本文整理汇总了C#中ISpell.OnCastInTown方法的典型用法代码示例。如果您正苦于以下问题:C# ISpell.OnCastInTown方法的具体用法?C# ISpell.OnCastInTown怎么用?C# ISpell.OnCastInTown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISpell
的用法示例。
在下文中一共展示了ISpell.OnCastInTown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnBeginSpellCast
public override bool OnBeginSpellCast( Mobile m, ISpell s )
{
if ( !s.OnCastInTown( this ) )
{
m.SendLocalizedMessage( 500946 ); // You cannot cast this in town!
return false;
}
return base.OnBeginSpellCast( m, s );
}
示例2: OnBeginSpellCast
public override bool OnBeginSpellCast(Mobile from, ISpell s)
{
if (!s.OnCastInTown(this) || s is TeleportSpell || s is MassDispelSpell || s is Server.Spells.Chivalry.DispelEvilSpell || s is MassCurseSpell || s is DispelSpell || s is FireFieldSpell || s is PoisonFieldSpell || s is WallOfStoneSpell || s is DispelFieldSpell || s is ParalyzeFieldSpell || s is EnergyFieldSpell )
{
from.SendMessage("You cannot cast that spell here.");
return false;
}
return base.OnBeginSpellCast(from, s);
}
示例3: OnBeginSpellCast
public override bool OnBeginSpellCast( Mobile m, ISpell s )
{
if ( !IsDisabled() && !s.OnCastInTown( this ) )
{
//m.SendLocalizedMessage( 500946 ); // You cannot cast this in town!
m.SendAsciiMessage("You cannot cast this in town!");
return false;
}
return base.OnBeginSpellCast( m, s );
}