Core/Spells: Implemented SPELL_ATTR9_TARGET_MUST_BE_GROUNDED
Port From (https://github.com/TrinityCore/TrinityCore/commit/dd61ba2844fc96b3344183fe0b05ce65985fa8be)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user