diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 23:20:06 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 23:20:06 -0300 |
| commit | 85a7d5ce9ac68b30da2277cc91d4b70358f1880d (patch) | |
| tree | df3d2084ee2e35008903c03178039b9c986e2d08 /src/server/scripts/EasternKingdoms/SunkenTemple | |
| parent | 052fc24315ace866ea1cf610e85df119b68100c9 (diff) | |
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/server/scripts/EasternKingdoms/SunkenTemple')
3 files changed, 21 insertions, 7 deletions
diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index 396d3f0c004..74d00fbc3ee 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -24,7 +24,9 @@ SDCategory: Sunken Temple EndScriptData */ #include "ScriptMgr.h" +#include "GameObject.h" #include "InstanceScript.h" +#include "Map.h" #include "sunken_temple.h" enum Gameobject @@ -59,7 +61,7 @@ static Position const statuePositions[nStatues] class instance_sunken_temple : public InstanceMapScript { public: - instance_sunken_temple() : InstanceMapScript("instance_sunken_temple", 109) { } + instance_sunken_temple() : InstanceMapScript(STScriptName, 109) { } InstanceScript* GetInstanceScript(InstanceMap* map) const override { @@ -176,14 +178,14 @@ public: void UseStatue(GameObject* go) { - go->SummonGameObject(GO_ATALAI_LIGHT1, *go, G3D::Quat(), 0); + go->SummonGameObject(GO_ATALAI_LIGHT1, *go, QuaternionData(), 0); go->SetUInt32Value(GAMEOBJECT_FLAGS, 4); } void UseLastStatue(GameObject* go) { for (uint8 i = 0; i < nStatues; ++i) - go->SummonGameObject(GO_ATALAI_LIGHT2, statuePositions[i], G3D::Quat(), 0); + go->SummonGameObject(GO_ATALAI_LIGHT2, statuePositions[i], QuaternionData(), 0); go->SummonCreature(NPC_ATALALARION, atalalarianPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200); } diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp index a39f636ee86..f896f7ba17a 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp @@ -28,10 +28,13 @@ at_malfurion_Stormrage_trigger EndContentData */ #include "ScriptMgr.h" -#include "ScriptedCreature.h" +#include "GameObject.h" #include "GameObjectAI.h" -#include "sunken_temple.h" +#include "InstanceScript.h" +#include "Map.h" #include "Player.h" +#include "ScriptedCreature.h" +#include "sunken_temple.h" /*##### # at_malfurion_Stormrage_trigger @@ -49,7 +52,7 @@ class at_malfurion_stormrage : public AreaTriggerScript public: at_malfurion_stormrage() : AreaTriggerScript("at_malfurion_stormrage") { } - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) override + bool OnTrigger(Player* player, AreaTriggerEntry const* /*at*/) override { if (player->GetInstanceScript() && !player->FindNearestCreature(NPC_MALFURION_STORMRAGE, 15.0f) && player->GetQuestStatus(QUEST_THE_CHARGE_OF_DRAGONFLIGHTS) == QUEST_STATUS_REWARDED && player->GetQuestStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) != QUEST_STATUS_REWARDED) @@ -82,7 +85,7 @@ class go_atalai_statue : public GameObjectScript GameObjectAI* GetAI(GameObject* go) const override { - return GetInstanceAI<go_atalai_statueAI>(go); + return GetSunkenTempleAI<go_atalai_statueAI>(go); } }; diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h index c6c2f087850..f2687c5de68 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h @@ -19,6 +19,9 @@ #ifndef DEF_SUNKEN_TEMPLE_H #define DEF_SUNKEN_TEMPLE_H +#include "CreatureAIImpl.h" + +#define STScriptName "instance_sunken_temple" #define DataHeader "ST" enum STEvents @@ -26,4 +29,10 @@ enum STEvents EVENT_STATE = 1 }; +template <class AI, class T> +inline AI* GetSunkenTempleAI(T* obj) +{ + return GetInstanceAI<AI>(obj, STScriptName); +} + #endif |
