diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 609b77f83..55b228730 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1305,13 +1305,18 @@ void Aura::HandleAddModifier(bool apply, bool Real) ((Player*)m_target)->AddSpellMod(m_spellmod, apply); - // reapply some passive spells after add/remove related spellmods - if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && (spellFamilyMask & UI64LIT(0x0000100000000000))) - { - m_target->RemoveAurasDueToSpell(45471); + // reaplly talents to own passive persistent auras + std::set affectedPassives; - if(apply) - m_target->CastSpell(m_target, 45471, true); + for(Unit::AuraMap::const_iterator itr = m_target->GetAuras().begin(); itr != m_target->GetAuras().end(); ++itr) + if (itr->second->IsPassive() && itr->second->IsPermanent() && + itr->second->GetCasterGUID() == m_target->GetGUID() && isAffectedOnSpell(itr->second->GetSpellProto())) + affectedPassives.insert(itr->second->GetId()); + + for(std::set::const_iterator set_itr = affectedPassives.begin(); set_itr != affectedPassives.end(); ++set_itr) + { + m_target->RemoveAurasDueToSpell(*set_itr); + m_target->CastSpell(m_target, *set_itr, true); } } void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 96c5f25bf..2bba88899 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8429" + #define REVISION_NR "8430" #endif // __REVISION_NR_H__