diff options
author | megamage <none@none> | 2009-05-04 17:29:19 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-04 17:29:19 -0500 |
commit | e9091134a86f34b5c97a55b6635e45c7585290cf (patch) | |
tree | 4ff120b1f20fca92508825120167d6f1b50b37d9 | |
parent | a5dcd0e7b239dc806aceaf5e2cc3a29a3de67817 (diff) |
[7757] Not remove auras required for casting warrior enrage aura state at this state lost. Author: VladimirMangos
--HG--
branch : trunk
-rw-r--r-- | src/game/Unit.cpp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index bdb99cef05a..85190ed22fd 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();) + + if (flag != AURA_STATE_ENRAGE) // enrage aura state triggering continues auras { - SpellEntry const* spellProto = (*itr).second->GetSpellProto(); - if (spellProto->CasterAuraState == flag) + Unit::AuraMap& tAuras = GetAuras(); + for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end();) { - // exceptions (applied at state but not removed at state change) - // Rampage - if(spellProto->SpellIconID==2006 && spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && spellProto->SpellFamilyFlags[0]==0x100000) + SpellEntry const* spellProto = (*itr).second->GetSpellProto(); + if (spellProto->CasterAuraState == flag) { - ++itr; - continue; - } + // 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); + RemoveAura(itr); + } + else + ++itr; } - else - ++itr; } } } |