diff options
author | Ovah <dreadkiller@gmx.de> | 2021-07-24 14:49:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-24 14:49:21 +0200 |
commit | 48f63eda9029d4fe16b7a350059c8e26ba8484ce (patch) | |
tree | f26b582bde7167ac2ff126865b25b1b2bd6f42b5 /src | |
parent | bd6de8eb6104e5e3e08149dfd44008ef0fb4c74a (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index d5b64275ffd..b18020b6e67 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -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; |