mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[10113] Some cleanups in Instance loading code.
* Remove reduncent chekc and args for MapInstanced::CreateInstance(const uint32 mapId, Player * player) * Rename for avoid name duplication raw InstanceMap creating to MapInstanced::CreateInstanceMap * Move lookup code of player/group bounde instance save to Player::GetBoundInstanceSaveForSelfOrGroup
This commit is contained in:
parent
3eb2d2910e
commit
6f4481a591
6 changed files with 50 additions and 45 deletions
|
|
@ -120,7 +120,8 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj)
|
|||
//if(!obj->IsInWorld()) sLog.outError("GetMap: called for map %d with object (typeid %d, guid %d, mapid %d, instanceid %d) who is not in world!", id, obj->GetTypeId(), obj->GetGUIDLow(), obj->GetMapId(), obj->GetInstanceId());
|
||||
Map *m = _createBaseMap(id);
|
||||
|
||||
if (m && (obj->GetTypeId() == TYPEID_PLAYER) && m->Instanceable()) m = ((MapInstanced*)m)->CreateInstance(id, (Player*)obj);
|
||||
if (m && (obj->GetTypeId() == TYPEID_PLAYER) && m->Instanceable())
|
||||
m = ((MapInstanced*)m)->CreateInstance((Player*)obj);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue