TrinityCore
instance_ahnkahet.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#include "ahnkahet.h"
19#include "AreaBoundary.h"
20#include "GameObject.h"
21#include "InstanceScript.h"
22#include "Map.h"
23#include "ScriptMgr.h"
24
26{
29};
30
32{
38 { 0, 0 }
39};
40
42{
44 { 0, 0 } //END
45};
46
48{
49 { DATA_JEDOGA_SHADOWSEEKER, new ParallelogramBoundary(Position(460.365f, -661.997f, -20.985f), Position(364.958f,-790.211f, -14.207f), Position(347.436f,-657.978f,14.478f)) }
50};
51
53{
54 { DATA_ELDER_NADOX, {{ 1969 }} },
55 { DATA_PRINCE_TALDARAM, {{ 1966 }} },
56 { DATA_JEDOGA_SHADOWSEEKER, {{ 1967 }} },
57 { DATA_AMANITAR, {{ 1989 }} },
58 { DATA_HERALD_VOLAZJ, {{ 1968 }} }
59};
60
62{
63 public:
65
67 {
69 {
76
77 SpheresState[0] = 0;
78 SpheresState[1] = 0;
79 }
80
81 void OnGameObjectCreate(GameObject* go) override
82 {
84
85 switch (go->GetEntry())
86 {
90 break;
91 case GO_SPHERE_1:
92 if (SpheresState[0])
93 {
96 }
97 else
99 break;
100 case GO_SPHERE_2:
101 if (SpheresState[1])
102 {
105 }
106 else
108 break;
109 default:
110 break;
111 }
112 }
113
114 void SetData(uint32 type, uint32 data) override
115 {
116 switch (type)
117 {
118 case DATA_SPHERE_1:
119 case DATA_SPHERE_2:
120 SpheresState[type - DATA_SPHERE_1] = data;
121 break;
122 default:
123 break;
124 }
125 }
126
127 uint32 GetData(uint32 type) const override
128 {
129 switch (type)
130 {
131 case DATA_SPHERE_1:
132 case DATA_SPHERE_2:
133 return SpheresState[type - DATA_SPHERE_1];
134 default:
135 break;
136 }
137 return 0;
138 }
139
140 void AfterDataLoad() override
141 {
143 {
146 }
147 }
148
149 protected:
151 };
152
154 {
155 return new instance_ahnkahet_InstanceScript(map);
156 }
157};
158
160{
161 new instance_ahnkahet();
162}
uint32_t uint32
Definition: Define.h:142
@ IN_PROGRESS
@ DONE
@ GO_FLAG_NOT_SELECTABLE
@ GO_STATE_ACTIVE
@ DATA_HERALD_VOLAZJ
Definition: ahnkahet.h:35
@ DATA_JEDOGA_SHADOWSEEKER
Definition: ahnkahet.h:33
@ DATA_AMANITAR
Definition: ahnkahet.h:34
@ DATA_SPHERE_2
Definition: ahnkahet.h:39
@ DATA_PRINCE_TALDARAM_PLATFORM
Definition: ahnkahet.h:40
@ DATA_ELDER_NADOX
Definition: ahnkahet.h:31
@ DATA_PRINCE_TALDARAM
Definition: ahnkahet.h:32
@ DATA_SPHERE_1
Definition: ahnkahet.h:38
#define AhnKahetScriptName
Definition: ahnkahet.h:23
@ GO_PRINCE_TALDARAM_GATE
Definition: ahnkahet.h:75
@ GO_PRINCE_TALDARAM_PLATFORM
Definition: ahnkahet.h:76
@ GO_SPHERE_2
Definition: ahnkahet.h:78
@ GO_SPHERE_1
Definition: ahnkahet.h:77
@ NPC_AMANITAR
Definition: ahnkahet.h:48
@ NPC_HERALD_VOLAZJ
Definition: ahnkahet.h:49
@ NPC_JEDOGA_SHADOWSEEKER
Definition: ahnkahet.h:47
@ NPC_ELDER_NADOX
Definition: ahnkahet.h:45
@ NPC_PRINCE_TALDARAM
Definition: ahnkahet.h:46
#define DataHeader
uint32 const EncounterCount
void SetGoState(GOState state)
void RemoveFlag(GameObjectFlags flags)
Definition: GameObject.h:275
void SetFlag(GameObjectFlags flags)
Definition: GameObject.h:274
void SetBossNumber(uint32 number)
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
void LoadDungeonEncounterData(T const &encounters)
EncounterState GetBossState(uint32 id) const
virtual void OnGameObjectCreate(GameObject *go) override
void LoadDoorData(DoorData const *data)
void LoadBossBoundaries(BossBoundaryData const &data)
void SetHeaders(std::string const &dataHeaders)
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
uint32 GetEntry() const
Definition: Object.h:161
InstanceScript * GetInstanceScript(InstanceMap *map) const override
ObjectData const gameObjectData[]
void AddSC_instance_ahnkahet()
ObjectData const creatureData[]
DoorData const doorData[]
BossBoundaryData const boundaries
DungeonEncounterData const encounters[]
void SetData(uint32 type, uint32 data) override