TrinityCore
Loading...
Searching...
No Matches
instance_azure_vault.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 "AreaBoundary.h"
19#include "Creature.h"
20#include "CreatureAI.h"
21#include "CreatureGroups.h"
22#include "InstanceScript.h"
23#include "ScriptMgr.h"
24#include "azure_vault.h"
25
27{
28 { DATA_LEYMOR, new CircleBoundary(Position(-5129.39f, 1253.30f), 75.0f) }
29};
30
38
44
45static constexpr DungeonEncounterData encounters[] =
46{
47 { DATA_LEYMOR, {{ 2582 }} },
48 { DATA_AZUREBLADE, {{ 2585 }} },
49 { DATA_TELASH_GREYWING, {{ 2583 }} },
50 { DATA_UMBRELSKUL, {{ 2584 }} },
51};
52
54{
55 public:
57
59 {
71
72 uint32 GetData(uint32 dataId) const override
73 {
74 switch (dataId)
75 {
77 return _leymorIntroDone ? 1 : 0;
78 default:
79 break;
80 }
81 return 0;
82 }
83
84 void OnCreatureGroupDepleted(CreatureGroup const* creatureGroup) override
85 {
86 if (!_leymorIntroDone && creatureGroup->LeaderHasStringId("leymor_arcane_tender"))
87 {
88 _leymorIntroDone = true;
89 if (Creature* leymor = GetCreature(DATA_LEYMOR); leymor && leymor->IsAIEnabled())
90 leymor->AI()->DoAction(ACTION_FINISH_LEYMOR_INTRO);
91 }
92 }
93
94 private:
96 };
97
99 {
101 }
102};
103
uint32_t uint32
Definition Define.h:154
#define DataHeader
uint32 const EncounterCount
@ ACTION_FINISH_LEYMOR_INTRO
Definition azure_vault.h:59
#define AVScriptName
Definition azure_vault.h:24
@ GO_ARCANE_VAULTS_DOOR_LEYMOR_EXIT
Definition azure_vault.h:54
@ GO_ARCANE_VAULTS_DOOR_LEYMOR_ENTRANCE
Definition azure_vault.h:53
@ BOSS_UMBRELSKUL
Definition azure_vault.h:45
@ BOSS_TELASH_GREYWING
Definition azure_vault.h:44
@ BOSS_LEYMOR
Definition azure_vault.h:42
@ BOSS_AZUREBLADE
Definition azure_vault.h:43
@ DATA_AZUREBLADE
Definition azure_vault.h:32
@ DATA_LEYMOR_INTRO_DONE
Definition azure_vault.h:36
@ DATA_LEYMOR
Definition azure_vault.h:31
@ DATA_TELASH_GREYWING
Definition azure_vault.h:33
@ DATA_UMBRELSKUL
Definition azure_vault.h:34
bool LeaderHasStringId(std::string_view id) const
void SetBossNumber(uint32 number)
Creature * GetCreature(uint32 type)
void LoadObjectData(std::span< ObjectData const > creatureData, std::span< ObjectData const > gameObjectData)
void SetHeaders(std::string_view dataHeaders)
void LoadDungeonEncounterData(std::span< DungeonEncounterData const > encounters)
void LoadDoorData(std::span< DoorData const > data)
void LoadBossBoundaries(BossBoundaryData const &data)
bool IsAIEnabled() const
Definition Unit.h:666
InstanceScript * GetInstanceScript(InstanceMap *map) const override
static constexpr ObjectData creatureData[]
void AddSC_instance_azure_vault()
static constexpr DoorData doorData[]
static BossBoundaryData const boundaries
static constexpr DungeonEncounterData encounters[]
void OnCreatureGroupDepleted(CreatureGroup const *creatureGroup) override