Core/Spells: Allow AOE spells to hit stealthed targets.

This commit is contained in:
QAston
2011-09-27 01:13:32 +02:00
parent a409cc226c
commit 75aeb15e90

View File

@@ -12366,8 +12366,8 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co
if (IsOnVehicle(target) || m_vehicle->GetBase()->IsOnVehicle(target))
return false;
// can't attack invisible
if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target))
// can't attack invisible (ignore stealth for aoe spells)
if ((!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_CAN_TARGET_INVISIBLE)) && !canSeeOrDetect(target, bySpell && bySpell->IsAOE()))
return false;
// can't attack dead