diff options
Diffstat (limited to 'src')
4 files changed, 8 insertions, 30 deletions
diff --git a/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp b/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp index a64ecb9f41e..8f4fb2c51a1 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp @@ -16,8 +16,9 @@ */ #include "ScriptMgr.h" -#include "ScriptedCreature.h" #include "InstanceScript.h" +#include "MotionMaster.h" +#include "ScriptedCreature.h" #include "the_stockade.h" enum Says diff --git a/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp b/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp index 21e2694ce2a..e0395bd154f 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp @@ -16,6 +16,7 @@ */ #include "ScriptMgr.h" +#include "MotionMaster.h" #include "ScriptedCreature.h" #include "the_stockade.h" @@ -85,8 +86,6 @@ public: summon->SetWalk(true); summon->GetMotionMaster()->MovePoint(POINT_FINISH, me->GetPosition()); } - - summons.Summon(summon); } void JustDied(Unit* /*killer*/) override diff --git a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.cpp deleted file mode 100644 index c11143b0f45..00000000000 --- a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2008-2017 TrinityCore <http://www.trinitycore.org/> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "the_stockade.h" diff --git a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h index 17bcdf1a995..4e2e4ea34e9 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h +++ b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h @@ -18,6 +18,8 @@ #ifndef THE_STOCKADE_H #define THE_STOCKADE_H +#include "CreatureAIImpl.h" + #define StormwindStockadeScriptName "instance_the_stockade" #define DataHeader "SS" @@ -39,14 +41,10 @@ enum SSCreatureIds NPC_MORTIMER_MOLOCH = 46482 }; -template<class AI> -CreatureAI* GetStormwindStockadeAI(Creature* creature) +template<typename AI> +inline AI* GetStormwindStockadeAI(Creature* creature) { - if (InstanceMap* instance = creature->GetMap()->ToInstanceMap()) - if (instance->GetInstanceScript()) - if (instance->GetScriptId() == sObjectMgr->GetScriptId(StormwindStockadeScriptName)) - return new AI(creature); - return nullptr; + return GetInstanceAI<AI>(creature, StormwindStockadeScriptName); } #endif |