Core/Spells: Implemented SPELL_ATTR9_TARGET_MUST_BE_GROUNDED
Port From (https://github.com/TrinityCore/TrinityCore/commit/dd61ba2844fc96b3344183fe0b05ce65985fa8be)
This commit is contained in:
@@ -1976,7 +1976,7 @@ namespace Framework.Constants
|
|||||||
DoNotAddToUnlearnList = 0x80, // NYI - unlearn list not maintained SMSG_SEND_UNLEARN_SPELLS always empty // Do Not Add to Unlearn List
|
DoNotAddToUnlearnList = 0x80, // NYI - unlearn list not maintained SMSG_SEND_UNLEARN_SPELLS always empty // Do Not Add to Unlearn List
|
||||||
CooldownIgnoresRangedWeapon = 0x100, // Cooldown Ignores Ranged Weapon
|
CooldownIgnoresRangedWeapon = 0x100, // Cooldown Ignores Ranged Weapon
|
||||||
NotInArena = 0x200, // 9 Not In Arena
|
NotInArena = 0x200, // 9 Not In Arena
|
||||||
Unk10 = 0x400, // 10
|
TargetMustBeGrounded = 0x400, // Target Must Be Grounded
|
||||||
Unk11 = 0x800, // 11
|
Unk11 = 0x800, // 11
|
||||||
Unk12 = 0x1000, // 12
|
Unk12 = 0x1000, // 12
|
||||||
Slam = 0x2000, // 13
|
Slam = 0x2000, // 13
|
||||||
|
|||||||
@@ -1079,6 +1079,11 @@ namespace Game.Spells
|
|||||||
if (HasAttribute(SpellAttr3.NotOnAoeImmune))
|
if (HasAttribute(SpellAttr3.NotOnAoeImmune))
|
||||||
if (unitTarget.GetSpellOtherImmunityMask().HasFlag(SpellOtherImmunity.AoETarget))
|
if (unitTarget.GetSpellOtherImmunityMask().HasFlag(SpellOtherImmunity.AoETarget))
|
||||||
return SpellCastResult.BadTargets;
|
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
|
// corpse specific target checks
|
||||||
else if (target.IsTypeId(TypeId.Corpse))
|
else if (target.IsTypeId(TypeId.Corpse))
|
||||||
|
|||||||
Reference in New Issue
Block a user