diff options
8 files changed, 651 insertions, 12 deletions
diff --git a/sql/updates/world/master/2017_06_01_02_world.sql b/sql/updates/world/master/2017_06_01_02_world.sql new file mode 100644 index 00000000000..b147b806ef5 --- /dev/null +++ b/sql/updates/world/master/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 00000000000..dfbf18e582c --- /dev/null +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp @@ -0,0 +1,193 @@ +/* + * 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 "InstanceScript.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); + + summons.Summon(summon); + } + + 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<boss_hoggerAI>(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<npc_warden_thelwaterAI>(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 00000000000..3a9e74c7146 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_lord_overheat.cpp @@ -0,0 +1,114 @@ +/* + * 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" + +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<boss_lord_overheatAI>(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 new file mode 100644 index 00000000000..21e2694ce2a --- /dev/null +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp @@ -0,0 +1,224 @@ +/* + * 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" + +enum Spells +{ + SPELL_WILDLY_STABBING = 86726, + SPELL_SWEEP = 86729, + SPELL_VANISH = 55964, + SPELL_SHADOWSTEP = 55966 +}; + +enum Events +{ + EVENT_WILDLY_STABBING = 1, + EVENT_SWEEP, + EVENT_VANISH, + EVENT_JUST_VANISHED, + EVENT_ATTACK_RANDOM, + + EVENT_MORTIMER_MOLOCH_EMOTE, + EVENT_MORTIMER_MOLOCH_DEATH +}; + +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! + + MORTIMER_MOLOCH_DEATH = 0, // %s collapses from a heart attack! + MORTIMER_MOLOCH_EMOTE = 1, //Egad! My sophisticated heart! +}; + +enum Points +{ + POINT_FINISH = 0, +}; + +Position const mortimerMolochPos = { 145.5811f, 0.7059f, -25.606f, 6.2f }; + +class boss_randolph_moloch : public CreatureScript +{ +public: + boss_randolph_moloch() : CreatureScript("boss_randolph_moloch") {} + + struct boss_randolph_molochAI : public BossAI + { + boss_randolph_molochAI(Creature* creature) : BossAI(creature, DATA_RANDOLPH_MOLOCH) + { + firstVanish = false; + secondVanish = false; + } + + void EnterCombat(Unit* /*who*/) override + { + _EnterCombat(); + Talk(SAY_PULL); + 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 + { + Talk(SAY_DEATH); + _JustDied(); + me->SummonCreature(NPC_MORTIMER_MOLOCH, mortimerMolochPos); + } + + 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_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 + { + if (me->HealthBelowPctDamaged(71, damage) && me->HealthAbovePct(59) && !firstVanish) + { + firstVanish = true; + events.ScheduleEvent(EVENT_VANISH, Seconds(1)); + } + + if (me->HealthBelowPctDamaged(41, damage) && me->HealthAbovePct(29) && !secondVanish) + { + secondVanish = true; + events.ScheduleEvent(EVENT_VANISH, Seconds(1)); + } + } + + private: + bool firstVanish, secondVanish; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetStormwindStockadeAI<boss_randolph_molochAI>(creature); + } +}; + +class npc_mortimer_moloch : public CreatureScript +{ +public: + npc_mortimer_moloch() : CreatureScript("npc_mortimer_moloch") {} + + struct npc_mortimer_molochAI : public ScriptedAI + { + npc_mortimer_molochAI(Creature* creature) : ScriptedAI(creature) {} + + void Reset() override + { + me->SetReactState(REACT_PASSIVE); + } + + 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 (eventId) + { + 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; + } + } + } + + private: + EventMap _events; + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return GetStormwindStockadeAI<npc_mortimer_molochAI>(creature); + } +}; + +void AddSC_boss_randolph_moloch() +{ + new boss_randolph_moloch(); + new npc_mortimer_moloch(); +} diff --git a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp index c222f395a50..1d4a09e9066 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp @@ -15,31 +15,29 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* -This placeholder for the instance is needed for dungeon finding to be able -to give credit after the boss defined in lastEncounterDungeon is killed. -Without it, the party doing random dungeon won't get satchel of spoils and -gets instead the deserter debuff. -*/ - #include "ScriptMgr.h" #include "InstanceScript.h" #include "Map.h" +#include "the_stockade.h" class instance_the_stockade : public InstanceMapScript { public: instance_the_stockade() : InstanceMapScript("instance_the_stockade", 34) { } + struct instance_the_stockade_InstanceMapScript : public InstanceScript + { + instance_the_stockade_InstanceMapScript(Map* map) : InstanceScript(map) + { + SetHeaders(DataHeader); + SetBossNumber(EncounterCount); + } + }; + InstanceScript* GetInstanceScript(InstanceMap* map) const override { return new instance_the_stockade_InstanceMapScript(map); } - - struct instance_the_stockade_InstanceMapScript : public InstanceScript - { - instance_the_stockade_InstanceMapScript(Map* map) : InstanceScript(map) { } - }; }; void AddSC_instance_the_stockade() diff --git a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.cpp new file mode 100644 index 00000000000..c11143b0f45 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.cpp @@ -0,0 +1,20 @@ +/* + * 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 new file mode 100644 index 00000000000..17bcdf1a995 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h @@ -0,0 +1,52 @@ +/* + * 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/>. + */ + +#ifndef THE_STOCKADE_H +#define THE_STOCKADE_H + +#define StormwindStockadeScriptName "instance_the_stockade" +#define DataHeader "SS" + +uint32 const EncounterCount = 3; + +enum SSDataTypes +{ + DATA_RANDOLPH_MOLOCH = 0, + DATA_LORD_OVERHEAT = 1, + DATA_HOGGER = 2 +}; + +enum SSCreatureIds +{ + NPC_RANDOLPH_MOLOCH = 46383, + NPC_LORD_OVERHEAT = 46264, + NPC_HOGGER = 46254, + NPC_WARDEN_THELWATER = 46409, + NPC_MORTIMER_MOLOCH = 46482 +}; + +template<class AI> +CreatureAI* GetStormwindStockadeAI(Creature* creature) +{ + if (InstanceMap* instance = creature->GetMap()->ToInstanceMap()) + if (instance->GetInstanceScript()) + if (instance->GetScriptId() == sObjectMgr->GetScriptId(StormwindStockadeScriptName)) + return new AI(creature); + return nullptr; +} + +#endif diff --git a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp index a04729a0ac3..68290790851 100644 --- a/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp +++ b/src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp @@ -159,6 +159,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(); @@ -341,6 +344,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(); |