diff options
author | megamage <none@none> | 2008-12-24 11:12:34 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-24 11:12:34 -0600 |
commit | 4a917033c5da12c838d47bff6798434a1698655a (patch) | |
tree | 0ab55bb888b09f2393b948b18a15987d0800b836 /src | |
parent | 5b2636c35474cd366348eae5dcfe3f333931d02e (diff) |
*Fix the bug that boss is stunned by proc stun aura.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 123dbbcf2eb..86d1d23be75 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13003,17 +13003,23 @@ void Unit::GetPartyMember(std::list<Unit*> &TagUnitMap, float radius) void Unit::AddAura(uint32 spellId, Unit* target) { - if(!target) + if(!target || !target->isAlive()) return; SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); if(!spellInfo) return; + if (target->IsImmunedToSpell(spellInfo)) + return; + for(uint32 i = 0; i < 3; ++i) { 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) { Aura *Aur = CreateAura(spellInfo, i, NULL, this, this); |