mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8102] Simplify code base at new root method WorldObject::CleanupsBeforeDelete
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls * Create Gameobject version to make GO with owner more safe for remove
This commit is contained in:
parent
dc10620148
commit
9f41772828
15 changed files with 19 additions and 32 deletions
|
|
@ -1053,6 +1053,10 @@ WorldObject::WorldObject()
|
|||
{
|
||||
}
|
||||
|
||||
void WorldObject::CleanupsBeforeDelete()
|
||||
{
|
||||
}
|
||||
|
||||
void WorldObject::_Create( uint32 guidlow, HighGuid guidhigh, uint32 mapid, uint32 phaseMask )
|
||||
{
|
||||
Object::_Create(guidlow, 0, guidhigh);
|
||||
|
|
@ -1546,14 +1550,7 @@ Map const* WorldObject::GetBaseMap() const
|
|||
|
||||
void WorldObject::AddObjectToRemoveList()
|
||||
{
|
||||
Map* map = GetMap();
|
||||
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());
|
||||
return;
|
||||
}
|
||||
|
||||
map->AddObjectToRemoveList(this);
|
||||
GetMap()->AddObjectToRemoveList(this);
|
||||
}
|
||||
|
||||
Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue