Core/Instances: Fixed and optimized instance id reuse
This commit is contained in:
1 parent
bc1887c5df
commit
900a2da03d
3 files changed
+30
-46
No files matched your search
@@ -323,11 +323,6 @@ void InstanceSaveManager::LoadResetTimes()
|
||||
|
||||
uint32 instanceId = fields[0].GetUInt32();
|
||||
|
||||
// Instances are pulled in ascending order from db and nextInstanceId is initialized with 1,
|
||||
// so if the instance id is used, increment until we find the first unused one for a potential new instance
|
||||
if (sMapMgr->GetNextInstanceId() == instanceId)
|
||||
sMapMgr->SetNextInstanceId(instanceId + 1);
|
||||
|
||||
// Mark instance id as being used
|
||||
sMapMgr->RegisterInstanceId(instanceId);
|
||||
|
||||
|
||||
Reference in new issue
Block a user