diff options
author | megamage <none@none> | 2009-04-08 17:23:57 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-08 17:23:57 -0500 |
commit | a7e04a252fc04988dea2072241ad8825db747e58 (patch) | |
tree | 686c5bc61de1ca0f01fafe4ec77f26c51f55fc6a /src/game/Object.cpp | |
parent | 0c2dd85c2c79dbeca289b8d420e573efe41cbc0b (diff) |
*Add unit to notify when unit is add to world (including load grid case).
*Add some check in remove object function.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r-- | src/game/Object.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 4159f05d4b8..4a485f9c489 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -97,6 +97,8 @@ Object::~Object( ) //DEBUG_LOG("Object desctr 1 check (%p)",(void*)this); delete [] m_uint32Values; delete [] m_uint32Values_mirror; + m_uint32Values = NULL; + m_uint32Values_mirror = NULL; //DEBUG_LOG("Object desctr 2 check (%p)",(void*)this); } } @@ -1567,7 +1569,9 @@ Map const* WorldObject::GetBaseMap() const void WorldObject::AddObjectToRemoveList() { - Map* map = MapManager::Instance().FindMap(GetMapId(), GetInstanceId()); + assert(m_uint32Values); + + Map* map = FindMap(); if(!map) { sLog.outError("Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).",GetTypeId(),GetEntry(),GetGUIDLow(),GetMapId()); |