Core/Spells: Update some targeting related attribute definitions to make them more clear and consistent.

This commit is contained in:
QAston
2011-08-16 16:06:21 +02:00
parent 8ae5750c15
commit 73bbc3aca8
7 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -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);