TrinityCore
instance_hellfire_ramparts.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/* ScriptData
19SDName: Instance_Hellfire_Ramparts
20SD%Complete: 50
21SDComment:
22SDCategory: Hellfire Ramparts
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "GameObject.h"
27#include "hellfire_ramparts.h"
28#include "InstanceScript.h"
29#include "Map.h"
30
32{
33 { DATA_WATCHKEEPER_GARGOLMAR, {{ 1893 }} },
34 { DATA_OMOR_THE_UNSCARRED, {{ 1891 }} },
35 { DATA_VAZRUDEN, {{ 1892 }} }
36};
37
39{
40 public:
42
44 {
46 {
50 }
51
52 void OnGameObjectCreate(GameObject* go) override
53 {
54 switch (go->GetEntry())
55 {
59 break;
60 }
61 }
62
63 bool SetBossState(uint32 type, EncounterState state) override
64 {
65 if (!InstanceScript::SetBossState(type, state))
66 return false;
67
68 switch (type)
69 {
70 case DATA_VAZRUDEN:
71 case DATA_NAZAN:
74 chest->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
75 break;
76 default:
77 break;
78 }
79 return true;
80 }
81
82 protected:
84 };
85
87 {
89 }
90};
91
93{
95}
uint32_t uint32
Definition: Define.h:142
EncounterState
@ DONE
@ GO_FLAG_NOT_SELECTABLE
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void LoadDungeonEncounterData(T const &encounters)
InstanceMap * instance
EncounterState GetBossState(uint32 id) const
void SetHeaders(std::string const &dataHeaders)
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3489
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
InstanceScript * GetInstanceScript(InstanceMap *map) const override
@ DATA_WATCHKEEPER_GARGOLMAR
@ DATA_OMOR_THE_UNSCARRED
@ DATA_VAZRUDEN
@ DATA_NAZAN
@ GO_FEL_IRON_CHEST_HEROIC
@ GO_FEL_IRON_CHEST_NORMAL
#define HRScriptName
void AddSC_instance_ramparts()
DungeonEncounterData const encounters[]
bool SetBossState(uint32 type, EncounterState state) override