mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 03:32:28 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user