aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcrom <malcromdev@gmail.com>2013-11-10 10:53:43 -0330
committerMalcrom <malcromdev@gmail.com>2013-11-10 10:53:43 -0330
commit8332cee0522b9166bd73903b85a3220a84b57a5f (patch)
tree1183a2c15f70d92d56df23ba3007c3f6a860e093
parentc2db6d49ced143f951b83185dfc525e5493d35b9 (diff)
Scripting/The Slave Pens: Moved boss_mennu_the_betrayer from EAI to CPP.
-rw-r--r--sql/updates/world/2013_11_10_01_world_misc.sql3
-rw-r--r--src/server/game/Scripting/ScriptLoader.cpp27
-rw-r--r--src/server/scripts/Outland/CMakeLists.txt4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp143
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp3
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h32
6 files changed, 203 insertions, 9 deletions
diff --git a/sql/updates/world/2013_11_10_01_world_misc.sql b/sql/updates/world/2013_11_10_01_world_misc.sql
new file mode 100644
index 00000000000..72881a96924
--- /dev/null
+++ b/sql/updates/world/2013_11_10_01_world_misc.sql
@@ -0,0 +1,3 @@
+UPDATE `creature_template` SET `AIName` = '', `ScriptName`= 'boss_mennu_the_betrayer' WHERE entry=17991;
+DELETE FROM creature_ai_scripts WHERE creature_id=17991;
+DELETE FROM creature_ai_texts WHERE entry BETWEEN -98 AND -93;
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 779c9be6c0e..bc29d96d1b8 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -575,7 +575,8 @@ void AddSC_boss_grandmaster_vorpil();
void AddSC_boss_murmur();
void AddSC_instance_shadow_labyrinth();
-void AddSC_black_temple(); //Black Temple
+//Black Temple
+void AddSC_black_temple();
void AddSC_boss_illidan();
void AddSC_boss_shade_of_akama();
void AddSC_boss_supremus();
@@ -586,22 +587,33 @@ void AddSC_boss_teron_gorefiend();
void AddSC_boss_najentus();
void AddSC_boss_illidari_council();
void AddSC_instance_black_temple();
-void AddSC_boss_fathomlord_karathress(); //CR Serpent Shrine Cavern
+
+//Coilfang Reservoir - Serpent Shrine Cavern
+void AddSC_boss_fathomlord_karathress();
void AddSC_boss_hydross_the_unstable();
void AddSC_boss_lady_vashj();
void AddSC_boss_leotheras_the_blind();
void AddSC_boss_morogrim_tidewalker();
void AddSC_instance_serpentshrine_cavern();
void AddSC_boss_the_lurker_below();
-void AddSC_boss_hydromancer_thespia(); //CR Steam Vault
+
+//Coilfang Reservoir - The Steam Vault
+void AddSC_boss_hydromancer_thespia();
void AddSC_boss_mekgineer_steamrigger();
void AddSC_boss_warlord_kalithresh();
void AddSC_instance_steam_vault();
-void AddSC_instance_the_slave_pens(); //The Slave Pens
-void AddSC_boss_hungarfen(); //CR Underbog
-void AddSC_boss_the_black_stalker();
+
+//Coilfang Reservoir - The Slave Pens
+void AddSC_instance_the_slave_pens();
+void AddSC_boss_mennu_the_betrayer();
+
+//Coilfang Reservoir - The Underbog
void AddSC_instance_the_underbog();
-void AddSC_boss_gruul(); //Gruul's Lair
+void AddSC_boss_hungarfen();
+void AddSC_boss_the_black_stalker();
+
+//Gruul's Lair
+void AddSC_boss_gruul();
void AddSC_boss_high_king_maulgar();
void AddSC_instance_gruuls_lair();
void AddSC_boss_broggok(); //HC Blood Furnace
@@ -1122,6 +1134,7 @@ void AddOutlandScripts()
AddSC_boss_warlord_kalithresh();
AddSC_instance_steam_vault();
AddSC_instance_the_slave_pens(); //The Slave Pens
+ AddSC_boss_mennu_the_betrayer();
AddSC_boss_hungarfen(); //CR Underbog
AddSC_boss_the_black_stalker();
AddSC_instance_the_underbog();
diff --git a/src/server/scripts/Outland/CMakeLists.txt b/src/server/scripts/Outland/CMakeLists.txt
index 45db8a80a26..e07424a77d2 100644
--- a/src/server/scripts/Outland/CMakeLists.txt
+++ b/src/server/scripts/Outland/CMakeLists.txt
@@ -43,9 +43,11 @@ set(scripts_STAT_SRCS
Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
+ Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h
+ Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp
+ Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp
Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
- Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
Outland/zone_shattrath_city.cpp
Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp
new file mode 100644
index 00000000000..d015919d978
--- /dev/null
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2008-2013 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/>.
+ */
+
+/* ScriptData
+SDName: boss_mennu_the_betrayer
+SD%Complete: 100%
+SDComment:
+SDCategory: Coilfang Reservoir, The Slave Pens
+EndScriptData */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "the_slave_pens.h"
+
+enum Say
+{
+ SAY_AGGRO = 0,
+ SAY_SLAY = 1,
+ SAY_DEATH = 2
+};
+
+enum Spells
+{
+ SPELL_TAINTED_STONESKIN_TOTEM = 31985,
+ SPELL_TAINTED_EARTHGRAB_TOTEM = 31981,
+ SPELL_CORRUPTED_NOVA_TOTEM = 31991,
+ SPELL_MENNUS_HEALING_WARD = 34980,
+ SPELL_LIGHTNING_BOLT = 35010
+};
+
+enum Events
+{
+ EVENT_TAINTED_STONESKIN_TOTEM = 1,
+ EVENT_TAINTED_EARTHGRAB_TOTEM = 2,
+ EVENT_CORRUPTED_NOVA_TOTEM = 3,
+ EVENT_LIGHTNING_BOLT = 4
+};
+
+class boss_mennu_the_betrayer : public CreatureScript
+{
+ public:
+ boss_mennu_the_betrayer() : CreatureScript("boss_mennu_the_betrayer") { }
+
+ struct boss_mennu_the_betrayerAI : public BossAI
+ {
+ boss_mennu_the_betrayerAI(Creature* creature) : BossAI(creature, DATA_MENNU_THE_BETRAYER) { }
+
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ healingWardDropped = false;
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_TAINTED_STONESKIN_TOTEM, 18000);
+ events.ScheduleEvent(EVENT_TAINTED_EARTHGRAB_TOTEM, 19000);
+ events.ScheduleEvent(EVENT_CORRUPTED_NOVA_TOTEM, 20000);
+ events.ScheduleEvent(EVENT_LIGHTNING_BOLT, urand(5000, 8000));
+ Talk(SAY_AGGRO);
+ }
+
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
+ {
+ Talk(SAY_SLAY);
+ }
+
+ 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_TAINTED_STONESKIN_TOTEM:
+ DoCast(me, SPELL_TAINTED_STONESKIN_TOTEM);
+ break;
+ case EVENT_TAINTED_EARTHGRAB_TOTEM:
+ DoCast(me, SPELL_TAINTED_EARTHGRAB_TOTEM);
+ break;
+ case EVENT_CORRUPTED_NOVA_TOTEM:
+ DoCast(me, SPELL_CORRUPTED_NOVA_TOTEM);
+ break;
+ case EVENT_LIGHTNING_BOLT:
+ DoCastVictim(SPELL_LIGHTNING_BOLT, true);
+ events.ScheduleEvent(EVENT_LIGHTNING_BOLT, urand(7000, 11000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (HealthBelowPct(60) && !healingWardDropped)
+ {
+ DoCast(me, SPELL_MENNUS_HEALING_WARD);
+ healingWardDropped = true;
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ bool healingWardDropped;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_mennu_the_betrayerAI(creature);
+ }
+};
+
+void AddSC_boss_mennu_the_betrayer()
+{
+ new boss_mennu_the_betrayer();
+}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
index cd11e2e1bf1..1c31bee7d4f 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
@@ -24,11 +24,12 @@ gets instead the deserter debuff.
#include "ScriptMgr.h"
#include "InstanceScript.h"
+#include "the_slave_pens.h"
class instance_the_slave_pens : public InstanceMapScript
{
public:
- instance_the_slave_pens() : InstanceMapScript("instance_the_slave_pens", 547) { }
+ instance_the_slave_pens() : InstanceMapScript(SPScriptName, 547) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h
new file mode 100644
index 00000000000..624ead7ef08
--- /dev/null
+++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2008-2013 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 SLAVE_PENS_H
+#define SLAVE_PENS_H
+
+uint32 const EncounterCount = 3;
+
+#define SPScriptName "instance_the_slave_pens"
+
+enum DataTypes
+{
+ DATA_MENNU_THE_BETRAYER = 1,
+ DATA_ROKMAR_THE_CRACKLER = 2,
+ DATA_QUAGMIRRAN = 3
+};
+
+#endif // SLAVE_PENS_H