TrinityCore
instance_gnomeregan.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 "gnomeregan.h"
22#include "InstanceScript.h"
23#include "Map.h"
24
25static constexpr DungeonEncounterData Encounters[] =
26{
27 { DATA_BLASTMASTER_EVENT, { { 379 } } },
28 { DATA_VICIOUS_FALLOUT , { { 378 } } },
29 { DATA_ELECTROCUTIONER , { { 380 } } },
30 { DATA_CROWD_PUMMELER , { { 381 } } },
31 { DATA_THERMAPLUGG , { { 382 } } },
32};
33
35{
36public:
38
40 {
42 }
43
45 {
47 {
51 }
52
55
57
58 void OnCreatureCreate(Creature* creature) override
59 {
60 switch (creature->GetEntry())
61 {
64 break;
65 }
66 }
67
68 void OnGameObjectCreate(GameObject* go) override
69 {
70 switch (go->GetEntry())
71 {
72 case GO_CAVE_IN_LEFT:
74 break;
77 break;
78 }
79 }
80
81 void OnUnitDeath(Unit* unit) override
82 {
83 Creature* creature = unit->ToCreature();
84 if (creature)
85 switch (creature->GetEntry())
86 {
89 break;
92 break;
95 break;
96 case NPC_MEKGINEER:
98 break;
99 }
100 }
101
102 ObjectGuid GetGuidData(uint32 uiType) const override
103 {
104 switch (uiType)
105 {
109 }
110
111 return ObjectGuid::Empty;
112 }
113 };
114
115};
116
118{
120}
uint32_t uint32
Definition: Define.h:142
@ DONE
#define DataHeader
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void LoadDungeonEncounterData(T const &encounters)
void SetHeaders(std::string const &dataHeaders)
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
static Creature * ToCreature(Object *o)
Definition: Object.h:219
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
Definition: Unit.h:627
InstanceScript * GetInstanceScript(InstanceMap *map) const override
@ NPC_BLASTMASTER_EMI_SHORTFUSE
Definition: gnomeregan.h:35
@ NPC_ELECTROCUTIONER
Definition: gnomeregan.h:40
@ NPC_CROWD_PUMMELER
Definition: gnomeregan.h:41
@ NPC_MEKGINEER
Definition: gnomeregan.h:42
@ NPC_VICIOUS_FALLOUT
Definition: gnomeregan.h:38
@ GO_CAVE_IN_LEFT
Definition: gnomeregan.h:28
@ GO_CAVE_IN_RIGHT
Definition: gnomeregan.h:29
@ DATA_NPC_BASTMASTER_EMI_SHORTFUSE
Definition: gnomeregan.h:60
@ DATA_GO_CAVE_IN_LEFT
Definition: gnomeregan.h:58
@ DATA_GO_CAVE_IN_RIGHT
Definition: gnomeregan.h:59
#define GNOScriptName
Definition: gnomeregan.h:23
@ DATA_THERMAPLUGG
Definition: gnomeregan.h:51
@ DATA_VICIOUS_FALLOUT
Definition: gnomeregan.h:48
@ DATA_ELECTROCUTIONER
Definition: gnomeregan.h:49
@ DATA_CROWD_PUMMELER
Definition: gnomeregan.h:50
@ DATA_BLASTMASTER_EVENT
Definition: gnomeregan.h:47
static constexpr DungeonEncounterData Encounters[]
void AddSC_instance_gnomeregan()
#define MAX_ENCOUNTER