Exemple #1
0
            public override bool CheckCast()
            {
                if (!CheckFlyingAllowed(Caster, true))
                {
                    return(false);
                }
                else if (!Caster.Alive)
                {
                    Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1113082);                       // You may not fly while dead.
                }
                else if (Caster.IsBodyMod && !VampiricEmbraceSpell.UnderEffect(Caster))
                {
                    Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1112453);                       // You can't fly in your current form!
                }
                else
                {
                    if (Caster is PlayerMobile)
                    {
                        ((PlayerMobile)Caster).Flying = true;
                    }

                    Caster.Animate(0x9);
                    return(true);
                }

                return(false);
            }
Exemple #2
0
        public override bool CheckCast()
        {
            if (!CheckFlyingAllowed(Caster, true))
            {
                return(false);
            }
            else if (!Caster.Alive)
            {
                Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1113082); // You may not fly while dead.
            }
            else if (Factions.Sigil.ExistsOn(Caster))
            {
                Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
            }
            else if (!Caster.CanBeginAction(typeof(Seventh.PolymorphSpell)))
            {
                Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1112453); // You can't fly in your current form!
            }
            else if (Ninjitsu.AnimalForm.UnderTransformation(Caster) || Mysticism.StoneFormSpell.IsEffected(Caster) || (TransformationSpellHelper.UnderTransformation(Caster) &&
                                                                                                                        !TransformationSpellHelper.UnderTransformation(Caster, typeof(Spells.Necromancy.VampiricEmbraceSpell))) || (Caster.IsBodyMod && !Caster.Body.IsHuman))
            {
                Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1112453); // You can't fly in your current form!
            }
            else if (Server.Mobiles.BaseMount.CheckMountAllowed(Caster, true, true))
            {
                Caster.Flying = true;
                BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.Fly, 1112193, 1112567)); // Flying & You are flying.
                Caster.Animate(AnimationType.TakeOff, 0);

                return(true);
            }

            return(false);
        }
Exemple #3
0
 public override void OnCast()
 {
     Caster.Flying = false;
     BuffInfo.RemoveBuff(Caster, BuffIcon.Fly);
     Caster.Animate(60, 10, 1, true, false, 0);
     Caster.Flying = true;
     BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.Fly, 1112567));
     FinishSequence();
 }
Exemple #4
0
 public override void OnCast()
 {
     Caster.Flying = false;
     BuffInfo.RemoveBuff(Caster, BuffIcon.Fly);
     Caster.Animate(60, 10, 1, true, false, 0);
     Caster.SendLocalizedMessage(1112567); // You are flying.
     Caster.Flying = true;
     BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.Fly, 1112567));
     FinishSequence();
 }