TrinityCore
instance_temple_of_ahnqiraj.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19SDName: Instance_Temple_of_Ahnqiraj
20SD%Complete: 80
21SDComment:
22SDCategory: Temple of Ahn'Qiraj
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "InstanceScript.h"
27#include "temple_of_ahnqiraj.h"
28
30{
31 { NPC_VEM, DATA_VEM },
32 { NPC_KRI, DATA_KRI },
37 { 0, 0 } // END
38};
39
41{
47};
48
50{
51 { DATA_SKERAM, {{ 709 }} },
52 { DATA_SARTURA, {{ 711 }} },
53 { DATA_FRANKRIS, {{ 712 }} },
54 { DATA_HUHURAN, {{ 714 }} },
55 { DATA_TWIN_EMPERORS, {{ 715 }} },
56 { DATA_CTHUN, {{ 717 }} },
57 { DATA_BUG_TRIO, {{ 710 }} },
58 { DATA_VISCIDUS, {{ 713 }} },
59 { DATA_OURO, {{ 716 }} }
60};
61
63{
64 public:
66
68 {
70 }
71
73 {
75 {
81 IsBossDied[0] = false;
82 IsBossDied[1] = false;
83 IsBossDied[2] = false;
84
86
87 CthunPhase = 0;
88 }
89
90 //If Vem is dead...
91 bool IsBossDied[3];
92
94
96
97 bool IsEncounterInProgress() const override
98 {
99 //not active in AQ40
100 return false;
101 }
102
103 uint32 GetData(uint32 type) const override
104 {
105 switch (type)
106 {
107 case DATA_VEMISDEAD:
108 if (IsBossDied[0])
109 return 1;
110 break;
111
113 if (IsBossDied[1])
114 return 1;
115 break;
116
118 if (IsBossDied[2])
119 return 1;
120 break;
121
123 return BugTrioDeathCount;
124
125 case DATA_CTHUN_PHASE:
126 return CthunPhase;
127 }
128 return 0;
129 }
130
131 void SetData(uint32 type, uint32 data) override
132 {
133 switch (type)
134 {
135 case DATA_VEM_DEATH:
136 IsBossDied[0] = true;
137 break;
138
140 if (++BugTrioDeathCount >= 3)
142 break;
143
145 IsBossDied[1] = true;
146 break;
147
149 IsBossDied[2] = true;
150 break;
151
152 case DATA_CTHUN_PHASE:
153 CthunPhase = data;
154 break;
155 }
156 }
157 };
158
159};
160
162{
164}
uint32_t uint32
Definition: Define.h:142
@ DONE
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void LoadDungeonEncounterData(T const &encounters)
void LoadDoorData(DoorData const *data)
void SetHeaders(std::string const &dataHeaders)
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
InstanceScript * GetInstanceScript(InstanceMap *map) const override
ObjectData const creatureData[]
void AddSC_instance_temple_of_ahnqiraj()
DoorData const doorData[]
DungeonEncounterData const encounters[]
@ NPC_VEKLOR
@ NPC_KRI
@ NPC_SARTURA
@ NPC_VEM
@ NPC_VISCIDUS
@ NPC_VEKNILASH
#define AQ40ScriptName
@ DATA_BUG_TRIO
@ DATA_VEM_DEATH
@ DATA_BUG_TRIO_DEATH
@ DATA_HUHURAN
@ DATA_KRI
@ DATA_VEKNILASH
@ DATA_FRANKRIS
@ DATA_VISCIDUS
@ DATA_SKERAM
@ DATA_VEKLORISDEAD
@ DATA_SARTURA
@ DATA_CTHUN
@ DATA_VEKNILASH_DEATH
@ DATA_VEM
@ DATA_TWIN_EMPERORS
@ DATA_VEKLOR
@ DATA_OURO
@ DATA_CTHUN_PHASE
@ DATA_VEKLOR_DEATH
@ DATA_VEKNILASHISDEAD
@ DATA_VEMISDEAD
@ AQ40_DOOR_1
@ AQ40_DOOR_3
@ AQ40_DOOR_2