void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId) { Guard guard(*this); Map *m = _createBaseMap(mapid); if (m && m->Instanceable()) ((MapInstanced*)m)->DestroyInstance(instanceId); }
void MapManager::RemoveBonesFromMap(uint32 mapid, uint64 guid, float x, float y) { bool remove_result = _createBaseMap(mapid)->RemoveBones(guid, x, y); if (!remove_result) { sLog.outDebug("Bones %u not found in world. Delete from DB also.", GUID_LOPART(guid)); } }
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->GetTypeId() == TYPEID_PLAYER) && m->Instanceable()) m = ((MapInstanced*)m)->CreateInstance(id, (Player*)obj); return m; }
Map* MapManager::CreateBgMap(uint32 mapid, BattleGround* bg) { Map *m = _createBaseMap(mapid); ((MapInstanced*)m)->CreateBattleGroundMap(sMapMgr.GenerateInstanceId(), bg); return m; }
Map* MapManager::CreateBgMap(uint32 mapid, BattleGround* bg) { Map *m = _createBaseMap(mapid); ((MapInstanced*)m)->CreateBattleGroundMap(sObjectMgr.GenerateLowGuid(HIGHGUID_INSTANCE), bg); return m; }