mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7757] Not remove auras required for casting warrior enrage aura state at this state lost.
This commit is contained in:
parent
255ed61a86
commit
15d449c161
2 changed files with 21 additions and 17 deletions
|
|
@ -7319,24 +7319,28 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
|
||||||
if (HasFlag(UNIT_FIELD_AURASTATE,1<<(flag-1)))
|
if (HasFlag(UNIT_FIELD_AURASTATE,1<<(flag-1)))
|
||||||
{
|
{
|
||||||
RemoveFlag(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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7756"
|
#define REVISION_NR "7757"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue