fix(Core/Maps): fix pooled creature/GO respawn in instanced maps (#25826)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-05-14 09:58:16 -03:00
committed by GitHub
parent b1e226db96
commit 61e99f9c44

View File

@@ -2717,12 +2717,18 @@ void Map::ProcessRespawns()
void Map::ProcessCreatureRespawn(ObjectGuid::LowType spawnId)
{
// Pool members are handled entirely by PoolMgr
if (uint32 poolId = sPoolMgr->IsPartOfAPool<Creature>(spawnId))
// Pool members in non-instanced maps are handled entirely by PoolMgr.
// In instanced maps the pool system operates globally and Spawn1Object is
// a no-op for instanceable maps, so fall through to the normal per-instance
// respawn logic instead.
if (!Instanceable())
{
sPoolMgr->UpdatePool<Creature>(poolId, spawnId);
RemoveCreatureRespawnTime(spawnId);
return;
if (uint32 poolId = sPoolMgr->IsPartOfAPool<Creature>(spawnId))
{
sPoolMgr->UpdatePool<Creature>(poolId, spawnId);
RemoveCreatureRespawnTime(spawnId);
return;
}
}
CreatureData const* data = sObjectMgr->GetCreatureData(spawnId);
@@ -2778,12 +2784,16 @@ void Map::ProcessCreatureRespawn(ObjectGuid::LowType spawnId)
void Map::ProcessGameObjectRespawn(ObjectGuid::LowType spawnId)
{
// Pool members are handled entirely by PoolMgr
if (uint32 poolId = sPoolMgr->IsPartOfAPool<GameObject>(spawnId))
// Same rationale as ProcessCreatureRespawn: pool management via PoolMgr is
// only meaningful for non-instanced maps where Spawn1Object actually spawns.
if (!Instanceable())
{
sPoolMgr->UpdatePool<GameObject>(poolId, spawnId);
RemoveGORespawnTime(spawnId);
return;
if (uint32 poolId = sPoolMgr->IsPartOfAPool<GameObject>(spawnId))
{
sPoolMgr->UpdatePool<GameObject>(poolId, spawnId);
RemoveGORespawnTime(spawnId);
return;
}
}
GameObjectData const* data = sObjectMgr->GetGameObjectData(spawnId);