Esempio n. 1
0
        public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
        {
            m_Table.Remove(m);

            if (context.SpeedBoost)
            {
                m.ForcedRun = false;
            }

            SkillMod mod = context.Mod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            if (context.Type == typeof(BakeKitsune) || context.Type == typeof(GreyWolf))
            {
                m.Hits -= 20;
            }

            if (resetGraphics)
            {
                m.HueMod  = -1;
                m.BodyMod = 0;
            }

            BuffInfo.RemoveBuff(m, BuffIcon.AnimalForm);

            context.Timer.Stop();
        }
Esempio n. 2
0
        public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
        {
            m_Table.Remove(m);

            if (context.SpeedBoost)
            {
                m.Send(SpeedControl.Disable);
            }

            SkillMod mod = context.Mod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            mod = context.StealingMod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            if (resetGraphics)
            {
                m.HueMod  = -1;
                m.BodyMod = 0;
            }

            m.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);

            context.Timer.Stop();

            BuffInfo.RemoveBuff(m, BuffIcon.AnimalForm);
        }
Esempio n. 3
0
        public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
        {
            m_Table.Remove(m);

            #region Mondain's Legacy
            if (context.SpeedBoost)
            {
                if (m.Region is Server.Regions.TwistedWealdDesert)
                {
                    m.Send(SpeedControl.WalkSpeed);
                }
                else
                {
                    m.Send(SpeedControl.Disable);
                }
            }
            #endregion

            SkillMod mod = context.Mod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            if (resetGraphics)
            {
                m.HueMod  = -1;
                m.BodyMod = 0;
            }

            m.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);

            context.Timer.Stop();
        }
Esempio n. 4
0
        public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
        {
            m_Table.Remove(m);

            // Genova: suporte ao UO:ML.
            #region Mondain's Legacy
            if (context.SpeedBoost)
            {
                if (m.Region is Server.Regions.TwistedWealdDesert)
                {
                    m.Send(SpeedControl.WalkSpeed);
                }
                else
                {
                    m.Send(SpeedControl.Disable);
                }
            }
            #endregion

            SkillMod mod = context.Mod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            if (resetGraphics)
            {
                m.HueMod  = -1;
                m.BodyMod = 0;
            }

            context.Timer.Stop();
        }
Esempio n. 5
0
        public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
        {
            m_Table.Remove(m);

            if (context.SpeedBoost)
            {
                m.Send(SpeedControl.Disable);
            }

            SkillMod mod = context.Mod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            mod = context.StealingMod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            if (resetGraphics)
            {
                m.HueMod  = -1;
                m.BodyMod = 0;
                m.NameMod = null; // vinds retour au nom d'origine lorsque reprise de la forme humaine
            }

            m.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);

            context.Timer.Stop();
        }
Esempio n. 6
0
        public static void RemoveContext(Mobile m, bool resetGraphics)
        {
            AnimalFormContext context = GetContext(m);

            if (context != null)
            {
                RemoveContext(m, context, resetGraphics);
            }
        }
Esempio n. 7
0
        public static void AddContext(Mobile m, AnimalFormContext context)
        {
            m_Table[m] = context;

            if (context.Type == typeof(BakeKitsune) || context.Type == typeof(GreyWolf))
            {
                m.Hits += 20;
            }
        }
Esempio n. 8
0
        public static void OnLogin(LoginEventArgs e)
        {
            AnimalFormContext context = GetContext(e.Mobile);

            if (context != null && context.SpeedBoost)
            {
                e.Mobile.Send(SpeedControl.MountSpeed);
            }
        }
Esempio n. 9
0
        public static void OnLogin(Mobile m)
        {
            AnimalFormContext context = AnimalForm.GetContext(m);

            if (context != null && context.SpeedBoost)
            {
                m.Send(SpeedControl.MountSpeed);
            }
        }
Esempio n. 10
0
        public static void OnLogin(LoginEventArgs e)
        {
            AnimalFormContext context = AnimalForm.GetContext(e.Mobile);

            if (context != null && context.SpeedBoost)
            {
                e.Mobile.InvalidateSpeed();
            }
        }
Esempio n. 11
0
        public static void AddContext(Mobile m, AnimalFormContext context)
        {
            m_Table[m] = context;

            if (context.Type == typeof(MysticalFox) || context.Type == typeof(GreyWolf))
            {
                m.CheckStatTimers();
            }
        }
Esempio n. 12
0
        public static void AddContext(Mobile m, AnimalFormContext context)
        {
            m_Table[m] = context;

            if (context.Type == typeof(BakeKitsune) || context.Type == typeof(GreyWolf))
            {
                m.CheckStatTimers();
            }

            m.Delta(MobileDelta.WeaponDamage);
        }
Esempio n. 13
0
        public static void RemoveContext(Mobile m, bool resetGraphics)
        {
            AnimalFormContext context = GetContext(m);

            if (context != null)
            {
                RemoveContext(m, context, resetGraphics);
            }

            m.Delta(MobileDelta.WeaponDamage);
        }
Esempio n. 14
0
        public static void AddContext(Mobile m, AnimalFormContext context)
        {
            m_Table[m] = context;

            if (context.Type == typeof(BakeKitsune) || context.Type == typeof(GreyWolf) ||
                context.Type == typeof(Dog) || context.Type == typeof(Cat) || context.Type == typeof(WildWhiteTiger))
            {
                m.ResetStatTimers();
            }

            m.Delta(MobileDelta.WeaponDamage);
        }
Esempio n. 15
0
        public override void OnCast()
        {
            if (!Caster.CanBeginAction(typeof(PolymorphSpell)))
            {
                Caster.SendLocalizedMessage(1061628);                   // You can't do that while polymorphed.
            }
            else if (Necromancy.TransformationSpell.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1063219);                   // You cannot mimic an animal while in that form.
            }
            else if (!BaseMount.CheckMountAllowed(Caster, false))
            {
                Caster.SendLocalizedMessage(1063108);                   // You cannot use this ability right now.
            }
            else if (!Caster.CanBeginAction(typeof(IncognitoSpell)) || (Caster.IsBodyMod && GetContext(Caster) == null))
            {
                DoFizzle();
            }
            else if (CheckSequence())
            {
                AnimalFormContext context = GetContext(Caster);

                if (context != null)
                {
                    RemoveContext(Caster, context, true);

                    Effects.SendLocationParticles(EffectItem.Create(Caster.Location, Caster.Map, EffectItem.DefaultDuration), 0x3728, 1, 13, 0x7F3);

                    ConsumeMana();
                }
                else
                {
                    if (Caster.IsPlayer)
                    {
                        Caster.CloseGump(typeof(AnimalFormGump));
                        Caster.SendGump(new AnimalFormGump(Caster, m_Entries, this));
                    }
                    else
                    {
                        if (Morph(Caster, GetLastAnimalForm(Caster)) == MorphResult.Fail)
                        {
                            DoFizzle();
                        }
                        else
                        {
                            ConsumeMana();
                        }
                    }
                }
            }

            FinishSequence();
        }
Esempio n. 16
0
        public override void OnCast()
        {
            if (!Caster.CanBeginAction(typeof(PolymorphSpell)))
            {
                Caster.SendLocalizedMessage(1061628);                   // You can't do that while polymorphed.
            }
            else if (TransformationSpellHelper.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1063219);                   // You cannot mimic an animal while in that form.
            }
            else if (!Caster.CanBeginAction(typeof(IncognitoSpell)) || (Caster.IsBodyMod && GetContext(Caster) == null))
            {
                DoFizzle();
            }
            else if (CheckSequence())
            {
                AnimalFormContext context = GetContext(Caster);

                if (context != null)
                {
                    RemoveContext(Caster, context, true);
                }
                else if (Caster is PlayerMobile)
                {
                    if (GetLastAnimalForm(Caster) == -1 || DateTime.Now - Caster.LastMoveTime > Caster.ComputeMovementSpeed(Caster.Direction))
                    {
                        Caster.CloseGump(typeof(AnimalFormGump));
                        Caster.SendGump(new AnimalFormGump(Caster, m_Entries, this));
                    }
                    else
                    {
                        if (Morph(Caster, GetLastAnimalForm(Caster)) == MorphResult.Fail)
                        {
                            DoFizzle();
                        }
                    }
                }
                else
                {
                    if (Morph(Caster, GetLastAnimalForm(Caster)) == MorphResult.Fail)
                    {
                        DoFizzle();
                    }
                }
            }

            FinishSequence();
        }
Esempio n. 17
0
        public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
        {
            m_Table.Remove(m);

            if (context.SpeedBoost)
            {
                if (m.Region is Server.Regions.TwistedWealdDesert)
                {
                    m.SendSpeedControl(SpeedControlType.WalkSpeed);
                }
                else
                {
                    m.SendSpeedControl(SpeedControlType.Disable);
                }
            }

            SkillMod mod = context.Mod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            mod = context.StealingMod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            if (resetGraphics)
            {
                m.HueMod  = -1;
                m.BodyMod = 0;
            }

            m.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);

            context.Timer.Stop();

            BuffInfo.RemoveBuff(m, BuffIcon.AnimalForm);
            BuffInfo.RemoveBuff(m, BuffIcon.WhiteTigerForm);
        }
        public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
        {
            m_Table.Remove(m);

            if (context.SpeedBoost)
            {
                m.Send(SpeedControl.Disable);
            }

            SkillMod mod = context.Mod;

            if (mod != null)
            {
                m.RemoveSkillMod(mod);
            }

            if (resetGraphics)
            {
                m.HueMod  = -1;
                m.BodyMod = 0;
            }

            context.Timer.Stop();
        }
Esempio n. 19
0
        public static bool UnderTransformation(Mobile m, Type type)
        {
            AnimalFormContext context = GetContext(m);

            return(context != null && context.Type == type);
        }
Esempio n. 20
0
        public static void RemoveContext( Mobile m, AnimalFormContext context, bool resetGraphics )
        {
            m_Table.Remove( m );

            if ( context.SpeedBoost )
                m.Send( SpeedControl.Disable );

            SkillMod mod = context.Mod;

            if ( mod != null )
                m.RemoveSkillMod( mod );

            if ( resetGraphics )
            {
                m.HueMod = -1;
                m.BodyMod = 0;
            }

            context.Timer.Stop();
        }
Esempio n. 21
0
		public static void RemoveContext( Mobile m, AnimalFormContext context, bool resetGraphics )
		{
			m_Table.Remove( m );

			#region Mondain's Legacy
			if ( context.SpeedBoost )
			{
				if ( m.Region is Server.Regions.TwistedWealdDesert )
					m.Send( SpeedControl.WalkSpeed );
				else
					m.Send( SpeedControl.Disable );
			}
			#endregion

			SkillMod mod = context.Mod;

			if ( mod != null )
				m.RemoveSkillMod( mod );

			if ( resetGraphics )
			{
				m.HueMod = -1;
				m.BodyMod = 0;
			}

			m.FixedParticles( 0x3728, 10, 13, 2023, EffectLayer.Waist );

			context.Timer.Stop();
		}
Esempio n. 22
0
        public static bool UnderTransformationNotTalisman(Mobile m)
        {
            AnimalFormContext context = GetContext(m);

            return(context != null && !context.Type.IsSubclassOf(typeof(BaseFormTalisman)));
        }
Esempio n. 23
0
        public override void OnCast()
        {
            if (!Caster.CanBeginAction(typeof(PolymorphSpell)))
            {
                Caster.SendLocalizedMessage(1061628);                 // You can't do that while polymorphed.
            }
            else if (TransformationSpellHelper.UnderTransformation(Caster))
            {
                Caster.SendLocalizedMessage(1063219);                 // You cannot mimic an animal while in that form.
            }
            else if (!Caster.CanBeginAction(typeof(IncognitoSpell)) || (Caster.IsBodyMod && GetContext(Caster) == null))
            {
                DoFizzle();
            }
            else if (CheckSequence())
            {
                AnimalFormContext context = GetContext(Caster);

                int mana = ScaleMana(RequiredMana);
                if (mana > Caster.Mana)
                {
                    Caster.SendLocalizedMessage(1060174, mana.ToString());
                    // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
                }
                else if (context != null)
                {
                    RemoveContext(Caster, context, true);
                    Caster.Mana -= mana;
                }
                else if (Caster is PlayerMobile)
                {
                    bool skipGump = (m_WasMoving || CasterIsMoving());

                    if (GetLastAnimalForm(Caster) == -1 || !skipGump)
                    {
                        Caster.CloseGump(typeof(AnimalFormGump));
                        Caster.SendGump(new AnimalFormGump(Caster, m_Entries, this));
                    }
                    else
                    {
                        if (Morph(Caster, GetLastAnimalForm(Caster)) == MorphResult.Fail)
                        {
                            DoFizzle();
                        }
                        else
                        {
                            Caster.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);
                            Caster.Mana -= mana;
                        }
                    }
                }
                else
                {
                    if (Morph(Caster, GetLastAnimalForm(Caster)) == MorphResult.Fail)
                    {
                        DoFizzle();
                    }
                    else
                    {
                        Caster.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);
                        Caster.Mana -= mana;
                    }
                }
            }

            FinishSequence();
        }
Esempio n. 24
0
		public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
		{
			m_Table.Remove(m);

			if (context.SpeedBoost)
				m.Send(SpeedControl.Disable);

			SkillMod mod = context.Mod;

			if (mod != null)
				m.RemoveSkillMod(mod);

			mod = context.StealingMod;

			if (mod != null)
				m.RemoveSkillMod(mod);

			if (resetGraphics)
			{
				m.HueMod = -1;
				m.BodyMod = 0;
                m.NameMod = null; // vinds retour au nom d'origine lorsque reprise de la forme humaine
			}

			m.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);

			context.Timer.Stop();
		}
Esempio n. 25
0
		public static void AddContext(Mobile m, AnimalFormContext context)
		{
			m_Table[m] = context;

			if (context.Type == typeof(BakeKitsune) || context.Type == typeof(GreyWolf))
				m.CheckStatTimers();
		}
Esempio n. 26
0
        public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
        {
            m_Table.Remove(m);

            if (context.SpeedBoost)
                m.Send(SpeedControl.Disable);

            SkillMod mod = context.Mod;

            if (mod != null)
                m.RemoveSkillMod(mod);

            mod = context.StealingMod;

            if (mod != null)
                m.RemoveSkillMod(mod);

            if (resetGraphics)
            {
                m.HueMod = -1;
                m.BodyMod = 0;
            }

            m.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist);

            context.Timer.Stop();
        }
Esempio n. 27
0
        public static void RemoveContext( Mobile m, AnimalFormContext context, bool resetGraphics )
        {
            m_Table.Remove( m );

            if ( context.SpeedBoost )
                m.ForcedRun = false;

            SkillMod mod = context.Mod;

            if ( mod != null )
                m.RemoveSkillMod( mod );

            if ( context.Type == typeof( BakeKitsune ) || context.Type == typeof( GreyWolf ) )
                m.Hits -= 20;

            if ( resetGraphics )
            {
                m.HueMod = -1;
                m.BodyMod = 0;
            }

            BuffInfo.RemoveBuff( m, BuffIcon.AnimalForm );

            context.Timer.Stop();
        }