本文整理汇总了C#中Mobile.IsPlayer方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.IsPlayer方法的具体用法?C# Mobile.IsPlayer怎么用?C# Mobile.IsPlayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mobile
的用法示例。
在下文中一共展示了Mobile.IsPlayer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnSkillUse
public override bool OnSkillUse(Mobile from, int Skill)
{
if (from.IsPlayer())
from.SendMessage("You may not use skills in jail.");
return (from.IsStaff());
}
示例2: AllowHousing
public override bool AllowHousing(Mobile from, Point3D p)
{
if (from.IsPlayer())
return false;
else
return base.AllowHousing(from, p);
}
示例3: OnMovement
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (this.TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
Effects.PlaySound(this.Location, this.Map, m_Sounds[Utility.Random(m_Sounds.Length)]);
base.OnMovement(m, oldLocation);
}
示例4: OnBeginSpellCast
public override bool OnBeginSpellCast(Mobile from, ISpell s)
{
if (from.IsPlayer())
from.SendLocalizedMessage(502629); // You cannot cast spells here.
return (from.IsStaff());
}
示例5: AllowHarmful
public override bool AllowHarmful(Mobile from, Mobile target)
{
if (from.IsPlayer())
from.SendMessage("You may not do that in jail.");
return (from.IsStaff());
}
示例6: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (from.IsPlayer())
{
from.SendMessage("Your not a Staff member, you may not wear this Item...");
this.Delete();
}
}
示例7: OnMovement
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (this.m_TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
{
this.PlaySound(m);
}
base.OnMovement(m, oldLocation);
}
示例8: OnMoveOver
}// Bone couch
public override bool OnMoveOver(Mobile m)
{
bool allow = base.OnMoveOver(m);
if (allow && m.Alive && m.Player && (m.IsPlayer() || !m.Hidden))
Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x547, 0x54A));
return allow;
}
示例9: OnEquip
public override bool OnEquip(Mobile from)
{
if (from.IsPlayer())
{
from.SendMessage("Your not a Staff member, you may not wear this Item...");
this.Delete();
}
return true;
}
示例10: OnLocationChanged
public override void OnLocationChanged(Mobile m, Point3D oldLocation)
{
base.OnLocationChanged(m, oldLocation);
this.StopTimer(m);
if (m.Player && m.Alive && m.IsPlayer())
this.StartTimer(m);
}
示例11: OnTarget
public override bool OnTarget(Mobile m, Target t, object o)
{
if (m.Spell != null && m.Spell is MarkSpell && m.IsPlayer())
{
m.SendLocalizedMessage(501800); // You cannot mark an object at that location.
return false;
}
return base.OnTarget(m, t, o);
}
示例12: OnMovement
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (this.TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
{
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, Utility.RandomMinMax(1073207, 1073216));
Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x5A, 0xE9));
}
base.OnMovement(m, oldLocation);
}
示例13: OnBeginSpellCast
public override bool OnBeginSpellCast(Mobile m, ISpell s)
{
if ((s is GateTravelSpell || s is RecallSpell || s is MarkSpell || s is SacredJourneySpell) && m.IsPlayer())
{
m.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
return false;
}
return base.OnBeginSpellCast(m, s);
}
示例14: OnBeginSpellCast
public override bool OnBeginSpellCast(Mobile m, ISpell s)
{
if ((s is GateTravelSpell || s is RecallSpell || s is MarkSpell || s is SacredJourneySpell) && m.IsPlayer())
{
m.SendMessage("You cannot cast that spell here.");
return false;
}
else
{
return base.OnBeginSpellCast(m, s);
}
}
示例15: OnMovement
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (this.TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
{
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, Utility.RandomList(1073326, 1073328, 1073329, 1073330, 1073331));
if (Utility.RandomBool())
Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x30A, 0x313));
else
Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x419, 0x422));
}
base.OnMovement(m, oldLocation);
}