Skip to content

Commit

Permalink
[2303] Reorder TYPE_ enums in sunken temple. Requires Acid 3.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmoozerd committed Oct 5, 2011
1 parent 9438d49 commit 6234183
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 31 deletions.
30 changes: 10 additions & 20 deletions scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
Expand Up @@ -46,7 +46,7 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo)
switch(pGo->GetEntry())
{
case GO_JAMMALAN_BARRIER:
if (m_auiEncounter[1] == DONE)
if (m_auiEncounter[TYPE_PROTECTORS] == DONE)
pGo->SetGoState(GO_STATE_ACTIVE);
break;
case GO_IDOL_OF_HAKKAR:
Expand Down Expand Up @@ -137,26 +137,23 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData)
case TYPE_ATALARION:
if (uiData == SPECIAL)
DoSpawnAtalarionIfCan();
m_auiEncounter[0] = uiData;
m_auiEncounter[uiType] = uiData;
break;
case TYPE_PROTECTORS:
if (uiData == DONE)
{
--m_uiProtectorsRemaining;
if (!m_uiProtectorsRemaining)
{
m_auiEncounter[1] = uiData;
m_auiEncounter[uiType] = uiData;
DoUseDoorOrButton(GO_JAMMALAN_BARRIER);
// Intro yell
DoOrSimulateScriptTextForThisInstance(SAY_JAMMALAN_INTRO, NPC_JAMMALAN);
}
}
break;
case TYPE_JAMMALAN:
m_auiEncounter[2] = uiData;
break;
case TYPE_MALFURION:
m_auiEncounter[3] = uiData;
m_auiEncounter[uiType] = uiData;
break;
case TYPE_AVATAR:
if (uiData == SPECIAL)
Expand Down Expand Up @@ -192,7 +189,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData)
}

// Prevent double processing
if (m_auiEncounter[4] == uiData)
if (m_auiEncounter[uiType] == uiData)
return;

if (uiData == IN_PROGRESS)
Expand Down Expand Up @@ -236,7 +233,7 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData)
DoUseDoorOrButton(GO_HAKKAR_DOOR_1);
DoUseDoorOrButton(GO_HAKKAR_DOOR_2);

m_auiEncounter[4] = uiData;
m_auiEncounter[uiType] = uiData;

break;
}
Expand Down Expand Up @@ -344,22 +341,15 @@ void instance_sunken_temple::Load(const char* chrIn)

uint32 instance_sunken_temple::GetData(uint32 uiType)
{
switch(uiType)
{
case TYPE_ATALARION: return m_auiEncounter[0];
case TYPE_PROTECTORS: return m_auiEncounter[1];
case TYPE_JAMMALAN: return m_auiEncounter[2];
case TYPE_MALFURION: return m_auiEncounter[3];
case TYPE_AVATAR: return m_auiEncounter[4];
if (uiType < MAX_ENCOUNTER)
return m_auiEncounter[uiType];

default:
return 0;
}
return 0;
}

void instance_sunken_temple::Update(uint32 uiDiff)
{
if (m_auiEncounter[4] != IN_PROGRESS)
if (m_auiEncounter[TYPE_AVATAR] != IN_PROGRESS)
return;

// Summon random mobs around the circles
Expand Down
15 changes: 5 additions & 10 deletions scripts/eastern_kingdoms/sunken_temple/sunken_temple.h
Expand Up @@ -11,16 +11,11 @@ enum
MAX_STATUES = 6,
MAX_FLAMES = 4,

// Don't change types 1,2 and 3 (handled in ACID)
TYPE_ATALARION_OBSOLET= 1,
TYPE_PROTECTORS_OBS = 2,
TYPE_JAMMALAN_OBS = 3,

TYPE_ATALARION = 4,
TYPE_PROTECTORS = 5,
TYPE_JAMMALAN = 6,
TYPE_MALFURION = 7,
TYPE_AVATAR = 8,
TYPE_ATALARION = 0,
TYPE_PROTECTORS = 1,
TYPE_JAMMALAN = 2,
TYPE_MALFURION = 3,
TYPE_AVATAR = 4,

NPC_ATALARION = 8580,
NPC_DREAMSCYTH = 5721,
Expand Down
2 changes: 1 addition & 1 deletion sd2_revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __SD2_REVISION_NR_H__
#define __SD2_REVISION_NR_H__
#define SD2_REVISION_NR "2302"
#define SD2_REVISION_NR "2303"
#endif // __SD2_REVISION_NR_H__

0 comments on commit 6234183

Please sign in to comment.