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
This commit is contained in:
Ovah
2021-07-24 14:49:21 +02:00
committed by GitHub
parent bd6de8eb61
commit 48f63eda90

View File

@@ -3408,6 +3408,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 (!(data->spawnMask & (1 << GetSpawnMode())))
continue;
// don't spawn if the grid isn't loaded (will be handled in grid loader)
if (!IsGridLoaded(data->spawnPoint))
continue;