mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
Merge commit 'origin/master' into 320
Conflicts: src/game/Map.cpp src/game/MapInstanced.cpp src/game/Player.cpp src/game/SpellEffects.cpp src/game/Totem.cpp
This commit is contained in:
commit
1a47420fe8
43 changed files with 1208 additions and 714 deletions
|
|
@ -122,13 +122,13 @@ MapManager::_createBaseMap(uint32 id)
|
|||
return m;
|
||||
}
|
||||
|
||||
Map* MapManager::GetMap(uint32 id, const WorldObject* obj)
|
||||
Map* MapManager::CreateMap(uint32 id, const WorldObject* obj)
|
||||
{
|
||||
ASSERT(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 && m->Instanceable()) m = ((MapInstanced*)m)->GetInstance(obj);
|
||||
if (m && (obj->GetTypeId() == TYPEID_PLAYER) && m->Instanceable()) m = ((MapInstanced*)m)->CreateInstance(id, (Player*)obj);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue