mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
*Add unit to notify when unit is add to world (including load grid case).
*Add some check in remove object function. --HG-- branch : trunk
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user