TrinityCore
instance_sepulcher_of_the_first_ones.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 "Map.h"
23#include "ScriptMgr.h"
25
27{
28 // Anduin Wrynn
40 { 0, 0 }
41};
42
44{
45 { DATA_ANDUIN_WRYNN, new CircleBoundary({ -3825.0601f, -2715.4600f }, 45.0)},
46};
47
49{
53};
54
56{
57 { DATA_ANDUIN_WRYNN, {{ 2546 }} },
58};
59
61{
62public:
64
66 {
68 {
75
77 }
78
79 bool SetBossState(uint32 id, EncounterState state) override
80 {
81 if (!InstanceScript::SetBossState(id, state))
82 return false;
83
84 switch (id)
85 {
87 {
88 if (state == NOT_STARTED)
90 else if (state == IN_PROGRESS)
91 {
93 if (!anduin)
94 return false;
95
97
98 // @TODO: uther, sylvanas and jaina should attack anduin but keep faction 35; we lack core support
100 uther->AI()->AttackStart(anduin);
101
103 {
104 if (Creature* creature = GetCreature(data))
105 creature->AI()->AttackStartCaster(anduin, 25.0f);
106 }
107 }
108 break;
109 }
110 default:
111 break;
112 }
113 return true;
114 }
115
116 void SetData(uint32 type, uint32 data) override
117 {
118 switch (type)
119 {
121 {
123 break;
124 }
125 default:
126 break;
127 }
128 }
129
130 uint32 GetData(uint32 type) const override
131 {
132 switch (type)
133 {
136 default:
137 break;
138 }
139
140 return 0;
141 }
142
143 protected:
145 };
146
148 {
150 }
151};
152
154{
156}
uint8_t uint8
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:142
EncounterState
@ IN_PROGRESS
@ NOT_STARTED
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
Creature * GetCreature(uint32 type)
void LoadDungeonEncounterData(T const &encounters)
void DoUpdateWorldState(int32 worldStateId, int32 value)
void LoadDoorData(DoorData const *data)
void LoadBossBoundaries(BossBoundaryData const &data)
void SetHeaders(std::string const &dataHeaders)
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
InstanceScript * GetInstanceScript(InstanceMap *map) const override
ObjectData const creatureData[]
DoorData const doorData[]
BossBoundaryData const boundaries
void AddSC_instance_sepulcher_of_the_first_ones()
DungeonEncounterData const encounters[]
@ WORLD_STATE_ANDUIN_ENCOUNTER_STARTED
#define SFOScriptName
@ BOSS_REMNANT_OF_A_FALLEN_KING
@ NPC_QUARTERMASTER_RAHM_ANDUIN
@ NPC_LADY_JAINA_PROUDMOORE_ANDUIN
@ NPC_SYLVANAS_WINDRUNNER_ANDUIN
@ NPC_BOLVAR_FORDRAGON_ANDUIN
@ NPC_UTHER_THE_LIGHTBRINGER_ANDUIN
@ DATA_QUARTERMASTER_RAHM_ANDUIN
@ DATA_BOLVAR_FORDRAGON_ANDUIN
@ DATA_SYLVANAS_WINDRUNNER_ANDUIN
@ DATA_UTHER_THE_LIGHTBRINGER_ANDUIN
@ DATA_ANDUIN_WRYNN_INTRODUCTION
@ DATA_JAINA_PROUDMOORE_ANDUIN
@ DATA_REMNANT_OF_A_FALLEN_KING
@ GAMEOBJECT_BRIDGE_TO_ANDUIN
@ GAMEOBJECT_BRIDGE_AFTER_ANDUIN