From 04d3144b5b034924797ddf7b4f8b659c5fe1431b Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Mon, 16 Nov 2020 19:10:20 +0100 Subject: [PATCH] Core/Maps: apply feedback from code review --- sql/updates/world/4.3.4/2020_11_16_00_world.sql | 2 +- src/server/game/Instances/InstanceScript.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/updates/world/4.3.4/2020_11_16_00_world.sql b/sql/updates/world/4.3.4/2020_11_16_00_world.sql index 1048ed2b96..3b34b1828c 100644 --- a/sql/updates/world/4.3.4/2020_11_16_00_world.sql +++ b/sql/updates/world/4.3.4/2020_11_16_00_world.sql @@ -10,4 +10,4 @@ SELECT @GROUPID, 0, `guid` FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CG DELETE FROM `instance_spawn_groups` WHERE `spawnGroupId`= @GROUPID; INSERT INTO `instance_spawn_groups` (`instanceMapId`, `bossStateId`, `bossStates`, `spawnGroupId`, `flags`) VALUES -(189, 0, 0, @GROUPID, 0x1 | 0x4); +(189, 0, 37, @GROUPID, 0x1 | 0x4); diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 3e922d398f..877d1a85cc 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -250,10 +250,10 @@ void InstanceScript::UpdateSpawnGroups() states& curValue = newStates[info.SpawnGroupId]; // makes sure there's a BLOCK value in the map if (curValue == FORCEBLOCK) // nothing will change this continue; - if (info.BossStates && !((1 << GetBossState(info.BossStateId)) & info.BossStates)) // allow boss state 0 to always bypass this check + if (!((1 << GetBossState(info.BossStateId)) & info.BossStates)) continue; - if (instance->GetTeamIdInInstance() == TEAM_ALLIANCE && (info.Flags & InstanceSpawnGroupInfo::FLAG_HORDE_ONLY) - || instance->GetTeamIdInInstance() == TEAM_HORDE && (info.Flags & InstanceSpawnGroupInfo::FLAG_ALLIANCE_ONLY)) + if (((instance->GetTeamIdInInstance() == TEAM_ALLIANCE) && (info.Flags & InstanceSpawnGroupInfo::FLAG_HORDE_ONLY)) + || ((instance->GetTeamIdInInstance() == TEAM_HORDE) && (info.Flags & InstanceSpawnGroupInfo::FLAG_ALLIANCE_ONLY))) continue; if (info.Flags & InstanceSpawnGroupInfo::FLAG_BLOCK_SPAWN) curValue = FORCEBLOCK;