Skip to content

Commit

Permalink
Sethekk Halls: add worldstate handling for random group combinations (#…
Browse files Browse the repository at this point in the history
…697)

All of these groups have 2 different sets of spawns

Co-authored-by: killerwife <killerwife@gmail.com>
  • Loading branch information
miraco and killerwife authored Oct 17, 2024
1 parent 9dd8379 commit 83b5a8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
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 "sethekk_halls.h"
#include "Entities/TemporarySpawn.h"
#include "World/WorldStateDefines.h"

instance_sethekk_halls::instance_sethekk_halls(Map* pMap) : ScriptedInstance(pMap), m_anzuTimer(0), m_anzuStage(0)
{
Expand All @@ -32,6 +33,12 @@ instance_sethekk_halls::instance_sethekk_halls(Map* pMap) : ScriptedInstance(pMa
void instance_sethekk_halls::Initialize()
{
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
instance->GetVariableManager().SetVariable(WORLD_STATE_SETHEKK_GROUP_12, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_SETHEKK_GROUP_13, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_SETHEKK_GROUP_14, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_SETHEKK_GROUP_16, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_SETHEKK_GROUP_20, urand(0, 1));
instance->GetVariableManager().SetVariable(WORLD_STATE_SETHEKK_GROUP_21, urand(0, 1));
}

void instance_sethekk_halls::OnCreatureCreate(Creature* pCreature)
Expand Down
10 changes: 9 additions & 1 deletion src/game/World/WorldStateDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,18 @@ enum WorldStateID : int32
// The Arcatraz
WORLD_STATE_PROTEAN_HORROR = 5520001, // Prevents that Protean Horrors respawn
WORLD_STATE_PROTEAN_NIGHTMARE = 5520002, // Prevents that Protean Nightmare respawn

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

// Sethekk Halls
WORLD_STATE_SETHEKK_GROUP_12 = 5560001, // 2 Possible group versions
WORLD_STATE_SETHEKK_GROUP_13 = 5560002, // 2 Possible group versions
WORLD_STATE_SETHEKK_GROUP_14 = 5560003, // 2 Possible group versions
WORLD_STATE_SETHEKK_GROUP_16 = 5560004, // 2 Possible group versions
WORLD_STATE_SETHEKK_GROUP_20 = 5560005, // 2 Possible group versions
WORLD_STATE_SETHEKK_GROUP_21 = 5560006, // 2 Possible group versions

// Wotlk
};

Expand Down

0 comments on commit 83b5a8e

Please sign in to comment.