TrinityCore
instance_kings_rest.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 "Creature.h"
19#include "InstanceScript.h"
20#include "Map.h"
21#include "ScriptMgr.h"
22#include "kings_rest.h"
23
25{
32 { 0, 0 } // END
33};
34
36{
39};
40
42{
45 { 0, 0 } // END
46};
47
49{
50 { DATA_GOLDEN_SERPENT, {{ 2139 }} },
51 { DATA_COUNCIL_OF_TRIBES, {{ 2140 }} },
52 { DATA_MCHIMBA_THE_EMBALMER, {{ 2142 }} },
53 { DATA_KING_DAZAR, {{ 2143 }} },
54};
55
57{
58public:
60
62 {
64 {
70
72 }
73
74 void OnCreatureCreate(Creature* creature) override
75 {
77
78 if (creature->HasStringId("TempleEvent"))
80 }
81
82 void OnUnitDeath(Unit* unit) override
83 {
84 Creature* creature = unit->ToCreature();
85 if (!creature)
86 return;
87
88 if (creature->HasStringId("TempleEvent"))
89 {
92 return;
93
95 }
96 }
97
98 private:
100 };
101
103 {
105 }
106};
107
109{
111}
uint8_t uint8
Definition: Define.h:144
#define DataHeader
uint32 const EncounterCount
bool HasStringId(std::string_view id) const
Definition: Creature.cpp:3184
void SetBossNumber(uint32 number)
virtual void OnCreatureCreate(Creature *creature) override
void LoadDungeonEncounterData(T const &encounters)
InstanceMap * instance
void LoadDoorData(DoorData const *data)
void SetHeaders(std::string const &dataHeaders)
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
bool SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn=false, bool force=false, std::vector< WorldObject * > *spawnedObjects=nullptr)
Definition: Map.cpp:2329
static Creature * ToCreature(Object *o)
Definition: Object.h:255
Definition: Unit.h:631
InstanceScript * GetInstanceScript(InstanceMap *map) const override
ObjectData const creatureData[]
ObjectData const objectData[]
DoorData const doorData[]
void AddSC_instance_kings_rest()
DungeonEncounterData const encounters[]
@ BOSS_ZANAZAL_THE_WISE
Definition: kings_rest.h:51
@ BOSS_GOLDEN_SERPENT
Definition: kings_rest.h:49
@ BOSS_MCHIMBA_THE_EMBALMER
Definition: kings_rest.h:53
@ BOSS_AKAALI_THE_CONQUEROR
Definition: kings_rest.h:50
@ BOSS_KULA_THE_BUTCHER
Definition: kings_rest.h:52
@ BOSS_KING_DAZAR
Definition: kings_rest.h:54
#define KingsRestScriptName
Definition: kings_rest.h:24
@ SPAWN_GROUP_SERPENT_BOSS
Definition: kings_rest.h:67
@ GO_KINGS_REST_LIQUID_GOLD_POOL
Definition: kings_rest.h:61
@ GO_KINGS_REST_ENTRYWAY_DOOR
Definition: kings_rest.h:59
@ GO_KINGS_REST_SERPENT_POST_DOOR
Definition: kings_rest.h:60
@ DATA_COUNCIL_OF_TRIBES
Definition: kings_rest.h:33
@ DATA_KULA_THE_BUTCHER
Definition: kings_rest.h:39
@ DATA_GOLDEN_SERPENT
Definition: kings_rest.h:31
@ DATA_KINGS_REST_INTRO_DOOR
Definition: kings_rest.h:42
@ DATA_ZANAZAL_THE_WISE
Definition: kings_rest.h:38
@ DATA_KINGS_REST_LIQUID_POOL
Definition: kings_rest.h:43
@ DATA_MCHIMBA_THE_EMBALMER
Definition: kings_rest.h:32
@ DATA_KING_DAZAR
Definition: kings_rest.h:34
@ DATA_AKAALI_THE_CONQUEROR
Definition: kings_rest.h:37