Project SkyFire Core
SkyFire 5.4.8 server core API documentation
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
7SDName: Sunken_Temple
8SD%Complete: 100
9SDComment: Area Trigger + Puzzle event support
10SDCategory: Sunken Temple
11EndScriptData */
12
13/* ContentData
14at_malfurion_Stormrage_trigger
15EndContentData */
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
27{
28public:
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
44{
45public:
46 go_atalai_statue() : GameObjectScript("go_atalai_statue") { }
47
49 {
50 if (InstanceScript* instance = player->GetInstanceScript())
51 instance->SetData(EVENT_STATE, go->GetEntry());
52 return false;
53 }
54
55};
56
#define OVERRIDE
Definition Define.h:60
static constexpr TempSummonType TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
AreaTriggerScript(const char *name)
GameObjectScript(const char *name)
bool OnTrigger(Player *player, const AreaTriggerEntry *) OVERRIDE
bool OnGossipHello(Player *player, GameObject *go) OVERRIDE
void AddSC_sunken_temple()
#define EVENT_STATE