TrinityCore
Loading...
Searching...
No Matches
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 "ScriptMgr.h"
24
40
42{
43 { DATA_ANDUIN_WRYNN, new CircleBoundary({ -3825.0601f, -2715.4600f }, 45.0f)},
44};
45
51
52static constexpr DungeonEncounterData encounters[] =
53{
54 { DATA_ANDUIN_WRYNN, {{ 2546 }} },
55};
56
58{
59public:
61
63 {
75
76 bool SetBossState(uint32 id, EncounterState state) override
77 {
78 if (!InstanceScript::SetBossState(id, state))
79 return false;
80
81 switch (id)
82 {
84 {
85 if (state == NOT_STARTED)
87 else if (state == IN_PROGRESS)
88 {
90 if (!anduin)
91 return false;
92
94
95 // @TODO: uther, sylvanas and jaina should attack anduin but keep faction 35; we lack core support
97 uther->AI()->AttackStart(anduin);
98
100 {
101 if (Creature* creature = GetCreature(data))
102 creature->AI()->AttackStartCaster(anduin, 25.0f);
103 }
104 }
105 break;
106 }
107 default:
108 break;
109 }
110 return true;
111 }
112
113 void SetData(uint32 type, uint32 data) override
114 {
115 switch (type)
116 {
118 {
120 break;
121 }
122 default:
123 break;
124 }
125 }
126
127 uint32 GetData(uint32 type) const override
128 {
129 switch (type)
130 {
133 default:
134 break;
135 }
136
137 return 0;
138 }
139
140 protected:
142 };
143
148};
149
uint8_t uint8
Definition Define.h:156
uint32_t uint32
Definition Define.h:154
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 DoUpdateWorldState(int32 worldStateId, int32 value)
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)
InstanceScript * GetInstanceScript(InstanceMap *map) const override
static constexpr ObjectData creatureData[]
static constexpr DoorData doorData[]
BossBoundaryData const boundaries
static constexpr DungeonEncounterData encounters[]
void AddSC_instance_sepulcher_of_the_first_ones()
@ 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