aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/Unit.cpp30
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;
}
}
}