diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuras.cpp | 16 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 03274b4b74b..11e8abb2d08 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4163,17 +4163,7 @@ void AuraEffect::HandleAuraModStateImmunity(bool apply, bool Real) { if(apply && Real && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY) { - Unit::AuraEffectList const& auraList = m_target->GetAurasByType(AuraType(GetMiscValue())); - for(Unit::AuraEffectList::const_iterator itr = auraList.begin(); itr != auraList.end();) - { - if (auraList.front() != this) // skip itself aura (it already added) - { - m_target->RemoveAurasDueToSpell(auraList.front()->GetId()); - itr = auraList.begin(); - } - else - ++itr; - } + m_target->RemoveAurasByType(AuraType(GetMiscValue()), NULL , GetParentAura()); } m_target->ApplySpellImmune(GetId(),IMMUNITY_STATE,GetMiscValue(),apply); @@ -4198,7 +4188,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real) { uint32 school_mask = GetMiscValue(); Unit::AuraMap& Auras = m_target->GetAuras(); - for(Unit::AuraMap::iterator iter = Auras.begin(), next; iter != Auras.end();) + for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end();) { SpellEntry const *spell = iter->second->GetSpellProto(); if((GetSpellSchoolMask(spell) & school_mask)//Check for school mask @@ -4206,7 +4196,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(bool apply, bool Real) && !iter->second->IsPositive() //Don't remove positive spells && spell->Id != GetId() ) //Don't remove self { - m_target->RemoveAurasDueToSpell(spell->Id); + m_target->RemoveAura(iter); } else ++iter; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 16623c00b69..49904c8d7e4 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11524,7 +11524,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag } case SPELL_AURA_PROC_TRIGGER_DAMAGE: { - sLog.outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog.outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount() , spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask); uint32 damage = SpellDamageBonus(pTarget, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE); CalculateSpellDamageTaken(&damageInfo, damage, spellInfo); |