Core/GameObject: Delete summoned gobs and DestroyForNearbyPlayers gobs spawned with negative spawn time once the gob is deactivated

Port From (https://github.com/TrinityCore/TrinityCore/commit/62d3010e56e018ffab0d3a0548d0b8ec51ab9964)
This commit is contained in:
hondacrx
2021-12-01 20:47:34 -05:00
parent 25b55bc348
commit 34144e11b0
@@ -831,13 +831,20 @@ namespace Game.Entities
if (m_respawnDelayTime == 0)
return;
if (!m_spawnedByDefault)
if (m_spawnId == 0)
{
m_respawnTime = 0;
Delete();
return;
}
if (!m_spawnedByDefault)
{
m_respawnTime = 0;
DestroyForNearbyPlayers();
return;
}
uint respawnDelay = m_respawnDelayTime;
uint scalingMode = WorldConfig.GetUIntValue(WorldCfg.RespawnDynamicMode);
if (scalingMode != 0)