TrinityCore
Loading...
Searching...
No Matches
instance_wailing_caverns.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 "Creature.h"
20#include "CreatureAI.h"
21#include "InstanceScript.h"
22#include "wailing_caverns.h"
23
24static constexpr ObjectData creatureData[] =
25{
28 { 0, 0 } // END
29};
30
32{
33public:
35
40
42 {
49
50 bool SetBossState(uint32 type, EncounterState state) override
51 {
52 if (!InstanceScript::SetBossState(type, state))
53 return false;
54
55 switch (type)
56 {
61 if (state == DONE)
62 {
65 {
66 if (Creature* disciple = GetCreature(DATA_DISCIPLE))
67 disciple->AI()->DoAction(ACTION_ALL_DONE);
68 }
69 }
70 break;
71 default:
72 break;
73 }
74 return true;
75 }
76 };
77};
78
uint32_t uint32
Definition Define.h:133
EncounterState
@ DONE
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
Creature * GetCreature(uint32 type)
EncounterState GetBossState(uint32 id) const
void SetHeaders(std::string const &dataHeaders)
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
InstanceScript * GetInstanceScript(InstanceMap *map) const override
static constexpr ObjectData creatureData[]
void AddSC_instance_wailing_caverns()
@ DATA_NARALEX
@ DATA_LORD_PYTHAS
@ DATA_DISCIPLE
@ DATA_LORD_SERPENTIS
@ DATA_LADY_ANACONDRA
@ DATA_LORD_COBRAHN
@ ACTION_ALL_DONE
#define WCScriptName
@ NPC_DISCIPLE
@ NPC_NARALEX