From 8fd539147317647ed6c91c7a9f45239c6b0bcf5c Mon Sep 17 00:00:00 2001 From: Miraco Date: Fri, 15 Nov 2024 14:04:47 +0100 Subject: [PATCH] SL: add worldstates for correct grouping --- .../shadow_labyrinth/shadow_labyrinth.cpp | 16 ++++++++++++++++ src/game/World/WorldStateDefines.h | 15 +++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/game/AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.cpp b/src/game/AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.cpp index 08083428b06..93e2a226055 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.cpp @@ -24,6 +24,7 @@ EndScriptData */ #include "AI/ScriptDevAI/include/sc_common.h" #include "shadow_labyrinth.h" #include "Spells/Scripts/SpellScript.h" +#include "World/WorldStateDefines.h" /* Shadow Labyrinth encounters: 1 - Ambassador Hellmaw event @@ -40,6 +41,21 @@ instance_shadow_labyrinth::instance_shadow_labyrinth(Map* pMap) : ScriptedInstan void instance_shadow_labyrinth::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + // Worldstates for correct grouping + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_01, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_05, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_12, urand(0, 2)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_13, urand(0, 2)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_23, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_24, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_25, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_33, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_34, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_35, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_40, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_41, urand(0, 1)); + instance->GetVariableManager().SetVariable(WORLD_STATE_SHADOW_LAB_GROUP_42, urand(0, 1)); } void instance_shadow_labyrinth::OnObjectCreate(GameObject* pGo) diff --git a/src/game/World/WorldStateDefines.h b/src/game/World/WorldStateDefines.h index 46c8b5e3f56..8e7ce5be5b0 100644 --- a/src/game/World/WorldStateDefines.h +++ b/src/game/World/WorldStateDefines.h @@ -369,6 +369,21 @@ enum WorldStateID : int32 // The Slave Pens WORLD_STATE_NATURALIST_BITE = 5470044, // Spawns Coilfang Group after freeing Naturalist Bite + // Shadow Labyrinth + WORLD_STATE_SHADOW_LAB_GROUP_01 = 5550001, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_05 = 5550002, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_12 = 5550003, // 3 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_13 = 5550004, // 3 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_23 = 5550005, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_24 = 5550006, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_25 = 5550007, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_33 = 5550008, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_34 = 5550009, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_35 = 5550010, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_40 = 5550011, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_41 = 5550012, // 2 Possible group versions + WORLD_STATE_SHADOW_LAB_GROUP_42 = 5550013, // 2 Possible group versions + // Sethekk Halls WORLD_STATE_SETHEKK_GROUP_12 = 5560001, // 2 Possible group versions WORLD_STATE_SETHEKK_GROUP_13 = 5560002, // 2 Possible group versions