*Make sure that any aura (in case of aura remove linked auras for example) won't survive Unit::RemoveAllAuras.
--HG-- branch : trunk
This commit is contained in:
@@ -179,4 +179,4 @@ bool DynamicObject::isVisibleForInState(Player const* u, bool inVisibleList) con
|
||||
{
|
||||
return IsInWorld() && u->IsInWorld()
|
||||
&& (IsWithinDistInMap(u->m_seer,World::GetMaxVisibleDistanceForObject()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f), false));
|
||||
}␍
|
||||
}
|
||||
|
||||
+1
-1
@@ -2440,7 +2440,7 @@ void Map::RemoveAllObjectsInRemoveList()
|
||||
case TYPEID_UNIT:
|
||||
// in case triggered sequence some spell can continue casting after prev CleanupsBeforeDelete call
|
||||
// make sure that like sources auras/etc removed before destructor start
|
||||
((Creature*)obj)->CleanupsBeforeDelete ();
|
||||
((Creature*)obj)->CleanupsBeforeDelete();
|
||||
Remove((Creature*)obj,true);
|
||||
break;
|
||||
default:
|
||||
|
||||
+9
-6
@@ -4279,13 +4279,16 @@ void Unit::RemoveAreaAurasDueToLeaveWorld()
|
||||
|
||||
void Unit::RemoveAllAuras()
|
||||
{
|
||||
AuraApplicationMap::iterator aurAppIter = m_appliedAuras.begin();
|
||||
while (!m_appliedAuras.empty())
|
||||
_UnapplyAura(aurAppIter, AURA_REMOVE_BY_DEFAULT);
|
||||
while (!m_appliedAuras.empty() || !m_ownedAuras.empty())
|
||||
{
|
||||
AuraApplicationMap::iterator aurAppIter = m_appliedAuras.begin();
|
||||
while (!m_appliedAuras.empty())
|
||||
_UnapplyAura(aurAppIter, AURA_REMOVE_BY_DEFAULT);
|
||||
|
||||
AuraMap::iterator aurIter = m_ownedAuras.begin();
|
||||
while (!m_ownedAuras.empty())
|
||||
RemoveOwnedAura(aurIter);
|
||||
AuraMap::iterator aurIter = m_ownedAuras.begin();
|
||||
while (!m_ownedAuras.empty())
|
||||
RemoveOwnedAura(aurIter);
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveArenaAuras(bool onleave)
|
||||
|
||||
+1
-1
@@ -1545,7 +1545,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
AuraMap const& GetOwnedAuras() const { return m_ownedAuras; }
|
||||
|
||||
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||
void RemoveOwnedAura(uint32 spellId, uint64 caster, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||
void RemoveOwnedAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||
void RemoveOwnedAura(Aura * aura, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||
|
||||
Aura * GetOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint8 reqEffMask = 0) const;
|
||||
|
||||
Reference in New Issue
Block a user