当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.IsPlayer方法代码示例

本文整理汇总了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());
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:Jail.cs

示例2: AllowHousing

 public override bool AllowHousing(Mobile from, Point3D p)
 {
     if (from.IsPlayer())
         return false;
     else
         return base.AllowHousing(from, p);
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:GreenAcres.cs

示例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);
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:TormentedMinotaurStatuette.cs

示例4: OnBeginSpellCast

        public override bool OnBeginSpellCast(Mobile from, ISpell s)
        {
            if (from.IsPlayer())
                from.SendLocalizedMessage(502629); // You cannot cast spells here.

            return (from.IsStaff());
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:Jail.cs

示例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());
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:Jail.cs

示例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();
     }
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:8,代码来源:StaffRing.cs

示例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);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:9,代码来源:BaseStatuette.cs

示例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;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:10,代码来源:BoneCouch.cs

示例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;
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:9,代码来源:StaffRing.cs

示例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);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:9,代码来源:DamagingRegion.cs

示例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);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:10,代码来源:HouseRaffleRegion.cs

示例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);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:10,代码来源:CollectionStatuettes.cs

示例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);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:11,代码来源:MondainRegion.cs

示例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);
     }
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:12,代码来源:GreenAcres.cs

示例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);
        }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:14,代码来源:Quotes.cs


注:本文中的Mobile.IsPlayer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。