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 "Creature.h"
20#include "GameObject.h"
21#include "halls_of_stone.h"
22#include "InstanceScript.h"
23#include "Map.h"
24#include "Player.h"
25
31
42
54
56{
57 public:
59
61 {
69
70 void OnGameObjectCreate(GameObject* go) override
71 {
73
74 switch (go->GetEntry())
75 {
80 break;
81 default:
82 break;
83 }
84 }
85
86 bool SetBossState(uint32 type, EncounterState state) override
87 {
88 if (!InstanceScript::SetBossState(type, state))
89 return false;
90
91 switch (type)
92 {
94 if (state == DONE)
96 go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
97 break;
98 default:
99 break;
100 }
101
102 return true;
103 }
104
105 bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
106 {
107 if (_SkipCheckRequiredBosses(player))
108 return true;
109
110 switch (bossId)
111 {
114 return false;
115 break;
116 default:
117 break;
118 }
119
120 return true;
121 }
122 };
123
125 {
127 }
128};
129
uint32_t uint32
Definition Define.h:133
EncounterState
@ DONE
@ DOOR_TYPE_ROOM
@ DOOR_TYPE_PASSAGE
@ GO_FLAG_NOT_SELECTABLE
#define DataHeader
uint32 const EncounterCount
void RemoveFlag(GameObjectFlags flags)
Definition GameObject.h:172
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
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:81
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()
bool CheckRequiredBosses(uint32 bossId, Player const *player=nullptr) const override