Core/Spells: Allow AoE spells to target dead units.
Also removes some unneeded checks from ally targeting. --HG-- branch : trunk
This commit is contained in:
@@ -12094,9 +12094,9 @@ bool Unit::canAttack(Unit const* target, bool force) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Unit::isAttackableByAOE() const
|
||||
bool Unit::isAttackableByAOE(bool requireDeadTarget) const
|
||||
{
|
||||
if (!isAlive())
|
||||
if (isAlive() == requireDeadTarget)
|
||||
return false;
|
||||
|
||||
if (HasFlag(UNIT_FIELD_FLAGS,
|
||||
|
||||
@@ -1413,7 +1413,7 @@ class Unit : public WorldObject
|
||||
bool isFrozen() const;
|
||||
|
||||
bool isTargetableForAttack() const;
|
||||
bool isAttackableByAOE() const;
|
||||
bool isAttackableByAOE(bool requireDeadTarget = false) const;
|
||||
bool canAttack(Unit const* target, bool force = true) const;
|
||||
virtual bool IsInWater() const;
|
||||
virtual bool IsUnderWater() const;
|
||||
|
||||
Reference in New Issue
Block a user