TrinityCore
instance_scholomance.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 "ScriptMgr.h"
19#include "GameObject.h"
20#include "InstanceScript.h"
21#include "Map.h"
22#include "Unit.h"
23#include "scholomance.h"
24
25static constexpr DungeonEncounterData Encounters[] =
26{
27 { DATA_DOCTORTHEOLENKRASTINOV, {{ 458 }} },
28 { DATA_INSTRUCTORMALICIA, {{ 457 }} },
29 { DATA_LADYILLUCIABAROV, {{ 462 }} },
30 { DATA_LORDALEXEIBAROV, {{ 461 }} },
31 { DATA_LOREKEEPERPOLKELT, {{ 459 }} },
32 { DATA_THERAVENIAN, {{ 460 }} },
33 { DATA_DARKMASTERGANDLING, {{ 463 }} },
34 { DATA_KIRTONOS, {{ 451 }} },
35 { DATA_JANDICE_BAROV, {{ 452 }} },
36 { DATA_RATTLEGORE, {{ 453 }} },
37 { DATA_MARDUK_BLACKPOOL, {{ 454 }} },
38 { DATA_VECTUS, {{ 455 }} },
39 { DATA_RAS_FROSTWHISPER, {{ 456 }} },
40};
41
42Position const GandlingLoc = { 180.7712f, -5.428603f, 75.57024f, 1.291544f };
43
45{
46 public:
48
50 {
52 }
53
55 {
57 {
61 }
62
63 void OnUnitDeath(Unit* unit) override
64 {
65 switch (unit->GetEntry())
66 {
69 default: break;
70 }
71 }
72
73 void OnGameObjectCreate(GameObject* go) override
74 {
75 switch (go->GetEntry())
76 {
79 break;
82 break;
83 case GO_GATE_MALICIA:
85 break;
86 case GO_GATE_THEOLEN:
88 break;
89 case GO_GATE_POLKELT:
91 break;
94 break;
95 case GO_GATE_BAROV:
96 GateBarovGUID = go->GetGUID();
97 break;
98 case GO_GATE_ILLUCIA:
100 break;
103 break;
104 default:
105 break;
106 }
107 }
108
109 bool SetBossState(uint32 type, EncounterState state) override
110 {
111 if (!InstanceScript::SetBossState(type, state))
112 return false;
113
114 switch (type)
115 {
118 case DATA_THERAVENIAN:
123 break;
124 default:
125 break;
126 }
127
128 return true;
129 }
130
131 ObjectGuid GetGuidData(uint32 type) const override
132 {
133 switch (type)
134 {
135 case GO_GATE_KIRTONOS:
136 return GateKirtonosGUID;
137 case GO_GATE_GANDLING:
138 return GateGandlingGUID;
139 case GO_GATE_MALICIA:
140 return GateMiliciaGUID;
141 case GO_GATE_THEOLEN:
142 return GateTheolenGUID;
143 case GO_GATE_POLKELT:
144 return GatePolkeltGUID;
145 case GO_GATE_RAVENIAN:
146 return GateRavenianGUID;
147 case GO_GATE_BAROV:
148 return GateBarovGUID;
149 case GO_GATE_ILLUCIA:
150 return GateIlluciaGUID;
153 default:
154 break;
155 }
156
157 return ObjectGuid::Empty;
158 }
159
160 bool CheckPreBosses(uint32 bossId) const
161 {
162 switch (bossId)
163 {
166 return false;
168 return false;
170 return false;
172 return false;
174 return false;
176 return false;
178 return false;
179 break;
180 default:
181 break;
182 }
183
184 return true;
185 }
186
188 {
191 }
192
193 void AfterDataLoad() override
194 {
196 }
197
198 protected:
208 };
209};
210
212{
214}
uint32_t uint32
Definition: Define.h:142
EncounterState
@ DONE
#define DataHeader
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void LoadDungeonEncounterData(T const &encounters)
InstanceMap * instance
EncounterState GetBossState(uint32 id) const
void SetHeaders(std::string const &dataHeaders)
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, Milliseconds duration=0ms, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty, SmoothPhasingInfo const *smoothPhasingInfo=nullptr)
Definition: Object.cpp:1836
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
Definition: Unit.h:627
InstanceScript * GetInstanceScript(InstanceMap *map) const override
void AddSC_instance_scholomance()
static constexpr DungeonEncounterData Encounters[]
Position const GandlingLoc
#define MAX_ENCOUNTER
@ NPC_DARKMASTER_GANDLING
Definition: scholomance.h:47
@ NPC_RATTLEGORE
Definition: scholomance.h:49
@ NPC_MARDUK_BLACKPOOL
Definition: scholomance.h:48
@ DATA_LOREKEEPERPOLKELT
Definition: scholomance.h:32
@ DATA_MARDUK_BLACKPOOL
Definition: scholomance.h:38
@ DATA_RAS_FROSTWHISPER
Definition: scholomance.h:40
@ DATA_LADYILLUCIABAROV
Definition: scholomance.h:30
@ DATA_LORDALEXEIBAROV
Definition: scholomance.h:31
@ DATA_INSTRUCTORMALICIA
Definition: scholomance.h:29
@ DATA_JANDICE_BAROV
Definition: scholomance.h:36
@ DATA_RATTLEGORE
Definition: scholomance.h:37
@ DATA_DOCTORTHEOLENKRASTINOV
Definition: scholomance.h:28
@ DATA_THERAVENIAN
Definition: scholomance.h:33
@ DATA_DARKMASTERGANDLING
Definition: scholomance.h:34
@ DATA_KIRTONOS
Definition: scholomance.h:35
@ DATA_VECTUS
Definition: scholomance.h:39
#define ScholomanceScriptName
Definition: scholomance.h:23
@ GO_GATE_RAVENIAN
Definition: scholomance.h:57
@ GO_GATE_KIRTONOS
Definition: scholomance.h:55
@ GO_GATE_BAROV
Definition: scholomance.h:61
@ GO_GATE_POLKELT
Definition: scholomance.h:62
@ GO_GATE_GANDLING
Definition: scholomance.h:56
@ GO_BRAZIER_OF_THE_HERALD
Definition: scholomance.h:63
@ GO_GATE_THEOLEN
Definition: scholomance.h:58
@ GO_GATE_ILLUCIA
Definition: scholomance.h:59
@ GO_GATE_MALICIA
Definition: scholomance.h:60
bool SetBossState(uint32 type, EncounterState state) override