Core/GameObject: Remove summoned game objects from the map after calling SetSpawnedByDefault(false)

Port From (https://github.com/TrinityCore/TrinityCore/commit/a99a60bcf36614c038efd33a1bd9e057935b3aaf)
This commit is contained in:
hondacrx
2021-11-29 16:18:00 -05:00
parent bc17b34ab7
commit f11a81c4b1
@@ -831,11 +831,10 @@ namespace Game.Entities
if (m_respawnDelayTime == 0)
return;
// ToDo: Decide if we should properly despawn these. Maybe they expect to be able to manually respawn from script?
if (!m_spawnedByDefault)
{
m_respawnTime = 0;
DestroyForNearbyPlayers(); // old UpdateObjectVisibility()
Delete();
return;
}