Core/Maps: Fix a possible crash in ObjectGridStoper:Visit
Dump found here: http://pastebin.com/2GZ3t5v4
This commit is contained in:
@@ -280,13 +280,13 @@ ObjectGridStoper::Visit(CreatureMapType &m)
|
|||||||
// stop any fights at grid de-activation and remove dynobjects created at cast by creatures
|
// stop any fights at grid de-activation and remove dynobjects created at cast by creatures
|
||||||
for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
|
||||||
{
|
{
|
||||||
iter->getSource()->RemoveAllDynObjects();
|
|
||||||
if (iter->getSource()->isInCombat())
|
if (iter->getSource()->isInCombat())
|
||||||
{
|
{
|
||||||
iter->getSource()->CombatStop();
|
iter->getSource()->CombatStop();
|
||||||
iter->getSource()->DeleteThreatList();
|
iter->getSource()->DeleteThreatList();
|
||||||
iter->getSource()->AI()->EnterEvadeMode();
|
iter->getSource()->AI()->EnterEvadeMode(); // Calls RemoveAllAuras
|
||||||
}
|
}
|
||||||
|
iter->getSource()->RemoveAllDynObjects(); // Calls RemoveFromWorld, needs to be after RemoveAllAuras or we invalidate the Owner pointer of the aura
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user