From e9091134a86f34b5c97a55b6635e45c7585290cf Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 4 May 2009 17:29:19 -0500 Subject: [PATCH] [7757] Not remove auras required for casting warrior enrage aura state at this state lost. Author: VladimirMangos --HG-- branch : trunk --- src/game/Unit.cpp | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index bdb99cef05..85190ed22f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8033,24 +8033,28 @@ void Unit::ModifyAuraState(AuraState flag, bool apply) if (HasFlag(UNIT_FIELD_AURASTATE,1<<(flag-1))) { RemoveFlag(UNIT_FIELD_AURASTATE, 1<<(flag-1)); - Unit::AuraMap& tAuras = GetAuras(); - for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end();) - { - SpellEntry const* spellProto = (*itr).second->GetSpellProto(); - if (spellProto->CasterAuraState == flag) - { - // exceptions (applied at state but not removed at state change) - // Rampage - if(spellProto->SpellIconID==2006 && spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && spellProto->SpellFamilyFlags[0]==0x100000) - { - ++itr; - continue; - } - RemoveAura(itr); + if (flag != AURA_STATE_ENRAGE) // enrage aura state triggering continues auras + { + Unit::AuraMap& tAuras = GetAuras(); + for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end();) + { + SpellEntry const* spellProto = (*itr).second->GetSpellProto(); + if (spellProto->CasterAuraState == flag) + { + // exceptions (applied at state but not removed at state change) + // Rampage + if(spellProto->SpellIconID==2006 && spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && spellProto->SpellFamilyFlags[0]==0x100000) + { + ++itr; + continue; + } + + RemoveAura(itr); + } + else + ++itr; } - else - ++itr; } } }