CheckMountAllowed() 공개 정적인 메소드

public static CheckMountAllowed ( Server.Mobile mob ) : bool
mob Server.Mobile
리턴 bool
예제 #1
0
        public virtual bool Validate(Mobile from)
        {
            #region SA
            if (from.Race == Race.Gargoyle)
            {
                from.SendLocalizedMessage(1112281); // gargs can't mount
                return(false);
            }
            #endregion

            if (Parent == null)
            {
                from.SayTo(from, 1010095); // This must be on your person to use.
                return(false);
            }

            if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
            {
                // CheckIsUsableBy sends the message
                return(false);
            }

            if (!BaseMount.CheckMountAllowed(from, true))
            {
                // CheckMountAllowed sends the message
                return(false);
            }

            if (from.Mounted)
            {
                from.SendLocalizedMessage(1005583); // Please dismount first.
                return(false);
            }

            if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
                return(false);
            }

            if (from.HasTrade)
            {
                from.SendLocalizedMessage(1042317, "", 0x41); // You may not ride at this time
                return(false);
            }

            if ((from.Followers + FollowerSlots) > from.FollowersMax)
            {
                from.SendLocalizedMessage(1049679); // You have too many followers to summon your mount.
                return(false);
            }

            if (!DesignContext.Check(from))
            {
                // Check sends the message
                return(false);
            }

            return(true);
        }
예제 #2
0
        public virtual bool Validate(Mobile from)
        {
            if (Parent == null)
            {
                from.SayTo(from, 1010095); // This must be on your person to use.
                return(false);
            }
            else if (!BaseMount.CheckMountAllowed(from))
            {
                // CheckMountAllowed sends the message
                return(false);
            }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(1005583); // Please dismount first.
                return(false);
            }
            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
                return(false);
            }
            else if (from.HasTrade)
            {
                from.SendLocalizedMessage(1042317, "", 0x41); // You may not ride at this time
                return(false);
            }

            return(true);
        }
예제 #3
0
        public virtual bool Validate(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
                return(false);
            }
            else if (m_IsRewardItem && !Engines.VeteranRewards.RewardSystem.CheckIsUsableBy(from, this, null))
            {
                // CheckIsUsableBy sends the message
                return(false);
            }
            else if (!BaseMount.CheckMountAllowed(from, true))
            {
                // CheckMountAllowed sends the message
                return(false);
            }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(1005583);                   // Please dismount first.
                return(false);
            }
            else if (from.Race == Race.Gargoyle)
            {
                from.SendLocalizedMessage(1112281);                   // Gargoyles are unable to ride animals.
                return(false);
            }
            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(1061628);                   // You can't do that while polymorphed.
                return(false);
            }
            else if (from.HasTrade)
            {
                from.SendLocalizedMessage(1042317, "", 0x41);                   // You may not ride at this time
                return(false);
            }
            else if ((from.Followers + FollowerSlots) > from.FollowersMax)
            {
                from.SendLocalizedMessage(1049679);                   // You have too many followers to summon your mount.
                return(false);
            }
            else if (!DesignContext.Check(from))
            {
                // Check sends the message
                return(false);
            }

            return(true);
        }
예제 #4
0
        public virtual bool Validate(Mobile from)
        {
            if (Parent == null)
            {
                from.SayTo(from, 1010095);                  // This must be on your person to use.
                return(false);
            }
            else if (Parent != from.Backpack)
            {
                from.SendMessage("You cannot mount it unless it is in your main backpack!");
                return(false);
            }
            else if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
            {
            }
            else if (!BaseMount.CheckMountAllowed(from, true))
            {
            }
            else if (from.IsT2A)
            {
                from.SendMessage(61, "You cannot use this item in a T2A zone.");
            }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(1005583); // Please dismount first.
            }
            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
            }
            else if (from.HasTrade)
            {
                from.SendLocalizedMessage(1042317, "", 0x41); // You may not ride at this time
            }
            else if ((from.Followers + FollowerSlots) > from.FollowersMax)
            {
                from.SendLocalizedMessage(1049679); // You have too many followers to summon your mount.
            }
            else if (!Multis.DesignContext.Check(from))
            {
            }
            else
            {
                return(true);
            }

            return(false);
        }
예제 #5
0
        public virtual bool Validate(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
                return(false);
            }
            else if (!BaseMount.CheckMountAllowed(from, true))
            {
                // CheckMountAllowed sends the message
                return(false);
            }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(1005583);                   // Please dismount first.
                return(false);
            }
            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(1061628);                   // You can't do that while polymorphed.
                return(false);
            }
            else if (from.HasTrade)
            {
                from.SendLocalizedMessage(1042317, "", 0x41);                   // You may not ride at this time
                return(false);
            }
            else if ((from.Followers + FollowerSlots) > from.FollowersMax)
            {
                from.SendLocalizedMessage(1049679);                   // You have too many followers to summon your mount.
                return(false);
            }
            else if (!Multis.DesignContext.Check(from))
            {
                // Check sends the message
                return(false);
            }

            return(true);
        }
예제 #6
0
        public virtual bool Validate(Mobile from)
        {
            if (Parent == null)
            {
                from.SayTo(from, 1010095);                   // This must be on your person to use.
                return(false);
            }
            else if ((this is PaladinWarhorse) && (from.Skills[SkillName.Chivalry].Base < 100 || from.Karma < 0))
            {
                from.SendMessage("Only grandmaster knights may ride this holy steed.");
                return(false);
            }
            else if ((this is DeathKnightWarhorse) && (from.Skills[SkillName.Chivalry].Base < 100 || from.Karma > 0))
            {
                from.SendMessage("Only grandmaster death knights may ride this evil steed.");
                return(false);
            }
            else if ((this is NecroHorse) && (from.Skills[SkillName.Necromancy].Base < 100))
            {
                from.SendMessage("Only a grandmaster in necromancy may ride this undead steed.");
                return(false);
            }
            else if ((this is DaemonMount) && (from.Skills[SkillName.Necromancy].Base < 100) && (from.Skills[SkillName.Magery].Base < 100))
            {
                from.SendMessage("Only a grandmaster in necromancy and magery may ride this evil being.");
                return(false);
            }
            else if (m_IsRewardItem && !Engines.VeteranRewards.RewardSystem.CheckIsUsableBy(from, this, null))
            {
                // CheckIsUsableBy sends the message
                return(false);
            }
            else if (!BaseMount.CheckMountAllowed(from, true))
            {
                // CheckMountAllowed sends the message
                return(false);
            }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(1005583);                   // Please dismount first.
                return(false);
            }
            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(1061628);                   // You can't do that while polymorphed.
                return(false);
            }
            else if (from.HasTrade)
            {
                from.SendLocalizedMessage(1042317, "", 0x41);                   // You may not ride at this time
                return(false);
            }
            else if ((from.Followers + FollowerSlots) > from.FollowersMax)
            {
                from.SendLocalizedMessage(1049679);                   // You have too many followers to summon your mount.
                return(false);
            }
            else if (!Multis.DesignContext.Check(from))
            {
                // Check sends the message
                return(false);
            }

            return(true);
        }