mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 04:42:10 +01:00
Core/GameObject: Remove summoned game objects from the map after calling SetSpawnedByDefault(false) (#23120)
Closes #23115
(cherry picked from commit 5f04c829a8)
This commit is contained in:
@@ -919,11 +919,10 @@ void GameObject::Update(uint32 diff)
|
||||
if (!m_respawnDelayTime)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user