TrinityCore
Loading...
Searching...
No Matches
instance_the_slave_pens.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/*
19This placeholder for the instance is needed for dungeon finding to be able
20to give credit after the boss defined in lastEncounterDungeon is killed.
21Without it, the party doing random dungeon won't get satchel of spoils and
22gets instead the deserter debuff.
23*/
24
25#include "ScriptMgr.h"
26#include "Creature.h"
27#include "InstanceScript.h"
28#include "the_slave_pens.h"
29
44
46{
47public:
49
51 {
58
59 void OnCreatureCreate(Creature* creature) override
60 {
62
63 if (creature->GetEntry() == NPC_EARTHEN_RING_FLAMECALLER)
64 {
65 switch (counter)
66 {
68 FlameCallerGUIDs[0] = creature->GetGUID();
69 break;
71 FlameCallerGUIDs[1] = creature->GetGUID();
72 break;
74 FlameCallerGUIDs[2] = creature->GetGUID();
75 break;
76 default:
77 break;
78 }
79 ++counter;
80 }
81 }
82
83 ObjectGuid GetGuidData(uint32 type) const override
84 {
85 switch (type)
86 {
88 return FlameCallerGUIDs[0];
90 return FlameCallerGUIDs[1];
92 return FlameCallerGUIDs[2];
93 default:
94 break;
95 }
96 return ObjectGuid::Empty;
97 }
98
99 protected:
102 };
103
105 {
107 }
108};
109
uint8_t uint8
Definition Define.h:135
uint32_t uint32
Definition Define.h:133
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual void OnCreatureCreate(Creature *creature) override
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
static ObjectGuid const Empty
Definition ObjectGuid.h:140
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
InstanceScript * GetInstanceScript(InstanceMap *map) const override
ObjectData const creatureData[]
void AddSC_instance_the_slave_pens()
@ NPC_SHAMAN_BONFIRE_BUNNY_001
@ NPC_SHAMAN_BEAM_BUNNY_001
@ NPC_SHAMAN_BEAM_BUNNY_000
@ NPC_FROZEN_CORE
@ NPC_AHUNE
@ NPC_EARTHEN_RING_FLAMECALLER
@ NPC_SHAMAN_BONFIRE_BUNNY_002
@ NPC_AHUNE_LOC_BUNNY
@ NPC_SHAMAN_BONFIRE_BUNNY_000
@ NPC_LUMA_SKYMOTHER
@ NPC_SHAMAN_BEAM_BUNNY_002
@ DATA_BONFIRE_BUNNY_000
@ DATA_BEAM_BUNNY_002
@ DATA_AHUNE_BUNNY
@ DATA_FLAMECALLER_000
@ DATA_FROZEN_CORE
@ DATA_AHUNE
@ DATA_BEAM_BUNNY_001
@ DATA_FLAMECALLER_001
@ DATA_BONFIRE_BUNNY_001
@ DATA_LUMA_SKYMOTHER
@ DATA_BEAM_BUNNY_000
@ DATA_BONFIRE_BUNNY_002
@ DATA_FLAMECALLER_002
#define SPScriptName