Core/GameObject: Remove summoned gobs properly from the map without effecting other cases

Port From (https://github.com/TrinityCore/TrinityCore/commit/a18808212e3f0e43dcb0ba099c003e45098c5dd9)
This commit is contained in:
hondacrx
2021-12-01 20:50:49 -05:00
parent 36f037db38
commit 3dd12575d9
@@ -831,17 +831,17 @@ namespace Game.Entities
if (m_respawnDelayTime == 0) if (m_respawnDelayTime == 0)
return; return;
if (m_spawnId == 0) if (m_spawnedByDefault && m_spawnId != 0)
{ {
m_respawnTime = 0; m_respawnTime = 0;
Delete(); DestroyForNearbyPlayers();
return; return;
} }
if (!m_spawnedByDefault) if (!m_spawnedByDefault)
{ {
m_respawnTime = 0; m_respawnTime = 0;
DestroyForNearbyPlayers(); Delete();
return; return;
} }