*Fix the bug that boss is stunned by proc stun aura.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-24 11:12:34 -06:00
parent 5b2636c354
commit 4a917033c5
+7 -1
View File
@@ -13003,17 +13003,23 @@ void Unit::GetPartyMember(std::list<Unit*> &TagUnitMap, float radius)
void Unit::AddAura(uint32 spellId, Unit* target) void Unit::AddAura(uint32 spellId, Unit* target)
{ {
if(!target) if(!target || !target->isAlive())
return; return;
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if(!spellInfo) if(!spellInfo)
return; return;
if (target->IsImmunedToSpell(spellInfo))
return;
for(uint32 i = 0; i < 3; ++i) for(uint32 i = 0; i < 3; ++i)
{ {
if(spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA) if(spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA)
{ {
if(target->IsImmunedToSpellEffect(spellInfo->Effect[i], spellInfo->EffectMechanic[i]))
continue;
if(spellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_CASTER) if(spellInfo->EffectImplicitTargetA[i] == TARGET_UNIT_CASTER)
{ {
Aura *Aur = CreateAura(spellInfo, i, NULL, this, this); Aura *Aur = CreateAura(spellInfo, i, NULL, this, this);