TrinityCore
Loading...
Searching...
No Matches
instance_forge_of_souls.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 "ScriptMgr.h"
19#include "AreaBoundary.h"
20#include "Creature.h"
21#include "forge_of_souls.h"
22#include "InstanceScript.h"
23#include "Map.h"
24
26{
27 { DATA_BRONJAHM, new CircleBoundary(Position(5297.3f, 2506.45f), 100.96f) },
28 { DATA_DEVOURER_OF_SOULS, new ParallelogramBoundary(Position(5663.56f, 2570.53f), Position(5724.39f, 2520.45f), Position(5570.36f, 2461.42f)) }
29};
30
32{
33 { DATA_BRONJAHM, {{ 2006 }} },
34 { DATA_DEVOURER_OF_SOULS, {{ 2007 }} }
35};
36
38{
39 public:
41
43 {
51
52 void OnCreatureCreate(Creature* creature) override
53 {
54 switch (creature->GetEntry())
55 {
56 case NPC_BRONJAHM:
57 bronjahm = creature->GetGUID();
58 break;
59 case NPC_DEVOURER:
60 devourerOfSouls = creature->GetGUID();
61 break;
62 }
63 }
64
65 uint32 GetCreatureEntry(ObjectGuid::LowType /*guidLow*/, CreatureData const* data) override
66 {
67 uint32 entry = data->id;
68 switch (entry)
69 {
72 case NPC_LORALEN:
74 case NPC_KALIRA:
76 default:
77 return entry;
78 }
79 }
80
81 uint32 GetData(uint32 type) const override
82 {
83 switch (type)
84 {
87 default:
88 break;
89 }
90
91 return 0;
92 }
93
94 ObjectGuid GetGuidData(uint32 type) const override
95 {
96 switch (type)
97 {
98 case DATA_BRONJAHM:
99 return bronjahm;
101 return devourerOfSouls;
102 default:
103 break;
104 }
105
106 return ObjectGuid::Empty;
107 }
108
109 private:
112 };
113
115 {
117 }
118};
119
uint32_t uint32
Definition Define.h:154
@ ALLIANCE
#define DataHeader
uint32 const EncounterCount
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
Team GetTeamInInstance() const
Definition Map.h:903
void SetBossNumber(uint32 number)
InstanceMap * instance
void SetHeaders(std::string_view dataHeaders)
void LoadDungeonEncounterData(std::span< DungeonEncounterData const > encounters)
void LoadBossBoundaries(BossBoundaryData const &data)
static ObjectGuid const Empty
Definition ObjectGuid.h:314
uint64 LowType
Definition ObjectGuid.h:321
uint32 GetEntry() const
Definition Object.h:89
InstanceScript * GetInstanceScript(InstanceMap *map) const override
#define FoSScriptName
@ DATA_TEAM_IN_INSTANCE
@ DATA_DEVOURER_OF_SOULS
@ DATA_BRONJAHM
@ NPC_JAINA_PART1
@ NPC_DEVOURER
@ NPC_KALIRA
@ NPC_KORELN
@ NPC_BRONJAHM
@ NPC_LORALEN
@ NPC_ELANDRA
@ NPC_SYLVANAS_PART1
void AddSC_instance_forge_of_souls()
BossBoundaryData const boundaries
DungeonEncounterData const encounters[]
uint32 id
Definition SpawnData.h:135
uint32 GetCreatureEntry(ObjectGuid::LowType, CreatureData const *data) override