diff --git a/sql/updates/world/4.3.4/2017_06_01_02_world.sql b/sql/updates/world/4.3.4/2017_06_01_02_world.sql new file mode 100644 index 0000000000..b147b806ef --- /dev/null +++ b/sql/updates/world/4.3.4/2017_06_01_02_world.sql @@ -0,0 +1,32 @@ +UPDATE `creature_template` SET `ScriptName`='boss_hogger' WHERE `entry`=46254; +DELETE from `creature_text` WHERE `entry`=46254; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(46254, 0, 0, 'Forest just setback!', 14, 0, 100, 0, 0, 0, 46474, 3, 'Hogger - Stockades - SAY_PULL'), +(46254, 1, 0, '%s Enrages!', 41, 0, 100, 0, 0, 0, 46631, 3, 'Hogger - Stockades - SAY_ENRAGE'), +(46254, 2, 0, 'Yiiipe!', 14, 0, 100, 0, 0, 0, 46476, 3, 'Hogger - Stockades - SAY_DEATH'); + +UPDATE `creature_template` Set `ScriptName`='npc_warden_thelwater' WHERE `entry`=46409; +DELETE FROM `creature_text` WHERE `entry`=46409; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(46409, 0, 0, 'This ends here, Hogger!', 14, 0, 100, 0, 0, 0, 46571, 3, 'Hogger - Stockades - Warden - EVENT_SAY_WARDEN_1'), +(46409, 1, 0, 'He\'s...he\'s dead?', 12, 0, 100, 0, 0, 0, 46572, 3, 'Hogger - Stockades - Warden - EVENT_SAY_WARDEN_2'), +(46409, 2, 0, 'It\'s simply too good to be true. You couldn\'t have killed him so easily!', 12, 0, 100, 0, 0, 0, 46573, 3, 'Hogger - Stockades - Warden - EVENT_SAY_WARDEN_3'); + +UPDATE `creature_template` set `ScriptName`='boss_randolph_moloch' WHERE `entry`=46383; +DELETE FROM `creature_text` WHERE `entry`=46383; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(46383, 0, 0, 'Allow me to introduce myself. I am Randolph Moloch, and I will be killing you all today.', 14, 0, 100, 0, 0, 0, 46495, 3, 'Randolph Moloch - Stockades - SAY_PULL'), +(46383, 1, 0, '%s vanishes!', 41, 0, 100, 0, 0, 0, 46630, 3, 'Randolph Moloch - Stockades - SAY_VANISH'), +(46383, 2, 0, 'My epic schemes, my great plans! Gone!', 14, 0, 100, 0, 0, 0, 46497, 3, 'Randolph Moloch - Stockades - SAY_DEATH'); + +UPDATE `creature_template` set `ScriptName`='npc_mortimer_moloch' WHERE `entry`=46482; +DELETE FROM `creature_text` WHERE `entry`=46482; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(46482, 0, 0, '%s collapses from a heart attack!', 16, 0, 100, 0, 0, 0, 46561, 3, 'MORTIMER MOLOCH - Stockades - MORTIMER_MOLOCH_DEATH'), +(46482, 1, 0, 'Egad! My sophisticated heart!', 14, 0, 100, 0, 0, 0, 46559, 3, 'MORTIMER MOLOCH - Stockades - MORTIMER_MOLOCH_EMOTE'); + +UPDATE `creature_template` set `ScriptName`='boss_lord_overheat' WHERE `entry`=46264; +DELETE FROM `creature_text` WHERE `entry`=46264; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(46264, 0, 0, 'ALL MUST BURN!', 14, 0, 100, 0, 0, 0, 46487, 3, 'TheStockade: Lord Overheat - SAY_PULL'), +(46264, 1, 0, 'FIRE... EXTINGUISHED!', 14, 0, 100, 0, 0, 0, 46489, 3, 'TheStockade: Lord Overheat - SAY_DEATH'); diff --git a/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp b/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp new file mode 100644 index 0000000000..8f4fb2c51a --- /dev/null +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp @@ -0,0 +1,192 @@ +/* + * Copyright (C) 2008-2017 TrinityCore + * + * 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 . + */ + +#include "ScriptMgr.h" +#include "InstanceScript.h" +#include "MotionMaster.h" +#include "ScriptedCreature.h" +#include "the_stockade.h" + +enum Says +{ + SAY_PULL = 0, // Forest just setback! + SAY_ENRAGE = 1, // AreaTriggerMessage: Hogger Enrages! + SAY_DEATH = 2, // Yiipe! + + SAY_WARDEN_1 = 0, // Yell - This ends here, Hogger! + SAY_WARDEN_2 = 1, // Say - He's...he's dead? + SAY_WARDEN_3 = 2 // Say - It's simply too good to be true. You couldn't have killed him so easily! +}; + +enum Spells +{ + SPELL_VICIOUS_SLICE = 86604, + SPELL_MADDENING_CALL = 86620, + SPELL_ENRAGE = 86736 +}; + +enum Events +{ + EVENT_VICIOUS_SLICE = 1, + EVENT_MADDENING_CALL, + + EVENT_SAY_WARDEN_1, + EVENT_SAY_WARDEN_2, + EVENT_SAY_WARDEN_3 +}; + +enum Points +{ + POINT_FINISH = 0 +}; + +Position const wardenthelwatermovepos = { 152.019f, 106.198f, -35.1896f, 1.082104f }; +Position const wardenthelwaterpos = { 138.369f, 78.2932f, -33.85627f, 1.082104f }; + +class boss_hogger : public CreatureScript +{ +public: + boss_hogger() : CreatureScript("boss_hogger") { } + + struct boss_hoggerAI : public BossAI + { + boss_hoggerAI(Creature* creature) : BossAI(creature, DATA_HOGGER), _hasEnraged(false) { } + + void EnterCombat(Unit* /*who*/) override + { + _EnterCombat(); + Talk(SAY_PULL); + events.ScheduleEvent(EVENT_VICIOUS_SLICE, Seconds(3), Seconds(4)); + events.ScheduleEvent(EVENT_MADDENING_CALL, Seconds(1), Seconds(2)); + } + + void JustDied(Unit* /*killer*/) override + { + Talk(SAY_DEATH); + _JustDied(); + me->SummonCreature(NPC_WARDEN_THELWATER, wardenthelwaterpos); + } + + void JustSummoned(Creature* summon) override + { + BossAI::JustSummoned(summon); + if (summon->GetEntry() == NPC_WARDEN_THELWATER) + summon->GetMotionMaster()->MovePoint(POINT_FINISH, wardenthelwatermovepos); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_VICIOUS_SLICE: + DoCastVictim(SPELL_VICIOUS_SLICE); + events.Repeat(Seconds(10), Seconds(14)); + break; + case EVENT_MADDENING_CALL: + DoCast(SPELL_MADDENING_CALL); + events.Repeat(Seconds(15), Seconds(20)); + break; + } + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + } + + DoMeleeAttackIfReady(); + } + + void DamageTaken(Unit* /*attacker*/, uint32& damage) override + { + if (me->HealthBelowPctDamaged(30, damage) && !_hasEnraged) + { + _hasEnraged = true; + Talk(SAY_ENRAGE); + DoCastSelf(SPELL_ENRAGE); + } + } + + private: + bool _hasEnraged; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetStormwindStockadeAI(creature); + } +}; + +class npc_warden_thelwater : public CreatureScript +{ +public: + npc_warden_thelwater() : CreatureScript("npc_warden_thelwater") {} + + struct npc_warden_thelwaterAI : public ScriptedAI + { + npc_warden_thelwaterAI(Creature* creature) : ScriptedAI(creature) {} + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == POINT_FINISH) + _events.ScheduleEvent(EVENT_SAY_WARDEN_1, Seconds(1)); + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SAY_WARDEN_1: + Talk(SAY_WARDEN_1); + _events.ScheduleEvent(EVENT_SAY_WARDEN_2, Seconds(4)); + break; + case EVENT_SAY_WARDEN_2: + Talk(SAY_WARDEN_2); + _events.ScheduleEvent(EVENT_SAY_WARDEN_3, Seconds(3)); + break; + case EVENT_SAY_WARDEN_3: + Talk(SAY_WARDEN_3); + break; + } + } + } + private: + EventMap _events; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetStormwindStockadeAI(creature); + } +}; + +void AddSC_boss_hogger() +{ + new boss_hogger(); + new npc_warden_thelwater(); +} diff --git a/src/server/scripts/EasternKingdoms/TheStockade/boss_lord_overheat.cpp b/src/server/scripts/EasternKingdoms/TheStockade/boss_lord_overheat.cpp new file mode 100644 index 0000000000..3a9e74c714 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_lord_overheat.cpp @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2008-2017 TrinityCore + * + * 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 . + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "the_stockade.h" + +enum Spells +{ + SPELL_FIREBALL = 12466, //starts 1-2 secs from pull + SPELL_OVERHEAT = 86633, //probably cast every 10 secs, need to confirm. + SPELL_RAIN_OF_FIRE = 86636 //probably cast every 10 secs, need to confirm +}; + +enum Events +{ + EVENT_OVERHEAT = 1, + EVENT_RAIN_OF_FIRE, + EVENT_FIREBALL +}; + +enum Says +{ + SAY_PULL = 0, //Yell: ALL MUST BURN! + SAY_DEATH = 1 //Yell: FIRE... EXTINGUISHED! +}; + +class boss_lord_overheat : public CreatureScript +{ +public: + boss_lord_overheat() : CreatureScript("boss_lord_overheat") {} + + struct boss_lord_overheatAI : public BossAI + { + boss_lord_overheatAI(Creature* creature) : BossAI(creature, DATA_LORD_OVERHEAT) { } + + void EnterCombat(Unit* /*who*/) override + { + _EnterCombat(); + Talk(SAY_PULL); + events.ScheduleEvent(EVENT_FIREBALL, Seconds(2)); + events.ScheduleEvent(EVENT_OVERHEAT, Seconds(9), Seconds(11)); + events.ScheduleEvent(EVENT_RAIN_OF_FIRE, Seconds(10), Seconds(13)); + } + + void JustDied(Unit* /*killer*/) override + { + Talk(SAY_DEATH); + _JustDied(); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_FIREBALL: + DoCastVictim(SPELL_FIREBALL); + events.Repeat(Seconds(2)); + break; + case EVENT_OVERHEAT: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true)) + DoCast(target, SPELL_OVERHEAT); + events.Repeat(Seconds(9), Seconds(10)); + break; + case EVENT_RAIN_OF_FIRE: + DoCastAOE(SPELL_RAIN_OF_FIRE); + events.Repeat(Seconds(15), Seconds(20)); + break; + default: + break; + } + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + } + + DoMeleeAttackIfReady(); + } + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetStormwindStockadeAI(creature); + } +}; + +void AddSC_boss_lord_overheat() +{ + new boss_lord_overheat(); +} diff --git a/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp b/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp index 07efa3148d..e0395bd154 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp @@ -16,15 +16,16 @@ */ #include "ScriptMgr.h" +#include "MotionMaster.h" #include "ScriptedCreature.h" #include "the_stockade.h" enum Spells { - SPELL_WILDLY_STABBING = 86726, - SPELL_SWEEP = 86729, - SPELL_VANISH = 55964, - SPELL_SHADOWSTEP = 55966 + SPELL_WILDLY_STABBING = 86726, + SPELL_SWEEP = 86729, + SPELL_VANISH = 55964, + SPELL_SHADOWSTEP = 55966 }; enum Events @@ -41,17 +42,17 @@ enum Events enum Says { - SAY_PULL = 0, //Allow me to introduce myself. I am Randolph Moloch and I will be killing you all today. - SAY_VANISH = 1, // Area Trigger: %s vanishes! - SAY_DEATH = 2, //My epic schemes, my great plans! Gone! + SAY_PULL = 0, //Allow me to introduce myself. I am Randolph Moloch and I will be killing you all today. + SAY_VANISH = 1, // Area Trigger: %s vanishes! + SAY_DEATH = 2, //My epic schemes, my great plans! Gone! - MORTIMER_MOLOCH_EMOTE = 0, // %s collapses from a heart attack! - MORTIMER_MOLOCH_DEATH = 1, //Egad! My sophisticated heart! + MORTIMER_MOLOCH_DEATH = 0, // %s collapses from a heart attack! + MORTIMER_MOLOCH_EMOTE = 1, //Egad! My sophisticated heart! }; enum Points { - POINT_FINISH =0, + POINT_FINISH = 0, }; Position const mortimerMolochPos = { 145.5811f, 0.7059f, -25.606f, 6.2f }; @@ -63,11 +64,8 @@ public: struct boss_randolph_molochAI : public BossAI { - boss_randolph_molochAI(Creature* creature) : BossAI(creature, DATA_RANDOLPH_MOLOCH) {} - - void Reset() override + boss_randolph_molochAI(Creature* creature) : BossAI(creature, DATA_RANDOLPH_MOLOCH) { - _Reset(); firstVanish = false; secondVanish = false; } @@ -76,18 +74,18 @@ public: { _EnterCombat(); Talk(SAY_PULL); - events.ScheduleEvent(EVENT_WILDLY_STABBING, randtime(Seconds(4), Seconds(5))); - events.ScheduleEvent(EVENT_SWEEP, randtime(Seconds(2), Seconds(3))); + events.ScheduleEvent(EVENT_WILDLY_STABBING, Seconds(4), Seconds(5)); + events.ScheduleEvent(EVENT_SWEEP, Seconds(2), Seconds(3)); } void JustSummoned(Creature* summon) override { BossAI::JustSummoned(summon); if (summon->GetEntry() == NPC_MORTIMER_MOLOCH) + { + summon->SetWalk(true); summon->GetMotionMaster()->MovePoint(POINT_FINISH, me->GetPosition()); - - summons.Summon(summon); - + } } void JustDied(Unit* /*killer*/) override @@ -111,52 +109,52 @@ public: { switch (eventId) { - case EVENT_WILDLY_STABBING: - DoCastVictim(SPELL_WILDLY_STABBING); - events.Repeat(randtime(Seconds(8), Seconds(12))); - break; - case EVENT_SWEEP: - DoCastVictim(SPELL_SWEEP); - events.ScheduleEvent(EVENT_SWEEP, randtime(Seconds(6), Seconds(7))); - break; - case EVENT_VANISH: - Talk(SAY_VANISH); - me->RemoveAllAuras(); - DoCastSelf(SPELL_VANISH); - me->SetReactState(REACT_PASSIVE); - me->SetInCombatState(true); // Prevents the boss from resetting - events.ScheduleEvent(EVENT_JUST_VANISHED, Seconds(2)); - break; - case EVENT_JUST_VANISHED: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true)) - DoCast(target, SPELL_SHADOWSTEP,true); - me->SetReactState(REACT_AGGRESSIVE); - break; - default: - break; + case EVENT_WILDLY_STABBING: + DoCastVictim(SPELL_WILDLY_STABBING); + events.Repeat(Seconds(8), Seconds(12)); + break; + case EVENT_SWEEP: + DoCastVictim(SPELL_SWEEP); + events.ScheduleEvent(EVENT_SWEEP, Seconds(6), Seconds(7)); + break; + case EVENT_VANISH: + Talk(SAY_VANISH); + me->RemoveAllAuras(); + DoCastSelf(SPELL_VANISH); + me->SetReactState(REACT_PASSIVE); + me->SetInCombatState(true); // Prevents the boss from resetting + events.ScheduleEvent(EVENT_JUST_VANISHED, Seconds(2)); + break; + case EVENT_JUST_VANISHED: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true)) + DoCast(target, SPELL_SHADOWSTEP, true); + me->SetReactState(REACT_AGGRESSIVE); + break; + default: + break; } } DoMeleeAttackIfReady(); } - void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) override + void DamageTaken(Unit* /*attacker*/, uint32& damage) override { - if (me->HealthBelowPct(71) && me->HealthAbovePct(59) && !firstVanish) + if (me->HealthBelowPctDamaged(71, damage) && me->HealthAbovePct(59) && !firstVanish) { firstVanish = true; events.ScheduleEvent(EVENT_VANISH, Seconds(1)); - } + } - if (me->HealthBelowPct(41) && me->HealthAbovePct(29) && !secondVanish) + if (me->HealthBelowPctDamaged(41, damage) && me->HealthAbovePct(29) && !secondVanish) { secondVanish = true; events.ScheduleEvent(EVENT_VANISH, Seconds(1)); } } - private: - bool firstVanish,secondVanish; + private: + bool firstVanish, secondVanish; }; CreatureAI* GetAI(Creature* creature) const override @@ -182,46 +180,35 @@ public: void MovementInform(uint32 type, uint32 id) override { if (type == POINT_MOTION_TYPE) + if(id == POINT_FINISH) + _events.ScheduleEvent(EVENT_MORTIMER_MOLOCH_EMOTE, Seconds(4)); + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) { - switch (id) + switch (eventId) { - case POINT_FINISH: - events.ScheduleEvent(EVENT_MORTIMER_MOLOCH_EMOTE, Seconds(1)); + case EVENT_MORTIMER_MOLOCH_EMOTE: + Talk(MORTIMER_MOLOCH_EMOTE); + _events.ScheduleEvent(EVENT_MORTIMER_MOLOCH_DEATH, Seconds(3)); + break; + case EVENT_MORTIMER_MOLOCH_DEATH: + Talk(MORTIMER_MOLOCH_DEATH); + me->KillSelf(); + break; + default: break; } } } - void JustRespawned() override - { - ScriptedAI::Reset(); - } - - void UpdateAI(uint32 diff) override - { - events.Update(diff); - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_MORTIMER_MOLOCH_EMOTE: - Talk(MORTIMER_MOLOCH_EMOTE); - events.ScheduleEvent(EVENT_MORTIMER_MOLOCH_DEATH, 100); - break; - case EVENT_MORTIMER_MOLOCH_DEATH: - Talk(MORTIMER_MOLOCH_DEATH); - me->setDeathState(DEAD); - break; - default: - break; - } - } - } - private: - EventMap events; -}; + EventMap _events; + }; CreatureAI* GetAI(Creature* creature) const override { @@ -233,4 +220,4 @@ void AddSC_boss_randolph_moloch() { new boss_randolph_moloch(); new npc_mortimer_moloch(); -} \ No newline at end of file +} diff --git a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp index 1a7c85fc33..1d4a09e906 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "InstanceScript.h" +#include "Map.h" #include "the_stockade.h" class instance_the_stockade : public InstanceMapScript @@ -31,40 +32,15 @@ public: SetHeaders(DataHeader); SetBossNumber(EncounterCount); } - - void OnCreatureCreate(Creature* creature) override - { - switch (creature->GetEntry()) - { - case NPC_RANDOLPH_MOLOCH: - RandolphMolochGuid = creature->GetGUID(); - break; - case NPC_LORD_OVERHEAT: - LordOverheatGuid = creature->GetGUID(); - break; - case NPC_HOGGER: - HoggerGUID = creature->GetGUID(); - break; - default: - break; - } - } - - protected: - EventMap events; - ObjectGuid RandolphMolochGuid; - ObjectGuid LordOverheatGuid; - ObjectGuid HoggerGUID; -}; + }; InstanceScript* GetInstanceScript(InstanceMap* map) const override { return new instance_the_stockade_InstanceMapScript(map); } - }; void AddSC_instance_the_stockade() { new instance_the_stockade(); -} \ No newline at end of file +} diff --git a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h index d4d8b52bd1..4e2e4ea34e 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h +++ b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h @@ -1,6 +1,5 @@ /* * Copyright (C) 2008-2017 TrinityCore - * Copyright (C) 2017-2017 SharpCore * * 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 @@ -19,6 +18,8 @@ #ifndef THE_STOCKADE_H #define THE_STOCKADE_H +#include "CreatureAIImpl.h" + #define StormwindStockadeScriptName "instance_the_stockade" #define DataHeader "SS" @@ -33,21 +34,17 @@ enum SSDataTypes enum SSCreatureIds { - NPC_RANDOLPH_MOLOCH = 46383, - NPC_LORD_OVERHEAT = 46264, - NPC_HOGGER = 46254, + NPC_RANDOLPH_MOLOCH = 46383, + NPC_LORD_OVERHEAT = 46264, + NPC_HOGGER = 46254, NPC_WARDEN_THELWATER = 46409, - NPC_MORTIMER_MOLOCH = 46482 + NPC_MORTIMER_MOLOCH = 46482 }; -template -CreatureAI* GetStormwindStockadeAI(Creature* creature) +template +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 NULL; + return GetInstanceAI(creature, StormwindStockadeScriptName); } #endif diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp index 9c9672d3ac..2001e9cd92 100644 --- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp @@ -161,7 +161,9 @@ void AddSC_boss_ironaya(); void AddSC_uldaman(); void AddSC_instance_uldaman(); void AddSC_instance_the_stockade(); //The Stockade +void AddSC_boss_hogger(); void AddSC_boss_randolph_moloch(); +void AddSC_boss_lord_overheat(); void AddSC_boss_akilzon(); //Zul'Aman void AddSC_boss_halazzi(); void AddSC_boss_hex_lord_malacrass(); @@ -345,7 +347,9 @@ void AddEasternKingdomsScripts() AddSC_boss_kiljaeden(); AddSC_sunwell_plateau(); AddSC_instance_the_stockade(); //The Stockade + AddSC_boss_hogger(); AddSC_boss_randolph_moloch(); + AddSC_boss_lord_overheat(); AddSC_boss_archaedas(); //Uldaman AddSC_boss_ironaya(); AddSC_uldaman();