fix(Core/Maps): exclude temporary spawns from dynamic respawn scaling (#26127)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-06-09 23:19:56 -03:00
committed by GitHub
parent 3891616eaf
commit 157e974751
+14 -1
View File
@@ -1732,12 +1732,25 @@ uint32 Map::ApplyDynamicModeRespawnScaling(WorldObject const* obj, uint32 respaw
if (obj->GetMap()->Instanceable())
return respawnDelay;
// No quest givers or world bosses
if (Creature const* creature = obj->ToCreature())
{
// Temporary spawns (no DB spawn id, e.g. summons / battlefield-spawned
// creatures such as Wintergrasp turrets) are not part of the respawn system.
if (!creature->GetSpawnId())
return respawnDelay;
// No quest givers or world bosses
if (creature->IsQuestGiver() || creature->isWorldBoss()
|| (creature->GetCreatureTemplate()->rank == CREATURE_ELITE_RARE)
|| (creature->GetCreatureTemplate()->rank == CREATURE_ELITE_RAREELITE))
return respawnDelay;
}
// Temporary gameobjects (no DB spawn id) are likewise excluded.
else if (GameObject const* go = obj->ToGameObject())
{
if (!go->GetSpawnId())
return respawnDelay;
}
auto it = _zonePlayerCountMap.find(obj->GetZoneId());
if (it == _zonePlayerCountMap.end())