TrinityCore
Loading...
Searching...
No Matches
steam_vault.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 "
GameObject.h
"
22
#include "
GameObjectAI.h
"
23
#include "
InstanceScript.h
"
24
#include "
steam_vault.h
"
25
26
enum
MainChambersAccessPanelMisc
27
{
28
EMOTE_PANEL_USED
= 0,
29
EMOTE_MAIN_DOOR_OPENS
= 1
30
};
31
32
// 184125, 184126 - Main Chambers Access Panel
33
struct
go_main_chambers_access_panel
:
public
GameObjectAI
34
{
35
go_main_chambers_access_panel
(
GameObject
* go) :
GameObjectAI
(go),
_instance
(go->GetInstanceScript()) { }
36
37
bool
OnGossipHello
(
Player
*
/*player*/
)
override
38
{
39
me
->
ActivateObject
(
GameObjectActions::MakeInert
, 0);
40
41
if
(
Creature
* controller =
_instance
->
GetCreature
(
DATA_DOOR_CONTROLLER
))
42
controller->AI()->Talk(
EMOTE_PANEL_USED
);
43
44
if
(
_instance
->
GetBossState
(
DATA_HYDROMANCER_THESPIA
) ==
DONE
&&
_instance
->
GetBossState
(
DATA_MEKGINEER_STEAMRIGGER
) ==
DONE
)
45
{
46
if
(
Creature
* controller =
_instance
->
GetCreature
(
DATA_DOOR_CONTROLLER
))
47
controller->AI()->Talk(
EMOTE_MAIN_DOOR_OPENS
);
48
49
if
(
GameObject
* go =
_instance
->
GetGameObject
(
DATA_MAIN_CHAMBERS_DOOR
))
50
{
51
_instance
->
HandleGameObject
(
ObjectGuid::Empty
,
true
, go);
52
go->ActivateObject(
GameObjectActions::MakeInert
, 0);
53
}
54
}
55
56
return
false
;
57
}
58
59
private
:
60
InstanceScript
*
_instance
;
61
};
62
63
void
AddSC_steam_vault
()
64
{
65
RegisterSteamVaultGameObjectAI
(
go_main_chambers_access_panel
);
66
}
CreatureAI.h
Creature.h
GameObjectAI.h
GameObjectActions::MakeInert
@ MakeInert
GameObject.h
InstanceScript.h
DONE
@ DONE
Definition
InstanceScript.h:73
ScriptMgr.h
Creature
Definition
Creature.h:82
GameObjectAI
Definition
GameObjectAI.h:44
GameObjectAI::me
GameObject *const me
Definition
GameObjectAI.h:50
GameObject
Definition
GameObject.h:172
GameObject::ActivateObject
void ActivateObject(GameObjectActions action, int32 param, WorldObject *spellCaster=nullptr, uint32 spellId=0, int32 effectIndex=-1)
Definition
GameObject.cpp:2447
InstanceScript
Definition
InstanceScript.h:182
InstanceScript::GetCreature
Creature * GetCreature(uint32 type)
Definition
InstanceScript.cpp:145
InstanceScript::HandleGameObject
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition
InstanceScript.cpp:574
InstanceScript::GetBossState
EncounterState GetBossState(uint32 id) const
Definition
InstanceScript.h:270
InstanceScript::GetGameObject
GameObject * GetGameObject(uint32 type)
Definition
InstanceScript.cpp:150
ObjectGuid::Empty
static ObjectGuid const Empty
Definition
ObjectGuid.h:314
Player
Definition
Player.h:1217
AddSC_steam_vault
void AddSC_steam_vault()
Definition
steam_vault.cpp:63
MainChambersAccessPanelMisc
MainChambersAccessPanelMisc
Definition
steam_vault.cpp:27
EMOTE_MAIN_DOOR_OPENS
@ EMOTE_MAIN_DOOR_OPENS
Definition
steam_vault.cpp:29
EMOTE_PANEL_USED
@ EMOTE_PANEL_USED
Definition
steam_vault.cpp:28
steam_vault.h
DATA_MAIN_CHAMBERS_DOOR
@ DATA_MAIN_CHAMBERS_DOOR
Definition
steam_vault.h:36
DATA_HYDROMANCER_THESPIA
@ DATA_HYDROMANCER_THESPIA
Definition
steam_vault.h:30
DATA_DOOR_CONTROLLER
@ DATA_DOOR_CONTROLLER
Definition
steam_vault.h:37
DATA_MEKGINEER_STEAMRIGGER
@ DATA_MEKGINEER_STEAMRIGGER
Definition
steam_vault.h:31
RegisterSteamVaultGameObjectAI
#define RegisterSteamVaultGameObjectAI(ai_name)
Definition
steam_vault.h:62
go_main_chambers_access_panel
Definition
steam_vault.cpp:34
go_main_chambers_access_panel::OnGossipHello
bool OnGossipHello(Player *) override
Definition
steam_vault.cpp:37
go_main_chambers_access_panel::go_main_chambers_access_panel
go_main_chambers_access_panel(GameObject *go)
Definition
steam_vault.cpp:35
go_main_chambers_access_panel::_instance
InstanceScript * _instance
Definition
steam_vault.cpp:60
server
scripts
Outland
CoilfangReservoir
SteamVault
steam_vault.cpp
Generated by
1.9.8