Skip to content

Commit

Permalink
UB: add worldstates for random groups
Browse files Browse the repository at this point in the history
  • Loading branch information
miraco authored and killerwife committed Nov 1, 2024
1 parent f16c3ba commit 492a0a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ EndScriptData */

#include "AI/ScriptDevAI/include/sc_common.h"
#include "underbog.h"
#include "World/WorldStateDefines.h"

instance_underbog::instance_underbog(Map* map) : ScriptedInstance(map), m_bGhazanSurfaced(false)
{
Expand All @@ -31,7 +32,13 @@ instance_underbog::instance_underbog(Map* map) : ScriptedInstance(map), m_bGhaza

void instance_underbog::Initialize()
{

instance->GetVariableManager().SetVariable(WORLD_STATE_UNDERBOG_GROUP_3, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_UNDERBOG_GROUP_18, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_UNDERBOG_GROUP_19, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_UNDERBOG_GROUP_20, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_UNDERBOG_GROUP_22, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_UNDERBOG_GROUP_24, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_UNDERBOG_GROUP_25, urand(0, 1));
}

void instance_underbog::SetData(uint32 type, uint32 data)
Expand Down
10 changes: 10 additions & 0 deletions src/game/World/WorldStateDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,16 @@ enum WorldStateID : int32
WORLD_STATE_PROTEAN_HORROR = 5520001, // Prevents that Protean Horrors respawn
WORLD_STATE_PROTEAN_NIGHTMARE = 5520002, // Prevents that Protean Nightmare respawn

// The Underbog
WORLD_STATE_UNDERBOG_GROUP_3 = 5460001, // 2 Possible group versions
WORLD_STATE_UNDERBOG_GROUP_18 = 5460002, // 2 Possible group versions

WORLD_STATE_UNDERBOG_GROUP_19 = 5460003, // 2 Possible group versions
WORLD_STATE_UNDERBOG_GROUP_20 = 5460004, // 2 Possible group versions
WORLD_STATE_UNDERBOG_GROUP_22 = 5460005, // 2 Possible group versions
WORLD_STATE_UNDERBOG_GROUP_24 = 5460006, // 2 Possible group versions
WORLD_STATE_UNDERBOG_GROUP_25 = 5460007, // 2 Possible group versions

// The Slave Pens
WORLD_STATE_NATURALIST_BITE = 5470044, // Spawns Coilfang Group after freeing Naturalist Bite

Expand Down

0 comments on commit 492a0a0

Please sign in to comment.