aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp113
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp123
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp69
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp56
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp85
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp22
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h80
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp55
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp9
11 files changed, 233 insertions, 385 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
index 85f82c62079..222626240ea 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
@@ -15,42 +15,30 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
#include "hyjal.h"
#include "hyjal_trash.h"
-#define SPELL_CARRION_SWARM 31306
-#define SPELL_SLEEP 31298
-#define SPELL_VAMPIRIC_AURA 38196
-#define SPELL_INFERNO 31299
-
-#define SAY_ONDEATH "The clock... is still... ticking."
-#define SOUND_ONDEATH 10982
-
-#define SAY_ONSLAY1 "Your hopes are lost!"
-#define SAY_ONSLAY2 "Scream for me!"
-#define SAY_ONSLAY3 "Pity, no time for a slow death!"
-#define SOUND_ONSLAY1 10981
-#define SOUND_ONSLAY2 11038
-#define SOUND_ONSLAY3 11039
-
-#define SAY_SWARM1 "The swarm is eager to feed!"
-#define SAY_SWARM2 "Pestilence upon you!"
-#define SOUND_SWARM1 10979
-#define SOUND_SWARM2 11037
-
-#define SAY_SLEEP1 "You look tired..."
-#define SAY_SLEEP2 "Sweet dreams..."
-#define SOUND_SLEEP1 10978
-#define SOUND_SLEEP2 11545
-
-#define SAY_INFERNO1 "Let fire rain from above!"
-#define SAY_INFERNO2 "Earth and sky shall burn!"
-#define SOUND_INFERNO1 10980
-#define SOUND_INFERNO2 11036
+enum Spells
+{
+ SPELL_CARRION_SWARM = 31306,
+ SPELL_SLEEP = 31298,
+ SPELL_VAMPIRIC_AURA = 38196,
+ SPELL_INFERNO = 31299,
+ SPELL_IMMOLATION = 31303,
+ SPELL_INFERNO_EFFECT = 31302,
+};
-#define SAY_ONAGGRO "You are defenders of a doomed world! Flee here, and perhaps you will prolong your pathetic lives!"
-#define SOUND_ONAGGRO 10977
+enum Texts
+{
+ SAY_ONDEATH = 0,
+ SAY_ONSLAY = 1,
+ SAY_SWARM = 2,
+ SAY_SLEEP = 3,
+ SAY_INFERNO = 4,
+ SAY_ONAGGRO = 5,
+};
class boss_anetheron : public CreatureScript
{
@@ -92,27 +80,12 @@ public:
{
if (instance && IsEvent)
instance->SetData(DATA_ANETHERONEVENT, IN_PROGRESS);
- DoPlaySoundToSet(me, SOUND_ONAGGRO);
- me->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
+ Talk(SAY_ONAGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- switch (urand(0, 2))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_ONSLAY1);
- me->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_ONSLAY2);
- me->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, 0);
- break;
- case 2:
- DoPlaySoundToSet(me, SOUND_ONSLAY3);
- me->MonsterYell(SAY_ONSLAY3, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_ONSLAY);
}
void WaypointReached(uint32 waypointId)
@@ -130,8 +103,7 @@ public:
hyjal_trashAI::JustDied(killer);
if (instance && IsEvent)
instance->SetData(DATA_ANETHERONEVENT, DONE);
- DoPlaySoundToSet(me, SOUND_ONDEATH);
- me->MonsterYell(SAY_ONDEATH, LANG_UNIVERSAL, 0);
+ Talk(SAY_ONDEATH);
}
void UpdateAI(const uint32 diff)
@@ -169,17 +141,7 @@ public:
DoCast(target, SPELL_CARRION_SWARM);
SwarmTimer = urand(45000, 60000);
- switch (urand(0, 1))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_SWARM1);
- me->MonsterYell(SAY_SWARM1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_SWARM2);
- me->MonsterYell(SAY_SWARM2, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_SWARM);
} else SwarmTimer -= diff;
if (SleepTimer <= diff)
@@ -190,17 +152,7 @@ public:
target->CastSpell(target, SPELL_SLEEP, true);
}
SleepTimer = 60000;
- switch (urand(0, 1))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_SLEEP1);
- me->MonsterYell(SAY_SLEEP1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_SLEEP2);
- me->MonsterYell(SAY_SLEEP2, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_SLEEP);
} else SleepTimer -= diff;
if (AuraTimer <= diff)
{
@@ -211,17 +163,7 @@ public:
{
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_INFERNO);
InfernoTimer = 45000;
- switch (urand(0, 1))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_INFERNO1);
- me->MonsterYell(SAY_INFERNO1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_INFERNO2);
- me->MonsterYell(SAY_INFERNO2, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_INFERNO);
} else InfernoTimer -= diff;
DoMeleeAttackIfReady();
@@ -230,9 +172,6 @@ public:
};
-#define SPELL_IMMOLATION 31303
-#define SPELL_INFERNO_EFFECT 31302
-
class mob_towering_infernal : public CreatureScript
{
public:
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index f07aaaa1f2a..ee988accbac 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -23,56 +23,57 @@ SDComment: Doomfires not completely offlike due to core limitations for random m
SDCategory: Caverns of Time, Mount Hyjal
EndScriptData */
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
#include "hyjal.h"
#include "SpellAuras.h"
#include "hyjal_trash.h"
-//text id -1534018 are the text used when previous events complete. Not part of this script.
-#define SAY_AGGRO -1534019
-#define SAY_DOOMFIRE1 -1534020
-#define SAY_DOOMFIRE2 -1534021
-#define SAY_AIR_BURST1 -1534022
-#define SAY_AIR_BURST2 -1534023
-#define SAY_SLAY1 -1534024
-#define SAY_SLAY2 -1534025
-#define SAY_SLAY3 -1534026
-#define SAY_ENRAGE -1534027
-#define SAY_DEATH -1534028
-#define SAY_SOUL_CHARGE1 -1534029
-#define SAY_SOUL_CHARGE2 -1534030
-
-#define SPELL_DENOUEMENT_WISP 32124
-#define SPELL_ANCIENT_SPARK 39349
-#define SPELL_PROTECTION_OF_ELUNE 38528
-
-#define SPELL_DRAIN_WORLD_TREE 39140
-#define SPELL_DRAIN_WORLD_TREE_2 39141
-
-#define SPELL_FINGER_OF_DEATH 31984
-#define SPELL_HAND_OF_DEATH 35354
-#define SPELL_AIR_BURST 32014
-#define SPELL_GRIP_OF_THE_LEGION 31972
-#define SPELL_DOOMFIRE_STRIKE 31903 //summons two creatures
-#define SPELL_DOOMFIRE_SPAWN 32074
-#define SPELL_DOOMFIRE 31945
-#define SPELL_SOUL_CHARGE_YELLOW 32045
-#define SPELL_SOUL_CHARGE_GREEN 32051
-#define SPELL_SOUL_CHARGE_RED 32052
-#define SPELL_UNLEASH_SOUL_YELLOW 32054
-#define SPELL_UNLEASH_SOUL_GREEN 32057
-#define SPELL_UNLEASH_SOUL_RED 32053
-#define SPELL_FEAR 31970
-
-#define CREATURE_ARCHIMONDE 17968
-#define CREATURE_DOOMFIRE 18095
-#define CREATURE_DOOMFIRE_SPIRIT 18104
-#define CREATURE_ANCIENT_WISP 17946
-#define CREATURE_CHANNEL_TARGET 22418
-
-#define NORDRASSIL_X 5503.713f
-#define NORDRASSIL_Y -3523.436f
-#define NORDRASSIL_Z 1608.781f
+enum Texts
+{
+ SAY_AGGRO = 1,
+ SAY_DOOMFIRE = 2,
+ SAY_AIR_BURST = 3,
+ SAY_SLAY = 4,
+ SAY_ENRAGE = 5,
+ SAY_DEATH = 6,
+ SAY_SOUL_CHARGE = 7,
+};
+
+enum Spells
+{
+ SPELL_DENOUEMENT_WISP = 32124,
+ SPELL_ANCIENT_SPARK = 39349,
+ SPELL_PROTECTION_OF_ELUNE = 38528,
+
+ SPELL_DRAIN_WORLD_TREE = 39140,
+ SPELL_DRAIN_WORLD_TREE_2 = 39141,
+
+ SPELL_FINGER_OF_DEATH = 31984,
+ SPELL_HAND_OF_DEATH = 35354,
+ SPELL_AIR_BURST = 32014,
+ SPELL_GRIP_OF_THE_LEGION = 31972,
+ SPELL_DOOMFIRE_STRIKE = 31903, //summons two creatures
+ SPELL_DOOMFIRE_SPAWN = 32074,
+ SPELL_DOOMFIRE = 31945,
+ SPELL_SOUL_CHARGE_YELLOW = 32045,
+ SPELL_SOUL_CHARGE_GREEN = 32051,
+ SPELL_SOUL_CHARGE_RED = 32052,
+ SPELL_UNLEASH_SOUL_YELLOW = 32054,
+ SPELL_UNLEASH_SOUL_GREEN = 32057,
+ SPELL_UNLEASH_SOUL_RED = 32053,
+ SPELL_FEAR = 31970,
+};
+
+enum Summons
+{
+ CREATURE_DOOMFIRE = 18095,
+ CREATURE_DOOMFIRE_SPIRIT = 18104,
+ CREATURE_ANCIENT_WISP = 17946,
+ CREATURE_CHANNEL_TARGET = 22418,
+};
+
+Position const NordrassilLoc = {5503.713f, -3523.436f, 1608.781f, 0.0f};
class mob_ancient_wisp : public CreatureScript
{
@@ -258,11 +259,11 @@ public:
uint32 GripOfTheLegionTimer;
uint32 DoomfireTimer;
uint32 SoulChargeTimer;
- uint32 SoulChargeCount;
+ uint8 SoulChargeCount;
uint32 MeleeRangeCheckTimer;
uint32 HandOfDeathTimer;
uint32 SummonWispTimer;
- uint32 WispCount;
+ uint8 WispCount;
uint32 EnrageTimer;
uint32 CheckDistanceTimer;
@@ -303,7 +304,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
DoZoneInCombat();
if (instance)
@@ -312,7 +313,7 @@ public:
void KilledUnit(Unit* victim)
{
- DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
+ Talk(SAY_SLAY);
if (victim && (victim->GetTypeId() == TYPEID_PLAYER))
GainSoulCharge(CAST_PLR(victim));
@@ -346,7 +347,7 @@ public:
void JustDied(Unit* killer)
{
hyjal_trashAI::JustDied(killer);
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_ARCHIMONDEEVENT, DONE);
@@ -488,7 +489,7 @@ public:
{
if (!IsChanneling)
{
- Creature* temp = me->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 1200000);
+ Creature* temp = me->SummonCreature(CREATURE_CHANNEL_TARGET, NordrassilLoc, TEMPSUMMON_TIMED_DESPAWN, 1200000);
if (temp)
WorldTreeGUID = temp->GetGUID();
@@ -525,14 +526,14 @@ public:
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveIdle();
Enraged = true;
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
}
} else EnrageTimer -= diff;
if (CheckDistanceTimer <= diff)
{
// To simplify the check, we simply summon a Creature in the location and then check how far we are from the creature
- Creature* Check = me->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 2000);
+ Creature* Check = me->SummonCreature(CREATURE_CHANNEL_TARGET, NordrassilLoc, TEMPSUMMON_TIMED_DESPAWN, 2000);
if (Check)
{
Check->SetVisible(false);
@@ -542,7 +543,7 @@ public:
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveIdle();
Enraged = true;
- DoScriptText(SAY_ENRAGE, me);
+ Talk(SAY_ENRAGE);
}
}
CheckDistanceTimer = 5000;
@@ -598,11 +599,7 @@ public:
if (AirBurstTimer <= diff)
{
- if (urand(0, 1))
- DoScriptText(SAY_AIR_BURST1, me);
- else
- DoScriptText(SAY_AIR_BURST2, me);
-
+ Talk(SAY_AIR_BURST);
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1), SPELL_AIR_BURST);//not on tank
AirBurstTimer = urand(25000, 40000);
} else AirBurstTimer -= diff;
@@ -615,11 +612,7 @@ public:
if (DoomfireTimer <= diff)
{
- if (urand(0, 1))
- DoScriptText(SAY_DOOMFIRE1, me);
- else
- DoScriptText(SAY_DOOMFIRE2, me);
-
+ Talk(SAY_DOOMFIRE);
Unit* temp = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (!temp)
temp = me->getVictim();
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
index a9e0c866ab9..bfdaed35dd4 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
@@ -15,33 +15,31 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
#include "hyjal.h"
#include "hyjal_trash.h"
-#define SPELL_RAIN_OF_FIRE 31340
-#define SPELL_DOOM 31347
-#define SPELL_HOWL_OF_AZGALOR 31344
-#define SPELL_CLEAVE 31345
-#define SPELL_BERSERK 26662
-
-#define SAY_ONDEATH "Your time is almost... up"
-#define SOUND_ONDEATH 11002
-
-#define SAY_ONSLAY1 "Reesh, hokta!"
-#define SAY_ONSLAY2 "Don't fight it"
-#define SAY_ONSLAY3 "No one is going to save you"
-#define SOUND_ONSLAY1 11001
-#define SOUND_ONSLAY2 11048
-#define SOUND_ONSLAY3 11047
-
-#define SAY_DOOM1 "Just a taste... of what awaits you"
-#define SAY_DOOM2 "Suffer you despicable insect!"
-#define SOUND_DOOM1 11046
-#define SOUND_DOOM2 11000
+enum Spells
+{
+ SPELL_RAIN_OF_FIRE = 31340,
+ SPELL_DOOM = 31347,
+ SPELL_HOWL_OF_AZGALOR = 31344,
+ SPELL_CLEAVE = 31345,
+ SPELL_BERSERK = 26662,
+
+ SPELL_THRASH = 12787,
+ SPELL_CRIPPLE = 31406,
+ SPELL_WARSTOMP = 31408,
+};
-#define SAY_ONAGGRO "Abandon all hope! The legion has returned to finish what was begun so many years ago. This time there will be no escape!"
-#define SOUND_ONAGGRO 10999
+enum Texts
+{
+ SAY_ONDEATH = 0,
+ SAY_ONSLAY = 1,
+ SAY_DOOM = 2, // Not used?
+ SAY_ONAGGRO = 3,
+};
class boss_azgalor : public CreatureScript
{
@@ -88,27 +86,12 @@ public:
{
if (instance && IsEvent)
instance->SetData(DATA_AZGALOREVENT, IN_PROGRESS);
- DoPlaySoundToSet(me, SOUND_ONAGGRO);
- me->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
+ Talk(SAY_ONAGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- switch (urand(0, 2))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_ONSLAY1);
- me->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_ONSLAY2);
- me->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, 0);
- break;
- case 2:
- DoPlaySoundToSet(me, SOUND_ONSLAY3);
- me->MonsterYell(SAY_ONSLAY3, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_ONSLAY);
}
void WaypointReached(uint32 waypointId)
@@ -126,7 +109,7 @@ public:
hyjal_trashAI::JustDied(killer);
if (instance && IsEvent)
instance->SetData(DATA_AZGALOREVENT, DONE);
- DoPlaySoundToSet(me, SOUND_ONDEATH);
+ Talk(SAY_ONDEATH);
}
void UpdateAI(const uint32 diff)
@@ -196,10 +179,6 @@ public:
};
-#define SPELL_THRASH 12787
-#define SPELL_CRIPPLE 31406
-#define SPELL_WARSTOMP 31408
-
class mob_lesser_doomguard : public CreatureScript
{
public:
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
index 9160983b0df..29eff68dfbd 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp
@@ -30,22 +30,17 @@ enum Spells
SPELL_MARK_DAMAGE = 31463
};
-#define SOUND_ONDEATH 11018
-
-#define SAY_ONSLAY1 "Shaza-Kiel!"
-#define SAY_ONSLAY2 "You... are nothing!"
-#define SAY_ONSLAY3 "Miserable nuisance!"
-#define SOUND_ONSLAY1 11017
-#define SOUND_ONSLAY2 11053
-#define SOUND_ONSLAY3 11054
-
-#define SAY_MARK1 "Your death will be a painful one."
-#define SAY_MARK2 "You... are marked."
-#define SOUND_MARK1 11016
-#define SOUND_MARK2 11052
+enum Texts
+{
+ SAY_ONSLAY = 0,
+ SAY_MARK = 1,
+ SAY_ONAGGRO = 2,
+};
-#define SAY_ONAGGRO "Cry for mercy! Your meaningless lives will soon be forfeit."
-#define SOUND_ONAGGRO 11015
+enum Sounds
+{
+ SOUND_ONDEATH = 11018,
+};
class boss_kazrogal : public CreatureScript
{
@@ -87,27 +82,12 @@ public:
{
if (instance && IsEvent)
instance->SetData(DATA_KAZROGALEVENT, IN_PROGRESS);
- DoPlaySoundToSet(me, SOUND_ONAGGRO);
- me->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
+ Talk(SAY_ONAGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- switch (urand(0, 2))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_ONSLAY1);
- me->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_ONSLAY2);
- me->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, 0);
- break;
- case 2:
- DoPlaySoundToSet(me, SOUND_ONSLAY3);
- me->MonsterYell(SAY_ONSLAY3, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_ONSLAY);
}
void WaypointReached(uint32 waypointId)
@@ -177,17 +157,7 @@ public:
if (MarkTimerBase < 5500)
MarkTimerBase = 5500;
MarkTimer = MarkTimerBase;
- switch (urand(0, 2))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_MARK1);
- me->MonsterYell(SAY_MARK1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_MARK2);
- me->MonsterYell(SAY_MARK2, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_MARK);
} else MarkTimer -= diff;
DoMeleeAttackIfReady();
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
index 5d7ee1fe194..09c8c1605b3 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_rage_winterchill.cpp
@@ -15,36 +15,27 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
#include "hyjal.h"
#include "hyjal_trash.h"
-#define SPELL_FROST_ARMOR 31256
-#define SPELL_DEATH_AND_DECAY 31258
-
-#define SPELL_FROST_NOVA 31250
-#define SPELL_ICEBOLT 31249
-
-#define SAY_ONDEATH "You have won this battle, but not... the... war"
-#define SOUND_ONDEATH 11026
-
-#define SAY_ONSLAY1 "All life must perish!"
-#define SAY_ONSLAY2 "Victory to the Legion!"
-#define SOUND_ONSLAY1 11025
-#define SOUND_ONSLAY2 11057
-
-#define SAY_DECAY1 "Crumble and rot!"
-#define SAY_DECAY2 "Ashes to ashes, dust to dust"
-#define SOUND_DECAY1 11023
-#define SOUND_DECAY2 11055
-
-#define SAY_NOVA1 "Succumb to the icy chill... of death!"
-#define SAY_NOVA2 "It will be much colder in your grave"
-#define SOUND_NOVA1 11024
-#define SOUND_NOVA2 11058
+enum Spells
+{
+ SPELL_FROST_ARMOR = 31256,
+ SPELL_DEATH_AND_DECAY = 31258,
+ SPELL_FROST_NOVA = 31250,
+ SPELL_ICEBOLT = 31249,
+};
-#define SAY_ONAGGRO "The Legion's final conquest has begun! Once again the subjugation of this world is within our grasp. Let none survive!"
-#define SOUND_ONAGGRO 11022
+enum Texts
+{
+ SAY_ONDEATH = 0,
+ SAY_ONSLAY = 1,
+ SAY_DECAY = 2,
+ SAY_NOVA = 3,
+ SAY_ONAGGRO = 4,
+};
class boss_rage_winterchill : public CreatureScript
{
@@ -86,23 +77,12 @@ public:
{
if (instance && IsEvent)
instance->SetData(DATA_RAGEWINTERCHILLEVENT, IN_PROGRESS);
- DoPlaySoundToSet(me, SOUND_ONAGGRO);
- me->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
+ Talk(SAY_ONAGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
- switch (urand(0, 1))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_ONSLAY1);
- me->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_ONSLAY2);
- me->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_ONSLAY);
}
void WaypointReached(uint32 waypointId)
@@ -120,8 +100,7 @@ public:
hyjal_trashAI::JustDied(killer);
if (instance && IsEvent)
instance->SetData(DATA_RAGEWINTERCHILLEVENT, DONE);
- DoPlaySoundToSet(me, SOUND_ONDEATH);
- me->MonsterYell(SAY_ONDEATH, LANG_UNIVERSAL, 0);
+ Talk(SAY_ONDEATH);
}
void UpdateAI(const uint32 diff)
@@ -162,33 +141,13 @@ public:
{
DoCast(me->getVictim(), SPELL_DEATH_AND_DECAY);
DecayTimer = 60000+rand()%20000;
- switch (urand(0, 1))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_DECAY1);
- me->MonsterYell(SAY_DECAY1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_DECAY2);
- me->MonsterYell(SAY_DECAY2, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_DECAY);
} else DecayTimer -= diff;
if (NovaTimer <= diff)
{
DoCast(me->getVictim(), SPELL_FROST_NOVA);
NovaTimer = 30000+rand()%15000;
- switch (urand(0, 1))
- {
- case 0:
- DoPlaySoundToSet(me, SOUND_NOVA1);
- me->MonsterYell(SAY_NOVA1, LANG_UNIVERSAL, 0);
- break;
- case 1:
- DoPlaySoundToSet(me, SOUND_NOVA2);
- me->MonsterYell(SAY_NOVA2, LANG_UNIVERSAL, 0);
- break;
- }
+ Talk(SAY_NOVA);
} else NovaTimer -= diff;
if (IceboltTimer <= diff)
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
index 22307468f14..1be8f8e058f 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
@@ -29,7 +29,9 @@ npc_thrall
npc_tyrande_whisperwind
EndContentData */
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "ScriptedGossip.h"
#include "hyjalAI.h"
#define GOSSIP_ITEM_BEGIN_ALLY "My companions and I are with you, Lady Proudmoore."
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
index e045d3cbf05..6d62072608d 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.h
@@ -21,7 +21,7 @@
#define ERROR_INST_DATA "TSCR: Instance data not set properly for Mount Hyjal. Encounters will be buggy."
-enum eTypes
+enum Types
{
WORLD_STATE_WAVES = 2842,
WORLD_STATE_ENEMY = 2453,
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index 2f6bbb7edb5..cdac1b18649 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -23,17 +23,21 @@ SDComment:
SDCategory: Caverns of Time, Mount Hyjal
EndScriptData */
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "ScriptedEscortAI.h"
+#include "GridNotifiers.h"
+#include "Cell.h"
+#include "CellImpl.h"
#include "hyjalAI.h"
#include "hyjal_trash.h"
-#include "MapManager.h"
-#include "Language.h"
-#include "Chat.h"
-#include "Object.h"
-
-#define SPAWN_GARG_GATE 0
-#define SPAWN_WYRM_GATE 1
-#define SPAWN_NEAR_TOWER 2
+
+enum Spawns
+{
+ SPAWN_GARG_GATE = 0,
+ SPAWN_WYRM_GATE = 1,
+ SPAWN_NEAR_TOWER = 2,
+};
#define YELL_HURRY "Hurry, we don't have much time"
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
index b32288ca43a..68efa94d98b 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
@@ -24,43 +24,49 @@
#define HYJAL_AI_MAX_SPELLS 3
-// Trash Mobs summoned in waves
-#define NECROMANCER 17899//done
-#define ABOMINATION 17898//done
-#define GHOUL 17895//done
-#define BANSHEE 17905//done
-#define CRYPT_FIEND 17897//done
-#define GARGOYLE 17906//done
-#define FROST_WYRM 17907//done
-#define GIANT_INFERNAL 17908//done
-#define FEL_STALKER 17916//done
-
-#define JAINA 17772
-#define THRALL 17852
-#define TYRANDE 17948
-
-#define ANCIENT_VEIN 185557
-#define FLAMEOBJECT 182592
-
-// Bosses summoned after every 8 waves
-#define RAGE_WINTERCHILL 17767
-#define ANETHERON 17808
-#define KAZROGAL 17888
-#define AZGALOR 17842
-#define ARCHIMONDE 17968
-
-#define SPELL_TELEPORT_VISUAL 41232
-#define SPELL_MASS_TELEPORT 16807
-
-//Spells for Jaina
-#define SPELL_BRILLIANCE_AURA 31260 // The database must handle this spell via creature_addon(it should, but is removed in evade..)
-#define SPELL_BLIZZARD 31266
-#define SPELL_PYROBLAST 31263
-#define SPELL_SUMMON_ELEMENTALS 31264
-
-//Thrall spells
-#define SPELL_CHAIN_LIGHTNING 31330
-#define SPELL_SUMMON_DIRE_WOLF 31331
+enum CreaturesIds
+{
+ // Trash Mobs summoned in waves
+ NECROMANCER = 17899,
+ ABOMINATION = 17898,
+ GHOUL = 17895,
+ BANSHEE = 17905,
+ CRYPT_FIEND = 17897,
+ GARGOYLE = 17906,
+ FROST_WYRM = 17907,
+ GIANT_INFERNAL = 17908,
+ FEL_STALKER = 17916,
+
+ JAINA = 17772,
+ THRALL = 17852,
+ TYRANDE = 17948,
+
+ ANCIENT_VEIN = 185557,
+ FLAMEOBJECT = 182592,
+
+ // Bosses summoned after every 8 waves
+ RAGE_WINTERCHILL = 17767,
+ ANETHERON = 17808,
+ KAZROGAL = 17888,
+ AZGALOR = 17842,
+ ARCHIMONDE = 17968,
+};
+
+enum SpellIds
+{
+ SPELL_TELEPORT_VISUAL = 41232,
+ SPELL_MASS_TELEPORT = 16807,
+
+ //Spells for Jaina
+ SPELL_BRILLIANCE_AURA = 31260, // The database must handle this spell via creature_addon(it should, but is removed in evade..)
+ SPELL_BLIZZARD = 31266,
+ SPELL_PYROBLAST = 31263,
+ SPELL_SUMMON_ELEMENTALS = 31264,
+
+ //Thrall spells
+ SPELL_CHAIN_LIGHTNING = 31330,
+ SPELL_SUMMON_DIRE_WOLF = 31331,
+};
struct Wave
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index 840aa5de081..d3218e1729e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -15,16 +15,35 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ScriptPCH.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
#include "hyjal.h"
#include "hyjal_trash.h"
#include "hyjalAI.h"
-#define SPELL_METEOR 33814 //infernal visual
-#define SPELL_IMMOLATION 37059
-#define SPELL_FLAME_BUFFET 31724
-#define NPC_TRIGGER 21987 //World Trigger (Tiny)
-#define MODEL_INVIS 11686 //invisible model
+enum Spells
+{
+ SPELL_METEOR = 33814, //infernal visual
+ SPELL_IMMOLATION = 37059,
+ SPELL_FLAME_BUFFET = 31724,
+ NPC_TRIGGER = 21987, //World Trigger (Tiny)
+ MODEL_INVIS = 11686, //invisible model
+ SPELL_DISEASE_CLOUD = 31607,
+ SPELL_KNOCKDOWN = 31610,
+ SPELL_FRENZY = 31540,
+ SPELL_RAISE_DEAD_1 = 31617,
+ SPELL_RAISE_DEAD_2 = 31624,
+ SPELL_RAISE_DEAD_3 = 31625,
+ SPELL_SHADOW_BOLT = 31627,
+ SPELL_BANSHEE_CURSE = 31651,
+ SPELL_BANSHEE_WAIL = 38183,
+ SPELL_ANTI_MAGIC_SHELL = 31662,
+ SPELL_WEB = 28991,
+ SPELL_MANA_BURN = 31729,
+ SPELL_FROST_BREATH = 31688,
+ SPELL_GARGOYLE_STRIKE = 31664,
+ SPELL_EXPLODING_SHOT = 7896,
+};
float HordeWPs[8][3]=//basic waypoints from spawn to leader
{
@@ -522,9 +541,6 @@ public:
}
};
-#define SPELL_DISEASE_CLOUD 31607
-#define SPELL_KNOCKDOWN 31610
-
class mob_abomination : public CreatureScript
{
public:
@@ -623,8 +639,6 @@ public:
};
-#define SPELL_FRENZY 31540
-
class mob_ghoul : public CreatureScript
{
public:
@@ -727,11 +741,6 @@ public:
};
-#define SPELL_RAISE_DEAD_1 31617
-#define SPELL_RAISE_DEAD_2 31624
-#define SPELL_RAISE_DEAD_3 31625
-#define SPELL_SHADOW_BOLT 31627
-
class mob_necromancer : public CreatureScript
{
public:
@@ -859,10 +868,6 @@ public:
};
-#define SPELL_BANSHEE_CURSE 31651
-#define SPELL_BANSHEE_WAIL 38183
-#define SPELL_ANTI_MAGIC_SHELL 31662
-
class mob_banshee : public CreatureScript
{
public:
@@ -966,8 +971,6 @@ public:
};
-#define SPELL_WEB 28991
-
class mob_crypt_fiend : public CreatureScript
{
public:
@@ -1058,8 +1061,6 @@ public:
};
-#define SPELL_MANA_BURN 31729
-
class mob_fel_stalker : public CreatureScript
{
public:
@@ -1150,8 +1151,6 @@ public:
};
-#define SPELL_FROST_BREATH 31688
-
class mob_frost_wyrm : public CreatureScript
{
public:
@@ -1264,8 +1263,6 @@ public:
};
-#define SPELL_GARGOYLE_STRIKE 31664
-
class mob_gargoyle : public CreatureScript
{
public:
@@ -1402,8 +1399,6 @@ public:
};
-#define SPELL_EXPLODING_SHOT 7896
-
class alliance_rifleman : public CreatureScript
{
public:
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index ad8ebdb370a..69bb8285404 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -23,15 +23,16 @@ SDComment: Instance Data Scripts and functions to acquire mobs and set encounter
SDCategory: Caverns of Time, Mount Hyjal
EndScriptData */
-#include "ScriptPCH.h"
-#include "hyjal.h"
+#include "ScriptMgr.h"
+#include "InstanceScript.h"
+#include "ScriptedCreature.h"
#include "hyjal_trash.h"
-enum eEnums
+enum Misc
{
MAX_ENCOUNTER = 5,
- GO_ANCIENT_GEM = 185557
+ GO_ANCIENT_GEM = 185557,
};
/* Battle of Mount Hyjal encounters:
0 - Rage Winterchill event