fix(Core/Unit): Added bluewall AoE check (#17064)

* Added bluewall AoE check

- AoE spells/abilities done by non-flagged players now has no effect on pvp flagged players.

* Crash fix

* Update Unit.cpp

Allow spells with flag "SPELL_ATTR5_IGNORE_AREA_EFFECT_PVP_CHECK" to pass this check.
This commit is contained in:
AG
2023-09-20 22:48:23 +02:00
committed by GitHub
parent 0e7d49529b
commit 540eda2af9

View File

@@ -13956,6 +13956,9 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
// additional checks - only PvP case // additional checks - only PvP case
if (playerAffectingAttacker && playerAffectingTarget) if (playerAffectingAttacker && playerAffectingTarget)
{ {
if (!IsPvP() && bySpell && bySpell->IsAffectingArea() && !bySpell->HasAttribute(SPELL_ATTR5_IGNORE_AREA_EFFECT_PVP_CHECK))
return false;
if (target->IsPvP()) if (target->IsPvP())
return true; return true;