本文整理汇总了C#中Server.Mobiles.BaseCreature.Freeze方法的典型用法代码示例。如果您正苦于以下问题:C# BaseCreature.Freeze方法的具体用法?C# BaseCreature.Freeze怎么用?C# BaseCreature.Freeze使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.BaseCreature
的用法示例。
在下文中一共展示了BaseCreature.Freeze方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Summon
public static bool Summon(BaseCreature creature, bool controlled, Mobile caster, Point3D p, int sound, TimeSpan duration)
{
/* if ( caster.Followers + creature.ControlSlots > caster.FollowersMax )
{
caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
creature.Delete();
return false;
}*/
m_Summoning = true;
creature.RangeHome = 10;
creature.Summoned = true;
if (controlled)
{
creature.SetControlMaster(caster);
creature.SummonMaster = caster;
}
Container pack = creature.Backpack;
if (pack != null)
{
for (int i = pack.Items.Count - 1; i >= 0; --i)
{
if (i >= pack.Items.Count)
continue;
pack.Items[i].Delete();
}
}
new UnsummonTimer(caster, creature, duration).Start();
creature.m_SummonEnd = DateTime.Now + duration;
creature.MoveToWorld(p, caster.Map);
Effects.PlaySound(p, creature.Map, sound);
m_Summoning = false;
creature.Freeze(TimeSpan.FromSeconds(2));
creature.NextCombatTime = DateTime.Now + TimeSpan.FromSeconds(2);
return true;
}