TrinityCore
Loading...
Searching...
No Matches
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
33
38
44
45static constexpr DungeonEncounterData encounters[] =
46{
47 { DATA_GOLDEN_SERPENT, {{ 2139 }} },
48 { DATA_COUNCIL_OF_TRIBES, {{ 2140 }} },
49 { DATA_MCHIMBA_THE_EMBALMER, {{ 2142 }} },
50 { DATA_KING_DAZAR, {{ 2143 }} },
51};
52
54{
55public:
57
59 {
70
71 void OnCreatureCreate(Creature* creature) override
72 {
74
75 if (creature->HasStringId("TempleEvent"))
77 }
78
79 void OnUnitDeath(Unit* unit) override
80 {
81 Creature* creature = unit->ToCreature();
82 if (!creature)
83 return;
84
85 if (creature->HasStringId("TempleEvent"))
86 {
89 return;
90
92 }
93 }
94
95 private:
97 };
98
100 {
102 }
103};
104
uint8_t uint8
Definition Define.h:156
#define DataHeader
uint32 const EncounterCount
bool HasStringId(std::string_view id) const
void SetBossNumber(uint32 number)
virtual void OnCreatureCreate(Creature *creature) override
void LoadObjectData(std::span< ObjectData const > creatureData, std::span< ObjectData const > gameObjectData)
InstanceMap * instance
void SetHeaders(std::string_view dataHeaders)
void LoadDungeonEncounterData(std::span< DungeonEncounterData const > encounters)
void LoadDoorData(std::span< DoorData const > data)
bool SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn=false, bool force=false, std::vector< WorldObject * > *spawnedObjects=nullptr)
Definition Map.cpp:2350
Creature * ToCreature()
Definition Object.h:121
Definition Unit.h:635
InstanceScript * GetInstanceScript(InstanceMap *map) const override
static constexpr ObjectData creatureData[]
static constexpr ObjectData objectData[]
static constexpr DoorData doorData[]
void AddSC_instance_kings_rest()
static constexpr DungeonEncounterData 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