Core/Vmaps: Fixed crash in unloading vmaps

Port From (https://github.com/TrinityCore/TrinityCore/commit/622cec8a8fff031ff2d8f3e4c0ad4fb97971dd7d)
This commit is contained in:
hondacrx
2021-05-23 16:44:50 -04:00
parent 22e96b477b
commit 50c7682db6
+2 -1
View File
@@ -98,9 +98,10 @@ namespace Game.Collision
{
foreach (var id in iLoadedSpawns)
{
iTreeValues[id.Key].SetUnloaded();
for (uint refCount = 0; refCount < id.Key; ++refCount)
vm.ReleaseModelInstance(iTreeValues[id.Key].name);
iTreeValues[id.Key].SetUnloaded();
}
iLoadedSpawns.Clear();
iLoadedTiles.Clear();