mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 13:37:02 +00:00
[11050] Implement aura state AURA_STATE_BLEEDING (18)
Signed-off-by: zergtmn <zerg@myisp.com>
This commit is contained in:
parent
4ddedf0804
commit
a7bf12de71
3 changed files with 25 additions and 2 deletions
|
|
@ -8200,6 +8200,10 @@ void SpellAuraHolder::_AddSpellAuraHolder()
|
|||
// Enrage aura state
|
||||
if(m_spellProto->Dispel == DISPEL_ENRAGE)
|
||||
m_target->ModifyAuraState(AURA_STATE_ENRAGE, true);
|
||||
|
||||
// Bleeding aura state
|
||||
if (GetAllSpellMechanicMask(m_spellProto) & (1 << (MECHANIC_BLEED-1)))
|
||||
m_target->ModifyAuraState(AURA_STATE_BLEEDING, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8254,6 +8258,25 @@ void SpellAuraHolder::_RemoveSpellAuraHolder()
|
|||
if(m_spellProto->Dispel == DISPEL_ENRAGE)
|
||||
m_target->ModifyAuraState(AURA_STATE_ENRAGE, false);
|
||||
|
||||
// Bleeding aura state
|
||||
if (GetAllSpellMechanicMask(m_spellProto) & (1 << (MECHANIC_BLEED-1)))
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
Unit::SpellAuraHolderMap const& holders = m_target->GetSpellAuraHolderMap();
|
||||
for (Unit::SpellAuraHolderMap::const_iterator itr = holders.begin(); itr != holders.end(); ++itr)
|
||||
{
|
||||
if (GetAllSpellMechanicMask(itr->second->GetSpellProto()) & (1 << (MECHANIC_BLEED-1)))
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
m_target->ModifyAuraState(AURA_STATE_BLEEDING, false);
|
||||
}
|
||||
|
||||
uint32 removeState = 0;
|
||||
uint64 removeFamilyFlag = m_spellProto->SpellFamilyFlags;
|
||||
uint32 removeFamilyFlag2 = m_spellProto->SpellFamilyFlags2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue