TrinityCore
instance_gruuls_lair.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 "gruuls_lair.h"
21#include "InstanceScript.h"
22
24{
28};
29
31{
37 { 0, 0 }
38};
39
41{
42 { DATA_MAULGAR, {{ 649 }} },
43 { DATA_GRUUL, {{ 650 }} }
44};
45
47{
48 public:
50
52 {
54 {
60 }
61
62 void OnCreatureCreate(Creature* creature) override
63 {
65
66 switch (creature->GetEntry())
67 {
68 case NPC_MAULGAR:
69 MaulgarGUID = creature->GetGUID();
70 [[fallthrough]];
75 AddMinion(creature, true);
76 break;
77 default:
78 break;
79 }
80 }
81
82 ObjectGuid GetGuidData(uint32 type) const override
83 {
84 switch (type)
85 {
86 case DATA_MAULGAR:
87 return MaulgarGUID;
88 default:
89 break;
90 }
91 return ObjectGuid::Empty;
92 }
93
94 protected:
96 };
97
99 {
101 }
102};
103
105{
107}
uint32_t uint32
Definition: Define.h:142
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual void OnCreatureCreate(Creature *creature) override
void LoadDungeonEncounterData(T const &encounters)
void AddMinion(Creature *minion, bool add)
void LoadMinionData(MinionData const *data)
void LoadDoorData(DoorData const *data)
void SetHeaders(std::string const &dataHeaders)
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
InstanceScript * GetInstanceScript(InstanceMap *map) const override
@ NPC_MAULGAR
Definition: gruuls_lair.h:37
@ NPC_KROSH_FIREHAND
Definition: gruuls_lair.h:38
@ NPC_KIGGLER_THE_CRAZED
Definition: gruuls_lair.h:40
@ NPC_OLM_THE_SUMMONER
Definition: gruuls_lair.h:39
@ NPC_BLINDEYE_THE_SEER
Definition: gruuls_lair.h:41
#define GLScriptName
Definition: gruuls_lair.h:23
@ GO_GRUUL_DOOR
Definition: gruuls_lair.h:47
@ GO_MAULGAR_DOOR
Definition: gruuls_lair.h:46
@ DATA_GRUUL
Definition: gruuls_lair.h:32
@ DATA_MAULGAR
Definition: gruuls_lair.h:31
MinionData const minionData[]
DoorData const doorData[]
void AddSC_instance_gruuls_lair()
DungeonEncounterData const encounters[]