TrinityCore
instance_halls_of_stone.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 "Creature.h"
20#include "GameObject.h"
21#include "halls_of_stone.h"
22#include "InstanceScript.h"
23#include "Map.h"
24
26{
29};
30
32{
39 { 0, 0 } // END
40};
41
43{
51 { 0, 0 } // END
52};
53
55{
56 { DATA_KRYSTALLUS, {{ 1994 }} },
57 { DATA_MAIDEN_OF_GRIEF, {{ 1996 }} },
58 { DATA_TRIBUNAL_OF_AGES, {{ 1995 }} },
59 { DATA_SJONNIR_THE_IRONSHAPER, {{ 1998 }} }
60};
61
63{
64 public:
66
68 {
70 {
76 }
77
78 void OnGameObjectCreate(GameObject* go) override
79 {
81
82 switch (go->GetEntry())
83 {
88 break;
89 default:
90 break;
91 }
92 }
93
94 bool SetBossState(uint32 type, EncounterState state) override
95 {
96 if (!InstanceScript::SetBossState(type, state))
97 return false;
98
99 switch (type)
100 {
102 if (state == DONE)
104 go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
105 break;
106 default:
107 break;
108 }
109
110 return true;
111 }
112
113 bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
114 {
115 if (_SkipCheckRequiredBosses(player))
116 return true;
117
118 switch (bossId)
119 {
122 return false;
123 break;
124 default:
125 break;
126 }
127
128 return true;
129 }
130 };
131
133 {
135 }
136};
137
139{
141}
uint32_t uint32
Definition: Define.h:142
EncounterState
@ DONE
@ GO_FLAG_NOT_SELECTABLE
#define DataHeader
uint32 const EncounterCount
void RemoveFlag(GameObjectFlags flags)
Definition: GameObject.h:275
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void LoadDungeonEncounterData(T const &encounters)
EncounterState GetBossState(uint32 id) const
virtual void OnGameObjectCreate(GameObject *go) override
void LoadDoorData(DoorData const *data)
GameObject * GetGameObject(uint32 type)
bool _SkipCheckRequiredBosses(Player const *player=nullptr) const
void SetHeaders(std::string const &dataHeaders)
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
uint32 GetEntry() const
Definition: Object.h:161
InstanceScript * GetInstanceScript(InstanceMap *map) const override
@ DATA_GO_SKY_FLOOR
@ DATA_GO_MARNAK
@ DATA_GO_TRIBUNAL_CHEST
@ DATA_SJONNIR_THE_IRONSHAPER
@ DATA_MARNAK
@ DATA_MAIDEN_OF_GRIEF
@ DATA_GO_KADDRAK
@ DATA_TRIBUNAL_OF_AGES
@ DATA_KRYSTALLUS
@ DATA_ABEDNEUM
@ DATA_GO_ABEDNEUM
@ DATA_GO_TRIBUNAL_CONSOLE
@ DATA_KADDRAK
#define HoSScriptName
@ GO_ABEDNEUM
@ GO_KADDRAK
@ GO_TRIBUNAL_SKY_FLOOR
@ GO_TRIBUNAL_CHEST
@ GO_TRIBUNAL_CHEST_HERO
@ GO_TRIBUNAL_CONSOLE
@ GO_SJONNIR_DOOR
@ GO_MARNAK
@ NPC_MAIDEN_OF_GRIEF
@ NPC_KADDRAK
@ NPC_KRYSTALLUS
@ NPC_SJONNIR_THE_IRONSHAPER
@ NPC_MARNAK
@ NPC_ABEDNEUM
ObjectData const gameObjectData[]
ObjectData const creatureData[]
DoorData const doorData[]
void AddSC_instance_halls_of_stone()
DungeonEncounterData const encounters[]
bool CheckRequiredBosses(uint32 bossId, Player const *player=nullptr) const override