TrinityCore
Loading...
Searching...
No Matches
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
38
46
47static constexpr DungeonEncounterData encounters[] =
48{
49 { DATA_SKERAM, {{ 709 }} },
50 { DATA_SARTURA, {{ 711 }} },
51 { DATA_FRANKRIS, {{ 712 }} },
52 { DATA_HUHURAN, {{ 714 }} },
53 { DATA_TWIN_EMPERORS, {{ 715 }} },
54 { DATA_CTHUN, {{ 717 }} },
55 { DATA_BUG_TRIO, {{ 710 }} },
56 { DATA_VISCIDUS, {{ 713 }} },
57 { DATA_OURO, {{ 716 }} }
58};
59
61{
62 public:
64
69
71 {
87
88 //If Vem is dead...
89 bool IsBossDied[3];
90
92
94
95 bool IsEncounterInProgress() const override
96 {
97 //not active in AQ40
98 return false;
99 }
100
101 uint32 GetData(uint32 type) const override
102 {
103 switch (type)
104 {
105 case DATA_VEMISDEAD:
106 if (IsBossDied[0])
107 return 1;
108 break;
109
111 if (IsBossDied[1])
112 return 1;
113 break;
114
116 if (IsBossDied[2])
117 return 1;
118 break;
119
121 return BugTrioDeathCount;
122
123 case DATA_CTHUN_PHASE:
124 return CthunPhase;
125 }
126 return 0;
127 }
128
129 void SetData(uint32 type, uint32 data) override
130 {
131 switch (type)
132 {
133 case DATA_VEM_DEATH:
134 IsBossDied[0] = true;
135 break;
136
138 if (++BugTrioDeathCount >= 3)
140 break;
141
143 IsBossDied[1] = true;
144 break;
145
147 IsBossDied[2] = true;
148 break;
149
150 case DATA_CTHUN_PHASE:
151 CthunPhase = data;
152 break;
153 }
154 }
155 };
156
157};
158
uint32_t uint32
Definition Define.h:154
@ DONE
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void LoadObjectData(std::span< ObjectData const > creatureData, std::span< ObjectData const > gameObjectData)
void SetHeaders(std::string_view dataHeaders)
void LoadDungeonEncounterData(std::span< DungeonEncounterData const > encounters)
void LoadDoorData(std::span< DoorData const > data)
InstanceScript * GetInstanceScript(InstanceMap *map) const override
static constexpr ObjectData creatureData[]
void AddSC_instance_temple_of_ahnqiraj()
static constexpr DoorData doorData[]
static constexpr DungeonEncounterData 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