TrinityCore
Loading...
Searching...
No Matches
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 "GameObject.h"
20#include "halls_of_stone.h"
21#include "InstanceScript.h"
22
27
37
48
49static constexpr DungeonEncounterData encounters[] =
50{
51 { DATA_KRYSTALLUS, {{ 1994 }} },
52 { DATA_MAIDEN_OF_GRIEF, {{ 1996 }} },
53 { DATA_TRIBUNAL_OF_AGES, {{ 1995 }} },
54 { DATA_SJONNIR_THE_IRONSHAPER, {{ 1998 }} }
55};
56
58{
59 public:
61
63 {
72
73 void OnGameObjectCreate(GameObject* go) override
74 {
76
77 switch (go->GetEntry())
78 {
83 break;
84 default:
85 break;
86 }
87 }
88
89 bool SetBossState(uint32 type, EncounterState state) override
90 {
91 if (!InstanceScript::SetBossState(type, state))
92 return false;
93
94 switch (type)
95 {
97 if (state == DONE)
99 go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
100 break;
101 default:
102 break;
103 }
104
105 return true;
106 }
107
108 bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
109 {
110 if (_SkipCheckRequiredBosses(player))
111 return true;
112
113 switch (bossId)
114 {
117 return false;
118 break;
119 default:
120 break;
121 }
122
123 return true;
124 }
125 };
126
128 {
130 }
131};
132
uint32_t uint32
Definition Define.h:154
EncounterState
@ DONE
@ GO_FLAG_NOT_SELECTABLE
#define DataHeader
uint32 const EncounterCount
void RemoveFlag(GameObjectFlags flags)
Definition GameObject.h:278
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void LoadObjectData(std::span< ObjectData const > creatureData, std::span< ObjectData const > gameObjectData)
void SetHeaders(std::string_view dataHeaders)
void LoadDungeonEncounterData(std::span< DungeonEncounterData const > encounters)
EncounterState GetBossState(uint32 id) const
virtual void OnGameObjectCreate(GameObject *go) override
void LoadDoorData(std::span< DoorData const > data)
GameObject * GetGameObject(uint32 type)
bool _SkipCheckRequiredBosses(Player const *player=nullptr) const
uint32 GetEntry() const
Definition Object.h:89
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
static constexpr ObjectData creatureData[]
void AddSC_instance_halls_of_stone()
static constexpr DoorData doorData[]
static constexpr ObjectData gameObjectData[]
static constexpr DungeonEncounterData encounters[]
bool CheckRequiredBosses(uint32 bossId, Player const *player=nullptr) const override