From 15d449c161a350df84730af9e6ed35c2eb4c47a7 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Mon, 4 May 2009 14:09:10 +0400 Subject: [PATCH] [7757] Not remove auras required for casting warrior enrage aura state at this state lost. --- src/game/Unit.cpp | 36 ++++++++++++++++++++---------------- src/shared/revision_nr.h | 2 +- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a4a126c21..a58c85b66 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7319,24 +7319,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==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==0x100000) + { + ++itr; + continue; + } + + RemoveAura(itr); + } + else + ++itr; } - else - ++itr; } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 27cc5c0f1..08398c04b 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 "7756" + #define REVISION_NR "7757" #endif // __REVISION_NR_H__