TrinityCore
Loading...
Searching...
No Matches
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 "Log.h"
24#include "Map.h"
25#include "Player.h"
26
28{
29public:
31
33 {
35 }
36
38 {
44
47
49
50 void OnCreatureCreate(Creature* creature) override
51 {
52 switch (creature->GetEntry())
53 {
56 break;
57 }
58 }
59
60 void OnGameObjectCreate(GameObject* go) override
61 {
62 switch (go->GetEntry())
63 {
64 case GO_CAVE_IN_LEFT:
66 break;
69 break;
70 }
71 }
72
73 void OnUnitDeath(Unit* unit) override
74 {
75 Creature* creature = unit->ToCreature();
76 if (creature)
77 switch (creature->GetEntry())
78 {
81 break;
84 break;
87 break;
88 case NPC_MEKGINEER:
90 break;
91 }
92 }
93
94 ObjectGuid GetGuidData(uint32 uiType) const override
95 {
96 switch (uiType)
97 {
101 }
102
103 return ObjectGuid::Empty;
104 }
105 };
106
107};
108
uint32_t uint32
Definition Define.h:133
@ DONE
#define DataHeader
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void SetHeaders(std::string const &dataHeaders)
static ObjectGuid const Empty
Definition ObjectGuid.h:140
static Creature * ToCreature(Object *o)
Definition Object.h:186
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
Definition Unit.h:769
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
#define MAX_ENCOUNTER
void AddSC_instance_gnomeregan()