TrinityCore
Loading...
Searching...
No Matches
instance_sethekk_halls.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 "InstanceScript.h"
22#include "sethekk_halls.h"
23
28
33
34static constexpr DungeonEncounterData encounters[] =
35{
36 { DATA_DARKWEAVER_SYTH, {{ 1903 }} },
37 { DATA_TALON_KING_IKISS, {{ 1902 }} },
38 { DATA_ANZU, {{ 1904 }} }
39};
40
42{
43 public:
45
47 {
56
57 void OnCreatureCreate(Creature* creature) override
58 {
59 if (creature->GetEntry() == NPC_ANZU)
60 {
62 creature->DisappearAndDie();
63 else
65 }
66 }
67
68 bool SetBossState(uint32 type, EncounterState state) override
69 {
70 if (!InstanceScript::SetBossState(type, state))
71 return false;
72
73 switch (type)
74 {
76 if (state == DONE)
77 {
83 }
84 break;
85 default:
86 break;
87 }
88 return true;
89 }
90 };
91
93 {
95 }
96};
97
uint32_t uint32
Definition Define.h:154
EncounterState
@ IN_PROGRESS
@ DONE
@ GO_FLAG_INTERACT_COND
@ GO_FLAG_NOT_SELECTABLE
#define DataHeader
uint32 const EncounterCount
void DisappearAndDie()
Definition Creature.h:95
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
void LoadDoorData(std::span< DoorData const > data)
GameObject * GetGameObject(uint32 type)
uint32 GetEntry() const
Definition Object.h:89
InstanceScript * GetInstanceScript(InstanceMap *map) const override
void AddSC_instance_sethekk_halls()
static constexpr DoorData doorData[]
static constexpr ObjectData gameObjectData[]
static constexpr DungeonEncounterData encounters[]
@ DATA_TALON_KING_COFFER
@ DATA_DARKWEAVER_SYTH
@ DATA_TALON_KING_IKISS
@ DATA_ANZU
#define SHScriptName
@ NPC_ANZU
@ GO_IKISS_DOOR
@ GO_TALON_KING_COFFER
bool SetBossState(uint32 type, EncounterState state) override