[7757] Not remove auras required for casting warrior enrage aura state at this state lost. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-04 17:29:19 -05:00
parent a5dcd0e7b2
commit e9091134a8
+20 -16
View File
@@ -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;
}
}
}