mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[10640] Implement instance guids with proper HIGHGUID_INSTANCE use.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
365c4a19e0
commit
d53fe93e9d
12 changed files with 28 additions and 27 deletions
|
|
@ -55,7 +55,6 @@ void
|
|||
MapManager::Initialize()
|
||||
{
|
||||
InitStateMachine();
|
||||
InitMaxInstanceId();
|
||||
}
|
||||
|
||||
void MapManager::InitStateMachine()
|
||||
|
|
@ -129,7 +128,7 @@ Map* MapManager::CreateMap(uint32 id, const WorldObject* obj)
|
|||
Map* MapManager::CreateBgMap(uint32 mapid, BattleGround* bg)
|
||||
{
|
||||
Map *m = _createBaseMap(mapid);
|
||||
((MapInstanced*)m)->CreateBattleGroundMap(sMapMgr.GenerateInstanceId(), bg);
|
||||
((MapInstanced*)m)->CreateBattleGroundMap(sObjectMgr.GenerateLowGuid(HIGHGUID_INSTANCE), bg);
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
@ -290,18 +289,6 @@ void MapManager::UnloadAll()
|
|||
}
|
||||
}
|
||||
|
||||
void MapManager::InitMaxInstanceId()
|
||||
{
|
||||
i_MaxInstanceId = 0;
|
||||
|
||||
QueryResult *result = CharacterDatabase.Query( "SELECT MAX(id) FROM instance" );
|
||||
if( result )
|
||||
{
|
||||
i_MaxInstanceId = result->Fetch()[0].GetUInt32();
|
||||
delete result;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 MapManager::GetNumInstances()
|
||||
{
|
||||
uint32 ret = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue