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 "Creature.h"
27#include "InstanceScript.h"
28#include "temple_of_ahnqiraj.h"
29
31{
32 { NPC_VEM, DATA_VEM },
33 { NPC_KRI, DATA_KRI },
39 { 0, 0 } // END
40};
41
50
52{
53 public:
55
60
62 {
76
77 bool IsBossDied[2];
78
80
82
83 bool IsEncounterInProgress() const override
84 {
85 //not active in AQ40
86 return false;
87 }
88
89 uint32 GetData(uint32 type) const override
90 {
91 switch (type)
92 {
94 if (IsBossDied[0])
95 return 1;
96 break;
97
99 if (IsBossDied[1])
100 return 1;
101 break;
102
104 return BugTrioDeathCount;
105
106 case DATA_CTHUN_PHASE:
107 return CthunPhase;
108 }
109 return 0;
110 }
111
112 void SetData(uint32 type, uint32 data) override
113 {
114 switch (type)
115 {
117 if (++BugTrioDeathCount >= 3)
119 break;
120
122 IsBossDied[0] = true;
123 break;
124
126 IsBossDied[1] = true;
127 break;
128
129 case DATA_CTHUN_PHASE:
130 CthunPhase = data;
131 break;
132 }
133 }
134 };
135
136};
137
uint32_t uint32
Definition Define.h:133
@ DONE
@ DOOR_TYPE_ROOM
@ DOOR_TYPE_PASSAGE
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
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[]
@ 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_VISCIDUS
@ DATA_SKERAM
@ DATA_VEKLORISDEAD
@ DATA_SARTURA
@ DATA_VEKNILASH_DEATH
@ DATA_VEM
@ DATA_TWIN_EMPERORS
@ DATA_VEKLOR
@ DATA_YAUJ
@ DATA_CTHUN_PHASE
@ DATA_VEKLOR_DEATH
@ DATA_VEKNILASHISDEAD
@ AQ40_DOOR_1
@ AQ40_DOOR_3
@ AQ40_DOOR_2