Core/Maps: Fixed initializing instance free ids when compiled with WITH_COREDEBUG

Closes #19931

(cherry picked from commit 9d37c2b8eb)
This commit is contained in:
Shauren
2017-06-21 17:55:38 +02:00
committed by Carbenium
parent d73e4015d1
commit 37c3259de8

View File

@@ -338,7 +338,7 @@ void MapManager::InitInstanceIds()
_nextInstanceId = 1;
if (QueryResult result = CharacterDatabase.Query("SELECT IFNULL(MAX(id), 0) FROM instance"))
_freeInstanceIds.resize((*result)[0].GetUInt32() + 2, true); // make space for one extra to be able to access [_nextInstanceId] index in case all slots are taken
_freeInstanceIds.resize((*result)[0].GetUInt64() + 2, true); // make space for one extra to be able to access [_nextInstanceId] index in case all slots are taken
else
_freeInstanceIds.resize(_nextInstanceId + 1, true);