Core/Spells: Implemented SPELL_ATTR9_TARGET_MUST_BE_GROUNDED

Port From (https://github.com/TrinityCore/TrinityCore/commit/dd61ba2844fc96b3344183fe0b05ce65985fa8be)
This commit is contained in:
Hondacrx
2024-08-25 23:54:10 -04:00
parent b3ffd700dd
commit 3ce314ef4b
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -1079,6 +1079,11 @@ namespace Game.Spells
if (HasAttribute(SpellAttr3.NotOnAoeImmune))
if (unitTarget.GetSpellOtherImmunityMask().HasFlag(SpellOtherImmunity.AoETarget))
return SpellCastResult.BadTargets;
if (HasAttribute(SpellAttr9.TargetMustBeGrounded) &&
(unitTarget.HasUnitMovementFlag(MovementFlag.Falling | MovementFlag.Swimming | MovementFlag.Flying | MovementFlag.Hover) ||
unitTarget.HasExtraUnitMovementFlag2(MovementFlags3.AdvFlying)))
return SpellCastResult.TargetNotGrounded;
}
// corpse specific target checks
else if (target.IsTypeId(TypeId.Corpse))