Skip to content

Commit

Permalink
SL: add worldstates for correct grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
miraco authored and killerwife committed Nov 15, 2024
1 parent 031742b commit 8fd5391
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
15 changes: 15 additions & 0 deletions src/game/World/WorldStateDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fd5391

Please sign in to comment.