Skip to content

Commit

Permalink
SSC: Remove Boss-Requirements from Vashj (2.4.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa committed Jan 14, 2025
1 parent 06190fb commit 533d8b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 82 deletions.
1 change: 0 additions & 1 deletion sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@ UPDATE creature_template SET ScriptName='mob_steamrigger_mechanic' WHERE entry=1

/* SERPENTSHRINE CAVERN */
UPDATE instance_template SET ScriptName='instance_serpent_shrine' WHERE map=548;
UPDATE gameobject_template SET ScriptName='go_ssc_boss_consoles' WHERE entry IN(185117,185118,185115,185114,185116);
UPDATE creature_template SET ScriptName='npc_serpentshrine_parasite' WHERE entry=22379;
/* Hydross the Unstable event */
UPDATE creature_template SET ScriptName='boss_hydross_the_unstable' WHERE entry=21216;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@ void instance_serpentshrine_cavern::OnObjectCreate(GameObject* pGo)
{
switch (pGo->GetEntry())
{
case GO_CONSOLE_HYDROSS:
case GO_CONSOLE_LURKER:
case GO_CONSOLE_LEOTHERAS:
case GO_CONSOLE_KARATHRESS:
case GO_CONSOLE_MOROGRIM:
m_goEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid();
EngageBossConsole(100, pGo);
break;
case GO_SHIELD_GENERATOR_1:
case GO_SHIELD_GENERATOR_2:
case GO_SHIELD_GENERATOR_3:
Expand Down Expand Up @@ -157,6 +149,7 @@ void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData)
}
break;
}
break;
case TYPE_LEOTHERAS_EVENT:
if (uiData == FAIL)
{
Expand All @@ -168,15 +161,6 @@ void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData)

m_uiSpellBinderCount = 0;
}
// no break;
case TYPE_HYDROSS_EVENT:
case TYPE_KARATHRESS_EVENT:
case TYPE_MOROGRIM_EVENT:
m_auiEncounter[uiType] = uiData;
if (uiData == DONE)
EngageBossConsole(uiType, 0);
if (uiData == SPECIAL)
EngageBridgeConsole();
break;
case TYPE_LADYVASHJ_EVENT:
m_auiEncounter[uiType] = uiData;
Expand Down Expand Up @@ -323,10 +307,8 @@ void instance_serpentshrine_cavern::SpawnFishCorpses()

void instance_serpentshrine_cavern::EngageBridgeConsole(GameObject* _console)
{
if(m_auiEncounter[TYPE_HYDROSS_EVENT] == SPECIAL && m_auiEncounter[TYPE_THELURKER_EVENT] == SPECIAL && m_auiEncounter[TYPE_LEOTHERAS_EVENT] == SPECIAL
&& m_auiEncounter[TYPE_KARATHRESS_EVENT] == SPECIAL && m_auiEncounter[TYPE_MOROGRIM_EVENT] == SPECIAL)
if(GameObject* console = _console ? _console : instance->GetGameObject(m_goEntryGuidStore[GO_CONSOLE_VASHJ]))
console->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);
if(GameObject* console = _console ? _console : instance->GetGameObject(m_goEntryGuidStore[GO_CONSOLE_VASHJ]))
console->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);
}

uint32 EncounterTypeFromGOEntry(uint32 goEntry)
Expand All @@ -348,60 +330,6 @@ uint32 EncounterTypeFromGOEntry(uint32 goEntry)
}
}

void instance_serpentshrine_cavern::EngageBossConsole(uint32 uiType, GameObject* console)
{
if (uiType == 100)
uiType = EncounterTypeFromGOEntry(console->GetEntry());
else if (console == nullptr) // 0 is taken
{
uint32 goEntry;
switch (uiType)
{
case TYPE_HYDROSS_EVENT:
goEntry = GO_CONSOLE_HYDROSS;
break;
case TYPE_THELURKER_EVENT:
goEntry = GO_CONSOLE_LURKER;
break;
case TYPE_LEOTHERAS_EVENT:
goEntry = GO_CONSOLE_LEOTHERAS;
break;
case TYPE_KARATHRESS_EVENT:
goEntry = GO_CONSOLE_KARATHRESS;
break;
case TYPE_MOROGRIM_EVENT:
goEntry = GO_CONSOLE_MOROGRIM;
break;
}
console = instance->GetGameObject(m_goEntryGuidStore[goEntry]);
}
if (m_auiEncounter[uiType] == DONE)
console->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);
else if(m_auiEncounter[uiType] == SPECIAL)
console->SetGoState(GO_STATE_ACTIVE);
}

bool GOUse_go_ssc_boss_consoles(Player* /*pPlayer*/, GameObject* pGo)
{
ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData();

if (!pInstance)
return true;

if (pGo->GetEntry() == GO_CONSOLE_HYDROSS)
pInstance->SetData(TYPE_HYDROSS_EVENT, SPECIAL);
else if (pGo->GetEntry() == GO_CONSOLE_LURKER)
pInstance->SetData(TYPE_THELURKER_EVENT, SPECIAL);
else if (pGo->GetEntry() == GO_CONSOLE_LEOTHERAS)
pInstance->SetData(TYPE_LEOTHERAS_EVENT, SPECIAL);
else if (pGo->GetEntry() == GO_CONSOLE_KARATHRESS)
pInstance->SetData(TYPE_KARATHRESS_EVENT, SPECIAL);
else if (pGo->GetEntry() == GO_CONSOLE_MOROGRIM)
pInstance->SetData(TYPE_MOROGRIM_EVENT, SPECIAL);

return false;
}

struct npc_serpentshrine_parasiteAI : public ScriptedAI
{
npc_serpentshrine_parasiteAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); }
Expand Down Expand Up @@ -443,11 +371,6 @@ void AddSC_instance_serpentshrine_cavern()
pNewScript->GetAI = &GetNewAIInstance<npc_serpentshrine_parasiteAI>;
pNewScript->RegisterSelf();

pNewScript = new Script;
pNewScript->Name = "go_ssc_boss_consoles";
pNewScript->pGOUse = &GOUse_go_ssc_boss_consoles;
pNewScript->RegisterSelf();

pNewScript = new Script;
pNewScript->Name = "instance_serpent_shrine";
pNewScript->GetInstanceData = &GetNewInstanceScript<instance_serpentshrine_cavern>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class instance_serpentshrine_cavern : public ScriptedInstance
private:
void SpawnFishCorpses();
void EngageBridgeConsole(GameObject* _console = nullptr);
void EngageBossConsole(uint32 uiType, GameObject* console);

uint32 m_auiEncounter[MAX_ENCOUNTER];
std::string m_strInstData;
Expand Down

0 comments on commit 533d8b5

Please sign in to comment.