Core/Misc: AddAura should allow adding auras to dead targets if spell is passive/can target dead targets

This commit is contained in:
Shocker
2011-04-09 19:49:45 +03:00
parent 0905538b32
commit 9efac6fe9f
+4 -1
View File
@@ -15926,13 +15926,16 @@ void Unit::GetPartyMembers(std::list<Unit*> &TagUnitMap)
Aura * Unit::AddAura(uint32 spellId, Unit *target)
{
if (!target || !target->isAlive())
if (!target)
return NULL;
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo)
return NULL;
if (!target->isAlive() && !(spellInfo->Attributes & SPELL_ATTR0_PASSIVE) && !(spellInfo->AttributesEx2 & SPELL_ATTR2_ALLOW_DEAD_TARGET))
return NULL;
return AddAura(spellInfo, MAX_EFFECT_MASK, target);
}