TrinityCore
Loading...
Searching...
No Matches
instance_the_stonevault.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 "InstanceScript.h"
22#include "ScriptMgr.h"
23#include "the_stonevault.h"
24
26{
27 { DATA_EDNA, new CircleBoundary({ 0.0f, 0.0f }, 58.0f)}
28};
29
38
45
46static constexpr DungeonEncounterData encounters[] =
47{
48 { DATA_EDNA, {{ 2854 }} },
49 { DATA_SKARMORAK, {{ 2880 }} },
50 { DATA_MASTER_MACHINISTS, {{ 2883 }} },
51 { DATA_VOID_SPEAKER_EIRICH, {{ 2888 }} }
52};
53
55
57{
58public:
60
62 {
75
76 uint32 GetData(uint32 dataId) const override
77 {
78 switch (dataId)
79 {
81 return _ednaIntroState;
82 default:
83 break;
84 }
85 return 0;
86 }
87
88 void SetData(uint32 dataId, uint32 value) override
89 {
90 switch (dataId)
91 {
93 _ednaIntroState = value;
94 break;
95 default:
96 break;
97 }
98 }
99
100 void OnUnitDeath(Unit* unit) override
101 {
102 Creature* creature = unit->ToCreature();
103 if (!creature)
104 return;
105
106 if (creature->HasStringId("edna_intro_trash"))
107 {
109 return;
110
113 return;
114
116
118 if (!edna)
119 return;
120
122 }
123 }
124
125 private:
128 };
129
131 {
133 }
134};
135
uint8_t uint8
Definition Define.h:156
uint32_t uint32
Definition Define.h:154
@ IN_PROGRESS
@ NOT_STARTED
#define DataHeader
uint32 const EncounterCount
bool HasStringId(std::string_view id) const
CreatureAI * AI() const
Definition Creature.h:228
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)
Creature * ToCreature()
Definition Object.h:121
virtual void DoAction(int32 param)
Definition UnitAI.h:73
Definition Unit.h:635
InstanceScript * GetInstanceScript(InstanceMap *map) const override
static constexpr ObjectData creatureData[]
void AddSC_instance_the_stonevault()
constexpr uint8 EDNA_INTRO_REQUIRED_KILLS
static constexpr DoorData doorData[]
BossBoundaryData const boundaries
static constexpr DungeonEncounterData encounters[]
@ DATA_SKARMORAK
@ DATA_SPEAKER_BROKK
@ DATA_MASTER_MACHINISTS
@ DATA_VOID_SPEAKER_EIRICH
@ DATA_SPEAKER_DORLITA
@ DATA_EDNA
@ DATA_EDNA_INTRO_STATE
#define TSVScriptName
@ ACTION_START_EDNA_INTRO
@ GO_FOUNDRY_DOOR_TOWARDS_MACHINISTS
@ GO_FOUNDRY_DOOR_TOWARDS_SKARMORAK
@ GO_FOUNDRY_DOOR_ENTRANCE
@ BOSS_SPEAKER_BROKK
@ BOSS_SKARMORAX
@ BOSS_EDNA
@ BOSS_SPEAKER_DORLITA
@ BOSS_VOID_SPEAKER_EIRICH