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
39
47
48static constexpr DungeonEncounterData encounters[] =
49{
50 { DATA_SKERAM, {{ 709 }} },
51 { DATA_SARTURA, {{ 711 }} },
52 { DATA_FRANKRIS, {{ 712 }} },
53 { DATA_HUHURAN, {{ 714 }} },
54 { DATA_TWIN_EMPERORS, {{ 715 }} },
55 { DATA_CTHUN, {{ 717 }} },
56 { DATA_BUG_TRIO, {{ 710 }} },
57 { DATA_VISCIDUS, {{ 713 }} },
58 { DATA_OURO, {{ 716 }} }
59};
60
62{
63 public:
65
70
72 {
87
88 bool IsBossDied[2];
89
91
93
94 bool IsEncounterInProgress() const override
95 {
96 //not active in AQ40
97 return false;
98 }
99
100 uint32 GetData(uint32 type) const override
101 {
102 switch (type)
103 {
105 if (IsBossDied[0])
106 return 1;
107 break;
108
110 if (IsBossDied[1])
111 return 1;
112 break;
113
115 return BugTrioDeathCount;
116
117 case DATA_CTHUN_PHASE:
118 return CthunPhase;
119 }
120 return 0;
121 }
122
123 void SetData(uint32 type, uint32 data) override
124 {
125 switch (type)
126 {
128 if (++BugTrioDeathCount >= 3)
130 break;
131
133 IsBossDied[0] = true;
134 break;
135
137 IsBossDied[1] = true;
138 break;
139
140 case DATA_CTHUN_PHASE:
141 CthunPhase = data;
142 break;
143 }
144 }
145 };
146
147};
148
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_YAUJ
@ NPC_VEKLOR
@ NPC_KRI
@ NPC_SARTURA
@ NPC_VEM
@ NPC_VISCIDUS
@ NPC_VEKNILASH
#define AQ40ScriptName
@ DATA_BUG_TRIO
@ 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_YAUJ
@ DATA_OURO
@ DATA_CTHUN_PHASE
@ DATA_VEKLOR_DEATH
@ DATA_VEKNILASHISDEAD
@ AQ40_DOOR_1
@ AQ40_DOOR_3
@ AQ40_DOOR_2