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


C# Mobile.IsStaff方法代码示例

本文整理汇总了C#中Mobile.IsStaff方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.IsStaff方法的具体用法?C# Mobile.IsStaff怎么用?C# Mobile.IsStaff使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile的用法示例。


在下文中一共展示了Mobile.IsStaff方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DropToMobile

        public override bool DropToMobile(Mobile from, Mobile target, Point3D p)
        {
            bool ret = base.DropToMobile(from, target, p);

            if (ret && !this.Accepted && this.Parent != from.Backpack)
            {
                if (from.IsStaff())
                {
                    return true;
                }
                else if (!(from is PlayerMobile) || this.CanDrop((PlayerMobile)from))
                {
                    return true;
                }
                else
                {
                    from.SendLocalizedMessage(1049344); // You decide against trading the item.  You still need it for your quest.
                    return false;
                }
            }
            else
            {
                return ret;
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:25,代码来源:QuestItem.cs

示例2: 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

示例3: DropToItem

        public override bool DropToItem(Mobile from, Item target, Point3D p)
        {
            bool ret = base.DropToItem(from, target, p);

            if (ret && !this.Accepted && this.Parent != from.Backpack)
            {
                if (from.IsStaff())
                {
                    return true;
                }
                else if (!(from is PlayerMobile) || this.CanDrop((PlayerMobile)from))
                {
                    return true;
                }
                else
                {
                    from.SendLocalizedMessage(1049343); // You can only drop quest items into the top-most level of your backpack while you still need them for your quest.
                    return false;
                }
            }
            else
            {
                return ret;
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:25,代码来源:QuestItem.cs

示例4: 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

示例5: 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

示例6: OnMoveInto

        public override bool OnMoveInto(Mobile m, Direction d, Point3D newLocation, Point3D oldLocation)
        {
            if (!base.OnMoveInto(m, d, newLocation, oldLocation))
                return false;

            if (m.IsStaff())
                return true;

            if (m is BaseCreature)
            {
                BaseCreature bc = m as BaseCreature;

                if (!bc.Controlled && !bc.Summoned)
                    return true;
            }

            if (this.m_Quest == null)
                return true;

            PlayerMobile player = m as PlayerMobile;

            if (player != null && player.Quest != null && player.Quest.GetType() == this.m_Quest &&
                (this.m_MinObjective == null || player.Quest.FindObjective(this.m_MinObjective) != null) &&
                (this.m_MaxObjective == null || player.Quest.FindObjective(this.m_MaxObjective) == null))
            {
                return true;
            }
            else
            {
                if (this.m_Message != 0)
                    m.SendLocalizedMessage(this.m_Message);

                return false;
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:35,代码来源:QuestNoEntryRegion.cs

示例7: OnEnter

        public override void OnEnter(Mobile m)
        {
            if (m == null || m is WandererOfTheVoid)
                return;

            if (m.IsStaff())
                return;

            if (this.Controller.Successful != null)
            {
                if (m is PlayerMobile)
                {
                    if (m == this.Controller.Successful)
                    {
                        return;
                    }
                }
                else if (m is BaseCreature)
                {
                    BaseCreature bc = (BaseCreature)m;
                    if ((bc.Controlled && bc.ControlMaster == this.Controller.Successful) || bc.Summoned)
                    {
                        return;
                    }
                }
            }
            Timer kick = new LeverPuzzleController.LampRoomKickTimer(m);
            kick.Start();
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:29,代码来源:LeverPuzzleRegions.cs

示例8: OnMoveOver

        public override bool OnMoveOver(Mobile m)
        {
            if (m.IsStaff())
                return true;

            bool sendMessage = m.Player;

            if (m is BaseCreature)
                m = ((BaseCreature)m).ControlMaster;

            PlayerMobile pm = m as PlayerMobile;

            if (pm != null)
            {
                QuestSystem qs = pm.Quest;

                if (qs is DarkTidesQuest)
                {
                    QuestObjective obj = qs.FindObjective(typeof(SpeakCavePasswordObjective));

                    if (obj != null && obj.Completed)
                    {
                        if (sendMessage)
                            m.SendLocalizedMessage(1060648); // With Horus' permission, you are able to pass through the barrier.

                        return true;
                    }
                }
            }

            if (sendMessage)
                m.SendLocalizedMessage(1060649, "", 0x66D); // Without the permission of the guardian Horus, the magic of the barrier prevents your passage.

            return false;
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:35,代码来源:CrystalCaveBarrier.cs

示例9: OnSkillUse

 public override bool OnSkillUse(Mobile m, int Skill) /* just in case */
 {
     if ((this.Controller.Successful == null) || (m.IsStaff() && m != this.Controller.Successful))
     {
         return false;
     }
     return true;
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:8,代码来源:LeverPuzzleRegions.cs

示例10: OnSnoop

        public override void OnSnoop(Mobile from)
        {
            if (from.IsStaff())
            {
                from.CloseGump(typeof(XmlQuestStatusGump));

                from.SendGump(new XmlQuestStatusGump(this, this.TitleString));
            }
        }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:9,代码来源:QuestHolder.cs

示例11: OnTrigger

        public override void OnTrigger(Mobile from)
        {
            if (from.IsStaff())
                return;

            Effects.SendLocationEffect(this.Location, this.Map, 0x1D99, 48, 2, this.GetEffectHue(), 0);

            if (from.Alive && this.CheckRange(from.Location, 0))
                Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), from, from, Utility.Dice(10, 7, 0));
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:10,代码来源:GiantSpikeTrap.cs

示例12: OnTrigger

        public override void OnTrigger(Mobile from)
        {
            if (!from.Alive || this.ItemID != 0x1125 || from.IsStaff())
                return;

            this.ItemID = 0x1126;
            Effects.PlaySound(this.Location, this.Map, 0x306);

            Spells.SpellHelper.Damage(TimeSpan.FromSeconds(0.5), from, from, Utility.Dice(2, 4, 0));

            Timer.DelayCall(TimeSpan.FromSeconds(2.0), new TimerCallback(OnMushroomReset));
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:12,代码来源:MushroomTrap.cs

示例13: OnMoveOver

        public override bool OnMoveOver(Mobile m)
        {
            if (m.IsStaff())
                return true;

            var pm = m as PlayerMobile;

            if (pm != null && pm.Profession == 4)
            {
                m.SendLocalizedMessage(1060188, "", 0x24); // The wicked may not enter!
                return false;
            }

            return base.OnMoveOver(m);
        }
开发者ID:rokann,项目名称:JustUO,代码行数:15,代码来源:VaultOfSecretsBarrier.cs

示例14: OnMoveOver

        public override bool OnMoveOver(Mobile m)
        {
            if (m.IsStaff())
                return true;

            // If the mobile is to the north of the barrier, allow him to pass
            if (this.Y >= m.Y)
                return true;

            if (m is BaseCreature)
            {
                Mobile master = ((BaseCreature)m).GetMaster();

                // Allow creatures to cross from the south to the north only if their master is near to the north
                if (master != null && this.Y >= master.Y && master.InRange(this, 4))
                    return true;
                else
                    return false;
            }

            PlayerMobile pm = m as PlayerMobile;

            if (pm != null)
            {
                EminosUndertakingQuest qs = pm.Quest as EminosUndertakingQuest;

                if (qs != null)
                {
                    SneakPastGuardiansObjective obj = qs.FindObjective(typeof(SneakPastGuardiansObjective)) as SneakPastGuardiansObjective;

                    if (obj != null)
                    {
                        if (m.Hidden)
                            return true; // Hidden ninjas can pass

                        if (!obj.TaughtHowToUseSkills)
                        {
                            obj.TaughtHowToUseSkills = true;
                            qs.AddConversation(new NeedToHideConversation());
                        }
                    }
                }
            }

            return false;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:46,代码来源:GuardianBarrier.cs

示例15: OnMoveInto

        public override bool OnMoveInto(Mobile m, Direction d, Point3D newLocation, Point3D oldLocation)
        {
            if (!base.OnMoveInto(m, d, newLocation, oldLocation))
                return false;

            if (m.IsStaff() || this.Contains(oldLocation))
                return true;
			
            if (m is PlayerMobile)
            {
                PlayerMobile pm = (PlayerMobile)m;

                if (pm.DuelContext != null)
                {
                    m.SendMessage("You may not enter this area while participating in a duel or a tournament.");
                    return false;
                }
            }

            return (Faction.Find(m, true, true) != null);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:21,代码来源:StrongholdRegion.cs


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