diff --git a/Projects/UOContent/Items/Weapons/Abilities/InfusedThrow.cs b/Projects/UOContent/Items/Weapons/Abilities/InfusedThrow.cs index 785aa1b32..84f7b7580 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/InfusedThrow.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/InfusedThrow.cs @@ -1,5 +1,6 @@ using Server.Mobiles; using System; +using Server.Spells.Ninjitsu; namespace Server.Items; @@ -27,7 +28,7 @@ public class InfusedThrow : WeaponAbility IMount mount = defender.Mount; - if ((defender.Mounted || defender.Flying || Spells.Ninjitsu.AnimalForm.UnderTransformation(defender)) && + if ((defender.Mounted || defender.Flying || AnimalForm.UnderTransformation(defender)) && !attacker.Mounted && !attacker.Flying && defender is not ChaosDragoon && defender is not ChaosDragoonElite) { defender.PlaySound(0x140); diff --git a/Projects/UOContent/Misc/RegenRates.cs b/Projects/UOContent/Misc/RegenRates.cs index 045c18064..0d675474d 100644 --- a/Projects/UOContent/Misc/RegenRates.cs +++ b/Projects/UOContent/Misc/RegenRates.cs @@ -41,8 +41,6 @@ namespace Server.Misc m.CheckSkill(skill, n); } - private static bool CheckTransform(Mobile m, Type type) => TransformationSpellHelper.UnderTransformation(m, type); - private static TimeSpan Mobile_HitsRegenRate(Mobile from) { var points = AosAttributes.GetValue(from, AosAttribute.RegenHits); @@ -74,7 +72,7 @@ namespace Server.Misc points = 0; } - if (CheckTransform(from, typeof(HorrificBeastSpell))) + if (TransformationSpellHelper.UnderTransformation(from, typeof(HorrificBeastSpell))) { points += 20; } @@ -105,7 +103,7 @@ namespace Server.Misc var cappedPoints = AosAttributes.GetValue(from, AosAttribute.RegenStam); - if (CheckTransform(from, typeof(VampiricEmbraceSpell))) + if (TransformationSpellHelper.UnderTransformation(from, typeof(VampiricEmbraceSpell))) { cappedPoints += 15; } @@ -169,11 +167,11 @@ namespace Server.Misc var cappedPoints = AosAttributes.GetValue(from, AosAttribute.RegenMana); - if (CheckTransform(from, typeof(VampiricEmbraceSpell))) + if (TransformationSpellHelper.UnderTransformation(from, typeof(VampiricEmbraceSpell))) { cappedPoints += 3; } - else if (CheckTransform(from, typeof(LichFormSpell))) + else if (TransformationSpellHelper.UnderTransformation(from, typeof(LichFormSpell))) { cappedPoints += 13; }