public override bool CheckCast()
        {
            /*if ( Caster.Mounted )
             * {
             *      Caster.SendLocalizedMessage( 1042561 ); //Please dismount first.
             *      return false;
             * }
             * else */
            if (Factions.Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1010521);                   // You cannot polymorph while you have a Town Sigil
                return(false);
            }
            else if (TransformationSpellHelper.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1061633);                   // You cannot polymorph while in that form.
                return(false);

                /*}
                 * else if ( DisguiseTimers.IsDisguised( Caster ) )
                 * {
                 *      Caster.SendLocalizedMessage( 502167 ); // You cannot polymorph while disguised.
                 *      return false;*/
            }
            else if (Caster.BodyMod == 183 || Caster.BodyMod == 184)
            {
                Caster.SendLocalizedMessage(1042512);                   // You cannot polymorph while wearing body paint
                return(false);
            }
            else if (!Caster.CanBeginAction(typeof(PolymorphSpell)))
            {
                if (Core.ML)
                {
                    EndPolymorph(Caster);
                }
                else
                {
                    Caster.SendLocalizedMessage(1005559);                       // This spell is already in effect.
                }
                return(false);
            }
            else if (m_NewBody == 0)
            {
                Gump gump;
                if (Core.SE)
                {
                    gump = new NewPolymorphGump(Caster, Scroll);
                }
                else
                {
                    gump = new PolymorphGump(Caster, Scroll);
                }

                Caster.SendGump(gump);
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        public override bool CheckCast()
        {
            if (Caster.Flying)
            {
                Caster.SendLocalizedMessage(1113415); // You cannot use this ability while flying.
                return(false);
            }
            if (Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1010521); // You cannot polymorph while you have a Town Sigil
                return(false);
            }
            if (TransformationSpellHelper.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1061633); // You cannot polymorph while in that form.
                return(false);
            }
            if (DisguiseTimers.IsDisguised(Caster))
            {
                Caster.SendLocalizedMessage(502167); // You cannot polymorph while disguised.
                return(false);
            }
            if (Caster.BodyMod == 183 || Caster.BodyMod == 184)
            {
                Caster.SendLocalizedMessage(1042512); // You cannot polymorph while wearing body paint
                return(false);
            }
            if (!Caster.CanBeginAction(typeof(PolymorphSpell)))
            {
                if (Core.ML)
                {
                    EndPolymorph(Caster);
                }
                else
                {
                    Caster.SendLocalizedMessage(1005559); // This spell is already in effect.
                }
                return(false);
            }
            if (m_NewBody == 0)
            {
                Gump gump;
                if (Core.SE)
                {
                    gump = new NewPolymorphGump(Caster, Scroll);
                }
                else
                {
                    gump = new PolymorphGump(Caster, Scroll);
                }

                Caster.SendGump(gump);
                return(false);
            }

            return(true);
        }
Beispiel #3
0
        public override bool CheckCast()
        {
            if (Caster.Flying)
            {
                Caster.SendLocalizedMessage(1113415); // You cannot use this ability while flying.
                return(false);
            }
            else if (TransformationSpellHelper.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1061633); // You cannot polymorph while in that form.
                return(false);
            }
            else if (DisguiseTimers.IsDisguised(Caster))
            {
                Caster.SendLocalizedMessage(502167); // You cannot polymorph while disguised.
                return(false);
            }
            else if (Caster.BodyMod == 183 || Caster.BodyMod == 184)
            {
                Caster.SendLocalizedMessage(1042512); // You cannot polymorph while wearing body paint
                return(false);
            }
            else if (!Caster.CanBeginAction(typeof(PolymorphSpell)))
            {
                EndPolymorph(Caster);
                return(false);
            }
            else if (m_NewBody == 0)
            {
                Gump gump = new NewPolymorphGump(Caster, Scroll);

                Caster.SendGump(gump);
                return(false);
            }

            return(true);
        }