Core/Spells: Prevent creatures from being able to cast all their spells while moving

Port From (https://github.com/TrinityCore/TrinityCore/commit/f80f931e2bee9dbf08c3edee94d0c79dbbb64072)
This commit is contained in:
Hondacrx
2024-08-25 00:12:46 -04:00
parent a4baf73814
commit e936c7d099
2 changed files with 38 additions and 28 deletions
+1 -4
View File
@@ -3314,6 +3314,7 @@ namespace Game.Spells
}
[SpellEffectHandler(SpellEffectName.Reputation)]
[SpellEffectHandler(SpellEffectName.Reputation2)]
void EffectReputation()
{
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
@@ -3630,10 +3631,6 @@ namespace Game.Spells
if (unitTarget.HasUnitState(UnitState.Root | UnitState.Stunned))
return;
// Instantly interrupt non melee spells being casted
if (unitTarget.IsNonMeleeSpellCast(true))
unitTarget.InterruptNonMeleeSpells(true);
float ratio = 0.1f;
float speedxy = effectInfo.MiscValue * ratio;
float speedz = damage * ratio;