Core/Spawns: prevent spawn groups from bypassing spawnMask restrictions (#26711)

* spawn groups have been able to spawn for all difficulties even when they should be restricted to a single difficulty only

(cherry picked from commit 48f63eda90)
This commit is contained in:
Ovah
2021-07-24 14:49:21 +02:00
committed by Shauren
parent 78e462cbec
commit 21177487ea

View File

@@ -3543,6 +3543,10 @@ bool Map::SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn, bool force, std::v
for (SpawnData const* data : toSpawn)
{
// don't spawn if the current map difficulty is not used by the spawn
if (std::find(data->spawnDifficulties.begin(), data->spawnDifficulties.end(), GetDifficultyID()) == data->spawnDifficulties.end())
continue;
// don't spawn if the grid isn't loaded (will be handled in grid loader)
if (!IsGridLoaded(data->spawnPoint))
continue;