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/ShadowfangKeep | |
| parent | 052fc24315ace866ea1cf610e85df119b68100c9 (diff) | |
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ShadowfangKeep')
4 files changed, 36 insertions, 22 deletions
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp index 8e4eb61d322..e39bf1d83f3 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp @@ -16,15 +16,17 @@ */ #include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" +#include "GridNotifiersImpl.h" +#include "Group.h" +#include "InstanceScript.h" #include "LFGMgr.h" +#include "Map.h" +#include "MotionMaster.h" #include "Player.h" -#include "Group.h" -#include "SpellScript.h" -#include "SpellAuraEffects.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" #include "shadowfang_keep.h" -#include "GridNotifiersImpl.h" +#include "SpellScript.h" enum ApothecarySpells { @@ -275,7 +277,7 @@ class boss_apothecary_hummel : public CreatureScript CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI<boss_apothecary_hummelAI>(creature); + return GetShadowfangKeepAI<boss_apothecary_hummelAI>(creature); } }; @@ -325,7 +327,7 @@ class npc_apothecary_frye : public CreatureScript CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI<npc_apothecary_fryeAI>(creature); + return GetShadowfangKeepAI<npc_apothecary_fryeAI>(creature); } }; @@ -388,7 +390,7 @@ class npc_apothecary_baxter : public CreatureScript CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI<npc_apothecary_baxterAI>(creature); + return GetShadowfangKeepAI<npc_apothecary_baxterAI>(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 9e84eb6f59e..9ec2a58f742 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -23,10 +23,13 @@ SDComment: SDCategory: Shadowfang Keep EndScriptData */ -#include "ScriptedCreature.h" #include "ScriptMgr.h" -#include "InstanceScript.h" #include "shadowfang_keep.h" +#include "GameObject.h" +#include "InstanceScript.h" +#include "Log.h" +#include "Map.h" +#include "ScriptedCreature.h" #include "TemporarySummon.h" #define MAX_ENCOUNTER 4 @@ -69,7 +72,7 @@ const Position SpawnLocation[] = class instance_shadowfang_keep : public InstanceMapScript { public: - instance_shadowfang_keep() : InstanceMapScript("instance_shadowfang_keep", 33) { } + instance_shadowfang_keep() : InstanceMapScript(SFKScriptName, 33) { } InstanceScript* GetInstanceScript(InstanceMap* map) const override { @@ -214,7 +217,7 @@ public: return str_data; } - void Load(const char* in) override + void Load(char const* in) override { if (!in) { diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 077a5664b93..86ef68e8c4a 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -28,13 +28,13 @@ npc_shadowfang_prisoner EndContentData */ #include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "SpellScript.h" -#include "SpellAuraEffects.h" -#include "ScriptedEscortAI.h" #include "shadowfang_keep.h" +#include "InstanceScript.h" #include "Player.h" +#include "ScriptedEscortAI.h" +#include "ScriptedGossip.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" /*###### ## npc_shadowfang_prisoner @@ -138,7 +138,7 @@ public: CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI<npc_shadowfang_prisonerAI>(creature); + return GetShadowfangKeepAI<npc_shadowfang_prisonerAI>(creature); } }; @@ -149,7 +149,7 @@ public: CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI<npc_arugal_voidwalkerAI>(creature); + return GetShadowfangKeepAI<npc_arugal_voidwalkerAI>(creature); } struct npc_arugal_voidwalkerAI : public ScriptedAI @@ -312,7 +312,7 @@ class boss_archmage_arugal : public CreatureScript CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI<boss_archmage_arugalAI>(creature); + return GetShadowfangKeepAI<boss_archmage_arugalAI>(creature); } }; @@ -333,7 +333,7 @@ class spell_shadowfang_keep_haunting_spirits : public SpellScriptLoader void HandleDummyTick(AuraEffect const* aurEff) { - GetTarget()->CastSpell((Unit*)NULL, aurEff->GetAmount(), true); + GetTarget()->CastSpell((Unit*)nullptr, aurEff->GetAmount(), true); } void HandleUpdatePeriodic(AuraEffect* aurEff) diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h index 7571f6f8fe3..3b2f6a7e105 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h @@ -19,6 +19,9 @@ #ifndef DEF_SHADOWFANG_H #define DEF_SHADOWFANG_H +#include "CreatureAIImpl.h" + +#define SFKScriptName "instance_shadowfang_keep" #define DataHeader "SK" enum SKDataTypes @@ -31,4 +34,10 @@ enum SKDataTypes DATA_APOTHECARY_HUMMEL = 6 }; +template <class AI, class T> +inline AI* GetShadowfangKeepAI(T* obj) +{ + return GetInstanceAI<AI>(obj, SFKScriptName); +} + #endif |
