TrinityCore
instance_the_botanica.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 "InstanceScript.h"
21#include "the_botanica.h"
22
24{
25 { DATA_COMMANDER_SARANNIS, {{ 1925 }} },
26 { DATA_HIGH_BOTANIST_FREYWINN, {{ 1926 }} },
27 { DATA_THORNGRIN_THE_TENDER, {{ 1928 }} },
28 { DATA_LAJ, {{ 1927 }} },
29 { DATA_WARP_SPLINTER, {{ 1929 }} }
30};
31
33{
34 public:
36
38 {
40 {
44 }
45
46 void OnCreatureCreate(Creature* creature) override
47 {
48 switch (creature->GetEntry())
49 {
51 CommanderSarannisGUID = creature->GetGUID();
52 break;
55 break;
57 ThorngrinTheTenderGUID = creature->GetGUID();
58 break;
59 case NPC_LAJ:
60 LajGUID = creature->GetGUID();
61 break;
63 WarpSplinterGUID = creature->GetGUID();
64 break;
65 default:
66 break;
67 }
68 }
69
70 ObjectGuid GetGuidData(uint32 type) const override
71 {
72 switch (type)
73 {
80 case DATA_LAJ:
81 return LajGUID;
83 return WarpSplinterGUID;
84 default:
85 break;
86 }
87
88 return ObjectGuid::Empty;
89 }
90
91 bool SetBossState(uint32 type, EncounterState state) override
92 {
93 if (!InstanceScript::SetBossState(type, state))
94 return false;
95
96 switch (type)
97 {
101 case DATA_LAJ:
103 break;
104 default:
105 break;
106 }
107
108 return true;
109 }
110
111 protected:
117 };
118
120 {
122 }
123};
124
126{
128}
uint32_t uint32
Definition: Define.h:142
EncounterState
#define DataHeader
uint32 const EncounterCount
void SetBossNumber(uint32 number)
virtual bool SetBossState(uint32 id, EncounterState state)
void LoadDungeonEncounterData(T const &encounters)
void SetHeaders(std::string const &dataHeaders)
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
uint32 GetEntry() const
Definition: Object.h:161
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
InstanceScript * GetInstanceScript(InstanceMap *map) const override
void AddSC_instance_the_botanica()
DungeonEncounterData const encounters[]
bool SetBossState(uint32 type, EncounterState state) override
@ NPC_WARP_SPLINTER
Definition: the_botanica.h:43
@ NPC_LAJ
Definition: the_botanica.h:42
@ NPC_COMMANDER_SARANNIS
Definition: the_botanica.h:39
@ NPC_HIGH_BOTANIST_FREYWINN
Definition: the_botanica.h:40
@ NPC_THORNGRIN_THE_TENDER
Definition: the_botanica.h:41
@ DATA_WARP_SPLINTER
Definition: the_botanica.h:34
@ DATA_COMMANDER_SARANNIS
Definition: the_botanica.h:30
@ DATA_LAJ
Definition: the_botanica.h:33
@ DATA_HIGH_BOTANIST_FREYWINN
Definition: the_botanica.h:31
@ DATA_THORNGRIN_THE_TENDER
Definition: the_botanica.h:32
#define BotanicaScriptName
Definition: the_botanica.h:23