TrinityCore
Loading...
Searching...
No Matches
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 "Player.h"
23#include "scholomance.h"
24
25Position const GandlingLoc = { 180.7712f, -5.428603f, 75.57024f, 1.291544f };
26
28{
29 public:
31
33 {
35 }
36
38 {
44
45 void OnGameObjectCreate(GameObject* go) override
46 {
47 switch (go->GetEntry())
48 {
51 break;
54 break;
55 case GO_GATE_MALICIA:
57 break;
58 case GO_GATE_THEOLEN:
60 break;
61 case GO_GATE_POLKELT:
63 break;
66 break;
67 case GO_GATE_BAROV:
68 GateBarovGUID = go->GetGUID();
69 break;
70 case GO_GATE_ILLUCIA:
72 break;
75 break;
76 default:
77 break;
78 }
79 }
80
81 bool SetBossState(uint32 type, EncounterState state) override
82 {
83 if (!InstanceScript::SetBossState(type, state))
84 return false;
85
86 switch (type)
87 {
95 break;
96 default:
97 break;
98 }
99
100 return true;
101 }
102
103 ObjectGuid GetGuidData(uint32 type) const override
104 {
105 switch (type)
106 {
107 case GO_GATE_KIRTONOS:
108 return GateKirtonosGUID;
109 case GO_GATE_GANDLING:
110 return GateGandlingGUID;
111 case GO_GATE_MALICIA:
112 return GateMiliciaGUID;
113 case GO_GATE_THEOLEN:
114 return GateTheolenGUID;
115 case GO_GATE_POLKELT:
116 return GatePolkeltGUID;
117 case GO_GATE_RAVENIAN:
118 return GateRavenianGUID;
119 case GO_GATE_BAROV:
120 return GateBarovGUID;
121 case GO_GATE_ILLUCIA:
122 return GateIlluciaGUID;
125 default:
126 break;
127 }
128
129 return ObjectGuid::Empty;
130 }
131
132 bool CheckPreBosses(uint32 bossId) const
133 {
134 switch (bossId)
135 {
138 return false;
140 return false;
142 return false;
144 return false;
146 return false;
148 return false;
150 return false;
151 break;
152 default:
153 break;
154 }
155
156 return true;
157 }
158
164
165 void ReadSaveDataMore(std::istringstream& /*data*/) override
166 {
168 }
169
170 protected:
180 };
181};
182
uint32_t uint32
Definition Define.h:133
EncounterState
@ DONE
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
InstanceMap * instance
EncounterState GetBossState(uint32 id) const
void SetHeaders(std::string const &dataHeaders)
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1852
static ObjectGuid const Empty
Definition ObjectGuid.h:140
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
InstanceScript * GetInstanceScript(InstanceMap *map) const override
void AddSC_instance_scholomance()
Position const GandlingLoc
@ NPC_DARKMASTER_GANDLING
Definition scholomance.h:42
@ DATA_LOREKEEPER_POLKELT
Definition scholomance.h:34
@ DATA_LADY_ILLUCIA_BAROV
Definition scholomance.h:32
@ DATA_LORD_ALEXEI_BAROV
Definition scholomance.h:33
@ DATA_THE_RAVENIAN
Definition scholomance.h:35
@ DATA_INSTRUCTOR_MALICIA
Definition scholomance.h:31
@ DATA_DOCTOR_THEOLEN_KRASTINOV
Definition scholomance.h:30
@ DATA_DARKMASTER_GANDLING
Definition scholomance.h:36
#define ScholomanceScriptName
Definition scholomance.h:23
@ GO_GATE_RAVENIAN
Definition scholomance.h:50
@ GO_GATE_KIRTONOS
Definition scholomance.h:48
@ GO_GATE_BAROV
Definition scholomance.h:54
@ GO_GATE_POLKELT
Definition scholomance.h:55
@ GO_GATE_GANDLING
Definition scholomance.h:49
@ GO_BRAZIER_OF_THE_HERALD
Definition scholomance.h:56
@ GO_GATE_THEOLEN
Definition scholomance.h:51
@ GO_GATE_ILLUCIA
Definition scholomance.h:52
@ GO_GATE_MALICIA
Definition scholomance.h:53
bool SetBossState(uint32 type, EncounterState state) override