Core/Creature: Fix crash in DeleteFromDB

This commit is contained in:
hondacrx
2021-01-15 10:15:09 -05:00
parent fa689dac1e
commit 5b3dd1895f
+1 -1
View File
@@ -1521,7 +1521,7 @@ namespace Game.Entities
// then delete any active instances of the creature
var spawnMap = GetMap().GetCreatureBySpawnIdStore().LookupByKey(m_spawnId);
foreach (var creature in spawnMap)
foreach (var creature in spawnMap.ToList())
creature.AddObjectToRemoveList();
}