Core/Spells: Update some targeting related attribute definitions to make them more clear and consistent.
This commit is contained in:
@@ -12328,8 +12328,8 @@ bool Unit::canAttack(Unit const* target, bool force) const
|
||||
|
||||
bool Unit::isAttackableByAOE(SpellInfo const* spellProto) const
|
||||
{
|
||||
bool targetMustBeDead = spellProto ? bool(spellProto->AttributesEx3 & SPELL_ATTR3_REQUIRE_DEAD_TARGET) : false;
|
||||
bool targetCanBeDead = spellProto ? bool(spellProto->AttributesEx2 & SPELL_ATTR2_ALLOW_DEAD_TARGET) : false;
|
||||
bool targetMustBeDead = spellProto ? bool(spellProto->AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS) : false;
|
||||
bool targetCanBeDead = spellProto ? bool(spellProto->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD) : false;
|
||||
|
||||
if (targetMustBeDead && isAlive())
|
||||
return false;
|
||||
@@ -16329,7 +16329,7 @@ Aura* Unit::AddAura(uint32 spellId, Unit* target)
|
||||
if (!spellInfo)
|
||||
return NULL;
|
||||
|
||||
if (!target->isAlive() && !(spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(spellInfo->AttributesEx2 & SPELL_ATTR2_ALLOW_DEAD_TARGET))
|
||||
if (!target->isAlive() && !(spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(spellInfo->AttributesEx2 & SPELL_ATTR2_CAN_TARGET_DEAD))
|
||||
return NULL;
|
||||
|
||||
return AddAura(spellInfo, MAX_EFFECT_MASK, target);
|
||||
|
||||
Reference in New Issue
Block a user