Core/Groups: Reuse group guids to stop endless growth

This commit is contained in:
leak committed 2011-02-22 23:49:57 +01:00
1 parent 44fc35bb07
commit b27735b590
3 files changed
+59 -14

No files matched your search

+6
View File
@@ -635,6 +635,12 @@ void Group::Disband(bool hideDestroy /* = false */)
CharacterDatabase.CommitTransaction(trans);
ResetInstances(INSTANCE_RESET_GROUP_DISBAND, false, NULL);
ResetInstances(INSTANCE_RESET_GROUP_DISBAND, true, NULL);
// If the deleted group guid is lower than the one we have stored for the next group creation,
// use this one instead.
if (lowguid < sObjectMgr->GetNextGroupGuid())
sObjectMgr->SetNextGroupGuid(lowguid);
}
sObjectMgr->RemoveGroup(this);