*Set interrupt aura with remove cancel.
--HG-- branch : trunk
This commit is contained in:
+13
-1
@@ -572,7 +572,7 @@ void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except)
|
|||||||
sLog.outError("Aura %u is trying to remove itself! Flag %u. May cause crash!", (*iter)->GetId(), flag);
|
sLog.outError("Aura %u is trying to remove itself! Flag %u. May cause crash!", (*iter)->GetId(), flag);
|
||||||
else if(!except || (*iter)->GetId() != except)
|
else if(!except || (*iter)->GetId() != except)
|
||||||
{
|
{
|
||||||
RemoveAurasDueToSpell((*iter)->GetId());
|
RemoveAurasBySpell((*iter)->GetId(), AURA_REMOVE_BY_CANCEL);
|
||||||
if (!m_interruptableAuras.empty())
|
if (!m_interruptableAuras.empty())
|
||||||
next = m_interruptableAuras.begin();
|
next = m_interruptableAuras.begin();
|
||||||
else
|
else
|
||||||
@@ -4121,6 +4121,18 @@ void Unit::RemoveAura(uint32 spellId, uint32 effindex, Aura* except)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Unit::RemoveAurasBySpell(uint32 spellId, AuraRemoveMode removeMode)
|
||||||
|
{
|
||||||
|
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
|
||||||
|
{
|
||||||
|
Aura *aur = iter->second;
|
||||||
|
if (aur->GetId() == spellId)
|
||||||
|
RemoveAura(iter, removeMode);
|
||||||
|
else
|
||||||
|
++iter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Unit::RemoveAurasByCasterSpell(uint32 spellId, uint64 casterGUID, AuraRemoveMode removeMode)
|
void Unit::RemoveAurasByCasterSpell(uint32 spellId, uint64 casterGUID, AuraRemoveMode removeMode)
|
||||||
{
|
{
|
||||||
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
|
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
|
||||||
|
|||||||
+2
-1
@@ -1245,7 +1245,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
|||||||
void RemoveSingleAuraFromStack(uint32 spellId, uint32 effindex);
|
void RemoveSingleAuraFromStack(uint32 spellId, uint32 effindex);
|
||||||
void RemoveAurasDueToSpell(uint32 spellId, Aura* except = NULL);
|
void RemoveAurasDueToSpell(uint32 spellId, Aura* except = NULL);
|
||||||
void RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId);
|
void RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId);
|
||||||
void RemoveAurasByCasterSpell(uint32 spellId, uint64 casterGUID, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT);
|
void RemoveAurasBySpell(uint32 spellId, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||||
|
void RemoveAurasByCasterSpell(uint32 spellId, uint64 casterGUID, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||||
void RemoveAurasByCasterSpell(uint32 spellId, uint8 effindex, uint64 casterGUID, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT);
|
void RemoveAurasByCasterSpell(uint32 spellId, uint8 effindex, uint64 casterGUID, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT);
|
||||||
void RefreshAurasByCasterSpell(uint32 spellId, uint64 casterGUID);
|
void RefreshAurasByCasterSpell(uint32 spellId, uint64 casterGUID);
|
||||||
void SetAurasDurationByCasterSpell(uint32 spellId, uint64 casterGUID, int32 duration);
|
void SetAurasDurationByCasterSpell(uint32 spellId, uint64 casterGUID, int32 duration);
|
||||||
|
|||||||
Reference in New Issue
Block a user