mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01: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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user