aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2010-01-18 18:42:36 +0100
committerQAston <none@none>2010-01-18 18:42:36 +0100
commit9a7746c9fcfe97edb044bde559b14d09d12f8e13 (patch)
tree320a6b34bd163aa605eb03b7fbb98e6dd248885b /src/game/ObjectMgr.cpp
parent844c09fc6153f99247318d521e68a47ba4d7d094 (diff)
*Add some debug info to trac reason of assertion fail in Unit destructor.
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 7c2c2e6a658..b1da7a6ae94 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -1470,6 +1470,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
Creature *creature = new Creature;
if(!creature->LoadFromDB(guid, map))
{
+ creature->CleanupsBeforeDelete();
sLog.outError("AddCreature: cannot add creature entry %u to map", guid);
delete creature;
return false;
@@ -1521,6 +1522,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 team, uint32 mapId, float x, f
Creature* creature = new Creature;
if(!creature->LoadFromDB(guid, map))
{
+ creature->CleanupsBeforeDelete();
sLog.outError("AddCreature: cannot add creature entry %u to map", entry);
delete creature;
return 0;