Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSC: Remove Boss-Requirements from Vashj (2.4.0) #721

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ void instance_serpentshrine_cavern::OnObjectCreate(GameObject* pGo)
m_goEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid();
break;
case GO_CONSOLE_VASHJ:
#ifdef PRENERF_2_3
pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);
#endif
m_goEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid();
EngageBridgeConsole(pGo);
break;
Expand Down Expand Up @@ -174,7 +177,7 @@ void instance_serpentshrine_cavern::SetData(uint32 uiType, uint32 uiData)
case TYPE_MOROGRIM_EVENT:
m_auiEncounter[uiType] = uiData;
if (uiData == DONE)
EngageBossConsole(uiType, 0);
EngageBossConsole(uiType, nullptr);
if (uiData == SPECIAL)
EngageBridgeConsole();
break;
Expand Down Expand Up @@ -323,10 +326,15 @@ void instance_serpentshrine_cavern::SpawnFishCorpses()

void instance_serpentshrine_cavern::EngageBridgeConsole(GameObject* _console)
{
#ifdef PRENERF_2_3
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)
#endif
if(GameObject* console = _console ? _console : instance->GetGameObject(m_goEntryGuidStore[GO_CONSOLE_VASHJ]))
{
console->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
console->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);
}
}

uint32 EncounterTypeFromGOEntry(uint32 goEntry)
Expand Down Expand Up @@ -375,10 +383,15 @@ void instance_serpentshrine_cavern::EngageBossConsole(uint32 uiType, GameObject*
}
console = instance->GetGameObject(m_goEntryGuidStore[goEntry]);
}
#ifdef PRENERF_2_3
if (m_auiEncounter[uiType] == DONE)
{
console->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
console->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);
}
else if(m_auiEncounter[uiType] == SPECIAL)
console->SetGoState(GO_STATE_ACTIVE);
#endif
}

bool GOUse_go_ssc_boss_consoles(Player* /*pPlayer*/, GameObject* pGo)
Expand Down