Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
sunken_temple.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
/* ScriptData
7
SDName: Sunken_Temple
8
SD%Complete: 100
9
SDComment: Area Trigger + Puzzle event support
10
SDCategory: Sunken Temple
11
EndScriptData */
12
13
/* ContentData
14
at_malfurion_Stormrage_trigger
15
EndContentData */
16
17
#include "
ScriptMgr.h
"
18
#include "
ScriptedCreature.h
"
19
#include "
sunken_temple.h
"
20
#include "
Player.h
"
21
22
/*#####
23
# at_malfurion_Stormrage_trigger
24
#####*/
25
26
class
at_malfurion_stormrage
:
public
AreaTriggerScript
27
{
28
public
:
29
at_malfurion_stormrage
() :
AreaTriggerScript
(
"at_malfurion_stormrage"
) { }
30
31
bool
OnTrigger
(
Player
* player,
const
AreaTriggerEntry
*
/*at*/
)
OVERRIDE
32
{
33
if
(player->GetInstanceScript() && !player->FindNearestCreature(15362, 15))
34
player->SummonCreature(15362, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), -1.52f,
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
, 100000);
35
return
false
;
36
}
37
38
};
39
/*#####
40
# go_atalai_statue
41
#####*/
42
43
class
go_atalai_statue
:
public
GameObjectScript
44
{
45
public
:
46
go_atalai_statue
() :
GameObjectScript
(
"go_atalai_statue"
) { }
47
48
bool
OnGossipHello
(
Player
* player,
GameObject
* go)
OVERRIDE
49
{
50
if
(
InstanceScript
* instance = player->GetInstanceScript())
51
instance->SetData(
EVENT_STATE
, go->GetEntry());
52
return
false
;
53
}
54
55
};
56
57
void
AddSC_sunken_temple
()
58
{
59
new
at_malfurion_stormrage
();
60
new
go_atalai_statue
();
61
}
OVERRIDE
#define OVERRIDE
Definition
Define.h:60
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
static constexpr TempSummonType TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition
ElunaCompatibility.h:25
Player.h
ScriptMgr.h
ScriptedCreature.h
AreaTriggerScript::AreaTriggerScript
AreaTriggerScript(const char *name)
Definition
ScriptMgr.cpp:1448
GameObject
Definition
GameObject.h:629
GameObjectScript::GameObjectScript
GameObjectScript(const char *name)
Definition
ScriptMgr.cpp:1442
InstanceScript
Definition
InstanceScript.h:123
Player
Definition
Player.h:1289
at_malfurion_stormrage
Definition
sunken_temple.cpp:27
at_malfurion_stormrage::OnTrigger
bool OnTrigger(Player *player, const AreaTriggerEntry *) OVERRIDE
Definition
sunken_temple.cpp:31
at_malfurion_stormrage::at_malfurion_stormrage
at_malfurion_stormrage()
Definition
sunken_temple.cpp:29
go_atalai_statue
Definition
sunken_temple.cpp:44
go_atalai_statue::go_atalai_statue
go_atalai_statue()
Definition
sunken_temple.cpp:46
go_atalai_statue::OnGossipHello
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
Definition
sunken_temple.cpp:48
AreaTriggerEntry
Definition
DBCStructure.h:716
AddSC_sunken_temple
void AddSC_sunken_temple()
Definition
sunken_temple.cpp:57
sunken_temple.h
EVENT_STATE
#define EVENT_STATE
Definition
sunken_temple.h:21
src
server
scripts
EasternKingdoms
SunkenTemple
sunken_temple.cpp
Generated on
for Project SkyFire Core by
1.17.0