--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-07-30 03:43:09 +02:00
2 changed files with 13 additions and 8 deletions
+12 -8
View File
@@ -4412,14 +4412,18 @@ void Unit::RemoveAreaAurasDueToLeaveWorld()
void Unit::RemoveAllAuras() void Unit::RemoveAllAuras()
{ {
AuraApplicationMap::iterator aurAppIter; // this may be a dead loop if some events on aura remove will continiously apply aura on remove
for (aurAppIter = m_appliedAuras.begin(); aurAppIter != m_appliedAuras.end();) // we want to have all auras removed, so use your brain when linking events
_UnapplyAura(aurAppIter, AURA_REMOVE_BY_DEFAULT); while (!m_appliedAuras.empty() || !m_ownedAuras.empty())
{
AuraMap::iterator aurIter; AuraApplicationMap::iterator aurAppIter;
for (aurIter = m_ownedAuras.begin(); aurIter != m_ownedAuras.end();) for (aurAppIter = m_appliedAuras.begin(); aurAppIter != m_appliedAuras.end();)
RemoveOwnedAura(aurIter); _UnapplyAura(aurAppIter, AURA_REMOVE_BY_DEFAULT);
AuraMap::iterator aurIter;
for (aurIter = m_ownedAuras.begin(); aurIter != m_ownedAuras.end();)
RemoveOwnedAura(aurIter);
}
} }
void Unit::RemoveArenaAuras(bool onleave) void Unit::RemoveArenaAuras(bool onleave)
+1
View File
@@ -6681,6 +6681,7 @@ SpellEvent::~SpellEvent()
{ {
sLog.outError("~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.", sLog.outError("~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
(m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUIDLow(), m_Spell->m_spellInfo->Id); (m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUIDLow(), m_Spell->m_spellInfo->Id);
ASSERT(false);
} }
} }