aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp67
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp51
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp68
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp14
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp68
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp17
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp16
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h2
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp26
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp19
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp39
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp18
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp8
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.cpp170
-rw-r--r--src/server/scripts/Outland/BlackTemple/black_temple.h9
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp14
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp122
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp14
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp69
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp1641
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_supremus.cpp37
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp43
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp42
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp88
-rw-r--r--src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp62
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp50
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp18
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp70
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp63
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp76
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp46
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp31
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp24
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp57
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp26
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h18
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp35
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp14
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_gruul.cpp33
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp64
-rw-r--r--src/server/scripts/Outland/GruulsLair/gruuls_lair.h23
-rw-r--r--src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h56
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp23
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp26
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp19
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp8
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp53
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp203
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp120
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h25
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp95
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp60
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp10
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h14
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp241
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp250
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp91
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp130
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h24
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp50
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp57
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp147
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp19
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp8
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/the_eye.h27
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp12
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp22
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp20
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp24
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp43
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h33
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp51
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp20
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp25
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp14
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp14
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp31
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp4
-rw-r--r--src/server/scripts/Outland/boss_doomlord_kazzak.cpp22
-rw-r--r--src/server/scripts/Outland/boss_doomwalker.cpp17
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp89
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp63
-rw-r--r--src/server/scripts/Outland/zone_nagrand.cpp63
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp80
-rw-r--r--src/server/scripts/Outland/zone_shadowmoon_valley.cpp281
-rw-r--r--src/server/scripts/Outland/zone_shattrath_city.cpp69
-rw-r--r--src/server/scripts/Outland/zone_terokkar_forest.cpp114
-rw-r--r--src/server/scripts/Outland/zone_zangarmarsh.cpp44
93 files changed, 3568 insertions, 2757 deletions
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
index ea7f4c668ab..9735011ba81 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -32,24 +32,31 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#define SPELL_MOONFIRE 37328
-#define SPELL_FIREBALL 37329
-#define SPELL_MIND_FLAY 37330
-#define SPELL_HEMORRHAGE 37331
-#define SPELL_FROSTSHOCK 37332
-#define SPELL_CURSE_OF_AGONY 37334
-#define SPELL_MORTAL_STRIKE 37335
-#define SPELL_FREEZING_TRAP 37368
-#define SPELL_HAMMER_OF_JUSTICE 37369
+enum Spells
+{
+ SPELL_MOONFIRE = 37328,
+ SPELL_FIREBALL = 37329,
+ SPELL_MIND_FLAY = 37330,
+ SPELL_HEMORRHAGE = 37331,
+ SPELL_FROSTSHOCK = 37332,
+ SPELL_CURSE_OF_AGONY = 37334,
+ SPELL_MORTAL_STRIKE = 37335,
+ SPELL_FREEZING_TRAP = 37368,
+ SPELL_HAMMER_OF_JUSTICE = 37369,
+
+ // Avatar of Martyred
+ SPELL_AV_MORTAL_STRIKE = 16856,
+ SPELL_AV_SUNDER_ARMOR = 16145
+};
class npc_stolen_soul : public CreatureScript
{
public:
npc_stolen_soul() : CreatureScript("npc_stolen_soul") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_stolen_soulAI (creature);
+ return new npc_stolen_soulAI(creature);
}
struct npc_stolen_soulAI : public ScriptedAI
@@ -59,12 +66,12 @@ public:
uint8 myClass;
uint32 Class_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Class_Timer = 1000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{ }
void SetMyClass(uint8 myclass)
@@ -72,7 +79,7 @@ public:
myClass = myclass;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -149,9 +156,9 @@ class boss_exarch_maladaar : public CreatureScript
public:
boss_exarch_maladaar() : CreatureScript("boss_exarch_maladaar") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_exarch_maladaarAI (creature);
+ return new boss_exarch_maladaarAI(creature);
}
struct boss_exarch_maladaarAI : public ScriptedAI
@@ -172,7 +179,7 @@ public:
bool HasTaunted;
bool Avatar_summoned;
- void Reset()
+ void Reset() OVERRIDE
{
soulmodel = 0;
soulholder = 0;
@@ -185,7 +192,8 @@ public:
Avatar_summoned = false;
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!HasTaunted && me->IsWithinDistInMap(who, 150.0f))
{
@@ -196,12 +204,12 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned->GetEntry() == ENTRY_STOLEN_SOUL)
{
@@ -219,7 +227,7 @@ public:
}
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (rand()%2)
return;
@@ -227,14 +235,14 @@ public:
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
//When Exarch Maladar is defeated D'ore appear.
me->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -294,17 +302,14 @@ public:
};
-#define SPELL_AV_MORTAL_STRIKE 16856
-#define SPELL_AV_SUNDER_ARMOR 16145
-
class npc_avatar_of_martyred : public CreatureScript
{
public:
npc_avatar_of_martyred() : CreatureScript("npc_avatar_of_martyred") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_avatar_of_martyredAI (creature);
+ return new npc_avatar_of_martyredAI(creature);
}
struct npc_avatar_of_martyredAI : public ScriptedAI
@@ -313,16 +318,16 @@ public:
uint32 Mortal_Strike_timer;
- void Reset()
+ void Reset() OVERRIDE
{
Mortal_Strike_timer = 10000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
index a599bdf74cb..9f7a27ecdef 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
@@ -27,22 +27,25 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "Player.h"
-#define SPELL_INHIBITMAGIC 32264
-#define SPELL_ATTRACTMAGIC 32265
-#define N_SPELL_CARNIVOROUSBITE 36383
-#define H_SPELL_CARNIVOROUSBITE 39382
-#define SPELL_CARNIVOROUSBITE DUNGEON_MODE(N_SPELL_CARNIVOROUSBITE, H_SPELL_CARNIVOROUSBITE)
+enum Spells
+{
+ SPELL_INHIBITMAGIC = 32264,
+ SPELL_ATTRACTMAGIC = 32265,
+ SPELL_CARNIVOROUSBITE = 36383,
-#define ENTRY_FOCUS_FIRE 18374
+ SPELL_FIERY_BLAST = 32302,
-#define N_SPELL_FIERY_BLAST 32302
-#define H_SPELL_FIERY_BLAST 38382
-#define SPELL_FIERY_BLAST DUNGEON_MODE(N_SPELL_FIERY_BLAST, H_SPELL_FIERY_BLAST)
-#define SPELL_FOCUS_FIRE_VISUAL 42075 //need to find better visual
+ SPELL_FOCUS_FIRE_VISUAL = 42075 //need to find better visual
+};
enum Say
{
- EMOTE_FOCUSED = 0
+ EMOTE_FOCUSED = 0
+};
+
+enum Creatures
+{
+ NPC_FOCUS_FIRE = 18374
};
class boss_shirrak_the_dead_watcher : public CreatureScript
@@ -50,9 +53,9 @@ class boss_shirrak_the_dead_watcher : public CreatureScript
public:
boss_shirrak_the_dead_watcher() : CreatureScript("boss_shirrak_the_dead_watcher") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_shirrak_the_dead_watcherAI (creature);
+ return new boss_shirrak_the_dead_watcherAI(creature);
}
struct boss_shirrak_the_dead_watcherAI : public ScriptedAI
@@ -68,7 +71,7 @@ public:
uint64 FocusedTargetGUID;
- void Reset()
+ void Reset() OVERRIDE
{
Inhibitmagic_Timer = 0;
Attractmagic_Timer = 28000;
@@ -77,12 +80,12 @@ public:
FocusedTargetGUID = 0;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{ }
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
- if (summoned && summoned->GetEntry() == ENTRY_FOCUS_FIRE)
+ if (summoned && summoned->GetEntry() == NPC_FOCUS_FIRE)
{
summoned->CastSpell(summoned, SPELL_FOCUS_FIRE_VISUAL, false);
summoned->setFaction(me->getFaction());
@@ -94,7 +97,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Inhibitmagic_Timer
if (Inhibitmagic_Timer <= diff)
@@ -145,7 +148,7 @@ public:
if (target && target->GetTypeId() == TYPEID_PLAYER && target->IsAlive())
{
FocusedTargetGUID = target->GetGUID();
- me->SummonCreature(ENTRY_FOCUS_FIRE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 5500);
+ me->SummonCreature(NPC_FOCUS_FIRE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 5500);
Talk(EMOTE_FOCUSED, FocusedTargetGUID);
}
FocusFire_Timer = 15000+(rand()%5000);
@@ -162,9 +165,9 @@ class npc_focus_fire : public CreatureScript
public:
npc_focus_fire() : CreatureScript("npc_focus_fire") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_focus_fireAI (creature);
+ return new npc_focus_fireAI(creature);
}
struct npc_focus_fireAI : public ScriptedAI
@@ -176,16 +179,16 @@ public:
uint32 FieryBlast_Timer;
bool fiery1, fiery2;
- void Reset()
+ void Reset() OVERRIDE
{
FieryBlast_Timer = 3000+(rand()%1000);
fiery1 = fiery2 = true;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{ }
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
index 41a94c84888..6c0d653f213 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
@@ -31,14 +31,17 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-enum ePrince
+enum Yells
{
SAY_INTRO = 0,
SAY_AGGRO = 1,
SAY_SLAY = 2,
SAY_SUMMON = 3,
SAY_DEAD = 4,
+};
+enum Spells
+{
SPELL_BLINK = 34605,
SPELL_FROSTBOLT = 32364,
SPELL_FIREBALL = 32363,
@@ -47,9 +50,19 @@ enum ePrince
SPELL_ETHEREAL_BEACON = 32371, // Summons NPC_BEACON
SPELL_ETHEREAL_BEACON_VISUAL = 32368,
+ // Ethereal Beacon
+ SPELL_ARCANE_BOLT = 15254,
+ SPELL_ETHEREAL_APPRENTICE = 32372 // Summon 18430
+};
+
+enum Creatures
+{
NPC_BEACON = 18431,
- NPC_SHAFFAR = 18344,
+ NPC_SHAFFAR = 18344
+};
+enum Misc
+{
NR_INITIAL_BEACONS = 3
};
@@ -58,9 +71,9 @@ class boss_nexusprince_shaffar : public CreatureScript
public:
boss_nexusprince_shaffar() : CreatureScript("boss_nexusprince_shaffar") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_nexusprince_shaffarAI (creature);
+ return new boss_nexusprince_shaffarAI(creature);
}
struct boss_nexusprince_shaffarAI : public ScriptedAI
@@ -78,7 +91,7 @@ public:
bool HasTaunted;
bool CanBlink;
- void Reset()
+ void Reset() OVERRIDE
{
Blink_Timer = 1500;
Beacon_Timer = 10000;
@@ -97,13 +110,14 @@ public:
me->SummonCreature(NPC_BEACON, posX + dist, posY, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
}
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
summons.DespawnAll();
ScriptedAI::EnterEvadeMode();
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
{
@@ -112,7 +126,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -120,7 +134,7 @@ public:
summons.DoZoneInCombat();
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned->GetEntry() == NPC_BEACON)
{
@@ -133,23 +147,23 @@ public:
summons.Summon(summoned);
}
- void SummonedCreatureDespawn(Creature* summon)
+ void SummonedCreatureDespawn(Creature* summon) OVERRIDE
{
summons.Despawn(summon);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEAD);
summons.DespawnAll();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -213,20 +227,14 @@ public:
};
-enum eEnums
-{
- SPELL_ARCANE_BOLT = 15254,
- SPELL_ETHEREAL_APPRENTICE = 32372 // Summon 18430
-};
-
class npc_ethereal_beacon : public CreatureScript
{
public:
npc_ethereal_beacon() : CreatureScript("npc_ethereal_beacon") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_ethereal_beaconAI (creature);
+ return new npc_ethereal_beaconAI(creature);
}
struct npc_ethereal_beaconAI : public ScriptedAI
@@ -244,14 +252,14 @@ public:
me->Kill(me);
}
- void Reset()
+ void Reset() OVERRIDE
{
Apprentice_Timer = DUNGEON_MODE(20000, 10000);
ArcaneBolt_Timer = 1000;
Check_Timer = 1000;
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
// Send Shaffar to fight
Creature* Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100);
@@ -264,12 +272,12 @@ public:
Shaffar->AI()->AttackStart(who);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
summoned->AI()->AttackStart(me->GetVictim());
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -305,7 +313,7 @@ public:
};
-enum eEthereal
+enum Ethereal
{
SPELL_ETHEREAL_APPRENTICE_FIREBOLT = 32369,
SPELL_ETHEREAL_APPRENTICE_FROSTBOLT = 32370
@@ -316,9 +324,9 @@ class npc_ethereal_apprentice : public CreatureScript
public:
npc_ethereal_apprentice() : CreatureScript("npc_ethereal_apprentice") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_ethereal_apprenticeAI (creature);
+ return new npc_ethereal_apprenticeAI(creature);
}
struct npc_ethereal_apprenticeAI : public ScriptedAI
@@ -329,13 +337,13 @@ public:
bool isFireboltTurn;
- void Reset()
+ void Reset() OVERRIDE
{
Cast_Timer = 3000;
isFireboltTurn = true;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
index e4d8d959941..3a845842934 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
@@ -45,9 +45,9 @@ class boss_pandemonius : public CreatureScript
public:
boss_pandemonius() : CreatureScript("boss_pandemonius") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_pandemoniusAI (creature);
+ return new boss_pandemoniusAI(creature);
}
struct boss_pandemoniusAI : public ScriptedAI
@@ -60,29 +60,29 @@ public:
uint32 DarkShell_Timer;
uint32 VoidBlast_Counter;
- void Reset()
+ void Reset() OVERRIDE
{
VoidBlast_Timer = 8000+rand()%15000;
DarkShell_Timer = 20000;
VoidBlast_Counter = 0;
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
index 22dcc7d996c..7a486876b3f 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
@@ -43,22 +43,22 @@ enum DarkweaverSyth
SPELL_SUMMON_SYTH_FIRE = 33537, // Spawns 19203
SPELL_SUMMON_SYTH_ARCANE = 33538, // Spawns 19205
SPELL_SUMMON_SYTH_FROST = 33539, // Spawns 19204
- SPELL_SUMMON_SYTH_SHADOW = 33540 // Spawns 19206
-};
+ SPELL_SUMMON_SYTH_SHADOW = 33540, // Spawns 19206
-#define SPELL_FLAME_BUFFET DUNGEON_MODE(33526, 38141)
-#define SPELL_ARCANE_BUFFET DUNGEON_MODE(33527, 38138)
-#define SPELL_FROST_BUFFET DUNGEON_MODE(33528, 38142)
-#define SPELL_SHADOW_BUFFET DUNGEON_MODE(33529, 38143)
+ SPELL_FLAME_BUFFET = 33526,
+ SPELL_ARCANE_BUFFET = 33527,
+ SPELL_FROST_BUFFET = 33528,
+ SPELL_SHADOW_BUFFET = 33529
+};
class boss_darkweaver_syth : public CreatureScript
{
public:
boss_darkweaver_syth() : CreatureScript("boss_darkweaver_syth") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_darkweaver_sythAI (creature);
+ return new boss_darkweaver_sythAI(creature);
}
struct boss_darkweaver_sythAI : public ScriptedAI
@@ -77,7 +77,7 @@ public:
bool summon50;
bool summon10;
- void Reset()
+ void Reset() OVERRIDE
{
flameshock_timer = 2000;
arcaneshock_timer = 4000;
@@ -90,17 +90,17 @@ public:
summon10 = false;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (rand()%2)
return;
@@ -108,7 +108,7 @@ public:
Talk(SAY_SLAY);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
summoned->AI()->AttackStart(target);
@@ -127,7 +127,7 @@ public:
DoCast(me, SPELL_SUMMON_SYTH_SHADOW, true); //right
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -211,16 +211,16 @@ public:
uint32 flameshock_timer;
uint32 flamebuffet_timer;
- void Reset()
+ void Reset() OVERRIDE
{
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
flameshock_timer = 2500;
flamebuffet_timer = 5000;
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -245,9 +245,9 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_syth_fireAI (creature);
+ return new npc_syth_fireAI(creature);
}
};
@@ -256,9 +256,9 @@ class npc_syth_arcane : public CreatureScript
public:
npc_syth_arcane() : CreatureScript("npc_syth_arcane") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_syth_arcaneAI (creature);
+ return new npc_syth_arcaneAI(creature);
}
struct npc_syth_arcaneAI : public ScriptedAI
@@ -270,16 +270,16 @@ public:
uint32 arcaneshock_timer;
uint32 arcanebuffet_timer;
- void Reset()
+ void Reset() OVERRIDE
{
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true);
arcaneshock_timer = 2500;
arcanebuffet_timer = 5000;
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -310,9 +310,9 @@ class npc_syth_frost : public CreatureScript
public:
npc_syth_frost() : CreatureScript("npc_syth_frost") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_syth_frostAI (creature);
+ return new npc_syth_frostAI(creature);
}
struct npc_syth_frostAI : public ScriptedAI
@@ -324,16 +324,16 @@ public:
uint32 frostshock_timer;
uint32 frostbuffet_timer;
- void Reset()
+ void Reset() OVERRIDE
{
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
frostshock_timer = 2500;
frostbuffet_timer = 5000;
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -365,9 +365,9 @@ class npc_syth_shadow : public CreatureScript
public:
npc_syth_shadow() : CreatureScript("npc_syth_shadow") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_syth_shadowAI (creature);
+ return new npc_syth_shadowAI(creature);
}
struct npc_syth_shadowAI : public ScriptedAI
@@ -379,16 +379,16 @@ public:
uint32 shadowshock_timer;
uint32 shadowbuffet_timer;
- void Reset()
+ void Reset() OVERRIDE
{
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
shadowshock_timer = 2500;
shadowbuffet_timer = 5000;
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
index b9a2fc62e8e..4123da48ba6 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
@@ -53,9 +53,9 @@ class boss_talon_king_ikiss : public CreatureScript
public:
boss_talon_king_ikiss() : CreatureScript("boss_talon_king_ikiss") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_talon_king_ikissAI (creature);
+ return new boss_talon_king_ikissAI(creature);
}
struct boss_talon_king_ikissAI : public ScriptedAI
@@ -76,7 +76,7 @@ public:
bool Blink;
bool Intro;
- void Reset()
+ void Reset() OVERRIDE
{
ArcaneVolley_Timer = 5000;
Sheep_Timer = 8000;
@@ -87,7 +87,8 @@ public:
ManaShield = false;
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!me->GetVictim() && me->CanCreatureAttack(who))
{
@@ -109,12 +110,12 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -122,12 +123,12 @@ public:
instance->SetData(DATA_IKISSDOOREVENT, DONE);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
index 785ec185941..d44789f4c39 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
@@ -27,10 +27,14 @@ EndScriptData */
#include "InstanceScript.h"
#include "sethekk_halls.h"
-enum eEnums
+enum Creatures
{
- NPC_ANZU = 23035,
- IKISS_DOOR = 177203,
+ NPC_ANZU = 23035
+};
+
+enum GameObjects
+{
+ GO_IKISS_DOOR = 177203
};
class instance_sethekk_halls : public InstanceMapScript
@@ -38,7 +42,7 @@ class instance_sethekk_halls : public InstanceMapScript
public:
instance_sethekk_halls() : InstanceMapScript("instance_sethekk_halls", 556) { }
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_sethekk_halls_InstanceMapScript(map);
}
@@ -69,11 +73,11 @@ public:
void OnGameObjectCreate(GameObject* go)
{
- if (go->GetEntry() == IKISS_DOOR)
+ if (go->GetEntry() == GO_IKISS_DOOR)
m_uiIkissDoorGUID = go->GetGUID();
}
- void SetData(uint32 type, uint32 data)
+ void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
index 58e6cc685ce..15ffda4ada9 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
@@ -19,7 +19,7 @@
#ifndef DEF_SETHEKK_HALLS_H
#define DEF_SETHEKK_HALLS_H
-enum eTypes
+enum DataTypes
{
DATA_IKISSDOOREVENT = 1,
TYPE_ANZU_ENCOUNTER = 2,
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
index f16a629dd0c..ffadfccecfe 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_ambassador_hellmaw.cpp
@@ -28,14 +28,17 @@ EndScriptData */
#include "ScriptedEscortAI.h"
#include "shadow_labyrinth.h"
-enum eEnums
+enum Yells
{
SAY_INTRO = 0,
SAY_AGGRO = 1,
SAY_HELP = 2,
SAY_SLAY = 3,
- SAY_DEATH = 4,
+ SAY_DEATH = 4
+};
+enum Spells
+{
SPELL_BANISH = 30231,
SPELL_CORROSIVE_ACID = 33551,
SPELL_FEAR = 33547,
@@ -47,7 +50,7 @@ class boss_ambassador_hellmaw : public CreatureScript
public:
boss_ambassador_hellmaw() : CreatureScript("boss_ambassador_hellmaw") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_ambassador_hellmawAI(creature);
}
@@ -69,7 +72,7 @@ public:
bool IsBanished;
bool Enraged;
- void Reset()
+ void Reset() OVERRIDE
{
EventCheck_Timer = 5000;
CorrosiveAcid_Timer = urand(5000, 10000);
@@ -86,13 +89,14 @@ public:
}
}
- void JustReachedHome()
+ void JustReachedHome() OVERRIDE
{
if (instance)
instance->SetData(TYPE_HELLMAW, FAIL);
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (me->HasAura(SPELL_BANISH))
return;
@@ -100,7 +104,7 @@ public:
npc_escortAI::MoveInLineOfSight(who);
}
- void WaypointReached(uint32 /*waypointId*/)
+ void WaypointReached(uint32 /*waypointId*/) OVERRIDE
{
}
@@ -124,17 +128,17 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -142,7 +146,7 @@ public:
instance->SetData(TYPE_HELLMAW, DONE);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Intro && !HasEscortState(STATE_ESCORT_ESCORTING))
{
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
index 307e8c8a2c6..573acfce5c2 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
@@ -65,7 +65,7 @@ public:
{
boss_blackheart_the_inciterAI(Creature* creature) : BossAI(creature, DATA_BLACKHEARTTHEINCITEREVENT) { }
- void Reset()
+ void Reset() OVERRIDE
{
InciteChaos = false;
@@ -73,12 +73,12 @@ public:
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, NOT_STARTED);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -86,7 +86,7 @@ public:
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, DONE);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
events.ScheduleEvent(EVENT_INCITE_CHAOS_WAIT, 15000);
events.ScheduleEvent(EVENT_INCITE_CHAOS, 20000);
@@ -99,7 +99,7 @@ public:
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, IN_PROGRESS);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -150,13 +150,12 @@ public:
private:
bool InciteChaos;
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_blackheart_the_inciterAI (creature);
- }
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_blackheart_the_inciterAI(creature);
+ }
};
void AddSC_boss_blackheart_the_inciter()
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
index 115c75c2f17..088913b13d2 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_grandmaster_vorpil.cpp
@@ -84,16 +84,16 @@ public:
uint32 move;
bool sacrificed;
- void Reset()
+ void Reset() OVERRIDE
{
VorpilGUID = 0;
move = 0;
sacrificed = false;
}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/)OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!VorpilGUID)
{
@@ -133,13 +133,12 @@ public:
move = 1000;
} else move -= diff;
}
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_voidtravelerAI (creature);
- }
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_voidtravelerAI(creature);
+ }
};
class boss_grandmaster_vorpil : public CreatureScript
@@ -154,7 +153,7 @@ public:
Intro = false;
}
- void Reset()
+ void Reset() OVERRIDE
{
HelpYell = false;
sumportals = false;
@@ -209,18 +208,18 @@ public:
}
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned && summoned->GetEntry() == NPC_VOID_TRAVELER)
CAST_AI(npc_voidtraveler::npc_voidtravelerAI, summoned->AI())->VorpilGUID = me->GetGUID();
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
destroyPortals();
@@ -229,7 +228,7 @@ public:
instance->SetData(DATA_GRANDMASTERVORPILEVENT, DONE);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
events.ScheduleEvent(EVENT_SHADOWBOLT_VOLLEY, urand(7000, 14000));
if (IsHeroic())
@@ -245,7 +244,8 @@ public:
_EnterCombat();
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
ScriptedAI::MoveInLineOfSight(who);
@@ -256,7 +256,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -312,12 +312,13 @@ public:
bool sumportals;
uint64 PortalsGuid[5];
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_grandmaster_vorpilAI (creature);
- }
+
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_grandmaster_vorpilAI(creature);
+ }
};
void AddSC_boss_grandmaster_vorpil()
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index 4f1d93aa04e..99078b3b15d 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -64,7 +64,7 @@ public:
SetCombatMovement(false);
}
- void Reset()
+ void Reset() OVERRIDE
{
events.ScheduleEvent(EVENT_SONIC_BOOM, 30000);
events.ScheduleEvent(EVENT_MURMURS_TOUCH, urand(8000, 20000));
@@ -100,16 +100,16 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
// Sonic Boom instant damage (needs core fix instead of this)
- void SpellHitTarget(Unit* target, const SpellInfo* spell)
+ void SpellHitTarget(Unit* target, const SpellInfo* spell) OVERRIDE
{
if (target && target->IsAlive() && spell && spell->Id == uint32(SPELL_SONIC_BOOM_EFFECT))
me->DealDamage(target, (target->GetHealth()*90)/100, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NATURE, spell);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target or casting
if (!UpdateVictim() || me->IsNonMeleeSpellCasted(false))
@@ -188,12 +188,12 @@ public:
DoMeleeAttackIfReady();
}
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_murmurAI (creature);
- }
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_murmurAI(creature);
+ }
};
void AddSC_boss_murmur()
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
index e3dec9c0a45..6e579003262 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp
@@ -39,7 +39,7 @@ class instance_shadow_labyrinth : public InstanceMapScript
public:
instance_shadow_labyrinth() : InstanceMapScript("instance_shadow_labyrinth", 555) { }
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_shadow_labyrinth_InstanceMapScript(map);
}
@@ -111,7 +111,7 @@ public:
}
}
- void SetData(uint32 type, uint32 uiData)
+ void SetData(uint32 type, uint32 uiData) OVERRIDE
{
switch (type)
{
@@ -174,7 +174,7 @@ public:
}
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -186,7 +186,7 @@ public:
return false;
}
- uint64 GetData64(uint32 identifier) const
+ uint64 GetData64(uint32 identifier) const OVERRIDE
{
if (identifier == DATA_GRANDMASTERVORPIL)
return m_uiGrandmasterVorpil;
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.cpp b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
index 329a8c73927..a44c5f58dc4 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.cpp
@@ -21,25 +21,41 @@ Complete: 100%
Comment: Spirit of Olum: Player Teleporter to Seer Kanai Teleport after defeating Naj'entus and Supremus.
*/
-/* Content
-npc_spirit_of_olum
-*/
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "black_temple.h"
#include "Player.h"
-/*###
-# npc_spirit_of_olum
-####*/
-
enum Spells
{
- SPELL_TELEPORT = 41566
+ // Spirit of Olum
+ SPELL_TELEPORT = 41566,
+ // Wrathbone Flayer
+ SPELL_CLEAVE = 15496,
+ SPELL_IGNORED = 39544,
+ SPELL_SUMMON_CHANNEL = 40094
};
+enum Creatures
+{
+ NPC_BLOOD_MAGE = 22945,
+ NPC_DEATHSHAPER = 22882
+};
+
+enum Events
+{
+ // Wrathbone Flayer
+ EVENT_GET_CHANNELERS = 1,
+ EVENT_SET_CHANNELERS = 2,
+ EVENT_CLEAVE = 3,
+ EVENT_IGNORED = 4,
+};
+
+// ########################################################
+// Spirit of Olum
+// ########################################################
+
class npc_spirit_of_olum : public CreatureScript
{
public:
@@ -49,7 +65,7 @@ public:
{
npc_spirit_of_olumAI(Creature* creature) : ScriptedAI(creature) {}
- void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action)
+ void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) OVERRIDE
{
if (action == 1)
{
@@ -60,13 +76,143 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_spirit_of_olumAI(creature);
+ }
+};
+
+// ########################################################
+// Wrathbone Flayer
+// ########################################################
+
+class npc_wrathbone_flayer : public CreatureScript
+{
+public:
+ npc_wrathbone_flayer() : CreatureScript("npc_wrathbone_flayer") { }
+
+ struct npc_wrathbone_flayerAI : public ScriptedAI
+ {
+ npc_wrathbone_flayerAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ void Reset() OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_GET_CHANNELERS, 3000);
+ enteredCombat = false;
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE { }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_CLEAVE, 5000);
+ events.ScheduleEvent(EVENT_IGNORED, 7000);
+ enteredCombat = true;
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+
+ if (!enteredCombat)
+ {
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_GET_CHANNELERS:
+ {
+ std::list<Creature*> BloodMageList;
+ me->GetCreatureListWithEntryInGrid(BloodMageList, NPC_BLOOD_MAGE, 15.0f);
+
+ if (!BloodMageList.empty())
+ for (std::list<Creature*>::const_iterator itr = BloodMageList.begin(); itr != BloodMageList.end(); ++itr)
+ {
+ bloodmage.push_back((*itr)->GetGUID());
+ if ((*itr)->isDead())
+ (*itr)->Respawn();
+ }
+
+ std::list<Creature*> DeathShaperList;
+ me->GetCreatureListWithEntryInGrid(DeathShaperList, NPC_DEATHSHAPER, 15.0f);
+
+ if (!DeathShaperList.empty())
+ for (std::list<Creature*>::const_iterator itr = DeathShaperList.begin(); itr != DeathShaperList.end(); ++itr)
+ {
+ deathshaper.push_back((*itr)->GetGUID());
+ if ((*itr)->isDead())
+ (*itr)->Respawn();
+ }
+
+ events.ScheduleEvent(EVENT_SET_CHANNELERS, 3000);
+
+ break;
+ }
+ case EVENT_SET_CHANNELERS:
+ {
+ for (std::list<uint64>::const_iterator itr = bloodmage.begin(); itr != bloodmage.end(); ++itr)
+ if (Creature* bloodmage = (Unit::GetCreature(*me, *itr)))
+ bloodmage->AI()->DoCast(SPELL_SUMMON_CHANNEL);
+
+ for (std::list<uint64>::const_iterator itr = deathshaper.begin(); itr != deathshaper.end(); ++itr)
+ if (Creature* deathshaper = (Unit::GetCreature(*me, *itr)))
+ deathshaper->AI()->DoCast(SPELL_SUMMON_CHANNEL);
+
+ events.ScheduleEvent(EVENT_SET_CHANNELERS, 12000);
+
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_CLEAVE:
+ DoCastVictim(SPELL_CLEAVE);
+ events.ScheduleEvent(EVENT_CLEAVE, urand (1000, 2000));
+ break;
+ case EVENT_IGNORED:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_IGNORED);
+ events.ScheduleEvent(EVENT_IGNORED, 10000);
+ break;
+ default:
+ break;
+ }
+ }
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ std::list<uint64> bloodmage;
+ std::list<uint64> deathshaper;
+ bool enteredCombat;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_spirit_of_olumAI (creature);
+ return new npc_wrathbone_flayerAI(creature);
}
};
void AddSC_black_temple()
{
new npc_spirit_of_olum();
+ new npc_wrathbone_flayer();
}
diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h
index 433624a7d55..971cc36d7ba 100644
--- a/src/server/scripts/Outland/BlackTemple/black_temple.h
+++ b/src/server/scripts/Outland/BlackTemple/black_temple.h
@@ -16,10 +16,12 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef DEF_BLACK_TEMPLE_H
-#define DEF_BLACK_TEMPLE_H
+#ifndef BLACK_TEMPLE_H_
+#define BLACK_TEMPLE_H_
-enum eTypes
+uint32 const EncounterCount = 9;
+
+enum DataTypes
{
DATA_AKAMA = 1,
DATA_AKAMA_SHADE = 2,
@@ -50,4 +52,3 @@ enum eTypes
};
#endif
-
diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
index d5db702a9fc..7a11044476a 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
@@ -62,9 +62,9 @@ class boss_gurtogg_bloodboil : public CreatureScript
public:
boss_gurtogg_bloodboil() : CreatureScript("boss_gurtogg_bloodboil") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_gurtogg_bloodboilAI (creature);
+ return new boss_gurtogg_bloodboilAI(creature);
}
struct boss_gurtogg_bloodboilAI : public ScriptedAI
@@ -93,7 +93,7 @@ public:
bool Phase1;
- void Reset()
+ void Reset() OVERRIDE
{
if (instance)
instance->SetData(DATA_GURTOGGBLOODBOILEVENT, NOT_STARTED);
@@ -119,7 +119,7 @@ public:
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, false);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoZoneInCombat();
Talk(SAY_AGGRO);
@@ -127,12 +127,12 @@ public:
instance->SetData(DATA_GURTOGGBLOODBOILEVENT, IN_PROGRESS);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_GURTOGGBLOODBOILEVENT, DONE);
@@ -196,7 +196,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index 22322625775..2fdfe72a6f9 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -383,14 +383,14 @@ public:
{
flame_of_azzinothAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset()
+ void Reset() OVERRIDE
{
FlameBlastTimer = 15000;
CheckTimer = 5000;
GlaiveGUID = 0;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoZoneInCombat();
}
@@ -435,7 +435,7 @@ public:
GlaiveGUID = guid;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -464,9 +464,9 @@ public:
uint64 GlaiveGUID;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new flame_of_azzinothAI (creature);
+ return new flame_of_azzinothAI(creature);
}
};
@@ -484,11 +484,11 @@ public:
DoCast(me, SPELL_DUAL_WIELD, true);
}
- void Reset();
+ void Reset() OVERRIDE;
- void JustSummoned(Creature* summon);
+ void JustSummoned(Creature* summon) OVERRIDE;
- void SummonedCreatureDespawn(Creature* summon)
+ void SummonedCreatureDespawn(Creature* summon) OVERRIDE
{
if (summon->GetCreatureTemplate()->Entry == FLAME_OF_AZZINOTH)
{
@@ -505,7 +505,7 @@ public:
Summons.Despawn(summon);
}
- void MovementInform(uint32 /*MovementType*/, uint32 /*Data*/)
+ void MovementInform(uint32 /*MovementType*/, uint32 /*Data*/) OVERRIDE
{
if (FlightCount == 7) // change hover point
{
@@ -520,13 +520,13 @@ public:
Timer[EVENT_FLIGHT_SEQUENCE] = 1000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
me->setActive(true);
DoZoneInCombat();
}
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (!who || Phase >= PHASE_TALK_SEQUENCE)
return;
@@ -537,9 +537,10 @@ public:
ScriptedAI::AttackStart(who);
}
- void MoveInLineOfSight(Unit*) {}
+ void MoveInLineOfSight(Unit*) OVERRIDE {}
- void JustDied(Unit* /*killer*/)
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -552,7 +553,7 @@ public:
instance->HandleGameObject(instance->GetData64(i), true);
}
- void KilledUnit(Unit* victim)
+ void KilledUnit(Unit* victim) OVERRIDE
{
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
@@ -560,7 +561,7 @@ public:
Talk(SAY_ILLIDAN_KILL);
}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (damage >= me->GetHealth() && done_by != me)
damage = 0;
@@ -568,7 +569,7 @@ public:
done_by->AddThreat(me, -(3*(float)damage)/4); // do not let maiev tank him
}
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
+ void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_GLAIVE_RETURNS) // Re-equip our warblades!
{
@@ -922,7 +923,7 @@ public:
++TransformCount;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if ((!UpdateVictim()) && Phase < PHASE_TALK_SEQUENCE)
return;
@@ -1126,9 +1127,9 @@ public:
SummonList Summons;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_illidan_stormrageAI (creature);
+ return new boss_illidan_stormrageAI(creature);
}
};
@@ -1144,7 +1145,7 @@ public:
{
boss_maievAI(Creature* creature) : ScriptedAI(creature) {};
- void Reset()
+ void Reset() OVERRIDE
{
MaxTimer = 0;
Phase = PHASE_NORMAL_MAIEV;
@@ -1156,16 +1157,17 @@ public:
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, 45738);
}
- void EnterCombat(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
- void EnterEvadeMode() {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
+ void EnterEvadeMode() OVERRIDE {}
void GetIllidanGUID(uint64 guid)
{
IllidanGUID = guid;
}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by->GetGUID() != IllidanGUID)
damage = 0;
@@ -1179,7 +1181,7 @@ public:
}
}
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (!who || Timer[EVENT_MAIEV_STEALTH])
return;
@@ -1197,7 +1199,7 @@ public:
ScriptedAI::AttackStart(who);
}
- void DoAction(int32 param)
+ void DoAction(int32 param) OVERRIDE
{
if (param > PHASE_ILLIDAN_NULL && param < PHASE_ILLIDAN_MAX)
EnterPhase(PhaseIllidan(param));
@@ -1269,7 +1271,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if ((!UpdateVictim())
&& !Timer[EVENT_MAIEV_STEALTH])
@@ -1346,9 +1348,9 @@ public:
uint32 MaxTimer;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_maievAI (creature);
+ return new boss_maievAI(creature);
}
};
@@ -1365,7 +1367,7 @@ public:
JustCreated = true;
}
- void Reset()
+ void Reset() OVERRIDE
{
WalkCount = 0;
if (instance)
@@ -1421,23 +1423,24 @@ public:
}
// Do not call reset in Akama's evade mode, as this will stop him from summoning minions after he kills the first bit
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
me->RemoveAllAuras();
me->DeleteThreatList();
me->CombatStop(true);
}
- void EnterCombat(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
- void MovementInform(uint32 MovementType, uint32 /*Data*/)
+
+ void MovementInform(uint32 MovementType, uint32 /*Data*/) OVERRIDE
{
if (MovementType == POINT_MOTION_TYPE)
Timer = 1;
}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (damage > me->GetHealth() || done_by->GetGUID() != IllidanGUID)
damage = 0;
@@ -1685,7 +1688,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!me->IsVisible())
{
@@ -1768,7 +1771,7 @@ public:
DoMeleeAttackIfReady();
}
- void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/)
+ void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
{
player->CLOSE_GOSSIP_MENU();
EnterPhase(PHASE_CHANNEL);
@@ -1791,7 +1794,7 @@ public:
uint32 Check_Timer;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_akama_illidanAI(creature);
}
@@ -1985,7 +1988,7 @@ public:
{
cage_trap_triggerAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset()
+ void Reset() OVERRIDE
{
IllidanGUID = 0;
@@ -1997,9 +2000,10 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/)OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (!Active)
return;
@@ -2023,7 +2027,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (DespawnTimer)
{
@@ -2049,9 +2053,9 @@ public:
bool SummonedBeams;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new cage_trap_triggerAI (creature);
+ return new cage_trap_triggerAI(creature);
}
};
@@ -2060,7 +2064,7 @@ class gameobject_cage_trap : public GameObjectScript
public:
gameobject_cage_trap() : GameObjectScript("gameobject_cage_trap") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
float x, y, z;
player->GetPosition(x, y, z);
@@ -2082,24 +2086,24 @@ public:
{
shadow_demonAI(Creature* creature) : ScriptedAI(creature) {}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoZoneInCombat();
}
- void Reset()
+ void Reset() OVERRIDE
{
TargetGUID = 0;
DoCast(me, SPELL_SHADOW_DEMON_PASSIVE, true);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (Unit* target = Unit::GetUnit(*me, TargetGUID))
target->RemoveAurasDueToSpell(SPELL_PARALYZE);
}
- void UpdateAI(uint32 /*diff*/)
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -2123,9 +2127,9 @@ public:
uint64 TargetGUID;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new shadow_demonAI (creature);
+ return new shadow_demonAI(creature);
}
};
@@ -2138,16 +2142,16 @@ public:
{
blade_of_azzinothAI(Creature* creature) : NullCreatureAI(creature) {}
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
+ void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_THROW_GLAIVE2 || spell->Id == SPELL_THROW_GLAIVE)
me->SetDisplayId(MODEL_BLADE);// appear when hit by Illidan's glaive
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new blade_of_azzinothAI (creature);
+ return new blade_of_azzinothAI(creature);
}
};
@@ -2164,7 +2168,7 @@ public:
instance = creature->GetInstanceScript();
}
- void Reset()
+ void Reset() OVERRIDE
{
if (instance)
IllidanGUID = instance->GetData64(DATA_ILLIDANSTORMRAGE);
@@ -2175,7 +2179,7 @@ public:
DoCast(me, SPELL_SHADOWFIEND_PASSIVE, true);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoZoneInCombat();
}
@@ -2196,7 +2200,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!me->GetVictim())
{
@@ -2230,9 +2234,9 @@ public:
uint32 CheckTimer;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_parasitic_shadowfiendAI (creature);
+ return new npc_parasitic_shadowfiendAI(creature);
}
};
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index 1695c729b86..b9172be49da 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -82,9 +82,9 @@ class boss_mother_shahraz : public CreatureScript
public:
boss_mother_shahraz() : CreatureScript("boss_mother_shahraz") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_shahrazAI (creature);
+ return new boss_shahrazAI(creature);
}
struct boss_shahrazAI : public ScriptedAI
@@ -111,7 +111,7 @@ public:
bool Enraged;
- void Reset()
+ void Reset() OVERRIDE
{
if (instance)
instance->SetData(DATA_MOTHERSHAHRAZEVENT, NOT_STARTED);
@@ -134,7 +134,7 @@ public:
Enraged = false;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_MOTHERSHAHRAZEVENT, IN_PROGRESS);
@@ -143,12 +143,12 @@ public:
Talk(SAY_AGGRO);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_MOTHERSHAHRAZEVENT, DONE);
@@ -174,7 +174,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index c2d2c67dc48..22ea1b70c21 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -104,9 +104,9 @@ class npc_enslaved_soul : public CreatureScript
public:
npc_enslaved_soul() : CreatureScript("npc_enslaved_soul") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_enslaved_soulAI (creature);
+ return new npc_enslaved_soulAI(creature);
}
struct npc_enslaved_soulAI : public ScriptedAI
@@ -115,15 +115,15 @@ public:
uint64 ReliquaryGUID;
- void Reset() {ReliquaryGUID = 0;}
+ void Reset() OVERRIDE { ReliquaryGUID = 0; }
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoCast(me, ENSLAVED_SOUL_PASSIVE, true);
DoZoneInCombat();
}
- void JustDied(Unit* /*killer*/);
+ void JustDied(Unit* /*killer*/) OVERRIDE;
};
};
@@ -132,9 +132,9 @@ class boss_reliquary_of_souls : public CreatureScript
public:
boss_reliquary_of_souls() : CreatureScript("boss_reliquary_of_souls") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_reliquary_of_soulsAI (creature);
+ return new boss_reliquary_of_soulsAI(creature);
}
struct boss_reliquary_of_soulsAI : public ScriptedAI
@@ -156,7 +156,7 @@ public:
uint32 SoulCount;
uint32 SoulDeathCount;
- void Reset()
+ void Reset() OVERRIDE
{
if (instance)
instance->SetData(DATA_RELIQUARYOFSOULSEVENT, NOT_STARTED);
@@ -177,7 +177,8 @@ public:
me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!who)
return;
@@ -194,7 +195,7 @@ public:
AttackStartNoMove(who);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
me->AddThreat(who, 10000.0f);
DoZoneInCombat();
@@ -242,13 +243,13 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_RELIQUARYOFSOULSEVENT, DONE);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Phase)
return;
@@ -387,9 +388,9 @@ class boss_essence_of_suffering : public CreatureScript
public:
boss_essence_of_suffering() : CreatureScript("boss_essence_of_suffering") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_essence_of_sufferingAI (creature);
+ return new boss_essence_of_sufferingAI(creature);
}
struct boss_essence_of_sufferingAI : public ScriptedAI
@@ -404,7 +405,7 @@ public:
uint32 SoulDrainTimer;
uint32 AuraTimer;
- void Reset()
+ void Reset() OVERRIDE
{
StatAuraGUID = 0;
@@ -415,7 +416,7 @@ public:
AuraTimer = 5000;
}
- void DamageTaken(Unit* /*done_by*/, uint32 &damage)
+ void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
if (damage >= me->GetHealth())
{
@@ -427,7 +428,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (!me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
{
@@ -440,7 +441,7 @@ public:
else return;
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SUFF_SAY_SLAY);
}
@@ -469,7 +470,7 @@ public:
me->AddThreat(target, 1000000);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (me->IsInCombat())
{
@@ -512,9 +513,9 @@ class boss_essence_of_desire : public CreatureScript
public:
boss_essence_of_desire() : CreatureScript("boss_essence_of_desire") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_essence_of_desireAI (creature);
+ return new boss_essence_of_desireAI(creature);
}
struct boss_essence_of_desireAI : public ScriptedAI
@@ -525,7 +526,7 @@ public:
uint32 DeadenTimer;
uint32 SoulShockTimer;
- void Reset()
+ void Reset() OVERRIDE
{
RuneShieldTimer = 60000;
DeadenTimer = 30000;
@@ -533,7 +534,7 @@ public:
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_CONFUSE, true);
}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by == me)
return;
@@ -552,7 +553,7 @@ public:
}
}
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
+ void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
if (me->GetCurrentSpell(CURRENT_GENERIC_SPELL))
for (uint8 i = 0; i < 3; ++i)
@@ -562,19 +563,19 @@ public:
me->InterruptSpell(CURRENT_GENERIC_SPELL, false);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(DESI_SAY_FREED);
DoZoneInCombat();
DoCast(me, AURA_OF_DESIRE, true);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(DESI_SAY_SLAY);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -615,9 +616,9 @@ class boss_essence_of_anger : public CreatureScript
public:
boss_essence_of_anger() : CreatureScript("boss_essence_of_anger") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_essence_of_angerAI (creature);
+ return new boss_essence_of_angerAI(creature);
}
struct boss_essence_of_angerAI : public ScriptedAI
@@ -634,7 +635,7 @@ public:
bool CheckedAggro;
- void Reset()
+ void Reset() OVERRIDE
{
AggroTargetGUID = 0;
@@ -647,7 +648,7 @@ public:
CheckedAggro = false;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(ANGER_SAY_FREED);
@@ -655,17 +656,17 @@ public:
DoCast(me, AURA_OF_ANGER, true);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(ANGER_SAY_DEATH);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(ANGER_SAY_SLAY);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index 0c1994d0c2e..d86c9a2afe7 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* 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
@@ -16,890 +15,1236 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Shade_of_Akama
-SD%Complete: 90
-SDComment: Seems to be complete.
-SDCategory: Black Temple
-EndScriptData */
+/*
+Name: Boss_Shade_of_Akama
+%Complete: 80
+Comment: WIP A few more adds to script, ending script, and bugs.
+Category: Black Temple
+*/
+#include "ObjectMgr.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "GridNotifiers.h"
#include "black_temple.h"
-#include "Player.h"
-enum ShadeOfAkama
+enum Says
{
- SAY_DEATH = 0,
- SAY_LOW_HEALTH = 1,
- // Ending cinematic text
- SAY_FREE = 2,
- SAY_BROKEN_FREE_01 = 0,
- SAY_BROKEN_FREE_02 = 1
+ // Akama Ending cinematic text
+ SAY_BROKEN_FREE_0 = 0,
+ SAY_BROKEN_FREE_1 = 1,
+ SAY_BROKEN_FREE_2 = 2
};
-#define GOSSIP_ITEM "We are ready to fight alongside you, Akama"
+enum Spells
+{
+ // Akama
+ SPELL_STEALTH = 34189, // On Spawn
+ SPELL_AKAMA_SOUL_CHANNEL = 40447, // Cast on self hits Shade
+ SPELL_FIXATE = 40607, // Cast on self hits Shade
+ SPELL_CHAIN_LIGHTNING = 39945, // Combat
+ SPELL_DESTRUCTIVE_POISON = 40874, // Combat
+ // Shade
+ SPELL_THREAT = 41602, // self cast hits Akama
+ SPELL_SHADE_OF_AKAMA_TRIGGER = 40955, // Cast on death
+ SPELL_AKAMA_SOUL_EXPEL_CHANNEL = 40927, // must hit shade
+ SPELL_AKAMA_SOUL_EXPEL = 40902, // the one he cast
+ // Ashtongue Channeler
+ SPELL_SHADE_SOUL_CHANNEL = 40401,
+ SPELL_SHADE_SOUL_CHANNEL_2 = 40520,
+ SPELL_SHADOWFORM = 40973, // Cast on Shade
+ // Creature Spawner
+ SPELL_ASHTONGUE_WAVE_B = 42035,
+ SPELL_SUMMON_ASHTONGUE_SORCERER = 40476,
+ SPELL_SUMMON_ASHTONGUE_DEFENDER = 40474,
+ // Ashtongue Defender
+ SPELL_DEBILITATING_STRIKE = 41178,
+ SPELL_HEROIC_STRIKE = 41975,
+ SPELL_SHIELD_BASH = 41180,
+ SPELL_WINDFURY = 38229,
+ // Ashtongue Rogue
+ SPELL_DEBILITATING_POISON = 41978,
+ SPELL_EVISCERATE = 41177,
+ // Ashtongue Elementalist
+ SPELL_RAIN_OF_FIRE = 42023,
+ SPELL_LIGHTNING_BOLT = 42024,
+ // Ashtongue Spiritbinder
+ SPELL_SPIRIT_MEND = 42025,
+ SPELL_CHAIN_HEAL = 42027,
+ SPELL_SPIRIT_HEAL = 42317
+};
-struct Location
+enum Creatures
{
- float x, y, o, z;
+ NPC_ASHTONGUE_CHANNELER = 23421,
+ NPC_ASHTONGUE_SORCERER = 23215,
+ NPC_ASHTONGUE_DEFENDER = 23216,
+ NPC_ASHTONGUE_ELEMENTALIST = 23523,
+ NPC_ASHTONGUE_ROGUE = 23318,
+ NPC_ASHTONGUE_SPIRITBINDER = 23524,
+ NPC_ASHTONGUE_BROKEN = 23319,
+ NPC_CREATURE_SPAWNER_AKAMA = 23210
};
-/* Not used
-static Location ChannelerLocations[]=
+enum Factions
{
- {463.161285f, 401.219757f, 3.141592f, 0.0f},
- {457.377625f, 391.227661f, 2.106461f, 0.0f},
- {446.012421f, 391.227661f, 1.071904f, 0.0f},
- {439.533783f, 401.219757f, 0.000000f, 0.0f},
- {446.012421f, 411.211853f, 5.210546f, 0.0f},
- {457.377625f, 411.211853f, 4.177494f, 0.0f}
+ FACTION_FRIENDLY = 1820,
+ FACTION_COMBAT = 1868
};
-*/
-static Location SpawnLocations[]=
+enum SetData
{
- {498.652740f, 461.728119f, 0.0f, 0.0f},
- {498.505003f, 339.619324f, 0.0f, 0.0f}
+ SETDATA_DATA = 1,
+ SETDATA_RESET = 1,
+ SETDATA_CHANNELER_DIED = 2,
+ SETDATA_START_SPAWNING = 3,
+ SETDATA_STOP_SPAWNING = 4,
+ SETDATA_DESPAWN_ALL_SPAWNS = 5,
+ SETDATA_START_ATTACK_AKAMA = 6
};
-static Location AkamaWP[]=
+enum Events
{
- {482.352448f, 401.162720f, 0.0f, 112.783928f},
- {469.597443f, 402.264404f, 0.0f, 118.537910f}
+ // Akama
+ EVENT_SHADE_START = 1,
+ EVENT_SHADE_CHANNEL = 2,
+ EVENT_FIXATE = 3,
+ EVENT_CHAIN_LIGHTNING = 4,
+ EVENT_DESTRUCTIVE_POISON = 5,
+ // Shade
+ EVENT_RESET_ENCOUNTER = 6,
+ EVENT_FIND_CHANNELERS_SPAWNERS = 7,
+ EVENT_SET_CHANNELERS_SPAWNERS = 8,
+ EVENT_START_ATTACK_AKAMA = 9,
+ EVENT_ADD_THREAT = 10,
+ // Creature spawner
+ EVENT_SPAWN_WAVE_B = 11,
+ EVENT_SUMMON_ASHTONGUE_SORCERER = 12,
+ EVENT_SUMMON_ASHTONGUE_DEFENDER = 13,
+ // Channeler
+ EVENT_GET_SHADE_GUID = 14,
+ EVENT_CHANNEL = 15,
+ // Ashtongue Sorcerer
+ EVENT_SORCERER_CHANNEL = 16,
+ // Ashtongue Defender
+ EVENT_DEBILITATING_STRIKE = 17,
+ EVENT_HEROIC_STRIKE = 18,
+ EVENT_SHIELD_BASH = 19,
+ EVENT_WINDFURY = 20,
+ // Ashtongue Rogue
+ EVENT_DEBILITATING_POISON = 21,
+ EVENT_EVISCERATE = 22,
+ // Ashtongue Elementalist
+ EVENT_RAIN_OF_FIRE = 23,
+ EVENT_LIGHTNING_BOLT = 24,
+ // Ashtongue Spiritbinder
+ EVENT_SPIRIT_HEAL = 25,
};
-static Location BrokenCoords[]=
+struct Location
{
- {541.375916f, 401.439575f, M_PI, 112.783997f}, // The place where Akama channels
- {534.130005f, 352.394531f, 2.164150f, 112.783737f}, // Behind a 'pillar' which is behind the east alcove
- {499.621185f, 341.534729f, 1.652856f, 112.783730f}, // East Alcove
- {499.151093f, 461.036438f, 4.770888f, 112.78370f}, // West Alcove
+ float x, y, z;
};
-static Location BrokenWP[]=
+static Location ShadeWP = { 512.4877f, 400.7993f, 112.7837f };
+
+static Location AkamaWP[] =
{
- {492.491638f, 400.744690f, 3.122336f, 112.783737f},
- {494.335724f, 382.221771f, 2.676230f, 112.783737f},
- {489.555939f, 373.507202f, 2.416263f, 112.783737f},
- {491.136353f, 427.868774f, 3.519748f, 112.783737f},
+ { 517.4877f, 400.7993f, 112.7837f },
+ { 468.4435f, 401.1062f, 118.5379f }
};
-// Locations
-#define Z1 118.543144f
-#define Z2 120.783768f
-#define Z_SPAWN 113.537949f
-#define AGGRO_X 482.793182f
-#define AGGRO_Y 401.270172f
-#define AGGRO_Z 112.783928f
-#define AKAMA_X 514.583984f
-#define AKAMA_Y 400.601013f
-#define AKAMA_Z 112.783997f
-
-// Spells
-#define SPELL_VERTEX_SHADE_BLACK 39833
-#define SPELL_SHADE_SOUL_CHANNEL 40401
-#define SPELL_DESTRUCTIVE_POISON 40874
-#define SPELL_LIGHTNING_BOLT 42024
-#define SPELL_AKAMA_SOUL_CHANNEL 40447
-#define SPELL_AKAMA_SOUL_RETRIEVE 40902
-#define AKAMA_SOUL_EXPEL 40855
-#define SPELL_SHADE_SOUL_CHANNEL_2 40520
-
-// Channeler entry
-#define CREATURE_CHANNELER 23421
-#define CREATURE_SORCERER 23215
-#define CREATURE_DEFENDER 23216
-#define CREATURE_BROKEN 23319
-
-const uint32 spawnEntries[4]= { 23523, 23318, 23524 };
+// ########################################################
+// Shade of Akama
+// ########################################################
-class npc_ashtongue_channeler : public CreatureScript
+class boss_shade_of_akama : public CreatureScript
{
public:
- npc_ashtongue_channeler() : CreatureScript("npc_ashtongue_channeler") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_ashtongue_channelerAI (creature);
- }
+ boss_shade_of_akama() : CreatureScript("boss_shade_of_akama") { }
- struct npc_ashtongue_channelerAI : public ScriptedAI
+ struct boss_shade_of_akamaAI : public ScriptedAI
{
- npc_ashtongue_channelerAI(Creature* creature) : ScriptedAI(creature)
+ boss_shade_of_akamaAI(Creature* creature) : ScriptedAI(creature), HasKilledAkamaAndReseting(false)
{
- ShadeGUID = 0;
+ instance = creature->GetInstanceScript();
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- uint64 ShadeGUID;
+ void Reset() OVERRIDE
+ {
+ if (!HasKilledAkamaAndReseting)
+ {
+ for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
+ if (Creature* Channeler = (Unit::GetCreature(*me, *itr)))
+ Channeler->DespawnOrUnsummon();
- void Reset() {}
- void JustDied(Unit* /*killer*/);
- void EnterCombat(Unit* /*who*/) {}
- void AttackStart(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
- void UpdateAI(uint32 /*diff*/) {}
- };
+ for (std::list<uint64>::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
+ if (Creature* Spawner = (Unit::GetCreature(*me, *itr)))
+ Spawner->AI()->SetData(SETDATA_DATA, SETDATA_DESPAWN_ALL_SPAWNS);
-};
+ events.ScheduleEvent(EVENT_FIND_CHANNELERS_SPAWNERS, 3000);
+ events.ScheduleEvent(EVENT_RESET_ENCOUNTER, 5000);
+ }
-class npc_ashtongue_sorcerer : public CreatureScript
-{
-public:
- npc_ashtongue_sorcerer() : CreatureScript("npc_ashtongue_sorcerer") { }
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_ashtongue_sorcererAI (creature);
- }
+ me->SetWalk(true);
+ combatStarted = false;
+ akamaReached = false;
+ HasKilledAkama = false;
+ HasKilledAkamaAndReseting = false;
+ }
- struct npc_ashtongue_sorcererAI : public ScriptedAI
- {
- npc_ashtongue_sorcererAI(Creature* creature) : ScriptedAI(creature)
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (instance)
+ instance->SetData(DATA_SHADEOFAKAMAEVENT, DONE);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void AttackStart(Unit* who) OVERRIDE
+ {
+ if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
+ {
+ if (Creature* Akama = Unit::GetCreature((*me), akamaGUID))
+ if (Akama->IsAlive())
+ ScriptedAI::AttackStart(Akama);
+ }
+ else
+ ScriptedAI::AttackStart(who);
+ }
+
+ void SetData(uint32 data, uint32 value) OVERRIDE
{
- ShadeGUID = 0;
+ if (data == SETDATA_DATA && value == SETDATA_CHANNELER_DIED)
+ me->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2);
+
+ UpdateSpeed();
}
- uint64 ShadeGUID;
- uint32 CheckTimer;
- bool StartBanishing;
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE
+ {
+ if (spell->Id == SPELL_AKAMA_SOUL_CHANNEL)
+ {
+ combatStarted = true;
+ events.ScheduleEvent(EVENT_START_ATTACK_AKAMA, 500);
+ events.ScheduleEvent(EVENT_SET_CHANNELERS_SPAWNERS, 1000);
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
+ if (Creature* Akama = Unit::GetCreature((*me), akamaGUID))
+ me->AddThreat(Akama, 10000000.0f);
+ }
+ else if (spell->Id == SPELL_SHADE_SOUL_CHANNEL_2)
+ UpdateSpeed();
+ }
- void Reset()
+ void UpdateSpeed()
{
- StartBanishing = false;
- CheckTimer = 5000;
+ float moveSpeed = 0.2f;
+
+ if (me->GetAuraCount(SPELL_SHADE_SOUL_CHANNEL_2) <= 3)
+ {
+ moveSpeed = (2.0 - (0.6 * me->GetAuraCount(SPELL_SHADE_SOUL_CHANNEL_2)));
+ me->SetSpeed(MOVE_WALK, moveSpeed / 2.5);
+ me->SetSpeed(MOVE_RUN, (moveSpeed * 2) / 7);
+ me->ClearUnitState(UNIT_STATE_ROOT);
+ }
+ else
+ me->AddUnitState(UNIT_STATE_ROOT);
}
- void JustDied(Unit* /*killer*/);
- void EnterCombat(Unit* /*who*/) {}
- void AttackStart(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
- if (StartBanishing)
+ if (HasKilledAkamaAndReseting)
return;
- if (CheckTimer <= diff)
+ events.Update(diff);
+
+ if (!combatStarted)
+ {
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_RESET_ENCOUNTER:
+ if (Creature* Akama = Unit::GetCreature((*me), akamaGUID))
+ if (!Akama->IsAlive())
+ Akama->Respawn();
+ break;
+ case EVENT_FIND_CHANNELERS_SPAWNERS:
+ {
+ std::list<Creature*> ChannelerList;
+ me->GetCreatureListWithEntryInGrid(ChannelerList, NPC_ASHTONGUE_CHANNELER, 15.0f);
+
+ if (!ChannelerList.empty())
+ for (std::list<Creature*>::const_iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr)
+ {
+ Channelers.push_back((*itr)->GetGUID());
+ if ((*itr)->isDead())
+ (*itr)->Respawn();
+ }
+
+ std::list<Creature*> SpawnerList;
+ me->GetCreatureListWithEntryInGrid(SpawnerList, NPC_CREATURE_SPAWNER_AKAMA, 90.0f);
+
+ if (!SpawnerList.empty())
+ for (std::list<Creature*>::const_iterator itr = SpawnerList.begin(); itr != SpawnerList.end(); ++itr)
+ Spawners.push_back((*itr)->GetGUID());
+
+ me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
+ akamaGUID = instance->GetData64(DATA_AKAMA_SHADE);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+ else
{
- Creature* Shade = Unit::GetCreature((*me), ShadeGUID);
- if (Shade && Shade->IsAlive() && me->IsAlive())
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_SET_CHANNELERS_SPAWNERS:
+ {
+ for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
+ {
+ if (Creature* Channeler = (Unit::GetCreature(*me, *itr)))
+ Channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ }
+
+ for (std::list<uint64>::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
+ {
+ if (Creature* Spawner = (Unit::GetCreature(*me, *itr)))
+ Spawner->AI()->SetData(SETDATA_DATA, SETDATA_START_SPAWNING);
+ }
+
+ break;
+ }
+ case EVENT_START_ATTACK_AKAMA:
+ me->GetMotionMaster()->MovePoint(0, ShadeWP.x, ShadeWP.y, ShadeWP.z ,false);
+ events.ScheduleEvent(EVENT_START_ATTACK_AKAMA, 1000);
+ break;
+ case EVENT_ADD_THREAT:
+ DoCast(SPELL_THREAT);
+ events.ScheduleEvent(EVENT_ADD_THREAT, 3500);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (HasKilledAkama)
+ {
+ if (!HasKilledAkamaAndReseting)
+ {
+ HasKilledAkamaAndReseting = true;
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ instance->SetData(DATA_SHADEOFAKAMAEVENT, NOT_STARTED);
+ me->RemoveAllAurasExceptType(SPELL_AURA_DUMMY);
+ me->DeleteThreatList();
+ me->CombatStop();
+ me->GetMotionMaster()->MoveTargetedHome();
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
+ combatStarted = false;
+
+ if (Creature* Akama = Unit::GetCreature((*me), akamaGUID))
+ Akama->DespawnOrUnsummon();
+
+ for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
+ if (Creature* Channeler = (Unit::GetCreature(*me, *itr)))
+ Channeler->DespawnOrUnsummon();
+
+ for (std::list<uint64>::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
+ if (Creature* Spawner = (Unit::GetCreature(*me, *itr)))
+ Spawner->AI()->SetData(SETDATA_DATA, SETDATA_DESPAWN_ALL_SPAWNS);
+
+ events.ScheduleEvent(EVENT_FIND_CHANNELERS_SPAWNERS, 10000);
+ events.ScheduleEvent(EVENT_RESET_ENCOUNTER, 20000);
+ }
+ }
+
+ if (!akamaReached)
{
- if (me->IsWithinDist(Shade, 20, false))
+ if (Creature* Akama = Unit::GetCreature((*me), akamaGUID))
{
- me->GetMotionMaster()->Clear(false);
- me->GetMotionMaster()->MoveIdle();
- DoCast(Shade, SPELL_SHADE_SOUL_CHANNEL, true);
- DoCast(Shade, SPELL_SHADE_SOUL_CHANNEL_2, true);
+ if (me->IsWithinDist(Akama, 2.0f, false))
+ {
+ akamaReached = true;
+ me->GetMotionMaster()->Clear(true);
+ me->GetMotionMaster()->MoveIdle();
+ me->SetWalk(false);
- StartBanishing = true;
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+
+ events.CancelEvent(EVENT_START_ATTACK_AKAMA);
+ events.ScheduleEvent(EVENT_ADD_THREAT, 100);
+
+ for (std::list<uint64>::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
+ if (Creature* Spawner = (Unit::GetCreature(*me, *itr)))
+ Spawner->AI()->SetData(SETDATA_DATA, SETDATA_STOP_SPAWNING);
+ }
}
}
- CheckTimer = 2000;
- } else CheckTimer -= diff;
+ else
+ DoMeleeAttackIfReady();
+ }
}
+
+ public:
+ bool HasKilledAkama;
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ std::list<uint64> Channelers;
+ std::list<uint64> Spawners;
+ uint64 akamaGUID;
+ uint64 ShadeGUID;
+ bool akamaReached;
+ bool combatStarted;
+ bool HasKilledAkamaAndReseting;
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_shade_of_akamaAI(creature);
+ }
};
-class boss_shade_of_akama : public CreatureScript
+// ########################################################
+// Akama
+// ########################################################
+
+class npc_akama_shade : public CreatureScript
{
public:
- boss_shade_of_akama() : CreatureScript("boss_shade_of_akama") { }
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new boss_shade_of_akamaAI (creature);
- }
+ npc_akama_shade() : CreatureScript("npc_akama_shade") { }
- struct boss_shade_of_akamaAI : public ScriptedAI
+ struct npc_akamaAI : public ScriptedAI
{
- boss_shade_of_akamaAI(Creature* creature) : ScriptedAI(creature), summons(me)
+ npc_akamaAI(Creature* creature) : ScriptedAI(creature)
{
instance = creature->GetInstanceScript();
- AkamaGUID = instance ? instance->GetData64(DATA_AKAMA_SHADE) : 0;
- me->setActive(true);//if view distance is too low
- me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
- me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
}
- InstanceScript* instance;
-
- std::list<uint64> Channelers;
- std::list<uint64> Sorcerers;
- uint64 AkamaGUID;
+ void Reset() OVERRIDE
+ {
+ me->setFaction(FACTION_FRIENDLY);
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ DoCast(me, SPELL_STEALTH);
+ StartChannel = false;
+ StartCombat = false;
+ HasYelledOnce = false;
+ ShadeHasDied = false;
+ }
- uint32 SorcererCount;
- uint32 DeathCount;
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (Creature* Shade = Unit::GetCreature((*me), ShadeGUID))
+ if (Shade->IsAlive())
+ CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->HasKilledAkama = true;
+ me->GetMotionMaster()->Clear(true);
+ me->GetMotionMaster()->MoveIdle();
+ }
- uint32 ReduceHealthTimer;
- uint32 SummonTimer;
- uint32 ResetTimer;
- uint32 DefenderTimer; // They are on a flat 15 second timer, independant of the other summon Creature timer.
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE
+ {
+ if (!StartCombat)
+ {
+ if (spell->Id == SPELL_THREAT)
+ {
+ me->ClearUnitState(UNIT_STATE_ROOT);
+ me->RemoveAura(SPELL_AKAMA_SOUL_CHANNEL);
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
+ if (Creature* Shade = Unit::GetCreature((*me), ShadeGUID))
+ Shade->RemoveAura(SPELL_AKAMA_SOUL_CHANNEL);
+ StartCombat = true;
+ }
+ }
+ }
- bool IsBanished;
- bool HasKilledAkama;
- bool reseting;
- bool GridSearcherSucceeded;
- bool HasKilledAkamaAndReseting;
- SummonList summons;
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 2000);
+ events.ScheduleEvent(EVENT_DESTRUCTIVE_POISON, 5000);
+ }
- void Reset()
+ void UpdateAI(uint32 diff) OVERRIDE
{
- reseting = true;
- HasKilledAkamaAndReseting = false;
+ if (StartChannel)
+ {
+ events.Update(diff);
- GridSearcherSucceeded = false;
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_SHADE_START:
+ if (instance)
+ {
+ ShadeGUID = instance->GetData64(DATA_SHADEOFAKAMA);
+ instance->SetData(DATA_SHADEOFAKAMAEVENT, IN_PROGRESS);
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->RemoveAura(SPELL_STEALTH);
+ me->SetWalk(true);
+ me->GetMotionMaster()->MovePoint(0, AkamaWP[0].x, AkamaWP[0].y, AkamaWP[0].z, false);
+ events.ScheduleEvent(EVENT_SHADE_CHANNEL, 10000);
+ break;
+ }
+ case EVENT_SHADE_CHANNEL:
+ me->AddUnitState(UNIT_STATE_ROOT);
+ me->SetFacingTo(3.118662f);
+ DoCast(me, SPELL_AKAMA_SOUL_CHANNEL);
+ me->setFaction(FACTION_COMBAT);
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
+ events.ScheduleEvent(EVENT_FIXATE, 5000);
+ break;
+ case EVENT_FIXATE:
+ DoCast(SPELL_FIXATE);
+ StartChannel = false;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ if (!UpdateVictim())
+ return;
- Sorcerers.clear();
- summons.DespawnAll();//despawn all adds
+ events.Update(diff);
- if (Creature* Akama = Unit::GetCreature(*me, AkamaGUID))
+ while (uint32 eventId = events.ExecuteEvent())
{
- Akama->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);//turn gossip on so players can restart the event
- if (Akama->isDead())
+ switch (eventId)
{
- Akama->Respawn();//respawn akama if dead
- Akama->AI()->EnterEvadeMode();
+ case EVENT_CHAIN_LIGHTNING:
+ DoCastVictim(SPELL_CHAIN_LIGHTNING);
+ events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, urand(10000, 15000));
+ break;
+ case EVENT_DESTRUCTIVE_POISON:
+ DoCast(me, SPELL_DESTRUCTIVE_POISON);
+ events.ScheduleEvent(EVENT_DESTRUCTIVE_POISON, urand(4000, 5000));
+ break;
+ default:
+ break;
}
}
- SorcererCount = 0;
- DeathCount = 0;
- SummonTimer = 10000;
- ReduceHealthTimer = 0;
- ResetTimer = 60000;
- DefenderTimer = 15000;
+ DoMeleeAttackIfReady();
+ }
- IsBanished = true;
- HasKilledAkama = false;
+ void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) OVERRIDE
+ {
+ if (action == 0)
+ {
+ player->CLOSE_GOSSIP_MENU();
+ StartChannel = true;
+ events.ScheduleEvent(EVENT_SHADE_START, 500);
+ }
+ }
- me->SetVisible(true);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- //me->GetMotionMaster()->Clear();
- //me->GetMotionMaster()->MoveIdle();
- me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ uint64 ShadeGUID;
+ bool StartChannel;
+ bool ShadeHasDied;
+ bool StartCombat;
+ bool HasYelledOnce;
- if (instance)
- instance->SetData(DATA_SHADEOFAKAMAEVENT, NOT_STARTED);
+ };
- reseting = false;
- }
- void JustDied(Unit* /*killer*/)
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_akamaAI(creature);
+ }
+};
+
+// ########################################################
+// Ashtongue Channeler
+// ########################################################
+
+class npc_ashtongue_channeler : public CreatureScript
+{
+public:
+ npc_ashtongue_channeler() : CreatureScript("npc_ashtongue_channeler") { }
+
+ struct npc_ashtongue_channelerAI : public ScriptedAI
+ {
+ npc_ashtongue_channelerAI(Creature* creature) : ScriptedAI(creature)
{
- summons.DespawnAll();
+ instance = creature->GetInstanceScript();
}
- void JustSummoned(Creature* summon)
+
+ void Reset() OVERRIDE
{
- if (summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
- summons.Summon(summon);
+ me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
+ me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
+
+ me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ events.ScheduleEvent(EVENT_CHANNEL, 2000);
+ events.ScheduleEvent(EVENT_GET_SHADE_GUID, 1000);
}
- void SummonedCreatureDespawn(Creature* summon)
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (summon->GetEntry() == CREATURE_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
- summons.Despawn(summon);
+ if (Creature* Shade = (Unit::GetCreature((*me), ShadeGUID)))
+ Shade->AI()->SetData(SETDATA_DATA, SETDATA_CHANNELER_DIED);
}
- void MoveInLineOfSight(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
+
+ void UpdateAI(uint32 diff) OVERRIDE
{
- if (!GridSearcherSucceeded)
- {
- FindChannelers();
+ events.Update(diff);
- if (!Channelers.empty())
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
{
- for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
- {
- Creature* Channeler = (Unit::GetCreature(*me, *itr));
- if (Channeler)
+ case EVENT_CHANNEL:
+ if (Creature* Shade = (Unit::GetCreature((*me), ShadeGUID)))
{
- if (Channeler->isDead())
+ if (Shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
+ DoCast(me, SPELL_SHADE_SOUL_CHANNEL);
+ else
{
- Channeler->RemoveCorpse();
- Channeler->Respawn();
+ me->InterruptSpell(CURRENT_CHANNELED_SPELL);
+ Shade->AI()->SetData(SETDATA_DATA, SETDATA_CHANNELER_DIED);
}
-
- Channeler->CastSpell(me, SPELL_SHADE_SOUL_CHANNEL, true);
- Channeler->CastSpell(me, SPELL_SHADE_SOUL_CHANNEL_2, true);
- Channeler->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- GridSearcherSucceeded = true;
}
- }
- } else TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2 ERROR: No Channelers are stored in the list. This encounter will not work properly");
+ events.ScheduleEvent(EVENT_CHANNEL, 2000);
+ break;
+ case EVENT_GET_SHADE_GUID:
+ if (instance)
+ ShadeGUID = instance->GetData64(DATA_SHADEOFAKAMA);
+ break;
+ default:
+ break;
+ }
}
}
- void AttackStart(Unit* who)
- {
- if (!who || IsBanished)
- return;
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ uint64 ShadeGUID;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_ashtongue_channelerAI(creature);
+ }
+};
+
+// ########################################################
+// Creature Generator Akama
+// ########################################################
+
+class npc_creature_generator_akama : public CreatureScript
+{
+public:
+ npc_creature_generator_akama() : CreatureScript("npc_creature_generator_akama") { }
- if (who->isTargetableForAttack() && who != me)
- DoStartMovement(who);
+ struct npc_creature_generator_akamaAI : public ScriptedAI
+ {
+ npc_creature_generator_akamaAI(Creature* creature) : ScriptedAI(creature), Summons(me)
+ {
+ instance = creature->GetInstanceScript();
}
- void IncrementDeathCount(uint64 guid = 0) // If guid is set, will remove it from list of sorcerer
+ void Reset() OVERRIDE
{
- if (reseting)
- return;
+ Summons.DespawnAll();
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Increasing Death Count for Shade of Akama encounter");
- ++DeathCount;
- me->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2);
- if (guid)
- {
- if (Sorcerers.empty())
- TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2 ERROR: Shade of Akama - attempt to remove guid " UI64FMTD " from Sorcerers list but list is already empty", guid);
- else Sorcerers.remove(guid);
- }
+ doSpawning = false;
+ leftSide = false;
+
+ if (me->GetPositionY() < 400.0f)
+ leftSide = true;
}
- void SummonCreature()
+ void JustSummoned(Creature* summon) OVERRIDE
{
- uint32 random = rand()%2;
- float X = SpawnLocations[random].x;
- float Y = SpawnLocations[random].y;
- // max of 6 sorcerers can be summoned
- if ((rand()%3 == 0) && (DeathCount > 0) && (SorcererCount < 7))
+ Summons.Summon(summon);
+ }
+
+ void SetData(uint32 data, uint32 value) OVERRIDE
+ {
+ if (data == SETDATA_DATA)
{
- Creature* Sorcerer = me->SummonCreature(CREATURE_SORCERER, X, Y, Z_SPAWN, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
- if (Sorcerer)
+ doSpawning = true;
+
+ switch (value)
{
- CAST_AI(npc_ashtongue_sorcerer::npc_ashtongue_sorcererAI, Sorcerer->AI())->ShadeGUID = me->GetGUID();
- Sorcerer->SetWalk(false);
- Sorcerer->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
- Sorcerer->SetTarget(me->GetGUID());
- Sorcerers.push_back(Sorcerer->GetGUID());
- --DeathCount;
- ++SorcererCount;
+ case SETDATA_START_SPAWNING:
+ if (leftSide)
+ {
+ events.ScheduleEvent(EVENT_SPAWN_WAVE_B, 100);
+ events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_SORCERER, urand(2000, 5000));
+ }
+ else
+ {
+ events.ScheduleEvent(EVENT_SPAWN_WAVE_B, 10000);
+ events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_DEFENDER, urand(2000, 5000));
+ }
+ break;
+ case SETDATA_STOP_SPAWNING:
+ doSpawning = false;
+ break;
+ case SETDATA_DESPAWN_ALL_SPAWNS:
+ doSpawning = false;
+ Summons.DespawnAll();
+ break;
+ default:
+ break;
}
}
- else
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (doSpawning)
{
- for (uint8 i = 0; i < 3; ++i)
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- Creature* Spawn = me->SummonCreature(spawnEntries[i], X, Y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
- if (Spawn)
+ switch (eventId)
{
- Spawn->SetWalk(false);
- Spawn->GetMotionMaster()->MovePoint(0, AGGRO_X, AGGRO_Y, AGGRO_Z);
- Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
- Spawn->AI()->AttackStart(target);
+ case EVENT_SPAWN_WAVE_B:
+ DoCast(me, SPELL_ASHTONGUE_WAVE_B);
+ events.ScheduleEvent(EVENT_SPAWN_WAVE_B, urand(45000, 50000));
+ break;
+ case EVENT_SUMMON_ASHTONGUE_SORCERER: // left
+ DoCast(me, SPELL_SUMMON_ASHTONGUE_SORCERER);
+ events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_SORCERER, urand(30000, 35000));
+ break;
+ case EVENT_SUMMON_ASHTONGUE_DEFENDER: // right
+ DoCast(me, SPELL_SUMMON_ASHTONGUE_DEFENDER);
+ events.ScheduleEvent(EVENT_SUMMON_ASHTONGUE_DEFENDER, urand(30000, 35000));
+ break;
+ default:
+ break;
}
}
}
}
- void FindChannelers()
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ SummonList Summons;
+ bool leftSide;
+ bool doSpawning;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_creature_generator_akamaAI(creature);
+ }
+};
+
+// ########################################################
+// Ashtongue Sorcerer
+// ########################################################
+
+class npc_ashtongue_sorcerer : public CreatureScript
+{
+public:
+ npc_ashtongue_sorcerer() : CreatureScript("npc_ashtongue_sorcerer") { }
+
+ struct npc_ashtongue_sorcererAI : public ScriptedAI
+ {
+ npc_ashtongue_sorcererAI(Creature* creature) : ScriptedAI(creature)
{
- std::list<Creature*> ChannelerList;
- me->GetCreatureListWithEntryInGrid(ChannelerList, CREATURE_CHANNELER, 50.0f);
+ instance = creature->GetInstanceScript();
- if (!ChannelerList.empty())
+ if (instance)
{
- for (std::list<Creature*>::const_iterator itr = ChannelerList.begin(); itr != ChannelerList.end(); ++itr)
- {
- CAST_AI(npc_ashtongue_channeler::npc_ashtongue_channelerAI, (*itr)->AI())->ShadeGUID = me->GetGUID();
- Channelers.push_back((*itr)->GetGUID());
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Shade of Akama Grid Search found channeler " UI64FMTD ". Adding to list", (*itr)->GetGUID());
- }
+ akamaGUID = instance->GetData64(DATA_AKAMA_SHADE);
+ shadeGUID = instance->GetData64(DATA_SHADEOFAKAMA);
}
- else TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2 ERROR: Grid Search was unable to find any channelers. Shade of Akama encounter will be buggy");
}
- void SetSelectableChannelers()
+ void Reset() OVERRIDE
{
- if (Channelers.empty())
+ if (!startedBanishing)
{
- TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2 ERROR: Channeler List is empty, Shade of Akama encounter will be buggy");
- return;
+ if (Creature* Shade = (Unit::GetCreature((*me), shadeGUID)))
+ {
+ if (Shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
+ me->GetMotionMaster()->MovePoint(0, Shade->GetPositionX(), Shade->GetPositionY(), Shade->GetPositionZ(), false);
+ else
+ {
+ if (Unit* target = me->GetCreature(*me, akamaGUID))
+ AttackStart(target);
+ }
+ }
}
- for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
- if (Creature* Channeler = (Unit::GetCreature(*me, *itr)))
- Channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
+ summonerGuid = 0;
+ startedBanishing = false;
+ switchToCombat = false;
}
- void SetAkamaGUID(uint64 guid) { AkamaGUID = guid; }
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (Creature* Shade = (Unit::GetCreature((*me), shadeGUID)))
+ Shade->AI()->SetData(SETDATA_DATA, SETDATA_CHANNELER_DIED);
+ me->DespawnOrUnsummon(5000);
+ }
- void UpdateAI(uint32 diff)
+ void IsSummonedBy(Unit* /*summoner*/) OVERRIDE
{
- if (!me->IsInCombat())
- return;
+ if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
+ }
- if (IsBanished)
- {
- // Akama is set in the threatlist so when we reset, we make sure that he is not included in our check
- if (me->getThreatManager().getThreatList().size() < 2)
- {
- EnterEvadeMode();
- return;
- }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- if (DefenderTimer <= diff)
- {
- uint32 ran = rand()%2;
- Creature* Defender = me->SummonCreature(CREATURE_DEFENDER, SpawnLocations[ran].x, SpawnLocations[ran].y, Z_SPAWN, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000);
- if (Defender)
- {
- Defender->SetWalk(false);
- bool move = true;
- if (AkamaGUID)
- {
- if (Creature* Akama = Unit::GetCreature(*me, AkamaGUID))
- {
- float x, y, z;
- Akama->GetPosition(x, y, z);
- // They move towards AKama
- Defender->GetMotionMaster()->MovePoint(0, x, y, z);
- Defender->AI()->AttackStart(Akama);
- } else move = false;
- } else move = false;
- if (!move)
- Defender->GetMotionMaster()->MovePoint(0, AKAMA_X, AKAMA_Y, AKAMA_Z);
- }
- DefenderTimer = 15000;
- } else DefenderTimer -= diff;
+ void AttackStart(Unit* who) OVERRIDE
+ {
+ if (!switchToCombat)
+ return;
+ ScriptedAI::AttackStart(who);
+ }
- if (SummonTimer <= diff)
- {
- SummonCreature();
- SummonTimer = 35000;
- } else SummonTimer -= diff;
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ events.Update(diff);
- if (DeathCount >= 6)
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
{
- if (AkamaGUID)
- {
- Creature* Akama = Unit::GetCreature((*me), AkamaGUID);
- if (Akama && Akama->IsAlive())
+ case EVENT_SORCERER_CHANNEL:
+ if (Creature* Shade = (Unit::GetCreature((*me), shadeGUID)))
{
- IsBanished = false;
- me->GetMotionMaster()->Clear(false);
- me->GetMotionMaster()->MoveChase(Akama);
- Akama->GetMotionMaster()->Clear();
- // Shade should move to Akama, not the other way around
- Akama->GetMotionMaster()->MoveIdle();
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- // Crazy amount of threat
- me->AddThreat(Akama, 10000000.0f);
- Akama->AddThreat(me, 10000000.0f);
- me->Attack(Akama, true);
- Akama->Attack(me, true);
+ if (Shade->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
+ {
+ me->SetFacingToObject(Shade);
+ DoCast(me, SPELL_SHADE_SOUL_CHANNEL);
+ events.ScheduleEvent(EVENT_SORCERER_CHANNEL, 2000);
+ }
+ else
+ {
+ me->InterruptSpell(CURRENT_CHANNELED_SPELL);
+ Shade->AI()->SetData(SETDATA_DATA, SETDATA_CHANNELER_DIED);
+ switchToCombat = true;
+ if (Unit* target = me->GetCreature(*me, akamaGUID))
+ AttackStart(target);
+ }
}
- }
+ break;
+ default:
+ break;
}
}
- else // No longer banished, let's fight Akama now
- {
- if (ReduceHealthTimer <= diff)
- {
- if (AkamaGUID)
- {
- Creature* Akama = Unit::GetCreature((*me), AkamaGUID);
- if (Akama && Akama->IsAlive())
- {
- //10 % less health every few seconds.
- me->DealDamage(Akama, Akama->GetMaxHealth()/10, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- ReduceHealthTimer = 12000;
- }
- }
- } else ReduceHealthTimer -= diff;
- if (HasKilledAkama)
+ if (!startedBanishing)
+ {
+ Creature* Shade = Unit::GetCreature((*me), shadeGUID);
+ if (me->IsWithinDist(Shade, 20.0f, false))
{
- if (!HasKilledAkamaAndReseting)//do not let players kill Shade if Akama is dead and Shade is waiting for ResetTimer!! event would bug
- {
- HasKilledAkamaAndReseting = true;
- me->RemoveAllAuras();
- me->DeleteThreatList();
- me->CombatStop();
- //me->SetFullHealth();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->GetMotionMaster()->MoveTargetedHome();
- }
- if (ResetTimer <= diff)
- {
- EnterEvadeMode();// Reset a little while after killing Akama, evade and respawn Akama
- return;
- } else ResetTimer -= diff;
+ me->StopMoving();
+ me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->MovePoint(1, me->GetPositionX() + frand (-8.0f, 8.0f), me->GetPositionY() + frand (-8.0f, 8.0f), me->GetPositionZ(), false);
+ events.ScheduleEvent(EVENT_SORCERER_CHANNEL, 1500);
+ startedBanishing = true;
}
-
- DoMeleeAttackIfReady();
}
+
+ DoMeleeAttackIfReady();
}
+
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ uint64 akamaGUID;
+ uint64 shadeGUID;
+ uint64 summonerGuid;
+ float distanceToShade;
+ bool startedBanishing;
+ bool switchToCombat;
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_ashtongue_sorcererAI(creature);
+ }
};
-void npc_ashtongue_channeler::npc_ashtongue_channelerAI::JustDied(Unit* /*killer*/)
-{
- Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
- if (Shade && Shade->IsAlive())
- CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount();
- else TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2 ERROR: Channeler dead but unable to increment DeathCount for Shade of Akama.");
-}
-
-void npc_ashtongue_sorcerer::npc_ashtongue_sorcererAI::JustDied(Unit* /*killer*/)
-{
- Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
- if (Shade && Shade->IsAlive())
- CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->IncrementDeathCount(me->GetGUID());
- else TC_LOG_ERROR(LOG_FILTER_TSCR, "SD2 ERROR: Sorcerer dead but unable to increment DeathCount for Shade of Akama.");
-}
+// ########################################################
+// Ashtongue Defender
+// ########################################################
-class npc_akama_shade : public CreatureScript
+class npc_ashtongue_defender : public CreatureScript
{
public:
- npc_akama_shade() : CreatureScript("npc_akama_shade") { }
+ npc_ashtongue_defender() : CreatureScript("npc_ashtongue_defender") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ struct npc_ashtongue_defenderAI : public ScriptedAI
{
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
+ npc_ashtongue_defenderAI(Creature* creature) : ScriptedAI(creature)
{
- player->CLOSE_GOSSIP_MENU();
- CAST_AI(npc_akama_shade::npc_akamaAI, creature->AI())->BeginEvent(player);
+ instance = creature->GetInstanceScript();
+ if (instance)
+ akamaGUID = instance->GetData64(DATA_AKAMA_SHADE);
}
- return true;
- }
+ void Reset() OVERRIDE
+ {
+ summonerGuid = 0;
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (player->IsAlive())
+ if (Unit* target = me->GetCreature(*me, akamaGUID))
+ AttackStart(target);
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(907, creature->GetGUID());
+ me->DespawnOrUnsummon(5000);
}
- return true;
- }
+ void IsSummonedBy(Unit* /*summoner*/) OVERRIDE
+ {
+ if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
+ }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_akamaAI (creature);
- }
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_HEROIC_STRIKE, 5000);
+ events.ScheduleEvent(EVENT_SHIELD_BASH, urand(10000, 16000));
+ events.ScheduleEvent(EVENT_DEBILITATING_STRIKE, urand(10000, 16000));
+ events.ScheduleEvent(EVENT_WINDFURY, urand(8000, 12000));
+ }
- struct npc_akamaAI : public ScriptedAI
- {
- npc_akamaAI(Creature* creature) : ScriptedAI(creature), summons(me)
+ void UpdateAI(uint32 diff) OVERRIDE
{
- ShadeHasDied = false;
- StartCombat = false;
- instance = creature->GetInstanceScript();
- if (instance)
- ShadeGUID = instance->GetData64(DATA_SHADEOFAKAMA);
- else
- ShadeGUID = NOT_STARTED;
- me->setActive(true);
- EventBegun = false;
- CastSoulRetrieveTimer = 0;
- SoulRetrieveTimer = 0;
- SummonBrokenTimer = 0;
- EndingTalkCount = 0;
- WayPointId = 0;
- BrokenSummonIndex = 0;
- BrokenList.clear();
- HasYelledOnce = false;
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_DEBILITATING_STRIKE:
+ DoCastVictim(SPELL_DEBILITATING_STRIKE);
+ events.ScheduleEvent(EVENT_DEBILITATING_STRIKE, urand(8000, 16000));
+ break;
+ case EVENT_HEROIC_STRIKE:
+ DoCast(me, SPELL_HEROIC_STRIKE);
+ events.ScheduleEvent(EVENT_HEROIC_STRIKE, urand(50000, 60000));
+ break;
+ case EVENT_SHIELD_BASH:
+ DoCastVictim(SPELL_SHIELD_BASH);
+ events.ScheduleEvent(EVENT_SHIELD_BASH, urand(8000, 16000));
+ break;
+ case EVENT_WINDFURY:
+ DoCastVictim(SPELL_WINDFURY);
+ events.ScheduleEvent(EVENT_WINDFURY, urand(6000 , 8000));
+ break;
+ default:
+ break;
+ }
+ }
+ DoMeleeAttackIfReady();
}
- InstanceScript* instance;
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ uint64 akamaGUID;
+ uint64 summonerGuid;
+ };
- uint64 ShadeGUID;
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_ashtongue_defenderAI(creature);
+ }
+};
- uint32 DestructivePoisonTimer;
- uint32 LightningBoltTimer;
- uint32 CheckTimer;
- uint32 CastSoulRetrieveTimer;
- uint32 SoulRetrieveTimer;
- uint32 SummonBrokenTimer;
- uint32 EndingTalkCount;
- uint32 WayPointId;
- uint32 BrokenSummonIndex;
+// ########################################################
+// Ashtongue Rogue
+// ########################################################
- std::list<uint64> BrokenList;
+class npc_ashtongue_rogue : public CreatureScript
+{
+public:
+ npc_ashtongue_rogue() : CreatureScript("npc_ashtongue_rogue") { }
- bool EventBegun;
- bool ShadeHasDied;
- bool StartCombat;
- bool HasYelledOnce;
- SummonList summons;
+ struct npc_ashtongue_rogueAI : public ScriptedAI
+ {
+ npc_ashtongue_rogueAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ if (instance)
+ akamaGUID = instance->GetData64(DATA_AKAMA_SHADE);
+ }
- void Reset()
+ void Reset() OVERRIDE
{
- DestructivePoisonTimer = 15000;
- LightningBoltTimer = 10000;
- CheckTimer = 2000;
+ summonerGuid = 0;
- if (!EventBegun)
- {
- me->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has very very strange values
- me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- }
- summons.DespawnAll();
+ if (Unit* target = me->GetCreature(*me, akamaGUID))
+ AttackStart(target);
}
- void JustSummoned(Creature* summon)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (summon->GetEntry() == CREATURE_BROKEN)
- summons.Summon(summon);
+ me->DespawnOrUnsummon(5000);
}
- void SummonedCreatureDespawn(Creature* summon)
+
+ void IsSummonedBy(Unit* /*summoner*/) OVERRIDE
{
- if (summon->GetEntry() == CREATURE_BROKEN)
- summons.Despawn(summon);
+ if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_DEBILITATING_POISON, urand(500, 2000));
+ events.ScheduleEvent(EVENT_EVISCERATE, urand(2000, 5000));
+ }
- void BeginEvent(Player* player)
+ void UpdateAI(uint32 diff) OVERRIDE
{
- if (!instance)
+ if (!UpdateVictim())
return;
- ShadeGUID = instance->GetData64(DATA_SHADEOFAKAMA);
- if (!ShadeGUID)
- return;
+ events.Update(diff);
- Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
- if (Shade)
+ while (uint32 eventId = events.ExecuteEvent())
{
- instance->SetData(DATA_SHADEOFAKAMAEVENT, IN_PROGRESS);
- // Prevent players from trying to restart event
- me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->SetAkamaGUID(me->GetGUID());
- CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->SetSelectableChannelers();
- Shade->AddThreat(me, 1000000.0f);
- me->CombatStart(Shade);
- Shade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
- Shade->SetTarget(me->GetGUID());
- if (player)
- Shade->AddThreat(player, 1.0f);
- DoZoneInCombat(Shade);
- EventBegun = true;
+ switch (eventId)
+ {
+ case EVENT_DEBILITATING_POISON:
+ DoCastVictim(SPELL_DEBILITATING_POISON);
+ events.ScheduleEvent(EVENT_DEBILITATING_POISON, urand(14000, 18000));
+ break;
+ case EVENT_EVISCERATE:
+ DoCastVictim(SPELL_EVISCERATE);
+ events.ScheduleEvent(EVENT_EVISCERATE, urand(12000, 16000));
+ break;
+ default:
+ break;
+ }
}
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ uint64 akamaGUID;
+ uint64 summonerGuid;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_ashtongue_rogueAI(creature);
+ }
+};
+
+// ########################################################
+// Ashtongue Elementalist
+// ########################################################
+
+class npc_ashtongue_elementalist : public CreatureScript
+{
+public:
+ npc_ashtongue_elementalist() : CreatureScript("npc_ashtongue_elementalist") { }
+
+ struct npc_ashtongue_elementalistAI : public ScriptedAI
+ {
+ npc_ashtongue_elementalistAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ if (instance)
+ akamaGUID = instance->GetData64(DATA_AKAMA_SHADE);
}
- void MovementInform(uint32 type, uint32 id)
+ void Reset() OVERRIDE
{
- if (type != POINT_MOTION_TYPE)
- return;
+ summonerGuid = 0;
- switch (id)
- {
- case 0:
- ++WayPointId;
- break;
+ if (Unit* target = me->GetCreature(*me, akamaGUID))
+ AttackStart(target);
+ }
- case 1:
- if (Creature* Shade = Unit::GetCreature(*me, ShadeGUID))
- {
- me->SetTarget(ShadeGUID);
- DoCast(Shade, SPELL_AKAMA_SOUL_RETRIEVE);
- EndingTalkCount = 0;
- SoulRetrieveTimer = 16000;
- }
- break;
- }
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ me->DespawnOrUnsummon(5000);
}
- void JustDied(Unit* /*killer*/)
+ void IsSummonedBy(Unit* /*summoner*/) OVERRIDE
{
- Talk(SAY_DEATH);
- EventBegun = false;
- ShadeHasDied = false;
- StartCombat = false;
- CastSoulRetrieveTimer = 0;
- SoulRetrieveTimer = 0;
- SummonBrokenTimer = 0;
- EndingTalkCount = 0;
- WayPointId = 0;
- BrokenSummonIndex = 0;
- BrokenList.clear();
- HasYelledOnce = false;
- Creature* Shade = Unit::GetCreature((*me), ShadeGUID);
- if (Shade && Shade->IsAlive())
- CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->HasKilledAkama = true;
- summons.DespawnAll();
+ if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
}
- void UpdateAI(uint32 diff)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
- if (!EventBegun)
+ events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 18000);
+ events.ScheduleEvent(EVENT_LIGHTNING_BOLT, 6000);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
return;
- if (HealthBelowPct(15) && !HasYelledOnce)
- {
- Talk(SAY_LOW_HEALTH);
- HasYelledOnce = true;
- }
+ events.Update(diff);
- if (ShadeGUID && !StartCombat)
+ while (uint32 eventId = events.ExecuteEvent())
{
- Creature* Shade = (Unit::GetCreature((*me), ShadeGUID));
- if (Shade && Shade->IsAlive())
+ switch (eventId)
{
- if (CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->IsBanished)
- {
- if (CastSoulRetrieveTimer <= diff)
- {
- DoCast(Shade, SPELL_AKAMA_SOUL_CHANNEL);
- CastSoulRetrieveTimer = 500;
- } else CastSoulRetrieveTimer -= diff;
- }
- else
- {
- me->InterruptNonMeleeSpells(false);
- StartCombat = true;
- }
+ case EVENT_RAIN_OF_FIRE:
+ DoCastVictim(SPELL_RAIN_OF_FIRE);
+ events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 20000);
+ break;
+ case EVENT_LIGHTNING_BOLT:
+ DoCastVictim(SPELL_LIGHTNING_BOLT);
+ events.ScheduleEvent(EVENT_LIGHTNING_BOLT, 15000);
+ break;
+ default:
+ break;
}
}
+ DoMeleeAttackIfReady();
+ }
- if (ShadeHasDied && (WayPointId == 1))
- {
- if (instance)
- instance->SetData(DATA_SHADEOFAKAMAEVENT, DONE);
- me->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[1].x, AkamaWP[1].y, AkamaWP[1].z);
- ++WayPointId;
- }
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ uint64 akamaGUID;
+ uint64 summonerGuid;
+ };
- if (!ShadeHasDied && StartCombat)
- {
- if (CheckTimer <= diff)
- {
- if (ShadeGUID)
- {
- Creature* Shade = Unit::GetCreature((*me), ShadeGUID);
- if (Shade && !Shade->IsAlive())
- {
- ShadeHasDied = true;
- WayPointId = 0;
- me->SetWalk(true);
- me->GetMotionMaster()->MovePoint(WayPointId, AkamaWP[0].x, AkamaWP[0].y, AkamaWP[0].z);
- }
- if (Shade && Shade->IsAlive())
- {
- if (Shade->getThreatManager().getThreatList().size() < 2)
- Shade->AI()->EnterEvadeMode();
- }
- }
- CheckTimer = 5000;
- } else CheckTimer -= diff;
- }
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_ashtongue_elementalistAI(creature);
+ }
+};
- if (SummonBrokenTimer && BrokenSummonIndex < 4)
- {
- if (SummonBrokenTimer <= diff)
- {
- for (uint8 i = 0; i < 4; ++i)
- {
- float x = BrokenCoords[BrokenSummonIndex].x + (i*5);
- float y = BrokenCoords[BrokenSummonIndex].y + (1*5);
- float z = BrokenCoords[BrokenSummonIndex].z;
- float o = BrokenCoords[BrokenSummonIndex].o;
- Creature* Broken = me->SummonCreature(CREATURE_BROKEN, x, y, z, o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000);
- if (Broken)
- {
- float wx = BrokenWP[BrokenSummonIndex].x + (i*5);
- float wy = BrokenWP[BrokenSummonIndex].y + (i*5);
- float wz = BrokenWP[BrokenSummonIndex].z;
- Broken->GetMotionMaster()->MovePoint(0, wx, wy, wz);
- Broken->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- BrokenList.push_back(Broken->GetGUID());
- }
- }
- ++BrokenSummonIndex;
- SummonBrokenTimer = 1000;
- } else SummonBrokenTimer -= diff;
- }
+// ########################################################
+// Ashtongue Spiritbinder
+// ########################################################
+
+class npc_ashtongue_spiritbinder : public CreatureScript
+{
+public:
+ npc_ashtongue_spiritbinder() : CreatureScript("npc_ashtongue_spiritbinder") { }
+
+ struct npc_ashtongue_spiritbinderAI : public ScriptedAI
+ {
+ npc_ashtongue_spiritbinderAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ if (instance)
+ akamaGUID = instance->GetData64(DATA_AKAMA_SHADE);
+ }
+
+ void Reset() OVERRIDE
+ {
+ spiritMend = false;
+ chainHeal = false;
+ summonerGuid = 0;
+
+ if (Unit* target = me->GetCreature(*me, akamaGUID))
+ AttackStart(target);
+ }
- if (SoulRetrieveTimer)
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ me->DespawnOrUnsummon(5000);
+ }
+
+ void IsSummonedBy(Unit* /*summoner*/) OVERRIDE
+ {
+ if (Creature* summoner = (Unit::GetCreature((*me), summonerGuid)))
+ CAST_AI(npc_creature_generator_akama::npc_creature_generator_akamaAI, summoner->AI())->JustSummoned(me);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_SPIRIT_HEAL, urand (5000, 6000));
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
{
- if (SoulRetrieveTimer <= diff)
+ switch (eventId)
{
- switch (EndingTalkCount)
- {
- case 0:
- me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
- ++EndingTalkCount;
- SoulRetrieveTimer = 2000;
- SummonBrokenTimer = 1;
+ case EVENT_SPIRIT_HEAL:
+ DoCast(me, SPELL_SPIRIT_HEAL);
+ events.ScheduleEvent(EVENT_SPIRIT_HEAL, urand (13000, 16000));
break;
- case 1:
- Talk(SAY_FREE);
- ++EndingTalkCount;
- SoulRetrieveTimer = 25000;
- break;
- case 2:
- if (!BrokenList.empty())
- {
- bool Yelled = false;
- for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
- if (Creature* unit = Unit::GetCreature(*me, *itr))
- {
- if (!Yelled)
- {
- unit->AI()->Talk(SAY_BROKEN_FREE_01);
- Yelled = true;
- }
- unit->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
- }
- }
- ++EndingTalkCount;
- SoulRetrieveTimer = 1500;
- break;
- case 3:
- if (!BrokenList.empty())
- {
- for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
- if (Creature* unit = Unit::GetCreature(*me, *itr))
- // This is the incorrect spell, but can't seem to find the right one.
- unit->CastSpell(unit, 39656, true);
- }
- ++EndingTalkCount;
- SoulRetrieveTimer = 5000;
- break;
- case 4:
- if (!BrokenList.empty())
- {
- for (std::list<uint64>::const_iterator itr = BrokenList.begin(); itr != BrokenList.end(); ++itr)
- if (Creature* unit = Unit::GetCreature((*me), *itr))
- unit->AI()->Talk(SAY_BROKEN_FREE_02);
- }
- SoulRetrieveTimer = 0;
+ default:
break;
- }
- } else SoulRetrieveTimer -= diff;
+ }
}
if (!UpdateVictim())
return;
- if (DestructivePoisonTimer <= diff)
+ if (!spiritMend)
{
- Creature* Shade = Unit::GetCreature((*me), ShadeGUID);
- if (Shade && Shade->IsAlive())
- DoCast(Shade, SPELL_DESTRUCTIVE_POISON);
- DestructivePoisonTimer = 15000;
- } else DestructivePoisonTimer -= diff;
+ if (HealthBelowPct(25))
+ {
+ DoCast(me, SPELL_SPIRIT_MEND);
+ spiritMend = true;
+ }
+ }
- if (LightningBoltTimer <= diff)
+ if (!chainHeal)
{
- DoCastVictim(SPELL_LIGHTNING_BOLT);
- LightningBoltTimer = 10000;
- } else LightningBoltTimer -= diff;
+ if (HealthBelowPct(40))
+ {
+ DoCast(me, SPELL_CHAIN_HEAL);
+ chainHeal = true;
+ }
+ }
DoMeleeAttackIfReady();
}
+
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ uint64 akamaGUID;
+ uint64 summonerGuid;
+ bool spiritMend;
+ bool chainHeal;
};
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_ashtongue_spiritbinderAI(creature);
+ }
};
void AddSC_boss_shade_of_akama()
{
new boss_shade_of_akama();
+ new npc_akama_shade();
new npc_ashtongue_channeler();
+ new npc_creature_generator_akama();
new npc_ashtongue_sorcerer();
- new npc_akama_shade();
+ new npc_ashtongue_defender();
+ new npc_ashtongue_rogue();
+ new npc_ashtongue_elementalist();
+ new npc_ashtongue_spiritbinder();
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
index e1da7882b70..fbc3e387e8e 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
@@ -63,16 +63,16 @@ class molten_flame : public CreatureScript
public:
molten_flame() : CreatureScript("molten_flame") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new molten_flameAI (creature);
+ return new molten_flameAI(creature);
}
struct molten_flameAI : public NullCreatureAI
{
molten_flameAI(Creature* creature) : NullCreatureAI(creature) {}
- void InitializeAI()
+ void InitializeAI() OVERRIDE
{
float x, y, z;
me->GetNearPoint(me, x, y, z, 1, 100, float(M_PI*2*rand_norm()));
@@ -88,9 +88,9 @@ class boss_supremus : public CreatureScript
public:
boss_supremus() : CreatureScript("boss_supremus") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_supremusAI (creature);
+ return new boss_supremusAI(creature);
}
struct boss_supremusAI : public ScriptedAI
@@ -105,7 +105,7 @@ public:
SummonList summons;
uint32 phase;
- void Reset()
+ void Reset() OVERRIDE
{
if (instance)
{
@@ -123,7 +123,7 @@ public:
summons.DespawnAll();
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_SUPREMUSEVENT, IN_PROGRESS);
@@ -160,7 +160,7 @@ public:
events.ScheduleEvent(EVENT_SWITCH_PHASE, 60000, GCD_CAST);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -170,12 +170,12 @@ public:
summons.DespawnAll();
}
- void JustSummoned(Creature* summon)
+ void JustSummoned(Creature* summon) OVERRIDE
{
summons.Summon(summon);
}
- void SummonedCreatureDespawn(Creature* summon)
+ void SummonedCreatureDespawn(Creature* summon) OVERRIDE
{
summons.Despawn(summon);
}
@@ -203,7 +203,7 @@ public:
return target;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -267,9 +267,9 @@ class npc_volcano : public CreatureScript
public:
npc_volcano() : CreatureScript("npc_volcano") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_volcanoAI (creature);
+ return new npc_volcanoAI(creature);
}
struct npc_volcanoAI : public ScriptedAI
@@ -279,7 +279,7 @@ public:
SetCombatMovement(false);
}
- void Reset()
+ void Reset() OVERRIDE
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -289,16 +289,17 @@ public:
}
uint32 wait;
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
- void DoAction(int32 /*info*/)
+
+ void DoAction(int32 /*info*/) OVERRIDE
{
me->RemoveAura(SPELL_VOLCANIC_ERUPTION);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (wait <= diff)//wait 3secs before casting
{
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 14a31e85e24..a861980ae42 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -56,7 +56,7 @@ class npc_doom_blossom : public CreatureScript
public:
npc_doom_blossom() : CreatureScript("npc_doom_blossom") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_doom_blossomAI(creature);
}
@@ -69,16 +69,17 @@ public:
uint32 ShadowBoltTimer;
uint64 TeronGUID;
- void Reset()
+ void Reset() OVERRIDE
{
CheckTeronTimer = 5000;
ShadowBoltTimer = 12000;
TeronGUID = 0;
}
- void EnterCombat(Unit* /*who*/) { }
- void AttackStart(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
void Despawn()
{
@@ -86,7 +87,7 @@ public:
me->RemoveCorpse();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (CheckTeronTimer <= diff)
{
@@ -124,7 +125,7 @@ class npc_shadowy_construct : public CreatureScript
public:
npc_shadowy_construct() : CreatureScript("npc_shadowy_construct") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_shadowy_constructAI(creature);
}
@@ -139,7 +140,7 @@ public:
uint32 CheckPlayerTimer;
uint32 CheckTeronTimer;
- void Reset()
+ void Reset() OVERRIDE
{
GhostGUID = 0;
TeronGUID = 0;
@@ -148,9 +149,10 @@ public:
CheckTeronTimer = 5000;
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (!who || (!who->IsAlive()) || (who->GetGUID() == GhostGUID))
return;
@@ -159,7 +161,7 @@ public:
}
/* Comment it out for now. NOTE TO FUTURE DEV: UNCOMMENT THIS OUT ONLY AFTER MIND CONTROL IS IMPLEMENTED
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by->GetGUID() != GhostGUID)
damage = 0; // Only the ghost can deal damage.
@@ -188,7 +190,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (CheckPlayerTimer <= diff)
{
@@ -213,9 +215,9 @@ class boss_teron_gorefiend : public CreatureScript
public:
boss_teron_gorefiend() : CreatureScript("boss_teron_gorefiend") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_teron_gorefiendAI (creature);
+ return new boss_teron_gorefiendAI(creature);
}
struct boss_teron_gorefiendAI : public ScriptedAI
@@ -242,7 +244,7 @@ public:
bool Intro;
bool Done;
- void Reset()
+ void Reset() OVERRIDE
{
if (instance)
instance->SetData(DATA_TERONGOREFIENDEVENT, NOT_STARTED);
@@ -264,9 +266,10 @@ public:
Done = false;
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (!Intro && who->GetTypeId() == TYPEID_PLAYER && me->CanCreatureAttack(who))
{
@@ -287,12 +290,12 @@ public:
ScriptedAI::MoveInLineOfSight(who);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_TERONGOREFIENDEVENT, DONE);
@@ -378,7 +381,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (Intro && !Done)
{
diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
index dbd7aa50899..532c66bb14a 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
@@ -29,32 +29,44 @@ EndScriptData */
#include "Player.h"
#include "SpellInfo.h"
-enum eEnums
+enum Yells
{
SAY_AGGRO = 0,
SAY_NEEDLE = 1,
SAY_SLAY = 2,
SAY_SPECIAL = 3,
SAY_ENRAGE = 4,
- SAY_DEATH = 5,
+ SAY_DEATH = 5
+};
- //Spells
+enum Spells
+{
SPELL_NEEDLE_SPINE = 39992,
SPELL_TIDAL_BURST = 39878,
SPELL_TIDAL_SHIELD = 39872,
SPELL_IMPALING_SPINE = 39837,
SPELL_CREATE_NAJENTUS_SPINE = 39956,
SPELL_HURL_SPINE = 39948,
- SPELL_BERSERK = 26662,
+ SPELL_BERSERK = 26662
- GOBJECT_SPINE = 185584,
+};
+enum GameObjects
+{
+ GOBJECT_SPINE = 185584
+};
+
+enum Events
+{
EVENT_BERSERK = 1,
EVENT_YELL = 2,
EVENT_NEEDLE = 3,
EVENT_SPINE = 4,
- EVENT_SHIELD = 5,
+ EVENT_SHIELD = 5
+};
+enum Misc
+{
GCD_CAST = 1,
GCD_YELL = 2
};
@@ -64,9 +76,9 @@ class boss_najentus : public CreatureScript
public:
boss_najentus() : CreatureScript("boss_najentus") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_najentusAI (creature);
+ return new boss_najentusAI(creature);
}
struct boss_najentusAI : public ScriptedAI
@@ -81,7 +93,7 @@ public:
uint64 SpineTargetGUID;
- void Reset()
+ void Reset() OVERRIDE
{
events.Reset();
@@ -91,13 +103,13 @@ public:
instance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, NOT_STARTED);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
events.DelayEvents(5000, GCD_YELL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, DONE);
@@ -105,7 +117,7 @@ public:
Talk(SAY_DEATH);
}
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
+ void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_HURL_SPINE && me->HasAura(SPELL_TIDAL_SHIELD))
{
@@ -115,7 +127,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_HIGHWARLORDNAJENTUSEVENT, IN_PROGRESS);
@@ -146,7 +158,7 @@ public:
events.RescheduleEvent(EVENT_SHIELD, 60000 + inc);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -213,7 +225,7 @@ class go_najentus_spine : public GameObjectScript
public:
go_najentus_spine() : GameObjectScript("go_najentus_spine") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (InstanceScript* instance = go->GetInstanceScript())
if (Creature* Najentus = Unit::GetCreature(*go, instance->GetData64(DATA_HIGHWARLORDNAJENTUS)))
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index bbf75b2df5c..3d7a143d59e 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -120,7 +120,7 @@ class npc_blood_elf_council_voice_trigger : public CreatureScript
public:
npc_blood_elf_council_voice_trigger() : CreatureScript("npc_blood_elf_council_voice_trigger") { }
- CreatureAI* GetAI(Creature* c) const
+ CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new npc_blood_elf_council_voice_triggerAI(c);
}
@@ -142,7 +142,7 @@ public:
bool EventStarted;
- void Reset()
+ void Reset() OVERRIDE
{
EnrageTimer = 900000; // 15 minutes
AggroYellTimer = 500;
@@ -164,12 +164,13 @@ public:
} else TC_LOG_ERROR(LOG_FILTER_TSCR, ERROR_INST_DATA);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!EventStarted)
return;
@@ -215,9 +216,9 @@ class npc_illidari_council : public CreatureScript
public:
npc_illidari_council() : CreatureScript("npc_illidari_council") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_illidari_councilAI (creature);
+ return new npc_illidari_councilAI(creature);
}
struct npc_illidari_councilAI : public ScriptedAI
@@ -240,7 +241,7 @@ public:
bool EventBegun;
- void Reset()
+ void Reset() OVERRIDE
{
CheckTimer = 2000;
EndEventTimer = 0;
@@ -276,9 +277,10 @@ public:
me->SetDisplayId(11686);
}
- void EnterCombat(Unit* /*who*/) {}
- void AttackStart(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
void StartEvent(Unit* target)
{
@@ -315,7 +317,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!EventBegun)
return;
@@ -397,7 +399,7 @@ struct boss_illidari_councilAI : public ScriptedAI
bool LoadedGUIDs;
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -420,7 +422,7 @@ struct boss_illidari_councilAI : public ScriptedAI
LoadGUIDs();
}
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
for (uint8 i = 0; i < 4; ++i)
{
@@ -434,7 +436,7 @@ struct boss_illidari_councilAI : public ScriptedAI
ScriptedAI::EnterEvadeMode();
}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by == me)
return;
@@ -473,9 +475,9 @@ class boss_gathios_the_shatterer : public CreatureScript
public:
boss_gathios_the_shatterer() : CreatureScript("boss_gathios_the_shatterer") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_gathios_the_shattererAI (creature);
+ return new boss_gathios_the_shattererAI(creature);
}
struct boss_gathios_the_shattererAI : public boss_illidari_councilAI
@@ -488,7 +490,7 @@ public:
uint32 AuraTimer;
uint32 BlessingTimer;
- void Reset()
+ void Reset() OVERRIDE
{
ConsecrationTimer = 40000;
HammerOfJusticeTimer = 10000;
@@ -497,12 +499,12 @@ public:
BlessingTimer = 60000;
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_GATH_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_GATH_DEATH);
}
@@ -536,7 +538,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -605,9 +607,9 @@ class boss_high_nethermancer_zerevor : public CreatureScript
public:
boss_high_nethermancer_zerevor() : CreatureScript("boss_high_nethermancer_zerevor") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_high_nethermancer_zerevorAI (creature);
+ return new boss_high_nethermancer_zerevorAI(creature);
}
struct boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI
@@ -621,7 +623,7 @@ public:
uint32 Cooldown;
uint32 ArcaneExplosionTimer;
- void Reset()
+ void Reset() OVERRIDE
{
BlizzardTimer = urand(30, 91) * 1000;
FlamestrikeTimer = urand(30, 91) * 1000;
@@ -631,17 +633,17 @@ public:
Cooldown = 0;
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_ZERE_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_ZERE_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -709,9 +711,9 @@ class boss_lady_malande : public CreatureScript
public:
boss_lady_malande() : CreatureScript("boss_lady_malande") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_lady_malandeAI (creature);
+ return new boss_lady_malandeAI(creature);
}
struct boss_lady_malandeAI : public boss_illidari_councilAI
@@ -723,7 +725,7 @@ public:
uint32 DivineWrathTimer;
uint32 ReflectiveShieldTimer;
- void Reset()
+ void Reset() OVERRIDE
{
EmpoweredSmiteTimer = 38000;
CircleOfHealingTimer = 20000;
@@ -731,17 +733,17 @@ public:
ReflectiveShieldTimer = 0;
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_MALA_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_MALA_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -787,9 +789,9 @@ class boss_veras_darkshadow : public CreatureScript
public:
boss_veras_darkshadow() : CreatureScript("boss_veras_darkshadow") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_veras_darkshadowAI (creature);
+ return new boss_veras_darkshadowAI(creature);
}
struct boss_veras_darkshadowAI : public boss_illidari_councilAI
@@ -804,7 +806,7 @@ public:
bool HasVanished;
- void Reset()
+ void Reset() OVERRIDE
{
EnvenomTargetGUID = 0;
@@ -817,17 +819,17 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_VERA_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_VERA_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -901,7 +903,7 @@ public:
{
PrepareAuraScript(spell_boss_lady_malande_shield_AuraScript);
- bool Validate(SpellInfo const* /*spellEntry*/)
+ bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
{
return sSpellMgr->GetSpellInfo(SPELL_REFLECTIVE_SHIELD_T);
}
@@ -915,13 +917,13 @@ public:
target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_REFLECTIVE_SHIELD_T, &bp, NULL, NULL, true, NULL, aurEff);
}
- void Register()
+ void Register() OVERRIDE
{
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_boss_lady_malande_shield_AuraScript::Trigger, EFFECT_0);
}
};
- AuraScript* GetAuraScript() const
+ AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_boss_lady_malande_shield_AuraScript();
}
diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
index 97247f1b7a6..2a82810a3c1 100644
--- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
@@ -28,8 +28,6 @@ EndScriptData */
#include "black_temple.h"
#include "Player.h"
-#define MAX_ENCOUNTER 9
-
/* Black Temple encounters:
0 - High Warlord Naj'entus event
1 - Supremus Event
@@ -47,7 +45,7 @@ class instance_black_temple : public InstanceMapScript
public:
instance_black_temple() : InstanceMapScript("instance_black_temple", 564) { }
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_black_temple_InstanceMapScript(map);
}
@@ -56,7 +54,7 @@ public:
{
instance_black_temple_InstanceMapScript(Map* map) : InstanceScript(map) {}
- uint32 m_auiEncounter[MAX_ENCOUNTER];
+ uint32 m_auiEncounter[EncounterCount];
std::string str_data;
uint64 Najentus;
@@ -89,37 +87,37 @@ public:
{
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
- Najentus = 0;
- Akama = 0;
- Akama_Shade = 0;
- ShadeOfAkama = 0;
- Supremus = 0;
- LadyMalande = 0;
- GathiosTheShatterer = 0;
+ Najentus = 0;
+ Akama = 0;
+ Akama_Shade = 0;
+ ShadeOfAkama = 0;
+ Supremus = 0;
+ LadyMalande = 0;
+ GathiosTheShatterer = 0;
HighNethermancerZerevor = 0;
- VerasDarkshadow = 0;
- IllidariCouncil = 0;
- BloodElfCouncilVoice = 0;
- IllidanStormrage = 0;
-
- NajentusGate = 0;
- MainTempleDoors = 0;
- ShadeOfAkamaDoor= 0;
- CommonDoor = 0;//teron
+ VerasDarkshadow = 0;
+ IllidariCouncil = 0;
+ BloodElfCouncilVoice = 0;
+ IllidanStormrage = 0;
+
+ NajentusGate = 0;
+ MainTempleDoors = 0;
+ ShadeOfAkamaDoor = 0;
+ CommonDoor = 0; // teron
TeronDoor = 0;
GuurtogDoor = 0;
MotherDoor = 0;
TempleDoor = 0;
- SimpleDoor = 0;//Bycouncil
+ SimpleDoor = 0; // Bycouncil
CouncilDoor = 0;
- IllidanGate = 0;
- IllidanDoor[0] = 0;
- IllidanDoor[1] = 0;
+ IllidanGate = 0;
+ IllidanDoor[0] = 0;
+ IllidanDoor[1] = 0;
}
bool IsEncounterInProgress() const
{
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < EncounterCount; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
return true;
@@ -149,7 +147,7 @@ public:
{
case 22887: Najentus = creature->GetGUID(); break;
case 23089: Akama = creature->GetGUID(); break;
- case 22990: Akama_Shade = creature->GetGUID(); break;
+ case 23191: Akama_Shade = creature->GetGUID(); break;
case 22841: ShadeOfAkama = creature->GetGUID(); break;
case 22898: Supremus = creature->GetGUID(); break;
case 22917: IllidanStormrage = creature->GetGUID(); break;
@@ -167,13 +165,13 @@ public:
switch (go->GetEntry())
{
case 185483:
- NajentusGate = go->GetGUID();// Gate past Naj'entus (at the entrance to Supermoose's courtyards)
+ NajentusGate = go->GetGUID(); // Gate past Naj'entus (at the entrance to Supermoose's courtyards)
if (m_auiEncounter[0] == DONE)
HandleGameObject(0, true, go);
break;
case 185882:
- MainTempleDoors = go->GetGUID();// Main Temple Doors - right past Supermoose (Supremus)
+ MainTempleDoors = go->GetGUID(); // Main Temple Doors - right past Supermoose (Supremus)
if (m_auiEncounter[1] == DONE)
HandleGameObject(0, true, go);
break;
@@ -238,7 +236,7 @@ public:
}
}
- uint64 GetData64(uint32 identifier) const
+ uint64 GetData64(uint32 identifier) const OVERRIDE
{
switch (identifier)
{
@@ -264,7 +262,7 @@ public:
return 0;
}
- void SetData(uint32 type, uint32 data)
+ void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -348,7 +346,7 @@ public:
}
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -386,7 +384,7 @@ public:
>> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]
>> m_auiEncounter[7] >> m_auiEncounter[8];
- for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
+ for (uint8 i = 0; i < EncounterCount; ++i)
if (m_auiEncounter[i] == IN_PROGRESS)
m_auiEncounter[i] = NOT_STARTED;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
index d25b9a25a85..a27677f60f5 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -102,9 +102,9 @@ class boss_fathomlord_karathress : public CreatureScript
public:
boss_fathomlord_karathress() : CreatureScript("boss_fathomlord_karathress") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_fathomlord_karathressAI (creature);
+ return new boss_fathomlord_karathressAI(creature);
}
struct boss_fathomlord_karathressAI : public ScriptedAI
@@ -127,7 +127,7 @@ public:
uint64 Advisors[MAX_ADVISORS];
- void Reset()
+ void Reset() OVERRIDE
{
CataclysmicBolt_Timer = 10000;
Enrage_Timer = 600000; //10 minutes
@@ -201,12 +201,12 @@ public:
instance->SetData(DATA_KARATHRESSEVENT, IN_PROGRESS);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -217,12 +217,12 @@ public:
me->SummonCreature(SEER_OLUM, OLUM_X, OLUM_Y, OLUM_Z, OLUM_O, TEMPSUMMON_TIMED_DESPAWN, 3600000);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
StartEvent(who);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
@@ -310,9 +310,9 @@ class boss_fathomguard_sharkkis : public CreatureScript
public:
boss_fathomguard_sharkkis() : CreatureScript("boss_fathomguard_sharkkis") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_fathomguard_sharkkisAI (creature);
+ return new boss_fathomguard_sharkkisAI(creature);
}
struct boss_fathomguard_sharkkisAI : public ScriptedAI
@@ -333,7 +333,7 @@ public:
uint64 SummonedPet;
- void Reset()
+ void Reset() OVERRIDE
{
LeechingThrow_Timer = 20000;
TheBeastWithin_Timer = 30000;
@@ -354,7 +354,7 @@ public:
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -363,7 +363,7 @@ public:
}
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -372,7 +372,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
@@ -457,9 +457,9 @@ class boss_fathomguard_tidalvess : public CreatureScript
public:
boss_fathomguard_tidalvess() : CreatureScript("boss_fathomguard_tidalvess") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_fathomguard_tidalvessAI (creature);
+ return new boss_fathomguard_tidalvessAI(creature);
}
struct boss_fathomguard_tidalvessAI : public ScriptedAI
@@ -476,7 +476,7 @@ public:
uint32 PoisonCleansing_Timer;
uint32 Earthbind_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
FrostShock_Timer = 25000;
Spitfire_Timer = 60000;
@@ -487,7 +487,7 @@ public:
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -496,7 +496,7 @@ public:
}
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -506,7 +506,7 @@ public:
DoCast(me, SPELL_WINDFURY_WEAPON);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
@@ -580,9 +580,9 @@ class boss_fathomguard_caribdis : public CreatureScript
public:
boss_fathomguard_caribdis() : CreatureScript("boss_fathomguard_caribdis") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_fathomguard_caribdisAI (creature);
+ return new boss_fathomguard_caribdisAI(creature);
}
struct boss_fathomguard_caribdisAI : public ScriptedAI
@@ -599,7 +599,7 @@ public:
uint32 Heal_Timer;
uint32 Cyclone_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
WaterBoltVolley_Timer = 35000;
TidalSurge_Timer = 15000+rand()%5000;
@@ -610,7 +610,7 @@ public:
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -619,7 +619,7 @@ public:
}
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -628,7 +628,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_KARATHRESSEVENT))
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
index 3b19393fa44..db270c943e5 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
@@ -84,9 +84,9 @@ class boss_hydross_the_unstable : public CreatureScript
public:
boss_hydross_the_unstable() : CreatureScript("boss_hydross_the_unstable") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_hydross_the_unstableAI (creature);
+ return new boss_hydross_the_unstableAI(creature);
}
struct boss_hydross_the_unstableAI : public ScriptedAI
@@ -111,7 +111,7 @@ public:
bool beam;
SummonList Summons;
- void Reset()
+ void Reset() OVERRIDE
{
DeSummonBeams();
beams[0] = 0;
@@ -169,7 +169,7 @@ public:
}
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -177,12 +177,12 @@ public:
instance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(CorruptedForm ? SAY_CORRUPT_SLAY : SAY_CLEAN_SLAY);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned->GetEntry() == ENTRY_PURE_SPAWN)
{
@@ -198,12 +198,12 @@ public:
}
}
- void SummonedCreatureDespawn(Creature* summon)
+ void SummonedCreatureDespawn(Creature* summon) OVERRIDE
{
Summons.Despawn(summon);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(CorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH);
@@ -212,7 +212,7 @@ public:
Summons.DespawnAll();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!beam)
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index 7e168f8bf90..4499cb98475 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -138,14 +138,14 @@ class boss_lady_vashj : public CreatureScript
public:
boss_lady_vashj() : CreatureScript("boss_lady_vashj") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_lady_vashjAI (creature);
+ return new boss_lady_vashjAI(creature);
}
struct boss_lady_vashjAI : public ScriptedAI
{
- boss_lady_vashjAI (Creature* creature) : ScriptedAI(creature)
+ boss_lady_vashjAI(Creature* creature) : ScriptedAI(creature)
{
instance = creature->GetInstanceScript();
Intro = false;
@@ -177,7 +177,7 @@ public:
bool CanAttack;
bool JustCreated;
- void Reset()
+ void Reset() OVERRIDE
{
AggroTimer = 19000;
ShockBlastTimer = 1+rand()%60000;
@@ -223,12 +223,12 @@ public:
if (TaintedElementalTimer > 50000)
TaintedElementalTimer = 50000;
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -246,7 +246,7 @@ public:
instance->SetData(DATA_LADYVASHJEVENT, IN_PROGRESS);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -263,7 +263,8 @@ public:
AttackStart(who);
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!Intro)
{
@@ -310,7 +311,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!CanAttack && Intro)
{
@@ -548,9 +549,9 @@ class npc_enchanted_elemental : public CreatureScript
public:
npc_enchanted_elemental() : CreatureScript("npc_enchanted_elemental") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_enchanted_elementalAI (creature);
+ return new npc_enchanted_elementalAI(creature);
}
struct npc_enchanted_elementalAI : public ScriptedAI
@@ -567,7 +568,7 @@ public:
uint64 VashjGUID;
- void Reset()
+ void Reset() OVERRIDE
{
me->SetSpeed(MOVE_WALK, 0.6f); // walk
me->SetSpeed(MOVE_RUN, 0.6f); // run
@@ -595,11 +596,12 @@ public:
VashjGUID = instance->GetData64(DATA_LADYVASHJ);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!instance)
return;
@@ -642,9 +644,9 @@ class npc_tainted_elemental : public CreatureScript
public:
npc_tainted_elemental() : CreatureScript("npc_tainted_elemental") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_tainted_elementalAI (creature);
+ return new npc_tainted_elementalAI(creature);
}
struct npc_tainted_elementalAI : public ScriptedAI
@@ -659,25 +661,25 @@ public:
uint32 PoisonBoltTimer;
uint32 DespawnTimer;
- void Reset()
+ void Reset() OVERRIDE
{
PoisonBoltTimer = 5000+rand()%5000;
DespawnTimer = 30000;
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
if (Creature* vashj = Unit::GetCreature((*me), instance->GetData64(DATA_LADYVASHJ)))
CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->EventTaintedElementalDeath();
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
me->AddThreat(who, 0.1f);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
// PoisonBoltTimer
if (PoisonBoltTimer <= diff)
@@ -711,9 +713,9 @@ class npc_toxic_sporebat : public CreatureScript
public:
npc_toxic_sporebat() : CreatureScript("npc_toxic_sporebat") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_toxic_sporebatAI (creature);
+ return new npc_toxic_sporebatAI(creature);
}
struct npc_toxic_sporebatAI : public ScriptedAI
@@ -731,7 +733,7 @@ public:
uint32 BoltTimer;
uint32 CheckTimer;
- void Reset()
+ void Reset() OVERRIDE
{
me->SetDisableGravity(true);
me->setFaction(14);
@@ -741,11 +743,12 @@ public:
CheckTimer = 1000;
}
- void MoveInLineOfSight(Unit* /*who*/)
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE
+
{
}
- void MovementInform(uint32 type, uint32 id)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -754,7 +757,7 @@ public:
MovementTimer = 0;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
// Random movement
if (MovementTimer <= diff)
@@ -809,9 +812,9 @@ class npc_shield_generator_channel : public CreatureScript
public:
npc_shield_generator_channel() : CreatureScript("npc_shield_generator_channel") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_shield_generator_channelAI (creature);
+ return new npc_shield_generator_channelAI(creature);
}
struct npc_shield_generator_channelAI : public ScriptedAI
@@ -825,7 +828,7 @@ public:
uint32 CheckTimer;
bool Casted;
- void Reset()
+ void Reset() OVERRIDE
{
CheckTimer = 0;
Casted = false;
@@ -834,9 +837,10 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!instance)
return;
@@ -866,7 +870,7 @@ class item_tainted_core : public ItemScript
public:
item_tainted_core() : ItemScript("item_tainted_core") { }
- bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& targets)
+ bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& targets) OVERRIDE
{
InstanceScript* instance = player->GetInstanceScript();
if (!instance)
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index 733ccf64101..a87ad44ef1c 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -74,9 +74,9 @@ class npc_inner_demon : public CreatureScript
public:
npc_inner_demon() : CreatureScript("npc_inner_demon") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_inner_demonAI (creature);
+ return new npc_inner_demonAI(creature);
}
struct npc_inner_demonAI : public ScriptedAI
@@ -91,33 +91,33 @@ public:
uint32 Link_Timer;
uint64 victimGUID;
- void Reset()
+ void Reset() OVERRIDE
{
ShadowBolt_Timer = 10000;
Link_Timer = 1000;
}
- void SetGUID(uint64 guid, int32 id/* = 0 */)
+ void SetGUID(uint64 guid, int32 id/* = 0 */) OVERRIDE
{
if (id == INNER_DEMON_VICTIM)
victimGUID = guid;
}
- uint64 GetGUID(int32 id/* = 0 */) const
+ uint64 GetGUID(int32 id/* = 0 */) const OVERRIDE
{
if (id == INNER_DEMON_VICTIM)
return victimGUID;
return 0;
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Unit* unit = Unit::GetUnit(*me, victimGUID);
if (unit && unit->HasAura(SPELL_INSIDIOUS_WHISPER))
unit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER);
}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by->GetGUID() != victimGUID && done_by->GetGUID() != me->GetGUID())
{
@@ -126,13 +126,13 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (!victimGUID)
return;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -179,9 +179,9 @@ class boss_leotheras_the_blind : public CreatureScript
public:
boss_leotheras_the_blind() : CreatureScript("boss_leotheras_the_blind") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_leotheras_the_blindAI (creature);
+ return new boss_leotheras_the_blindAI(creature);
}
struct boss_leotheras_the_blindAI : public ScriptedAI
@@ -218,7 +218,7 @@ public:
uint64 Demon;
uint64 SpellBinderGUID[3];
- void Reset()
+ void Reset() OVERRIDE
{
CheckChannelers();
BanishTimer = 1000;
@@ -264,7 +264,8 @@ public:
SpellBinderGUID[i] = binder->GetGUID();
}
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (me->HasAura(AURA_BANISH))
return;
@@ -383,7 +384,7 @@ public:
}
}
- void KilledUnit(Unit* victim)
+ void KilledUnit(Unit* victim) OVERRIDE
{
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
@@ -391,7 +392,7 @@ public:
Talk(DemonForm ? SAY_DEMON_SLAY : SAY_NIGHTELF_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -405,7 +406,7 @@ public:
instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (me->HasAura(AURA_BANISH))
return;
@@ -413,7 +414,7 @@ public:
me->LoadEquipment();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (me->HasAura(AURA_BANISH) || !UpdateVictim())
@@ -601,9 +602,9 @@ class boss_leotheras_the_blind_demonform : public CreatureScript
public:
boss_leotheras_the_blind_demonform() : CreatureScript("boss_leotheras_the_blind_demonform") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_leotheras_the_blind_demonformAI (creature);
+ return new boss_leotheras_the_blind_demonformAI(creature);
}
struct boss_leotheras_the_blind_demonformAI : public ScriptedAI
@@ -613,7 +614,7 @@ public:
uint32 ChaosBlast_Timer;
bool DealDamage;
- void Reset()
+ void Reset() OVERRIDE
{
ChaosBlast_Timer = 1000;
DealDamage = true;
@@ -624,7 +625,7 @@ public:
Talk(SAY_FREE);
}
- void KilledUnit(Unit* victim)
+ void KilledUnit(Unit* victim) OVERRIDE
{
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
@@ -632,18 +633,18 @@ public:
Talk(SAY_DEMON_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
//invisibility (blizzlike, at the end of the fight he doesn't die, he disappears)
DoCast(me, 8149, true);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
StartEvent();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -674,9 +675,9 @@ class npc_greyheart_spellbinder : public CreatureScript
public:
npc_greyheart_spellbinder() : CreatureScript("npc_greyheart_spellbinder") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_greyheart_spellbinderAI (creature);
+ return new npc_greyheart_spellbinderAI(creature);
}
struct npc_greyheart_spellbinderAI : public ScriptedAI
@@ -697,7 +698,7 @@ public:
bool AddedBanish;
- void Reset()
+ void Reset() OVERRIDE
{
Mindblast_Timer = urand(3000, 8000);
Earthshock_Timer = urand(5000, 10000);
@@ -711,14 +712,14 @@ public:
}
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
me->InterruptNonMeleeSpells(false);
if (instance)
instance->SetData64(DATA_LEOTHERAS_EVENT_STARTER, who->GetGUID());
}
- void JustRespawned()
+ void JustRespawned() OVERRIDE
{
AddedBanish = false;
Reset();
@@ -737,7 +738,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (instance)
{
@@ -800,7 +801,7 @@ public:
DoMeleeAttackIfReady();
}
- void JustDied(Unit* /*killer*/) {}
+ void JustDied(Unit* /*killer*/) OVERRIDE {}
};
};
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
index da8e75e8f31..cd56005b3f6 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
@@ -29,31 +29,37 @@ EndScriptData */
#include "Spell.h"
#include "Player.h"
-#define SPELL_SPOUT 37433
-#define SPELL_SPOUT_ANIM 42835
-#define SPELL_SPOUT_BREATH 37431
-#define SPELL_KNOCKBACK 19813
-#define SPELL_GEYSER 37478
-#define SPELL_WHIRL 37660
-#define SPELL_WATERBOLT 37138
-#define SPELL_SUBMERGE 37550
-#define SPELL_EMERGE 20568
+enum Spells
+{
+ SPELL_SPOUT = 37433,
+ SPELL_SPOUT_ANIM = 42835,
+ SPELL_SPOUT_BREATH = 37431,
+ SPELL_KNOCKBACK = 19813,
+ SPELL_GEYSER = 37478,
+ SPELL_WHIRL = 37660,
+ SPELL_WATERBOLT = 37138,
+ SPELL_SUBMERGE = 37550,
+ SPELL_EMERGE = 20568,
+
+
+ // Ambusher spells
+ SPELL_SPREAD_SHOT = 37790,
+ SPELL_SHOOT = 37770,
+ // Guardian spells
+ SPELL_ARCINGSMASH = 38761, // Wrong SpellId. Can't find the right one.
+ SPELL_HAMSTRING = 26211
+};
+
+enum Creatures
+{
+ NPC_COILFANG_GUARDIAN = 21873,
+ NPC_COILFANG_AMBUSHER = 21865
+};
#define EMOTE_SPOUT "The Lurker Below takes a deep breath."
#define SPOUT_DIST 100
-#define NPC_COILFANG_GUARDIAN 21873
-#define NPC_COILFANG_AMBUSHER 21865
-
-//Ambusher spells
-#define SPELL_SPREAD_SHOT 37790
-#define SPELL_SHOOT 37770
-
-//Guardian spells
-#define SPELL_ARCINGSMASH 38761 // Wrong SpellId. Can't find the right one.
-#define SPELL_HAMSTRING 26211
-
float AddPos[9][3] =
{
// MOVE_AMBUSHER_1 X, Y, Z
@@ -73,9 +79,9 @@ class boss_the_lurker_below : public CreatureScript
public:
boss_the_lurker_below() : CreatureScript("boss_the_lurker_below") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_the_lurker_belowAI (creature);
+ return new boss_the_lurker_belowAI(creature);
}
struct boss_the_lurker_belowAI : public ScriptedAI
@@ -110,7 +116,7 @@ public:
return false;
return true;
}
- void Reset()
+ void Reset() OVERRIDE
{
me->SetSwim(true);
me->SetDisableGravity(true);
@@ -143,7 +149,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -154,13 +160,14 @@ public:
Summons.DespawnAll();
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_THELURKERBELOWEVENT, IN_PROGRESS);
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!CanStartEvent) // boss is invisible, don't attack
return;
@@ -172,13 +179,13 @@ public:
}
}
- void MovementInform(uint32 type, uint32 /*id*/)
+ void MovementInform(uint32 type, uint32 /*id*/) OVERRIDE
{
if (type == ROTATE_MOTION_TYPE)
me->SetReactState(REACT_AGGRESSIVE);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!CanStartEvent) // boss is invisible, don't attack
{
@@ -364,9 +371,9 @@ class npc_coilfang_ambusher : public CreatureScript
public:
npc_coilfang_ambusher() : CreatureScript("npc_coilfang_ambusher") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_coilfang_ambusherAI (creature);
+ return new npc_coilfang_ambusherAI(creature);
}
struct npc_coilfang_ambusherAI : public ScriptedAI
@@ -379,13 +386,14 @@ public:
uint32 MultiShotTimer;
uint32 ShootBowTimer;
- void Reset()
+ void Reset() OVERRIDE
{
MultiShotTimer = 10000;
ShootBowTimer = 4000;
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!who || me->GetVictim())
return;
@@ -394,7 +402,7 @@ public:
AttackStart(who);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (MultiShotTimer <= diff)
{
@@ -423,7 +431,7 @@ class go_strange_pool : public GameObjectScript
public:
go_strange_pool() : GameObjectScript("go_strange_pool") {}
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
// 25%
if (InstanceScript* instanceScript = go->GetInstanceScript())
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
index ec949345928..e0469dbfbfb 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
@@ -27,7 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "serpent_shrine.h"
-enum eEnums
+enum Yells
{
// Yell
SAY_AGGRO = 0,
@@ -38,8 +38,11 @@ enum eEnums
// Emotes
EMOTE_WATERY_GRAVE = 5,
EMOTE_EARTHQUAKE = 6,
- EMOTE_WATERY_GLOBULES = 7,
- // Spells
+ EMOTE_WATERY_GLOBULES = 7
+};
+
+enum Spells
+{
SPELL_TIDAL_WAVE = 37730,
SPELL_WATERY_GRAVE = 38049,
SPELL_EARTHQUAKE = 37764,
@@ -54,6 +57,13 @@ enum eEnums
SPELL_SUMMON_WATER_GLOBULE_2 = 37858,
SPELL_SUMMON_WATER_GLOBULE_3 = 37860,
SPELL_SUMMON_WATER_GLOBULE_4 = 37861,
+
+ // Water Globule
+ SPELL_GLOBULE_EXPLOSION = 37871
+};
+
+enum Creatures
+{
// Creatures
NPC_WATER_GLOBULE = 21913,
NPC_TIDEWALKER_LURKER = 21920
@@ -79,9 +89,9 @@ class boss_morogrim_tidewalker : public CreatureScript
public:
boss_morogrim_tidewalker() : CreatureScript("boss_morogrim_tidewalker") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_morogrim_tidewalkerAI (creature);
+ return new boss_morogrim_tidewalkerAI(creature);
}
struct boss_morogrim_tidewalkerAI : public ScriptedAI
@@ -106,7 +116,7 @@ public:
bool Earthquake;
bool Phase2;
- void Reset()
+ void Reset() OVERRIDE
{
TidalWave_Timer = 10000;
WateryGrave_Timer = 30000;
@@ -132,12 +142,12 @@ public:
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -145,7 +155,7 @@ public:
instance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, DONE);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
PlayerList = &me->GetMap()->GetPlayers();
Playercount = PlayerList->getSize();
@@ -163,7 +173,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -277,17 +287,14 @@ public:
};
-//Water Globule AI
-#define SPELL_GLOBULE_EXPLOSION 37871
-
class npc_water_globule : public CreatureScript
{
public:
npc_water_globule() : CreatureScript("npc_water_globule") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_water_globuleAI (creature);
+ return new npc_water_globuleAI(creature);
}
struct npc_water_globuleAI : public ScriptedAI
@@ -296,7 +303,7 @@ public:
uint32 Check_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Check_Timer = 1000;
@@ -305,9 +312,10 @@ public:
me->setFaction(14);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (!who || me->GetVictim())
return;
@@ -320,7 +328,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
index de12e35ec19..79e89740b2d 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp
@@ -30,12 +30,21 @@ EndScriptData */
#include "TemporarySummon.h"
#define MAX_ENCOUNTER 6
-#define SPELL_SCALDINGWATER 37284
-#define NPC_COILFANG_FRENZY 21508
-#define TRASHNPC_COILFANG_PRIESTESS 21220 //6*2
-#define TRASHNPC_COILFANG_SHATTERER 21301 //6*3
-#define MIN_KILLS 30
+enum Misc
+{
+ // Spells
+ SPELL_SCALDINGWATER = 37284,
+
+ // Creatures
+ NPC_COILFANG_FRENZY = 21508,
+ NPC_COILFANG_PRIESTESS = 21220,
+ NPC_COILFANG_SHATTERER = 21301,
+
+ // Misc
+ MIN_KILLS = 30
+};
+
//NOTE: there are 6 platforms
//there should be 3 shatterers and 2 priestess on all platforms, total of 30 elites, else it won't work!
@@ -55,7 +64,7 @@ class go_bridge_console : public GameObjectScript
public:
go_bridge_console() : GameObjectScript("go_bridge_console") { }
- bool OnGossipHello(Player* /*player*/, GameObject* go)
+ bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
InstanceScript* instance = go->GetInstanceScript();
@@ -237,7 +246,7 @@ class instance_serpent_shrine : public InstanceMapScript
}
}
- void SetData64(uint32 type, uint64 data)
+ void SetData64(uint32 type, uint64 data) OVERRIDE
{
if (type == DATA_KARATHRESSEVENT_STARTER)
KarathressEvent_Starter = data;
@@ -245,7 +254,7 @@ class instance_serpent_shrine : public InstanceMapScript
LeotherasEventStarter = data;
}
- uint64 GetData64(uint32 identifier) const
+ uint64 GetData64(uint32 identifier) const OVERRIDE
{
switch (identifier)
{
@@ -273,7 +282,7 @@ class instance_serpent_shrine : public InstanceMapScript
return 0;
}
- void SetData(uint32 type, uint32 data)
+ void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -343,7 +352,7 @@ class instance_serpent_shrine : public InstanceMapScript
SaveToDB();
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -438,7 +447,7 @@ class instance_serpent_shrine : public InstanceMapScript
bool DoSpawnFrenzy;
};
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_serpentshrine_cavern_InstanceMapScript(map);
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
index 9a7ca994291..57cca36b854 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
@@ -52,9 +52,9 @@ class boss_hydromancer_thespia : public CreatureScript
public:
boss_hydromancer_thespia() : CreatureScript("boss_hydromancer_thespia") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_thespiaAI (creature);
+ return new boss_thespiaAI(creature);
}
struct boss_thespiaAI : public ScriptedAI
@@ -70,7 +70,7 @@ public:
uint32 LungBurst_Timer;
uint32 EnvelopingWinds_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
LightningCloud_Timer = 15000;
LungBurst_Timer = 7000;
@@ -80,7 +80,7 @@ public:
instance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEAD);
@@ -88,12 +88,12 @@ public:
instance->SetData(TYPE_HYDROMANCER_THESPIA, DONE);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -101,7 +101,7 @@ public:
instance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -152,9 +152,9 @@ class npc_coilfang_waterelemental : public CreatureScript
public:
npc_coilfang_waterelemental() : CreatureScript("npc_coilfang_waterelemental") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_coilfang_waterelementalAI (creature);
+ return new npc_coilfang_waterelementalAI(creature);
}
struct npc_coilfang_waterelementalAI : public ScriptedAI
@@ -163,14 +163,14 @@ public:
uint32 WaterBoltVolley_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
WaterBoltVolley_Timer = 3000+rand()%3000;
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
index 31af3e5a8d8..fa2fac2b0cb 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
@@ -32,18 +32,28 @@ EndContentData */
#include "ScriptedCreature.h"
#include "steam_vault.h"
-enum MekgineerSteamrigger
+enum Yells
{
SAY_MECHANICS = 0,
SAY_AGGRO = 1,
SAY_SLAY = 2,
- SAY_DEATH = 3,
+ SAY_DEATH = 3
+};
+enum Spells
+{
SPELL_SUPER_SHRINK_RAY = 31485,
SPELL_SAW_BLADE = 31486,
SPELL_ELECTRIFIED_NET = 35107,
- ENTRY_STREAMRIGGER_MECHANIC = 17951
+ SPELL_DISPEL_MAGIC = 17201,
+ SPELL_REPAIR = 31532,
+ H_SPELL_REPAIR = 37936
+};
+
+enum Creatures
+{
+ NPC_STREAMRIGGER_MECHANIC = 17951
};
class boss_mekgineer_steamrigger : public CreatureScript
@@ -51,9 +61,9 @@ class boss_mekgineer_steamrigger : public CreatureScript
public:
boss_mekgineer_steamrigger() : CreatureScript("boss_mekgineer_steamrigger") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_mekgineer_steamriggerAI (creature);
+ return new boss_mekgineer_steamriggerAI(creature);
}
struct boss_mekgineer_steamriggerAI : public ScriptedAI
@@ -72,7 +82,7 @@ public:
bool Summon50;
bool Summon25;
- void Reset()
+ void Reset() OVERRIDE
{
Shrink_Timer = 20000;
Saw_Blade_Timer = 15000;
@@ -86,7 +96,7 @@ public:
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -94,12 +104,12 @@ public:
instance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -112,17 +122,17 @@ public:
{
Talk(SAY_MECHANICS);
- DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
- DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, -5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
- DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, -5, -5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
+ DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
+ DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, -5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
+ DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, -5, -5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
if (rand()%2)
- DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, 5, -7, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
+ DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 5, -7, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
if (rand()%2)
- DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC, 7, -5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
+ DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 7, -5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -183,10 +193,6 @@ public:
};
-#define SPELL_DISPEL_MAGIC 17201
-#define SPELL_REPAIR 31532
-#define H_SPELL_REPAIR 37936
-
#define MAX_REPAIR_RANGE (13.0f) //we should be at least at this range for repair
#define MIN_REPAIR_RANGE (7.0f) //we can stop movement at this range to repair but not required
@@ -195,9 +201,9 @@ class npc_steamrigger_mechanic : public CreatureScript
public:
npc_steamrigger_mechanic() : CreatureScript("npc_steamrigger_mechanic") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_steamrigger_mechanicAI (creature);
+ return new npc_steamrigger_mechanicAI(creature);
}
struct npc_steamrigger_mechanicAI : public ScriptedAI
@@ -211,19 +217,20 @@ public:
uint32 Repair_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Repair_Timer = 2000;
}
- void MoveInLineOfSight(Unit* /*who*/)
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE
+
{
//react only if attacked
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (Repair_Timer <= diff)
{
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
index d8cbcc8b49d..4314b43e0e8 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
@@ -49,9 +49,9 @@ class npc_naga_distiller : public CreatureScript
public:
npc_naga_distiller() : CreatureScript("npc_naga_distiller") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_naga_distillerAI (creature);
+ return new npc_naga_distillerAI(creature);
}
struct npc_naga_distillerAI : public ScriptedAI
@@ -63,7 +63,7 @@ public:
InstanceScript* instance;
- void Reset()
+ void Reset() OVERRIDE
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -79,7 +79,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
void StartRageGen(Unit* /*caster*/)
{
@@ -92,7 +92,7 @@ public:
instance->SetData(TYPE_DISTILLER, IN_PROGRESS);
}
- void DamageTaken(Unit* /*done_by*/, uint32 &damage)
+ void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
{
if (me->GetHealth() <= damage)
if (instance)
@@ -107,9 +107,9 @@ class boss_warlord_kalithresh : public CreatureScript
public:
boss_warlord_kalithresh() : CreatureScript("boss_warlord_kalithresh") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_warlord_kalithreshAI (creature);
+ return new boss_warlord_kalithreshAI(creature);
}
struct boss_warlord_kalithreshAI : public ScriptedAI
@@ -126,7 +126,7 @@ public:
uint32 Rage_Timer;
bool CanRage;
- void Reset()
+ void Reset() OVERRIDE
{
Reflection_Timer = 10000;
Impale_Timer = 7000+rand()%7000;
@@ -137,7 +137,7 @@ public:
instance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -145,12 +145,12 @@ public:
instance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
+ void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
//hack :(
if (spell->Id == SPELL_WARLORDS_RAGE_PROC)
@@ -159,7 +159,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -167,7 +167,7 @@ public:
instance->SetData(TYPE_WARLORD_KALITHRESH, DONE);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
index ea89ac3c611..275a21f5757 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/steam_vault.h
@@ -19,13 +19,17 @@
#ifndef DEF_STEAM_VAULT_H
#define DEF_STEAM_VAULT_H
-#define TYPE_HYDROMANCER_THESPIA 1
-#define TYPE_MEKGINEER_STEAMRIGGER 2
-#define TYPE_WARLORD_KALITHRESH 3
-#define TYPE_DISTILLER 4
+enum DataTypes
+{
+ TYPE_HYDROMANCER_THESPIA = 1,
+ TYPE_MEKGINEER_STEAMRIGGER = 2,
+ TYPE_WARLORD_KALITHRESH = 3,
+ TYPE_DISTILLER = 4,
+
+ DATA_MEKGINEERSTEAMRIGGER = 5,
+ DATA_KALITRESH = 6,
+ DATA_THESPIA = 7
+};
-#define DATA_MEKGINEERSTEAMRIGGER 5
-#define DATA_KALITRESH 6
-#define DATA_THESPIA 7
#endif
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
index f1bb841fa85..0db48d83ebb 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
@@ -29,7 +29,11 @@ EndScriptData */
enum Spells
{
SPELL_FOUL_SPORES = 31673,
- SPELL_ACID_GEYSER = 38739
+ SPELL_ACID_GEYSER = 38739,
+
+ SPELL_SPORE_CLOUD = 34168,
+ SPELL_PUTRID_MUSHROOM = 31690,
+ SPELL_GROW = 31698
};
class boss_hungarfen : public CreatureScript
@@ -37,9 +41,9 @@ class boss_hungarfen : public CreatureScript
public:
boss_hungarfen() : CreatureScript("boss_hungarfen") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_hungarfenAI (creature);
+ return new boss_hungarfenAI(creature);
}
struct boss_hungarfenAI : public ScriptedAI
@@ -52,18 +56,18 @@ public:
uint32 Mushroom_Timer;
uint32 AcidGeyser_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Root = false;
Mushroom_Timer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode
AcidGeyser_Timer = 10000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -100,18 +104,14 @@ public:
};
-#define SPELL_SPORE_CLOUD 34168
-#define SPELL_PUTRID_MUSHROOM 31690
-#define SPELL_GROW 31698
-
class npc_underbog_mushroom : public CreatureScript
{
public:
npc_underbog_mushroom() : CreatureScript("npc_underbog_mushroom") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_underbog_mushroomAI (creature);
+ return new npc_underbog_mushroomAI(creature);
}
struct npc_underbog_mushroomAI : public ScriptedAI
@@ -122,7 +122,7 @@ public:
uint32 Grow_Timer;
uint32 Shrink_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Stop = false;
Grow_Timer = 0;
@@ -132,13 +132,14 @@ public:
DoCast(me, SPELL_SPORE_CLOUD, true);
}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
- void AttackStart(Unit* /*who*/) {}
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (Stop)
return;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
index e5d0726dca4..c22dedd269e 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
@@ -47,9 +47,9 @@ class boss_the_black_stalker : public CreatureScript
public:
boss_the_black_stalker() : CreatureScript("boss_the_black_stalker") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_the_black_stalkerAI (creature);
+ return new boss_the_black_stalkerAI(creature);
}
struct boss_the_black_stalkerAI : public ScriptedAI
@@ -68,7 +68,7 @@ public:
uint32 check_Timer;
std::list<uint64> Striders;
- void Reset()
+ void Reset() OVERRIDE
{
Levitate_Timer = 12000;
ChainLightning_Timer = 6000;
@@ -80,9 +80,9 @@ public:
Striders.clear();
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void JustSummoned(Creature* summon)
+ void JustSummoned(Creature* summon) OVERRIDE
{
if (summon && summon->GetEntry() == ENTRY_SPORE_STRIDER)
{
@@ -95,14 +95,14 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
for (std::list<uint64>::const_iterator i = Striders.begin(); i != Striders.end(); ++i)
if (Creature* strider = Unit::GetCreature(*me, *i))
strider->DisappearAndDie();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
index 473630cc9af..31f854803bc 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
@@ -28,7 +28,7 @@ EndScriptData */
#include "SpellScript.h"
#include "gruuls_lair.h"
-enum eEnums
+enum Yells
{
SAY_AGGRO = 0,
SAY_SLAM = 1,
@@ -36,8 +36,11 @@ enum eEnums
SAY_SLAY = 3,
SAY_DEATH = 4,
- EMOTE_GROW = 5,
+ EMOTE_GROW = 5
+};
+enum Spells
+{
SPELL_GROWTH = 36300,
SPELL_CAVE_IN = 36240,
SPELL_GROUND_SLAM = 33525, //AoE Ground Slam applying Ground Slam to everyone with a script effect (most likely the knock back, we can code it to a set knockback)
@@ -57,9 +60,9 @@ class boss_gruul : public CreatureScript
public:
boss_gruul() : CreatureScript("boss_gruul") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_gruulAI (creature);
+ return new boss_gruulAI(creature);
}
struct boss_gruulAI : public ScriptedAI
@@ -80,7 +83,7 @@ public:
bool m_bPerformingGroundSlam;
- void Reset()
+ void Reset() OVERRIDE
{
m_uiGrowth_Timer= 30000;
m_uiCaveIn_Timer= 27000;
@@ -94,7 +97,7 @@ public:
instance->SetData(DATA_GRUULEVENT, NOT_STARTED);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -102,12 +105,12 @@ public:
instance->SetData(DATA_GRUULEVENT, IN_PROGRESS);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -118,7 +121,7 @@ public:
}
}
- void SpellHitTarget(Unit* target, const SpellInfo* pSpell)
+ void SpellHitTarget(Unit* target, const SpellInfo* pSpell) OVERRIDE
{
//This to emulate effect1 (77) of SPELL_GROUND_SLAM, knock back to any direction
//It's initially wrong, since this will cause fall damage, which is by comments, not intended.
@@ -158,7 +161,7 @@ public:
}
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 uiDiff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -260,7 +263,7 @@ class spell_gruul_shatter : public SpellScriptLoader
{
PrepareSpellScript(spell_gruul_shatter_SpellScript);
- bool Validate(SpellInfo const* /*spell*/)
+ bool Validate(SpellInfo const* /*spell*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_STONED))
return false;
@@ -278,13 +281,13 @@ class spell_gruul_shatter : public SpellScriptLoader
}
}
- void Register()
+ void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_gruul_shatter_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_gruul_shatter_SpellScript();
}
@@ -313,13 +316,13 @@ class spell_gruul_shatter_effect : public SpellScriptLoader
SetHitDamage(int32(GetHitDamage() * ((radius - distance) / radius)));
}
- void Register()
+ void Register() OVERRIDE
{
OnHit += SpellHitFn(spell_gruul_shatter_effect_SpellScript::CalculateDamage);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_gruul_shatter_effect_SpellScript();
}
diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
index f927f606bda..d216c0b02ee 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
@@ -110,9 +110,9 @@ class boss_high_king_maulgar : public CreatureScript
public:
boss_high_king_maulgar() : CreatureScript("boss_high_king_maulgar") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_high_king_maulgarAI (creature);
+ return new boss_high_king_maulgarAI(creature);
}
struct boss_high_king_maulgarAI : public ScriptedAI
@@ -136,7 +136,7 @@ public:
uint64 Council[4];
- void Reset()
+ void Reset() OVERRIDE
{
ArcingSmash_Timer = 10000;
MightyBlow_Timer = 40000;
@@ -167,12 +167,12 @@ public:
instance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -185,7 +185,7 @@ public:
Talk(SAY_OGRE_DEATH);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
StartEvent(who);
}
@@ -217,7 +217,7 @@ public:
DoZoneInCombat();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_MAULGAREVENT))
@@ -309,9 +309,9 @@ class boss_olm_the_summoner : public CreatureScript
public:
boss_olm_the_summoner() : CreatureScript("boss_olm_the_summoner") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_olm_the_summonerAI (creature);
+ return new boss_olm_the_summonerAI(creature);
}
struct boss_olm_the_summonerAI : public ScriptedAI
@@ -327,7 +327,7 @@ public:
InstanceScript* instance;
- void Reset()
+ void Reset() OVERRIDE
{
DarkDecay_Timer = 10000;
Summon_Timer = 15000;
@@ -338,7 +338,7 @@ public:
instance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
}
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (!who)
return;
@@ -353,7 +353,7 @@ public:
}
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -362,7 +362,7 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -377,7 +377,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_MAULGAREVENT))
@@ -437,9 +437,9 @@ class boss_kiggler_the_crazed : public CreatureScript
public:
boss_kiggler_the_crazed() : CreatureScript("boss_kiggler_the_crazed") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_kiggler_the_crazedAI (creature);
+ return new boss_kiggler_the_crazedAI(creature);
}
struct boss_kiggler_the_crazedAI : public ScriptedAI
@@ -456,7 +456,7 @@ public:
InstanceScript* instance;
- void Reset()
+ void Reset() OVERRIDE
{
GreaterPolymorph_Timer = 5000;
LightningBolt_Timer = 10000;
@@ -468,7 +468,7 @@ public:
instance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -477,7 +477,7 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -492,7 +492,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_MAULGAREVENT))
@@ -558,9 +558,9 @@ class boss_blindeye_the_seer : public CreatureScript
public:
boss_blindeye_the_seer() : CreatureScript("boss_blindeye_the_seer") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_blindeye_the_seerAI (creature);
+ return new boss_blindeye_the_seerAI(creature);
}
struct boss_blindeye_the_seerAI : public ScriptedAI
@@ -576,7 +576,7 @@ public:
InstanceScript* instance;
- void Reset()
+ void Reset() OVERRIDE
{
GreaterPowerWordShield_Timer = 5000;
Heal_Timer = urand(25000, 40000);
@@ -587,7 +587,7 @@ public:
instance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -596,7 +596,7 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -611,7 +611,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_MAULGAREVENT))
@@ -668,9 +668,9 @@ class boss_krosh_firehand : public CreatureScript
public:
boss_krosh_firehand() : CreatureScript("boss_krosh_firehand") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_krosh_firehandAI (creature);
+ return new boss_krosh_firehandAI(creature);
}
struct boss_krosh_firehandAI : public ScriptedAI
@@ -686,7 +686,7 @@ public:
InstanceScript* instance;
- void Reset()
+ void Reset() OVERRIDE
{
GreaterFireball_Timer = 1000;
SpellShield_Timer = 5000;
@@ -697,7 +697,7 @@ public:
instance->SetData(DATA_MAULGAREVENT, NOT_STARTED);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (instance)
{
@@ -706,7 +706,7 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -721,7 +721,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Only if not incombat check if the event is started
if (!me->IsInCombat() && instance && instance->GetData(DATA_MAULGAREVENT))
diff --git a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
index 2e9715a7ffe..69ddba8c274 100644
--- a/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
+++ b/src/server/scripts/Outland/GruulsLair/gruuls_lair.h
@@ -19,16 +19,19 @@
#ifndef DEF_GRUULS_LAIR_H
#define DEF_GRUULS_LAIR_H
-#define DATA_BLINDEYETHESEER 1
-#define DATA_GRUULEVENT 2
-#define DATA_KIGGLERTHECRAZED 3
-#define DATA_KROSHFIREHAND 4
-#define DATA_MAULGAREVENT 5
-#define DATA_MAULGAREVENT_TANK 6
-#define DATA_OLMTHESUMMONER 7
-#define DATA_MAULGARDOOR 8
-#define DATA_GRUULDOOR 9
-#define DATA_MAULGAR 10
+enum DataTypes
+{
+ DATA_BLINDEYETHESEER = 1,
+ DATA_GRUULEVENT = 2,
+ DATA_KIGGLERTHECRAZED = 3,
+ DATA_KROSHFIREHAND = 4,
+ DATA_MAULGAREVENT = 5,
+ DATA_MAULGAREVENT_TANK = 6,
+ DATA_OLMTHESUMMONER = 7,
+ DATA_MAULGARDOOR = 8,
+ DATA_GRUULDOOR = 9,
+ DATA_MAULGAR = 10
+};
#define ERROR_INST_DATA "TSCR Error: Instance Data not set properly for Gruul's Lair instance (map 565). Encounters will be buggy."
#endif
diff --git a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
index e8aa6838d09..3fbdfe94c05 100644
--- a/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
+++ b/src/server/scripts/Outland/GruulsLair/instance_gruuls_lair.cpp
@@ -39,7 +39,7 @@ class instance_gruuls_lair : public InstanceMapScript
public:
instance_gruuls_lair() : InstanceMapScript("instance_gruuls_lair", 565) { }
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_gruuls_lair_InstanceMapScript(map);
}
@@ -111,13 +111,13 @@ public:
}
}
- void SetData64(uint32 type, uint64 data)
+ void SetData64(uint32 type, uint64 data) OVERRIDE
{
if (type == DATA_MAULGAREVENT_TANK)
MaulgarEvent_Tank = data;
}
- uint64 GetData64(uint32 identifier) const
+ uint64 GetData64(uint32 identifier) const OVERRIDE
{
switch (identifier)
{
@@ -133,7 +133,7 @@ public:
return 0;
}
- void SetData(uint32 type, uint32 data)
+ void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -156,7 +156,7 @@ public:
SaveToDB();
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
index 01f7a2bca98..1303a80488e 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/blood_furnace.h
@@ -19,29 +19,37 @@
#ifndef DEF_BLOOD_FURNACE_H
#define DEF_BLOOD_FURNACE_H
-#define DATA_THE_MAKER 1
-#define DATA_BROGGOK 2
-#define DATA_KELIDAN_THE_MAKER 3
-#define TYPE_THE_MAKER_EVENT 4
-#define TYPE_BROGGOK_EVENT 5
-#define TYPE_KELIDAN_THE_BREAKER_EVENT 6
-#define DATA_DOOR1 7
-#define DATA_DOOR2 8
-#define DATA_DOOR3 9
-#define DATA_DOOR4 10
-#define DATA_DOOR5 11
-#define DATA_DOOR6 12
-#define DATA_PRISON_CELL1 13
-#define DATA_PRISON_CELL2 14
-#define DATA_PRISON_CELL3 15
-#define DATA_PRISON_CELL4 16
-#define DATA_PRISON_CELL5 17
-#define DATA_PRISON_CELL6 18
-#define DATA_PRISON_CELL7 19
-#define DATA_PRISON_CELL8 20
-#define DATA_BROGGOK_LEVER 21
-#define ACTION_ACTIVATE_BROGGOK 22
-#define ACTION_RESET_BROGGOK 23
-#define ACTION_PREPARE_BROGGOK 24
+enum DataTypes
+{
+ DATA_THE_MAKER = 1,
+ DATA_BROGGOK = 2,
+ DATA_KELIDAN_THE_MAKER = 3,
+ TYPE_THE_MAKER_EVENT = 4,
+ TYPE_BROGGOK_EVENT = 5,
+ TYPE_KELIDAN_THE_BREAKER_EVENT = 6,
+ DATA_DOOR1 = 7,
+ DATA_DOOR2 = 8,
+ DATA_DOOR3 = 9,
+ DATA_DOOR4 = 10,
+ DATA_DOOR5 = 11,
+ DATA_DOOR6 = 12,
+ DATA_PRISON_CELL1 = 13,
+ DATA_PRISON_CELL2 = 14,
+ DATA_PRISON_CELL3 = 15,
+ DATA_PRISON_CELL4 = 16,
+ DATA_PRISON_CELL5 = 17,
+ DATA_PRISON_CELL6 = 18,
+ DATA_PRISON_CELL7 = 19,
+ DATA_PRISON_CELL8 = 20,
+ DATA_BROGGOK_LEVER = 21
+};
+
+enum ActionIds
+{
+ ACTION_ACTIVATE_BROGGOK = 1,
+ ACTION_RESET_BROGGOK = 2,
+ ACTION_PREPARE_BROGGOK = 3
+};
+
#endif
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
index fdbd0b9dcc6..2f5e160b335 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp
@@ -27,10 +27,13 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "blood_furnace.h"
-enum eEnums
+enum Yells
{
- SAY_AGGRO = 0,
+ SAY_AGGRO = 0
+};
+enum Spells
+{
SPELL_SLIME_SPRAY = 30913,
SPELL_POISON_CLOUD = 30916,
SPELL_POISON_BOLT = 30917,
@@ -61,7 +64,7 @@ class boss_broggok : public CreatureScript
uint32 PoisonBolt_Timer;
bool canAttack;
- void Reset()
+ void Reset() OVERRIDE
{
_Reset();
AcidSpray_Timer = 10000;
@@ -71,12 +74,12 @@ class boss_broggok : public CreatureScript
instance->SetData(TYPE_BROGGOK_EVENT, NOT_STARTED);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
summoned->setFaction(16);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -84,7 +87,7 @@ class boss_broggok : public CreatureScript
summoned->CastSpell(summoned, SPELL_POISON, false, 0, 0, me->GetGUID());
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -117,7 +120,7 @@ class boss_broggok : public CreatureScript
DoMeleeAttackIfReady();
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
@@ -127,7 +130,7 @@ class boss_broggok : public CreatureScript
}
}
- void DoAction(int32 action)
+ void DoAction(int32 action) OVERRIDE
{
switch (action)
{
@@ -149,7 +152,7 @@ class boss_broggok : public CreatureScript
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_broggokAI(creature);
}
@@ -160,7 +163,7 @@ class go_broggok_lever : public GameObjectScript
public:
go_broggok_lever() : GameObjectScript("go_broggok_lever") {}
- bool OnGossipHello(Player* /*player*/, GameObject* go)
+ bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
if (InstanceScript* instance = go->GetInstanceScript())
if (instance->GetData(TYPE_BROGGOK_EVENT) != DONE && instance->GetData(TYPE_BROGGOK_EVENT) != IN_PROGRESS)
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
index 31e66c380d2..fedf56eb929 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
@@ -33,7 +33,7 @@ EndContentData */
#include "SpellAuras.h"
#include "blood_furnace.h"
-enum eKelidan
+enum Kelidan
{
SAY_WAKE = 0,
SAY_ADD_AGGRO = 1,
@@ -97,7 +97,7 @@ class boss_kelidan_the_breaker : public CreatureScript
bool addYell;
uint64 Channelers[5];
- void Reset()
+ void Reset() OVERRIDE
{
ShadowVolley_Timer = 1000;
BurningNova_Timer = 15000;
@@ -112,7 +112,7 @@ class boss_kelidan_the_breaker : public CreatureScript
instance->SetData(TYPE_KELIDAN_THE_BREAKER_EVENT, NOT_STARTED);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
Talk(SAY_WAKE);
if (me->IsNonMeleeSpellCasted(false))
@@ -122,7 +122,7 @@ class boss_kelidan_the_breaker : public CreatureScript
instance->SetData(TYPE_KELIDAN_THE_BREAKER_EVENT, IN_PROGRESS);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (rand()%2)
return;
@@ -189,7 +189,7 @@ class boss_kelidan_the_breaker : public CreatureScript
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DIE);
@@ -201,7 +201,7 @@ class boss_kelidan_the_breaker : public CreatureScript
instance->HandleGameObject(instance->GetData64(DATA_DOOR6), true);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
{
@@ -273,7 +273,7 @@ class boss_kelidan_the_breaker : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_kelidan_the_breakerAI(creature);
}
@@ -283,7 +283,7 @@ class boss_kelidan_the_breaker : public CreatureScript
## npc_shadowmoon_channeler
######*/
-enum eShadowmoon
+enum Shadowmoon
{
SPELL_SHADOW_BOLT = 12739,
H_SPELL_SHADOW_BOLT = 15472,
@@ -306,7 +306,7 @@ class npc_shadowmoon_channeler : public CreatureScript
uint32 MarkOfShadow_Timer;
uint32 check_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
ShadowBolt_Timer = 1000+rand()%1000;
MarkOfShadow_Timer = 5000+rand()%2000;
@@ -315,7 +315,7 @@ class npc_shadowmoon_channeler : public CreatureScript
me->InterruptNonMeleeSpells(true);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
CAST_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerEngaged(who);
@@ -324,13 +324,13 @@ class npc_shadowmoon_channeler : public CreatureScript
DoStartMovement(who);
}
- void JustDied(Unit* killer)
+ void JustDied(Unit* killer) OVERRIDE
{
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
CAST_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(killer);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
{
@@ -371,7 +371,7 @@ class npc_shadowmoon_channeler : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_shadowmoon_channelerAI(creature);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
index 134284acab5..33e23c12d14 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
@@ -27,12 +27,15 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "blood_furnace.h"
-enum eEnums
+enum Yells
{
SAY_AGGRO = 0,
SAY_KILL = 1,
- SAY_DIE = 2,
+ SAY_DIE = 2
+};
+enum Spells
+{
SPELL_ACID_SPRAY = 38153,
SPELL_EXPLODING_BREAKER = 30925,
SPELL_KNOCKDOWN = 20276,
@@ -62,7 +65,7 @@ class boss_the_maker : public CreatureScript
uint32 Domination_Timer;
uint32 Knockdown_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
AcidSpray_Timer = 15000;
ExplodingBreaker_Timer = 6000;
@@ -76,7 +79,7 @@ class boss_the_maker : public CreatureScript
instance->HandleGameObject(instance->GetData64(DATA_DOOR2), true);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -87,12 +90,12 @@ class boss_the_maker : public CreatureScript
instance->HandleGameObject(instance->GetData64(DATA_DOOR2), false);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DIE);
@@ -105,7 +108,7 @@ class boss_the_maker : public CreatureScript
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -151,7 +154,7 @@ class boss_the_maker : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_the_makerAI(creature);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
index 65ae859b5ae..22b1b776e40 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp
@@ -175,7 +175,7 @@ class instance_blood_furnace : public InstanceMapScript
BroggokLeverGUID = go->GetGUID(); //Broggok lever
}
- uint64 GetData64(uint32 data) const
+ uint64 GetData64(uint32 data) const OVERRIDE
{
switch (data)
{
@@ -201,7 +201,7 @@ class instance_blood_furnace : public InstanceMapScript
return 0;
}
- void SetData(uint32 type, uint32 data)
+ void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -231,7 +231,7 @@ class instance_blood_furnace : public InstanceMapScript
}
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -409,7 +409,7 @@ class instance_blood_furnace : public InstanceMapScript
}
};
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_blood_furnace_InstanceMapScript(map);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
index 872b05d8ed1..a87aefa72af 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
@@ -26,8 +26,9 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "Player.h"
+#include "hellfire_ramparts.h"
-enum eSays
+enum Says
{
SAY_AGGRO = 0,
SAY_SUMMON = 1,
@@ -37,7 +38,7 @@ enum eSays
SAY_WIPE = 5
};
-enum eSpells
+enum Spells
{
SPELL_ORBITAL_STRIKE = 30637,
SPELL_SHADOW_WHIP = 30638,
@@ -53,29 +54,16 @@ class boss_omor_the_unscarred : public CreatureScript
{
public:
- boss_omor_the_unscarred()
- : CreatureScript("boss_omor_the_unscarred")
- {
- }
+ boss_omor_the_unscarred() : CreatureScript("boss_omor_the_unscarred") { }
- struct boss_omor_the_unscarredAI : public ScriptedAI
+ struct boss_omor_the_unscarredAI : public BossAI
{
- boss_omor_the_unscarredAI(Creature* creature) : ScriptedAI(creature)
+ boss_omor_the_unscarredAI(Creature* creature) : BossAI(creature, DATA_OMOR_THE_UNSCARRED)
{
SetCombatMovement(false);
}
- uint32 OrbitalStrike_Timer;
- uint32 ShadowWhip_Timer;
- uint32 Aura_Timer;
- uint32 DemonicShield_Timer;
- uint32 Shadowbolt_Timer;
- uint32 Summon_Timer;
- uint32 SummonedCount;
- uint64 PlayerGUID;
- bool CanPullBack;
-
- void Reset()
+ void Reset() OVERRIDE
{
Talk(SAY_WIPE);
@@ -88,14 +76,17 @@ class boss_omor_the_unscarred : public CreatureScript
SummonedCount = 0;
PlayerGUID = 0;
CanPullBack = false;
+
+ _Reset();
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
+ _EnterCombat();
Talk(SAY_AGGRO);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (rand()%2)
return;
@@ -103,7 +94,7 @@ class boss_omor_the_unscarred : public CreatureScript
Talk(SAY_KILL_1);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
Talk(SAY_SUMMON);
@@ -113,12 +104,13 @@ class boss_omor_the_unscarred : public CreatureScript
++SummonedCount;
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DIE);
+ _JustDied();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -217,9 +209,20 @@ class boss_omor_the_unscarred : public CreatureScript
DoMeleeAttackIfReady();
}
+
+ private:
+ uint32 OrbitalStrike_Timer;
+ uint32 ShadowWhip_Timer;
+ uint32 Aura_Timer;
+ uint32 DemonicShield_Timer;
+ uint32 Shadowbolt_Timer;
+ uint32 Summon_Timer;
+ uint32 SummonedCount;
+ uint64 PlayerGUID;
+ bool CanPullBack;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_omor_the_unscarredAI(creature);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
index cee8a2e840e..0f5cea6c4c6 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
@@ -26,8 +26,21 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
+#include "hellfire_ramparts.h"
-enum eSpells
+enum Says
+{
+ SAY_INTRO = 0,
+
+ SAY_WIPE = 0,
+ SAY_AGGRO = 1,
+ SAY_KILL = 2,
+ SAY_DIE = 3,
+
+ EMOTE = 0
+};
+
+enum Spells
{
SPELL_FIREBALL = 34653,
SPELL_FIREBALL_H = 36920,
@@ -42,74 +55,45 @@ enum eSpells
SPELL_FIRE_NOVA_VISUAL = 19823
};
-enum eUnits
-{
- ENTRY_HELLFIRE_SENTRY = 17517,
- ENTRY_VAZRUDEN_HERALD = 17307,
- ENTRY_VAZRUDEN = 17537,
- ENTRY_NAZAN = 17536,
- ENTRY_LIQUID_FIRE = 22515,
- ENTRY_REINFORCED_FEL_IRON_CHEST = 185168,
- ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169
-};
-
-enum Says
-{
- SAY_INTRO = 0,
-
- SAY_WIPE = 0,
- SAY_AGGRO = 1,
- SAY_KILL = 2,
- SAY_DIE = 3,
-
- EMOTE = 0
-};
+const float VazrudenMiddle[3] = { -1406.5f, 1746.5f, 81.2f };
-const float VazrudenMiddle[3] = {-1406.5f, 1746.5f, 81.2f};
const float VazrudenRing[2][3] =
{
- {-1430, 1705, 112},
- {-1377, 1760, 112}
+ { -1430.0f, 1705.0f, 112.0f },
+ { -1377.0f, 1760.0f, 112.0f }
};
class boss_nazan : public CreatureScript
{
public:
+ boss_nazan() : CreatureScript("boss_nazan") { }
- boss_nazan()
- : CreatureScript("boss_nazan")
+ struct boss_nazanAI : public BossAI
{
- }
-
- struct boss_nazanAI : public ScriptedAI
- {
- boss_nazanAI(Creature* creature) : ScriptedAI(creature)
+ boss_nazanAI(Creature* creature) : BossAI(creature, DATA_NAZAN)
{
VazrudenGUID = 0;
flight = true;
}
- uint32 Fireball_Timer;
- uint32 ConeOfFire_Timer;
- uint32 BellowingRoar_Timer;
- uint32 Fly_Timer;
- uint32 Turn_Timer;
- bool flight;
- uint64 VazrudenGUID;
- SpellInfo* liquid_fire;
-
- void Reset()
+ void Reset() OVERRIDE
{
Fireball_Timer = 4000;
Fly_Timer = 45000;
Turn_Timer = 0;
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void IsSummonedBy(Unit* summoner) OVERRIDE
+ {
+ if (summoner->GetEntry() == NPC_VAZRUDEN_HERALD)
+ VazrudenGUID = summoner->GetGUID();
+ }
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
- if (summoned && summoned->GetEntry() == ENTRY_LIQUID_FIRE)
+ if (summoned && summoned->GetEntry() == NPC_LIQUID_FIRE)
{
summoned->SetLevel(me->getLevel());
summoned->setFaction(me->getFaction());
@@ -118,13 +102,13 @@ class boss_nazan : public CreatureScript
}
}
- void SpellHitTarget(Unit* target, const SpellInfo* entry)
+ void SpellHitTarget(Unit* target, const SpellInfo* entry) OVERRIDE
{
if (target && entry->Id == uint32(SPELL_FIREBALL))
- me->SummonCreature(ENTRY_LIQUID_FIRE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 30000);
+ me->SummonCreature(NPC_LIQUID_FIRE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 30000);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -193,9 +177,19 @@ class boss_nazan : public CreatureScript
DoMeleeAttackIfReady();
}
}
+
+ private:
+ uint32 Fireball_Timer;
+ uint32 ConeOfFire_Timer;
+ uint32 BellowingRoar_Timer;
+ uint32 Fly_Timer;
+ uint32 Turn_Timer;
+ bool flight;
+ uint64 VazrudenGUID;
+ SpellInfo* liquid_fire;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_nazanAI(creature);
}
@@ -204,46 +198,40 @@ class boss_nazan : public CreatureScript
class boss_vazruden : public CreatureScript
{
public:
+ boss_vazruden() : CreatureScript("boss_vazruden") { }
- boss_vazruden()
- : CreatureScript("boss_vazruden")
- {
- }
- struct boss_vazrudenAI : public ScriptedAI
+ struct boss_vazrudenAI : public BossAI
{
- boss_vazrudenAI(Creature* creature) : ScriptedAI(creature)
- {
- }
-
- uint32 Revenge_Timer;
- bool WipeSaid;
- uint32 UnsummonCheck;
+ boss_vazrudenAI(Creature* creature) : BossAI(creature, DATA_VAZRUDEN) { }
- void Reset()
+ void Reset() OVERRIDE
{
Revenge_Timer = 4000;
UnsummonCheck = 2000;
WipeSaid = false;
+ _Reset();
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
+ _EnterCombat();
}
- void KilledUnit(Unit* who)
+ void KilledUnit(Unit* who) OVERRIDE
{
- if (who && who->GetEntry() != ENTRY_VAZRUDEN)
+ if (who && who->GetEntry() != NPC_VAZRUDEN)
Talk(SAY_KILL);
}
- void JustDied(Unit* killer)
+ void JustDied(Unit* killer) OVERRIDE
{
if (killer && killer != me)
Talk(SAY_DIE);
+ _JustDied();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
{
@@ -272,8 +260,14 @@ class boss_vazruden : public CreatureScript
DoMeleeAttackIfReady();
}
+
+ private:
+ uint32 Revenge_Timer;
+ bool WipeSaid;
+ uint32 UnsummonCheck;
};
- CreatureAI* GetAI(Creature* creature) const
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_vazrudenAI(creature);
}
@@ -282,11 +276,7 @@ class boss_vazruden : public CreatureScript
class boss_vazruden_the_herald : public CreatureScript
{
public:
-
- boss_vazruden_the_herald()
- : CreatureScript("boss_vazruden_the_herald")
- {
- }
+ boss_vazruden_the_herald() : CreatureScript("boss_vazruden_the_herald") { }
struct boss_vazruden_the_heraldAI : public ScriptedAI
{
@@ -299,16 +289,7 @@ class boss_vazruden_the_herald : public CreatureScript
VazrudenGUID = 0;
}
- uint32 phase;
- uint32 waypoint;
- uint32 check;
- bool sentryDown;
- uint64 NazanGUID;
- uint64 VazrudenGUID;
- bool summoned;
- bool lootSpawned;
-
- void Reset()
+ void Reset() OVERRIDE
{
phase = 0;
waypoint = 0;
@@ -322,7 +303,7 @@ class boss_vazruden_the_herald : public CreatureScript
{
Creature* Nazan = Unit::GetCreature(*me, NazanGUID);
if (!Nazan)
- Nazan = me->FindNearestCreature(ENTRY_NAZAN, 5000);
+ Nazan = me->FindNearestCreature(NPC_NAZAN, 5000);
if (Nazan)
{
Nazan->DisappearAndDie();
@@ -331,7 +312,7 @@ class boss_vazruden_the_herald : public CreatureScript
Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
if (!Vazruden)
- Vazruden = me->FindNearestCreature(ENTRY_VAZRUDEN, 5000);
+ Vazruden = me->FindNearestCreature(NPC_VAZRUDEN, 5000);
if (Vazruden)
{
Vazruden->DisappearAndDie();
@@ -347,9 +328,9 @@ class boss_vazruden_the_herald : public CreatureScript
{
if (!summoned)
{
- if (Creature* Vazruden = me->SummonCreature(ENTRY_VAZRUDEN, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000000))
+ if (Creature* Vazruden = me->SummonCreature(NPC_VAZRUDEN, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000000))
VazrudenGUID = Vazruden->GetGUID();
- if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000000))
+ if (Creature* Nazan = me->SummonCreature(NPC_NAZAN, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000000))
NazanGUID = Nazan->GetGUID();
summoned = true;
me->SetVisible(false);
@@ -357,7 +338,7 @@ class boss_vazruden_the_herald : public CreatureScript
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (phase == 0)
{
@@ -367,14 +348,13 @@ class boss_vazruden_the_herald : public CreatureScript
}
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (!summoned)
return;
Unit* victim = me->GetVictim();
- if (summoned->GetEntry() == ENTRY_NAZAN)
+ if (summoned->GetEntry() == NPC_NAZAN)
{
- CAST_AI(boss_nazan::boss_nazanAI, summoned->AI())->VazrudenGUID = VazrudenGUID;
summoned->SetDisableGravity(true);
summoned->SetSpeed(MOVE_FLIGHT, 2.5f);
if (victim)
@@ -396,7 +376,7 @@ class boss_vazruden_the_herald : public CreatureScript
sentryDown = true;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
switch (phase)
{
@@ -440,7 +420,7 @@ class boss_vazruden_the_herald : public CreatureScript
}
else if (!lootSpawned)
{
- me->SummonGameObject(DUNGEON_MODE(ENTRY_REINFORCED_FEL_IRON_CHEST, ENTRY_REINFORCED_FEL_IRON_CHEST_H), VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 0, 0, 0, 0, 0, 0);
+ me->SummonGameObject(DUNGEON_MODE(GO_FEL_IRON_CHEST_NORMAL, GO_FEL_IRON_CHECT_HEROIC), VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 0, 0, 0, 0, 0, 0);
me->SetLootRecipient(NULL); // don't think this is necessary..
//me->Kill(me);
lootSpawned = true;
@@ -452,9 +432,19 @@ class boss_vazruden_the_herald : public CreatureScript
break;
}
}
+
+ private:
+ uint32 phase;
+ uint32 waypoint;
+ uint32 check;
+ bool sentryDown;
+ uint64 NazanGUID;
+ uint64 VazrudenGUID;
+ bool summoned;
+ bool lootSpawned;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_vazruden_the_heraldAI(creature);
}
@@ -463,31 +453,26 @@ class boss_vazruden_the_herald : public CreatureScript
class npc_hellfire_sentry : public CreatureScript
{
public:
+ npc_hellfire_sentry() : CreatureScript("npc_hellfire_sentry") { }
- npc_hellfire_sentry()
- : CreatureScript("npc_hellfire_sentry")
- {
- }
struct npc_hellfire_sentryAI : public ScriptedAI
{
npc_hellfire_sentryAI(Creature* creature) : ScriptedAI(creature) {}
- uint32 KidneyShot_Timer;
-
- void Reset()
+ void Reset() OVERRIDE
{
KidneyShot_Timer = urand(3000, 7000);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void JustDied(Unit* killer)
+ void JustDied(Unit* killer) OVERRIDE
{
- if (Creature* herald = me->FindNearestCreature(ENTRY_VAZRUDEN_HERALD, 150))
+ if (Creature* herald = me->FindNearestCreature(NPC_VAZRUDEN_HERALD, 150))
CAST_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(killer);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -503,8 +488,12 @@ class npc_hellfire_sentry : public CreatureScript
DoMeleeAttackIfReady();
}
+
+ private:
+ uint32 KidneyShot_Timer;
};
- CreatureAI* GetAI(Creature* creature) const
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_hellfire_sentryAI(creature);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
index afde225407d..493630a7650 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
@@ -25,8 +25,9 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "hellfire_ramparts.h"
-enum eSays
+enum Says
{
SAY_TAUNT = 0,
SAY_HEAL = 1,
@@ -36,7 +37,7 @@ enum eSays
SAY_DIE = 5
};
-enum eSpells
+enum Spells
{
SPELL_MORTAL_WOUND = 30641,
H_SPELL_MORTAL_WOUND = 36814,
@@ -44,44 +45,40 @@ enum eSpells
SPELL_RETALIATION = 22857
};
+enum Events
+{
+ EVENT_MORTAL_WOUND = 1,
+ EVENT_SURGE = 2,
+ EVENT_RETALIATION = 3
+};
+
class boss_watchkeeper_gargolmar : public CreatureScript
{
public:
+ boss_watchkeeper_gargolmar() : CreatureScript("boss_watchkeeper_gargolmar") { }
- boss_watchkeeper_gargolmar()
- : CreatureScript("boss_watchkeeper_gargolmar")
+ struct boss_watchkeeper_gargolmarAI : public BossAI
{
- }
+ boss_watchkeeper_gargolmarAI(Creature* creature) : BossAI(creature, DATA_WATCHKEEPER_GARGOLMAR) { }
- struct boss_watchkeeper_gargolmarAI : public ScriptedAI
- {
- boss_watchkeeper_gargolmarAI(Creature* creature) : ScriptedAI(creature)
+ void Reset() OVERRIDE
{
+ hasTaunted = false;
+ yelledForHeal = false;
+ retaliation = false;
+ _Reset();
}
- uint32 Surge_Timer;
- uint32 MortalWound_Timer;
- uint32 Retaliation_Timer;
-
- bool HasTaunted;
- bool YelledForHeal;
-
- void Reset()
- {
- Surge_Timer = 5000;
- MortalWound_Timer = 4000;
- Retaliation_Timer = 0;
-
- HasTaunted = false;
- YelledForHeal = false;
- }
-
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
+ events.ScheduleEvent(EVENT_MORTAL_WOUND, 5000);
+ events.ScheduleEvent(EVENT_SURGE, 4000);
+ _EnterCombat();
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!me->GetVictim() && me->CanCreatureAttack(who))
{
@@ -94,74 +91,83 @@ class boss_watchkeeper_gargolmar : public CreatureScript
//who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
AttackStart(who);
}
- else if (!HasTaunted && me->IsWithinDistInMap(who, 60.0f))
+ else if (!hasTaunted && me->IsWithinDistInMap(who, 60.0f))
{
Talk(SAY_TAUNT);
- HasTaunted = true;
+ hasTaunted = true;
}
}
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DIE);
+ _JustDied();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
- if (MortalWound_Timer <= diff)
- {
- DoCastVictim(SPELL_MORTAL_WOUND);
- MortalWound_Timer = 5000+rand()%8000;
- }
- else
- MortalWound_Timer -= diff;
+ events.Update(diff);
- if (Surge_Timer <= diff)
+ while (uint32 eventId = events.ExecuteEvent())
{
- Talk(SAY_SURGE);
-
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SURGE);
-
- Surge_Timer = 5000+rand()%8000;
+ switch (eventId)
+ {
+ case EVENT_MORTAL_WOUND:
+ DoCastVictim(SPELL_MORTAL_WOUND);
+ events.ScheduleEvent(EVENT_MORTAL_WOUND, urand (5000, 13000));
+ break;
+ case EVENT_SURGE:
+ Talk(SAY_SURGE);
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_SURGE);
+ events.ScheduleEvent(EVENT_SURGE, urand (5000, 13000));
+ break;
+ case EVENT_RETALIATION:
+ DoCast(me, SPELL_RETALIATION);
+ events.ScheduleEvent(EVENT_RETALIATION, 30000);
+ break;
+ default:
+ break;
+ }
}
- else
- Surge_Timer -= diff;
- if (HealthBelowPct(20))
+ if (!retaliation)
{
- if (Retaliation_Timer <= diff)
+ if (HealthBelowPct(20))
{
- DoCast(me, SPELL_RETALIATION);
- Retaliation_Timer = 30000;
+ events.ScheduleEvent(EVENT_RETALIATION, 1000);
+ retaliation = true;
}
- else
- Retaliation_Timer -= diff;
}
- if (!YelledForHeal)
+ if (!yelledForHeal)
{
if (HealthBelowPct(40))
{
Talk(SAY_HEAL);
- YelledForHeal = true;
+ yelledForHeal = true;
}
}
DoMeleeAttackIfReady();
}
+
+ private:
+ bool hasTaunted;
+ bool yelledForHeal;
+ bool retaliation;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_watchkeeper_gargolmarAI(creature);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
index b67041e93f2..880640659b0 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/hellfire_ramparts.h
@@ -19,12 +19,29 @@
#ifndef DEF_RAMPARTS_H
#define DEF_RAMPARTS_H
-#define MAX_ENCOUNTER 2
+uint32 const EncounterCount = 4;
-enum eTypes
+enum DataTypes
{
- TYPE_VAZRUDEN = 1,
- TYPE_NAZAN = 2
+ DATA_WATCHKEEPER_GARGOLMAR = 0,
+ DATA_OMOR_THE_UNSCARRED = 1,
+ DATA_VAZRUDEN = 2,
+ DATA_NAZAN = 3
+};
+
+enum CreatureIds
+{
+ NPC_HELLFIRE_SENTRY = 17517,
+ NPC_VAZRUDEN_HERALD = 17307,
+ NPC_VAZRUDEN = 17537,
+ NPC_NAZAN = 17536,
+ NPC_LIQUID_FIRE = 22515
+};
+
+enum GameobjectIds
+{
+ GO_FEL_IRON_CHEST_NORMAL = 185168,
+ GO_FEL_IRON_CHECT_HEROIC = 185169
};
#endif
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
index b1d780c18ca..12458243286 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp
@@ -30,65 +30,94 @@ EndScriptData */
class instance_ramparts : public InstanceMapScript
{
public:
- instance_ramparts()
- : InstanceMapScript("instance_ramparts", 543)
- {
- }
+ instance_ramparts() : InstanceMapScript("instance_ramparts", 543) { }
struct instance_ramparts_InstanceMapScript : public InstanceScript
{
instance_ramparts_InstanceMapScript(Map* map) : InstanceScript(map) {}
- uint32 m_auiEncounter[MAX_ENCOUNTER];
- uint64 m_uiChestNGUID;
- uint64 m_uiChestHGUID;
- bool spawned;
-
void Initialize()
{
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
-
- m_uiChestNGUID = 0;
- m_uiChestHGUID = 0;
+ SetBossNumber(EncounterCount);
+ felIronChestGUID = 0;
}
void OnGameObjectCreate(GameObject* go)
{
switch (go->GetEntry())
{
- case 185168:
- m_uiChestNGUID = go->GetGUID();
- break;
- case 185169:
- m_uiChestHGUID = go->GetGUID();
+ case GO_FEL_IRON_CHEST_NORMAL:
+ case GO_FEL_IRON_CHECT_HEROIC:
+ felIronChestGUID = go->GetGUID();
break;
}
}
- void SetData(uint32 uiType, uint32 uiData)
+ bool SetBossState(uint32 type, EncounterState state)
{
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Ramparts: SetData received for type %u with data %u", uiType, uiData);
+ if (!InstanceScript::SetBossState(type, state))
+ return false;
- switch (uiType)
+ switch (type)
{
- case TYPE_VAZRUDEN:
- if (uiData == DONE && m_auiEncounter[1] == DONE && !spawned)
- {
- DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS);
- spawned = true;
- }
- m_auiEncounter[0] = uiData;
- break;
- case TYPE_NAZAN:
- if (uiData == DONE && m_auiEncounter[0] == DONE && !spawned)
+ case DATA_VAZRUDEN:
+ case DATA_NAZAN:
+ if (GetBossState(DATA_VAZRUDEN) == DONE && GetBossState(DATA_NAZAN) == DONE && !spawned)
{
- DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILLISECONDS);
+ DoRespawnGameObject(felIronChestGUID, HOUR*IN_MILLISECONDS);
spawned = true;
}
- m_auiEncounter[1] = uiData;
break;
}
+ return true;
+ }
+
+ std::string GetSaveData()
+ {
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << "H R " << GetBossSaveData();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
}
+
+ void Load(const char* strIn)
+ {
+ if (!strIn)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
+
+ OUT_LOAD_INST_DATA(strIn);
+
+ char dataHead1, dataHead2;
+
+ std::istringstream loadStream(strIn);
+ loadStream >> dataHead1 >> dataHead2;
+
+ if (dataHead1 == 'H' && dataHead2 == 'R')
+ {
+ for (uint8 i = 0; i < EncounterCount; ++i)
+ {
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetBossState(i, EncounterState(tmpState));
+ }
+ }
+ else
+ OUT_LOAD_INST_DATA_FAIL;
+
+ OUT_LOAD_INST_DATA_COMPLETE;
+ }
+
+ protected:
+ uint64 felIronChestGUID;
+ bool spawned;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index 8ad34033e5c..f99bb4ade85 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -29,7 +29,7 @@ EndScriptData */
#include "Player.h"
#include "SpellInfo.h"
-enum eSays
+enum Yells
{
SAY_TAUNT = 0,
SAY_FREED = 1,
@@ -40,14 +40,14 @@ enum eSays
SAY_DEATH = 6
};
-enum eEmotes
+enum Emotes
{
EMOTE_BERSERK = 7,
EMOTE_BLASTNOVA = 8,
EMOTE_BEGIN = 9
};
-enum eCreatures
+enum Creatures
{
NPC_MAGTHERIDON = 17257,
NPC_ROOM = 17516,
@@ -55,7 +55,7 @@ enum eCreatures
NPC_ABYSSAL = 17454,
};
-enum eSpells
+enum Spells
{
SPELL_BLASTNOVA = 30616,
SPELL_CLEAVE = 30619,
@@ -108,12 +108,12 @@ class npc_abyssal : public CreatureScript
uint32 Despawn_Timer;
uint32 trigger;
- void Reset()
+ void Reset() OVERRIDE
{
FireBlast_Timer = 6000;
}
- void SpellHit(Unit*, const SpellInfo* spell)
+ void SpellHit(Unit*, const SpellInfo* spell) OVERRIDE
{
if (trigger == 2 && spell->Id == SPELL_BLAZE_TARGET)
{
@@ -136,22 +136,23 @@ class npc_abyssal : public CreatureScript
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoZoneInCombat();
}
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (!trigger)
ScriptedAI::AttackStart(who);
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!trigger)
ScriptedAI::MoveInLineOfSight(who);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (trigger)
{
@@ -187,7 +188,7 @@ class npc_abyssal : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_abyssalAI(creature);
}
@@ -226,7 +227,7 @@ class boss_magtheridon : public CreatureScript
bool Phase3;
bool NeedCheckCube;
- void Reset()
+ void Reset() OVERRIDE
{
Berserk_Timer = 1320000;
Quake_Timer = 40000;
@@ -246,7 +247,7 @@ class boss_magtheridon : public CreatureScript
DoCast(me, SPELL_SHADOW_CAGE_C, true);
}
- void JustReachedHome()
+ void JustReachedHome() OVERRIDE
{
if (instance)
{
@@ -306,12 +307,12 @@ class boss_magtheridon : public CreatureScript
NeedCheckCube = false;
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_PLAYER_KILLED);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_MAGTHERIDON_EVENT, DONE);
@@ -319,15 +320,16 @@ class boss_magtheridon : public CreatureScript
Talk(SAY_DEATH);
}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (!me->HasUnitState(UNIT_STATE_STUNNED))
ScriptedAI::AttackStart(who);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_MAGTHERIDON_EVENT, IN_PROGRESS);
@@ -339,7 +341,7 @@ class boss_magtheridon : public CreatureScript
Talk(SAY_FREED);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!me->IsInCombat())
{
@@ -453,7 +455,7 @@ class boss_magtheridon : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_magtheridonAI(creature);
}
@@ -484,7 +486,7 @@ class npc_hellfire_channeler : public CreatureScript
uint32 Check_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
ShadowBoltVolley_Timer = urand(8000, 10000);
DarkMending_Timer = 10000;
@@ -494,7 +496,7 @@ class npc_hellfire_channeler : public CreatureScript
Check_Timer = 5000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_CHANNELER_EVENT, IN_PROGRESS);
@@ -503,7 +505,7 @@ class npc_hellfire_channeler : public CreatureScript
DoZoneInCombat();
}
- void JustReachedHome()
+ void JustReachedHome() OVERRIDE
{
if (instance)
instance->SetData(DATA_CHANNELER_EVENT, NOT_STARTED);
@@ -511,24 +513,24 @@ class npc_hellfire_channeler : public CreatureScript
DoCast(me, SPELL_SHADOW_GRASP_C, false);
}
- void JustSummoned(Creature* summon)
+ void JustSummoned(Creature* summon) OVERRIDE
{
summon->AI()->AttackStart(me->GetVictim());
}
- void DamageTaken(Unit*, uint32 &damage)
+ void DamageTaken(Unit*, uint32 &damage) OVERRIDE
{
if (damage >= me->GetHealth())
DoCast(me, SPELL_SOUL_TRANSFER, true);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_CHANNELER_EVENT, DONE);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -572,7 +574,7 @@ class npc_hellfire_channeler : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_hellfire_channelerAI(creature);
}
@@ -586,7 +588,7 @@ public:
{
}
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
InstanceScript* instance = go->GetInstanceScript();
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
index 6d65e8ebc43..efca48505a8 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp
@@ -28,7 +28,7 @@ EndScriptData */
#include "InstanceScript.h"
#include "magtheridons_lair.h"
-enum eSpells
+enum Spells
{
SPELL_SOUL_TRANSFER = 30531, // core bug, does not support target 7
SPELL_BLAZE_TARGET = 30541, // core bug, does not support target 7
@@ -123,7 +123,7 @@ class instance_magtheridons_lair : public InstanceMapScript
}
}
- uint64 GetData64(uint32 type) const
+ uint64 GetData64(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -133,7 +133,7 @@ class instance_magtheridons_lair : public InstanceMapScript
return 0;
}
- void SetData(uint32 type, uint32 data)
+ void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -211,7 +211,7 @@ class instance_magtheridons_lair : public InstanceMapScript
}
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
if (type == DATA_MAGTHERIDON_EVENT)
return m_auiEncounter[0];
@@ -254,7 +254,7 @@ class instance_magtheridons_lair : public InstanceMapScript
}
};
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_magtheridons_lair_InstanceMapScript(map);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
index 9a4e4613d59..f67b8ff3256 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h
@@ -19,10 +19,14 @@
#ifndef DEF_MAGTHERIDONS_LAIR_H
#define DEF_MAGTHERIDONS_LAIR_H
-#define DATA_MAGTHERIDON_EVENT 1
-#define DATA_MAGTHERIDON 3
-#define DATA_CHANNELER_EVENT 2
-#define DATA_COLLAPSE 6
-#define DATA_CHANNELER 9
+enum DataTypes
+{
+ DATA_MAGTHERIDON_EVENT = 1,
+ DATA_MAGTHERIDON = 3,
+ DATA_CHANNELER_EVENT = 2,
+ DATA_COLLAPSE = 6,
+ DATA_CHANNELER = 9
+};
+
#endif
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index b3408ed6c49..1d50be94bdf 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -33,7 +33,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "shattered_halls.h"
-enum eSays
+enum Says
{
SAY_INTRO = 0,
SAY_PEON_ATTACKED = 1,
@@ -44,9 +44,9 @@ enum eSays
SAY_DIE = 6
};
-enum eSpells
+enum Spells
{
- SPELL_DEATH_COIL = 30500,
+ SPELL_DEATH_COIL = 30500, // 30741 heroic
SPELL_DARK_SPIN = 30502, // core bug spell attack caster :D
SPELL_SHADOW_FISSURE = 30496, // Summon the ShadowFissure NPC
SPELL_SHADOW_CLEAVE = 30495,
@@ -54,42 +54,38 @@ enum eSpells
SPELL_HEMORRHAGE = 30478,
SPELL_CONSUMPTION = 30497,
SPELL_TEMPORARY_VISUAL = 39312, // this is wrong, a temporary solution. spell consumption already has the purple visual, but doesn't display as it should
+
+ SPELL_SHADOW_SEAR = 30735 // cast on entry 17083 which then makes sound 1343
+ // 30948 cast on self by 17687
};
-class boss_grand_warlock_nethekurse : public CreatureScript
+enum SetData
{
- public:
-
- boss_grand_warlock_nethekurse()
- : CreatureScript("boss_grand_warlock_nethekurse")
- {
- }
-
- struct boss_grand_warlock_nethekurseAI : public ScriptedAI
- {
- boss_grand_warlock_nethekurseAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
+ SETDATA_DATA = 1,
+ SETDATA_PEON_AGGRO = 1,
+ SETDATA_PEON_DEATH = 2
+};
- InstanceScript* instance;
+enum Events
+{
+ // Fel Orc Convert
+ EVENT_HEMORRHAGE = 1
+};
- bool IntroOnce;
- bool IsIntroEvent;
- bool IsMainEvent;
- bool SpinOnce;
- //bool HasTaunted;
- bool Phase;
+// ########################################################
+// Grand Warlock Nethekurse
+// ########################################################
- uint32 PeonEngagedCount;
- uint32 PeonKilledCount;
+class boss_grand_warlock_nethekurse : public CreatureScript
+{
+ public:
+ boss_grand_warlock_nethekurse() : CreatureScript("boss_grand_warlock_nethekurse") { }
- uint32 IntroEvent_Timer;
- uint32 DeathCoil_Timer;
- uint32 ShadowFissure_Timer;
- uint32 Cleave_Timer;
+ struct boss_grand_warlock_nethekurseAI : public BossAI
+ {
+ boss_grand_warlock_nethekurseAI(Creature* creature) : BossAI(creature, DATA_NETHEKURSE) { }
- void Reset()
+ void Reset() OVERRIDE
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -103,34 +99,50 @@ class boss_grand_warlock_nethekurse : public CreatureScript
PeonEngagedCount = 0;
PeonKilledCount = 0;
- IntroEvent_Timer = 90000; //how long before getting bored and kills his minions?
+ IntroEvent_Timer = 90000; // how long before getting bored and kills his minions?
DeathCoil_Timer = 20000;
ShadowFissure_Timer = 8000;
Cleave_Timer = 5000;
}
- void DoYellForPeonAggro()
+ void JustDied(Unit* /*killer*/)
{
- if (PeonEngagedCount >= 4)
- return;
+ Talk(SAY_DIE);
- Talk(SAY_PEON_ATTACKED);
- ++PeonEngagedCount;
+ if (instance)
+ instance->SetBossState(DATA_NETHEKURSE, DONE);
}
- void DoYellForPeonDeath()
+ void SetData(uint32 data, uint32 value)
{
- if (PeonKilledCount >= 4)
+ if (data != SETDATA_DATA)
return;
- Talk(SAY_PEON_DIES);
- ++PeonKilledCount;
-
- if (PeonKilledCount == 4)
+ switch (value)
{
- IsIntroEvent = false;
- IsMainEvent = true;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ case SETDATA_PEON_AGGRO:
+ if (PeonEngagedCount >= 4)
+ return;
+
+ Talk(SAY_PEON_ATTACKED);
+ ++PeonEngagedCount;
+ break;
+ case SETDATA_PEON_DEATH:
+ if (PeonKilledCount >= 4)
+ return;
+
+ Talk(SAY_PEON_DIES);
+ ++PeonKilledCount;
+
+ if (PeonKilledCount == 4)
+ {
+ IsIntroEvent = false;
+ IsMainEvent = true;
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ }
+ break;
+ default:
+ break;
}
}
@@ -146,7 +158,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (IsIntroEvent || !IsMainEvent)
return;
@@ -160,9 +172,10 @@ class boss_grand_warlock_nethekurse : public CreatureScript
}
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
- if (!IntroOnce && me->IsWithinDistInMap(who, 50.0f))
+ if (!IntroOnce && me->IsWithinDistInMap(who, 30.0f))
{
if (who->GetTypeId() != TYPEID_PLAYER)
return;
@@ -172,7 +185,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
IsIntroEvent = true;
if (instance)
- instance->SetData(TYPE_NETHEKURSE, IN_PROGRESS);
+ instance->SetBossState(DATA_NETHEKURSE, IN_PROGRESS);
}
if (IsIntroEvent || !IsMainEvent)
@@ -181,12 +194,12 @@ class boss_grand_warlock_nethekurse : public CreatureScript
ScriptedAI::MoveInLineOfSight(who);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
summoned->setFaction(16);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -197,30 +210,19 @@ class boss_grand_warlock_nethekurse : public CreatureScript
summoned->CastSpell(summoned, SPELL_CONSUMPTION, false, 0, 0, me->GetGUID());
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
- {
- Talk(SAY_DIE);
-
- if (!instance)
- return;
-
- instance->SetData(TYPE_NETHEKURSE, DONE);
- instance->HandleGameObject(instance->GetData64(DATA_NETHEKURSE_DOOR), true);
- }
-
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (IsIntroEvent)
{
if (!instance)
return;
- if (instance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS)
+ if (instance->GetBossState(DATA_NETHEKURSE) == IN_PROGRESS)
{
if (IntroEvent_Timer <= diff)
DoTauntPeons();
@@ -277,22 +279,36 @@ class boss_grand_warlock_nethekurse : public CreatureScript
DoMeleeAttackIfReady();
}
}
+
+ private:
+ uint32 PeonEngagedCount;
+ uint32 PeonKilledCount;
+ uint32 IntroEvent_Timer;
+ uint32 DeathCoil_Timer;
+ uint32 ShadowFissure_Timer;
+ uint32 Cleave_Timer;
+ bool IntroOnce;
+ bool IsIntroEvent;
+ bool IsMainEvent;
+ bool SpinOnce;
+ //bool HasTaunted;
+ bool Phase;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_grand_warlock_nethekurseAI(creature);
}
};
+// ########################################################
+// Fel Orc Convert
+// ########################################################
+
class npc_fel_orc_convert : public CreatureScript
{
public:
-
- npc_fel_orc_convert()
- : CreatureScript("npc_fel_orc_convert")
- {
- }
+ npc_fel_orc_convert() : CreatureScript("npc_fel_orc_convert") { }
struct npc_fel_orc_convertAI : public ScriptedAI
{
@@ -301,95 +317,84 @@ class npc_fel_orc_convert : public CreatureScript
instance = creature->GetInstanceScript();
}
- InstanceScript* instance;
- uint32 Hemorrhage_Timer;
-
- void Reset()
+ void Reset() OVERRIDE
{
me->SetNoCallAssistance(true); //we don't want any assistance (WE R HEROZ!)
- Hemorrhage_Timer = 3000;
}
- void MoveInLineOfSight(Unit* /*who*/)
- {
- }
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
- if (instance)
- {
- if (instance->GetData64(DATA_NETHEKURSE))
- {
- Creature* pKurse = Unit::GetCreature(*me, instance->GetData64(DATA_NETHEKURSE));
- if (pKurse && me->IsWithinDist(pKurse, 45.0f))
- {
- CAST_AI(boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, pKurse->AI())->DoYellForPeonAggro();
+ events.ScheduleEvent(EVENT_HEMORRHAGE, 3000);
- if (instance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS)
- return;
- else
- instance->SetData(TYPE_NETHEKURSE, IN_PROGRESS);
- }
- }
- }
+ if (instance)
+ if (Creature* Kurse = Unit::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE)))
+ if (Kurse && me->IsWithinDist(Kurse, 45.0f))
+ Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_AGGRO);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
{
- if (instance->GetData(TYPE_NETHEKURSE) != IN_PROGRESS)
+ if (instance->GetBossState(DATA_NETHEKURSE) != IN_PROGRESS)
return;
- if (instance->GetData64(DATA_NETHEKURSE))
- if (Creature* pKurse = Unit::GetCreature(*me, instance->GetData64(DATA_NETHEKURSE)))
- CAST_AI(boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, pKurse->AI())->DoYellForPeonDeath();
+ if (instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE))
+ if (Creature* Kurse = Unit::GetCreature(*me, instance->GetData64(NPC_GRAND_WARLOCK_NETHEKURSE)))
+ Kurse->AI()->SetData(SETDATA_DATA, SETDATA_PEON_DEATH);
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
- if (Hemorrhage_Timer <= diff)
+ events.Update(diff);
+
+ if (events.ExecuteEvent() == EVENT_HEMORRHAGE)
{
DoCastVictim(SPELL_HEMORRHAGE);
- Hemorrhage_Timer = 15000;
- } else Hemorrhage_Timer -= diff;
+ events.ScheduleEvent(EVENT_HEMORRHAGE, 15000);
+ }
DoMeleeAttackIfReady();
}
+
+ private:
+ InstanceScript* instance;
+ EventMap events;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fel_orc_convertAI(creature);
}
};
-//NOTE: this Creature are also summoned by other spells, for different creatures
+// ########################################################
+// Lesser Shadow Fissure
+// ########################################################
+
class npc_lesser_shadow_fissure : public CreatureScript
{
public:
-
- npc_lesser_shadow_fissure()
- : CreatureScript("npc_lesser_shadow_fissure")
- {
- }
+ npc_lesser_shadow_fissure() : CreatureScript("npc_lesser_shadow_fissure") { }
struct npc_lesser_shadow_fissureAI : public ScriptedAI
{
npc_lesser_shadow_fissureAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() { }
- void MoveInLineOfSight(Unit* /*who*/) {}
- void AttackStart(Unit* /*who*/) {}
- void EnterCombat(Unit* /*who*/) {}
+ void Reset() OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_lesser_shadow_fissureAI (creature);
+ return new npc_lesser_shadow_fissureAI(creature);
}
};
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
index 82ee361b657..9c32e459b9a 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
@@ -32,23 +32,41 @@ EndContentData */
#include "ScriptedCreature.h"
#include "shattered_halls.h"
-enum eEnums
+enum Yells
{
YELL_DIE_L = 0,
YELL_DIE_R = 1,
EMOTE_ENRAGE = 2,
+};
+enum Spells
+{
SPELL_BLAST_WAVE = 30600,
SPELL_FEAR = 30584,
SPELL_THUNDERCLAP = 30633,
SPELL_BURNING_MAUL = 30598,
H_SPELL_BURNING_MAUL = 36056,
+};
+enum Creatures
+{
NPC_LEFT_HEAD = 19523,
NPC_RIGHT_HEAD = 19524
};
+enum SetData
+{
+ SETDATA_DATA = 1,
+ SETDATA_YELL = 1
+};
+
+enum Events
+{
+ // Omrogg Heads
+ EVENT_DEATH_YELL = 1
+};
+
struct Yell
{
int32 id;
@@ -61,6 +79,7 @@ static Yell GoCombat[]=
{1, NPC_LEFT_HEAD},
{2, NPC_LEFT_HEAD},
};
+
static Yell GoCombatDelay[]=
{
{0, NPC_RIGHT_HEAD},
@@ -75,6 +94,7 @@ static Yell Threat[]=
{4, NPC_LEFT_HEAD},
{5, NPC_LEFT_HEAD},
};
+
static Yell ThreatDelay1[]=
{
{4, NPC_RIGHT_HEAD},
@@ -82,6 +102,7 @@ static Yell ThreatDelay1[]=
{5, NPC_RIGHT_HEAD},
{6, NPC_RIGHT_HEAD},
};
+
static Yell ThreatDelay2[]=
{
{7, NPC_LEFT_HEAD},
@@ -102,104 +123,34 @@ static Yell KillingDelay[]=
{11, NPC_LEFT_HEAD},
};
-class npc_omrogg_heads : public CreatureScript
-{
- public:
-
- npc_omrogg_heads()
- : CreatureScript("npc_omrogg_heads")
- {
- }
-
- struct npc_omrogg_headsAI : public ScriptedAI
- {
- npc_omrogg_headsAI(Creature* creature) : ScriptedAI(creature) {}
-
- bool DeathYell;
- uint32 Death_Timer;
-
- void Reset()
- {
- Death_Timer = 4000;
- DeathYell = false;
- }
- void EnterCombat(Unit* /*who*/) {}
-
- void DoDeathYell()
- {
- DeathYell = true;
- }
-
- void UpdateAI(uint32 diff)
- {
- if (!DeathYell)
- return;
-
- if (Death_Timer <= diff)
- {
- Talk(YELL_DIE_R);
- Death_Timer = false;
- me->setDeathState(JUST_DIED);
- } else Death_Timer -= diff;
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_omrogg_headsAI(creature);
- }
-};
+// ########################################################
+// Warbringer_Omrogg
+// ########################################################
class boss_warbringer_omrogg : public CreatureScript
{
public:
+ boss_warbringer_omrogg() : CreatureScript("boss_warbringer_omrogg") { }
- boss_warbringer_omrogg()
- : CreatureScript("boss_warbringer_omrogg")
+ struct boss_warbringer_omroggAI : public BossAI
{
- }
-
- struct boss_warbringer_omroggAI : public ScriptedAI
- {
- boss_warbringer_omroggAI(Creature* creature) : ScriptedAI(creature)
+ boss_warbringer_omroggAI(Creature* creature) : BossAI(creature, DATA_OMROGG)
{
LeftHeadGUID = 0;
RightHeadGUID = 0;
- instance = creature->GetInstanceScript();
}
- InstanceScript* instance;
-
- uint64 LeftHeadGUID;
- uint64 RightHeadGUID;
- int iaggro;
- int ithreat;
- int ikilling;
-
- bool AggroYell;
- bool ThreatYell;
- bool ThreatYell2;
- bool KillingYell;
-
- uint32 Delay_Timer;
- uint32 BlastWave_Timer;
- uint32 BlastCount;
- uint32 Fear_Timer;
- uint32 BurningMaul_Timer;
- uint32 ThunderClap_Timer;
- uint32 ResetThreat_Timer;
-
- void Reset()
+ void Reset() OVERRIDE
{
- if (Unit* pLeftHead = Unit::GetUnit(*me, LeftHeadGUID))
+ if (Unit* LeftHead = Unit::GetUnit(*me, LeftHeadGUID))
{
- pLeftHead->setDeathState(JUST_DIED);
+ LeftHead->setDeathState(JUST_DIED);
LeftHeadGUID = 0;
}
- if (Unit* pRightHead = Unit::GetUnit(*me, RightHeadGUID))
+ if (Unit* RightHead = Unit::GetUnit(*me, RightHeadGUID))
{
- pRightHead->setDeathState(JUST_DIED);
+ RightHead->setDeathState(JUST_DIED);
RightHeadGUID = 0;
}
@@ -217,20 +168,20 @@ class boss_warbringer_omrogg : public CreatureScript
ResetThreat_Timer = 30000;
if (instance)
- instance->SetData(TYPE_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid.
+ instance->SetData(DATA_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid.
}
void DoYellForThreat()
{
- Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
- Creature* pRightHead = Unit::GetCreature(*me, RightHeadGUID);
+ Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* RightHead = Unit::GetCreature(*me, RightHeadGUID);
- if (!pLeftHead || !pRightHead)
+ if (!LeftHead || !RightHead)
return;
ithreat = rand()%4;
- Creature* source = (pLeftHead->GetEntry() == Threat[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (LeftHead->GetEntry() == Threat[ithreat].creature ? LeftHead : RightHead);
source->AI()->Talk(Threat[ithreat].id);
@@ -238,26 +189,26 @@ class boss_warbringer_omrogg : public CreatureScript
ThreatYell = true;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
me->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
me->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
- if (Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID))
+ if (Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID))
{
iaggro = rand()%3;
- pLeftHead->AI()->Talk(GoCombat[iaggro].id);
+ LeftHead->AI()->Talk(GoCombat[iaggro].id);
Delay_Timer = 3500;
AggroYell = true;
}
if (instance)
- instance->SetData(TYPE_OMROGG, IN_PROGRESS);
+ instance->SetBossState(DATA_OMROGG, IN_PROGRESS);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned->GetEntry() == NPC_LEFT_HEAD)
LeftHeadGUID = summoned->GetGUID();
@@ -270,17 +221,17 @@ class boss_warbringer_omrogg : public CreatureScript
summoned->SetVisible(false);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
- Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
- Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
+ Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* RightHead = Creature::GetCreature(*me, RightHeadGUID);
- if (!pLeftHead || !pRightHead)
+ if (!LeftHead || !RightHead)
return;
ikilling = rand()%2;
- Creature* source = (pLeftHead->GetEntry() == Killing[ikilling].creature ? pLeftHead : pRightHead);
+ Creature* source = (LeftHead->GetEntry() == Killing[ikilling].creature ? LeftHead : RightHead);
switch (ikilling)
{
@@ -296,43 +247,43 @@ class boss_warbringer_omrogg : public CreatureScript
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
- Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
- Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
+ Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* RightHead = Creature::GetCreature(*me, RightHeadGUID);
- if (!pLeftHead || !pRightHead)
+ if (!LeftHead || !RightHead)
return;
- pLeftHead->AI()->Talk(YELL_DIE_L);
+ LeftHead->AI()->Talk(YELL_DIE_L);
- CAST_AI(npc_omrogg_heads::npc_omrogg_headsAI, pRightHead->ToCreature()->AI())->DoDeathYell();
+ RightHead->AI()->SetData(SETDATA_DATA, SETDATA_YELL);
if (instance)
- instance->SetData(TYPE_OMROGG, DONE);
+ instance->SetBossState(DATA_OMROGG, DONE);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (Delay_Timer <= diff)
{
Delay_Timer = 3500;
- Creature* pLeftHead = Creature::GetCreature(*me, LeftHeadGUID);
- Creature* pRightHead = Creature::GetCreature(*me, RightHeadGUID);
+ Creature* LeftHead = Creature::GetCreature(*me, LeftHeadGUID);
+ Creature* RightHead = Creature::GetCreature(*me, RightHeadGUID);
- if (!pLeftHead || !pRightHead)
+ if (!LeftHead || !RightHead)
return;
if (AggroYell)
{
- pRightHead->AI()->Talk(GoCombatDelay[iaggro].id);
+ RightHead->AI()->Talk(GoCombatDelay[iaggro].id);
AggroYell = false;
}
if (ThreatYell2)
{
- Creature* source = (pLeftHead->GetEntry() == ThreatDelay2[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (LeftHead->GetEntry() == ThreatDelay2[ithreat].creature ? LeftHead : RightHead);
source->AI()->Talk(ThreatDelay2[ithreat].id);
ThreatYell2 = false;
@@ -340,7 +291,7 @@ class boss_warbringer_omrogg : public CreatureScript
if (ThreatYell)
{
- Creature* source = (pLeftHead->GetEntry() == ThreatDelay1[ithreat].creature ? pLeftHead : pRightHead);
+ Creature* source = (LeftHead->GetEntry() == ThreatDelay1[ithreat].creature ? LeftHead : RightHead);
source->AI()->Talk(ThreatDelay1[ithreat].id);
ThreatYell = false;
@@ -349,7 +300,7 @@ class boss_warbringer_omrogg : public CreatureScript
if (KillingYell)
{
- Creature* source = (pLeftHead->GetEntry() == KillingDelay[ikilling].creature ? pLeftHead : pRightHead);
+ Creature* source = (LeftHead->GetEntry() == KillingDelay[ikilling].creature ? LeftHead : RightHead);
source->AI()->Talk(KillingDelay[ikilling].id);
KillingYell = false;
@@ -413,13 +364,84 @@ class boss_warbringer_omrogg : public CreatureScript
DoMeleeAttackIfReady();
}
+
+ private:
+ uint64 LeftHeadGUID;
+ uint64 RightHeadGUID;
+ int iaggro;
+ int ithreat;
+ int ikilling;
+
+ bool AggroYell;
+ bool ThreatYell;
+ bool ThreatYell2;
+ bool KillingYell;
+
+ uint32 Delay_Timer;
+ uint32 BlastWave_Timer;
+ uint32 BlastCount;
+ uint32 Fear_Timer;
+ uint32 BurningMaul_Timer;
+ uint32 ThunderClap_Timer;
+ uint32 ResetThreat_Timer;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_warbringer_omroggAI (creature);
+ return new boss_warbringer_omroggAI(creature);
}
};
+
+// ########################################################
+// Omrogg Heads
+// ########################################################
+
+class npc_omrogg_heads : public CreatureScript
+{
+ public:
+ npc_omrogg_heads() : CreatureScript("npc_omrogg_heads") { }
+
+ struct npc_omrogg_headsAI : public ScriptedAI
+ {
+ npc_omrogg_headsAI(Creature* creature) : ScriptedAI(creature)
+ {
+ instance = creature->GetInstanceScript();
+ }
+
+ void Reset() OVERRIDE { }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
+
+ void SetData(uint32 data, uint32 value)
+ {
+ if (data == SETDATA_DATA && value == SETDATA_YELL)
+ {
+ events.ScheduleEvent(EVENT_DEATH_YELL, 4000);
+ }
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ events.Update(diff);
+
+ if (events.ExecuteEvent() == EVENT_DEATH_YELL)
+ {
+ Talk(YELL_DIE_R);
+ me->setDeathState(JUST_DIED);
+ }
+ }
+
+ private:
+ InstanceScript* instance;
+ EventMap events;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_omrogg_headsAI(creature);
+ }
+};
+
void AddSC_boss_warbringer_omrogg()
{
new boss_warbringer_omrogg();
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
index 882cc3a0d3f..87b94deb552 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
@@ -29,66 +29,45 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "shattered_halls.h"
-enum eSays
+enum Says
{
SAY_AGGRO = 0,
SAY_SLAY = 1,
SAY_DEATH = 2
};
-enum eSpells
+enum Spells
{
- SPELL_BLADE_DANCE = 30739,
- H_SPELL_CHARGE = 25821,
+ SPELL_BLADE_DANCE = 30739,
+ H_SPELL_CHARGE = 25821
};
-enum eCreatures
+enum Creatures
{
NPC_SHATTERED_ASSASSIN = 17695,
NPC_HEARTHEN_GUARD = 17621,
NPC_SHARPSHOOTER_GUARD = 17622,
- NPC_REAVER_GUARD = 17623,
+ NPC_REAVER_GUARD = 17623
};
-#define TARGET_NUM 5
+#define TARGET_NUM 5
-float AssassEntrance[3] = {275.136f, -84.29f, 2.3f}; // y -8
-float AssassExit[3] = {184.233f, -84.29f, 2.3f}; // y -8
-float AddsEntrance[3] = {306.036f, -84.29f, 1.93f};
+float AssassEntrance[3] = { 275.136f, -84.29f, 2.3f }; // y -8
+float AssassExit[3] = { 184.233f, -84.29f, 2.3f }; // y -8
+float AddsEntrance[3] = { 306.036f, -84.29f, 1.93f };
class boss_warchief_kargath_bladefist : public CreatureScript
{
public:
+ boss_warchief_kargath_bladefist() : CreatureScript("boss_warchief_kargath_bladefist") { }
- boss_warchief_kargath_bladefist()
- : CreatureScript("boss_warchief_kargath_bladefist")
+ struct boss_warchief_kargath_bladefistAI : public BossAI
{
- }
+ boss_warchief_kargath_bladefistAI(Creature* creature) : BossAI(creature, DATA_KARGATH) { }
- struct boss_warchief_kargath_bladefistAI : public ScriptedAI
- {
- boss_warchief_kargath_bladefistAI(Creature* creature) : ScriptedAI(creature)
- {
- }
-
- std::vector<uint64> adds;
- std::vector<uint64> assassins;
-
- uint32 Charge_timer;
- uint32 Blade_Dance_Timer;
- uint32 Summon_Assistant_Timer;
- uint32 resetcheck_timer;
- uint32 Wait_Timer;
-
- uint32 Assassins_Timer;
-
- uint32 summoned;
- bool InBlade;
-
- uint32 target_num;
-
- void Reset()
+ void Reset() OVERRIDE
{
removeAdds();
@@ -106,12 +85,21 @@ class boss_warchief_kargath_bladefist : public CreatureScript
resetcheck_timer = 5000;
}
- void EnterCombat(Unit* /*who*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ Talk(SAY_DEATH);
+ removeAdds();
+
+ if (instance)
+ instance->SetBossState(DATA_KARGATH, DONE);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
switch (summoned->GetEntry())
{
@@ -127,7 +115,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
}
}
- void KilledUnit(Unit* victim)
+ void KilledUnit(Unit* victim) OVERRIDE
{
if (victim->GetTypeId() == TYPEID_PLAYER)
{
@@ -135,13 +123,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
}
}
- void JustDied(Unit* /*killer*/)
- {
- Talk(SAY_DEATH);
- removeAdds();
- }
-
- void MovementInform(uint32 type, uint32 id)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (InBlade)
{
@@ -194,7 +176,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
me->SummonCreature(NPC_SHATTERED_ASSASSIN, AssassExit[0], AssassExit[1]-8, AssassExit[2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Return since we have no target
if (!UpdateVictim())
@@ -312,9 +294,22 @@ class boss_warchief_kargath_bladefist : public CreatureScript
else
resetcheck_timer -= diff;
}
+
+ private:
+ std::vector<uint64> adds;
+ std::vector<uint64> assassins;
+ uint32 Charge_timer;
+ uint32 Blade_Dance_Timer;
+ uint32 Summon_Assistant_Timer;
+ uint32 resetcheck_timer;
+ uint32 Wait_Timer;
+ uint32 Assassins_Timer;
+ uint32 summoned;
+ uint32 target_num;
+ bool InBlade;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_warchief_kargath_bladefistAI(creature);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
index 95579aba002..3328d5c900d 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp
@@ -19,7 +19,7 @@
/* ScriptData
SDName: Instance_Shattered_Halls
SD%Complete: 50
-SDComment: currently missing info about door. instance not complete
+SDComment: instance not complete
SDCategory: Hellfire Citadel, Shattered Halls
EndScriptData */
@@ -27,39 +27,37 @@ EndScriptData */
#include "InstanceScript.h"
#include "shattered_halls.h"
-#define MAX_ENCOUNTER 2
-
-#define DOOR_NETHEKURSE 1
-
class instance_shattered_halls : public InstanceMapScript
{
public:
- instance_shattered_halls()
- : InstanceMapScript("instance_shattered_halls", 540)
+ instance_shattered_halls() : InstanceMapScript("instance_shattered_halls", 540) { }
+
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
+ return new instance_shattered_halls_InstanceMapScript(map);
}
+
struct instance_shattered_halls_InstanceMapScript : public InstanceScript
{
- instance_shattered_halls_InstanceMapScript(Map* map) : InstanceScript(map) {}
-
- uint32 m_auiEncounter[MAX_ENCOUNTER];
- uint64 nethekurseGUID;
- uint64 nethekurseDoorGUID;
+ instance_shattered_halls_InstanceMapScript(Map* map) : InstanceScript(map) { }
void Initialize()
{
- memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
-
- nethekurseGUID = 0;
- nethekurseDoorGUID = 0;
+ SetBossNumber(EncounterCount);
+ nethekurseGUID = 0;
+ nethekurseDoor1GUID = 0;
+ nethekurseDoor2GUID = 0;
}
void OnGameObjectCreate(GameObject* go)
{
switch (go->GetEntry())
{
- case DOOR_NETHEKURSE:
- nethekurseDoorGUID = go->GetGUID();
+ case GO_GRAND_WARLOCK_CHAMBER_DOOR_1:
+ nethekurseDoor1GUID = go->GetGUID();
+ break;
+ case GO_GRAND_WARLOCK_CHAMBER_DOOR_2:
+ nethekurseDoor2GUID = go->GetGUID();
break;
}
}
@@ -68,54 +66,102 @@ class instance_shattered_halls : public InstanceMapScript
{
switch (creature->GetEntry())
{
- case 16807:
+ case NPC_GRAND_WARLOCK_NETHEKURSE:
nethekurseGUID = creature->GetGUID();
break;
}
}
- void SetData(uint32 type, uint32 data)
+ bool SetBossState(uint32 type, EncounterState state)
{
+ if (!InstanceScript::SetBossState(type, state))
+ return false;
+
switch (type)
{
- case TYPE_NETHEKURSE:
- m_auiEncounter[0] = data;
+ case DATA_NETHEKURSE:
+ if (state == IN_PROGRESS)
+ {
+ HandleGameObject(nethekurseDoor1GUID, false);
+ HandleGameObject(nethekurseDoor2GUID, false);
+ }
+ else
+ {
+ HandleGameObject(nethekurseDoor1GUID, true);
+ HandleGameObject(nethekurseDoor2GUID, true);
+ }
break;
- case TYPE_OMROGG:
- m_auiEncounter[1] = data;
+ case DATA_OMROGG:
break;
}
+ return true;
}
- uint32 GetData(uint32 type) const
+ uint64 GetData64(uint32 data) const OVERRIDE
{
- switch (type)
+ switch (data)
{
- case TYPE_NETHEKURSE:
- return m_auiEncounter[0];
- case TYPE_OMROGG:
- return m_auiEncounter[1];
+ case NPC_GRAND_WARLOCK_NETHEKURSE:
+ return nethekurseGUID;
+ break;
+ case GO_GRAND_WARLOCK_CHAMBER_DOOR_1:
+ return nethekurseDoor1GUID;
+ break;
+ case GO_GRAND_WARLOCK_CHAMBER_DOOR_2:
+ return nethekurseDoor2GUID;
+ break;
}
return 0;
}
- uint64 GetData64(uint32 data) const
+ std::string GetSaveData()
{
- switch (data)
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << "S H " << GetBossSaveData();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
+ }
+
+ void Load(const char* strIn)
+ {
+ if (!strIn)
{
- case DATA_NETHEKURSE:
- return nethekurseGUID;
- case DATA_NETHEKURSE_DOOR:
- return nethekurseDoorGUID;
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
}
- return 0;
+
+ OUT_LOAD_INST_DATA(strIn);
+
+ char dataHead1, dataHead2;
+
+ std::istringstream loadStream(strIn);
+ loadStream >> dataHead1 >> dataHead2;
+
+ if (dataHead1 == 'S' && dataHead2 == 'H')
+ {
+ for (uint8 i = 0; i < EncounterCount; ++i)
+ {
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetBossState(i, EncounterState(tmpState));
+ }
+ }
+ else
+ OUT_LOAD_INST_DATA_FAIL;
+
+ OUT_LOAD_INST_DATA_COMPLETE;
}
- };
- InstanceScript* GetInstanceScript(InstanceMap* map) const
- {
- return new instance_shattered_halls_InstanceMapScript(map);
- }
+ protected:
+ uint64 nethekurseGUID;
+ uint64 nethekurseDoor1GUID;
+ uint64 nethekurseDoor2GUID;
+ };
};
void AddSC_instance_shattered_halls()
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
index f56f844a49a..888a9cb5010 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.h
@@ -19,10 +19,24 @@
#ifndef DEF_SHATTERED_H
#define DEF_SHATTERED_H
-#define TYPE_NETHEKURSE 1
-#define DATA_NETHEKURSE 2
-#define DATA_NETHEKURSE_DOOR 3
+uint32 const EncounterCount = 3;
-#define TYPE_OMROGG 4
-#endif
+enum DataTypes
+{
+ DATA_NETHEKURSE = 1,
+ DATA_OMROGG = 2,
+ DATA_KARGATH = 3
+};
+
+enum CreatureIds
+{
+ NPC_GRAND_WARLOCK_NETHEKURSE = 16807
+};
+enum GameobjectIds
+{
+ GO_GRAND_WARLOCK_CHAMBER_DOOR_1 = 182539,
+ GO_GRAND_WARLOCK_CHAMBER_DOOR_2 = 182540
+};
+
+#endif
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
index 7de32c4bfbd..389634a50bf 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -28,7 +28,7 @@ EndScriptData */
#include "the_eye.h"
#include "SpellInfo.h"
-enum eSpells
+enum Spells
{
SPELL_FLAME_BUFFET = 34121, // Flame Buffet - every 1, 5 secs in phase 1 if there is no victim in melee range and after Dive Bomb in phase 2 with same conditions
SPELL_FLAME_QUILLS = 34229, // Randomly after changing position in phase after watching tons of movies, set probability 20%
@@ -110,7 +110,7 @@ class boss_alar : public CreatureScript
int8 cur_wp;
- void Reset()
+ void Reset() OVERRIDE
{
if (instance)
instance->SetData(DATA_ALAREVENT, NOT_STARTED);
@@ -137,7 +137,7 @@ class boss_alar : public CreatureScript
me->setActive(false);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_ALAREVENT, IN_PROGRESS);
@@ -147,22 +147,23 @@ class boss_alar : public CreatureScript
me->setActive(true);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance)
instance->SetData(DATA_ALAREVENT, DONE);
}
- void JustSummoned(Creature* summon)
+ void JustSummoned(Creature* summon) OVERRIDE
{
if (summon->GetEntry() == CREATURE_EMBER_OF_ALAR)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
summon->AI()->AttackStart(target);
}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
- void AttackStart(Unit* who)
+
+ void AttackStart(Unit* who) OVERRIDE
{
if (Phase1)
AttackStartNoMove(who);
@@ -170,7 +171,7 @@ class boss_alar : public CreatureScript
ScriptedAI::AttackStart(who);
}
- void DamageTaken(Unit* /*killer*/, uint32 &damage)
+ void DamageTaken(Unit* /*killer*/, uint32 &damage) OVERRIDE
{
if (damage >= me->GetHealth() && Phase1)
{
@@ -192,7 +193,7 @@ class boss_alar : public CreatureScript
}
}
- void SpellHit(Unit*, const SpellInfo* spell)
+ void SpellHit(Unit*, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_DIVE_BOMB_VISUAL)
{
@@ -202,7 +203,7 @@ class boss_alar : public CreatureScript
}
}
- void MovementInform(uint32 type, uint32 /*id*/)
+ void MovementInform(uint32 type, uint32 /*id*/) OVERRIDE
{
if (type == POINT_MOTION_TYPE)
{
@@ -212,7 +213,7 @@ class boss_alar : public CreatureScript
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!me->IsInCombat()) // sometimes IsInCombat but !incombat, faction bug?
return;
@@ -452,7 +453,7 @@ class boss_alar : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_alarAI(creature);
}
@@ -479,20 +480,20 @@ class npc_ember_of_alar : public CreatureScript
InstanceScript* instance;
bool toDie;
- void Reset()
+ void Reset() OVERRIDE
{
toDie = false;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoZoneInCombat();
}
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
me->setDeathState(JUST_DIED);
}
- void DamageTaken(Unit* killer, uint32 &damage)
+ void DamageTaken(Unit* killer, uint32 &damage) OVERRIDE
{
if (damage >= me->GetHealth() && killer != me && !toDie)
{
@@ -515,7 +516,7 @@ class npc_ember_of_alar : public CreatureScript
}
}
- void UpdateAI(uint32 /*diff*/)
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -531,7 +532,7 @@ class npc_ember_of_alar : public CreatureScript
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_ember_of_alarAI(creature);
}
@@ -549,14 +550,15 @@ class npc_flame_patch_alar : public CreatureScript
struct npc_flame_patch_alarAI : public ScriptedAI
{
npc_flame_patch_alarAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() {}
- void EnterCombat(Unit* /*who*/) {}
- void AttackStart(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
- void UpdateAI(uint32 /*diff*/) {}
+ void Reset() OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
+ void UpdateAI(uint32 /*diff*/) OVERRIDE {}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_flame_patch_alarAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index a7f19aad871..597cccda102 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -30,7 +30,7 @@ EndScriptData */
#include "the_eye.h"
-enum eEnums
+enum Yells
{
SAY_AGGRO = 0,
SAY_SUMMON1 = 1,
@@ -38,8 +38,11 @@ enum eEnums
SAY_KILL = 3,
SAY_DEATH = 4,
SAY_VOIDA = 5,
- SAY_VOIDB = 6,
+ SAY_VOIDB = 6
+};
+enum Spells
+{
SPELL_ARCANE_MISSILES = 33031,
SPELL_WRATH_OF_THE_ASTROMANCER = 42783,
SPELL_WRATH_OF_THE_ASTROMANCER_DOT = 42784,
@@ -48,18 +51,28 @@ enum eEnums
SPELL_VOID_BOLT = 39329,
SPELL_SPOTLIGHT = 25824,
+
+ SPELL_SOLARIUM_GREAT_HEAL = 33387,
+ SPELL_SOLARIUM_HOLY_SMITE = 25054,
+ SPELL_SOLARIUM_ARCANE_TORRENT = 33390
+};
+
+enum Creatures
+{
NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT = 18928,
NPC_SOLARIUM_AGENT = 18925,
- NPC_SOLARIUM_PRIEST = 18806,
+ NPC_SOLARIUM_PRIEST = 18806
+};
+enum Models
+{
MODEL_HUMAN = 18239,
- MODEL_VOIDWALKER = 18988,
-
- SPELL_SOLARIUM_GREAT_HEAL = 33387,
- SPELL_SOLARIUM_HOLY_SMITE = 25054,
- SPELL_SOLARIUM_ARCANE_TORRENT = 33390,
+ MODEL_VOIDWALKER = 18988
+};
+enum Misc
+{
WV_ARMOR = 31000
};
@@ -117,7 +130,7 @@ class boss_high_astromancer_solarian : public CreatureScript
bool AppearDelay;
bool BlindingLight;
- void Reset()
+ void Reset() OVERRIDE
{
ArcaneMissiles_Timer = 2000;
m_uiWrathOfTheAstromancer_Timer = 15000;
@@ -145,12 +158,12 @@ class boss_high_astromancer_solarian : public CreatureScript
Summons.DespawnAll();
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
me->SetObjectScale(defaultsize);
me->SetDisplayId(MODEL_HUMAN);
@@ -159,7 +172,7 @@ class boss_high_astromancer_solarian : public CreatureScript
instance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, DONE);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
DoZoneInCombat();
@@ -195,7 +208,7 @@ class boss_high_astromancer_solarian : public CreatureScript
return (z*sqrt(radius*radius - (x - CENTER_X)*(x - CENTER_X)) + CENTER_Y);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -404,9 +417,9 @@ class boss_high_astromancer_solarian : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_high_astromancer_solarianAI (creature);
+ return new boss_high_astromancer_solarianAI(creature);
}
};
@@ -432,18 +445,18 @@ class npc_solarium_priest : public CreatureScript
uint32 holysmiteTimer;
uint32 aoesilenceTimer;
- void Reset()
+ void Reset() OVERRIDE
{
healTimer = 9000;
holysmiteTimer = 1;
aoesilenceTimer = 15000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -491,7 +504,7 @@ class npc_solarium_priest : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_solarium_priestAI(creature);
}
@@ -506,7 +519,7 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader
{
PrepareAuraScript(spell_astromancer_wrath_of_the_astromancer_AuraScript);
- bool Validate(SpellInfo const* /*SpellEntry*/)
+ bool Validate(SpellInfo const* /*SpellEntry*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_WRATH_OF_THE_ASTROMANCER_DOT))
return false;
@@ -523,13 +536,13 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader
target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), false);
}
- void Register()
+ void Register() OVERRIDE
{
AfterEffectRemove += AuraEffectRemoveFn(spell_astromancer_wrath_of_the_astromancer_AuraScript::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
- AuraScript* GetAuraScript() const
+ AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_astromancer_wrath_of_the_astromancer_AuraScript();
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index a5923d86ff8..cf25efb17c6 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -29,9 +29,9 @@ EndScriptData */
#include "WorldPacket.h"
#include "Opcodes.h"
-enum eEnums
+enum Yells
{
- //kael'thas Speech
+ // Kael'thas Speech
SAY_INTRO = 0,
SAY_INTRO_CAPERNIAN = 1,
SAY_INTRO_TELONICUS = 2,
@@ -47,7 +47,7 @@ enum eEnums
SAY_SUMMON_PHOENIX = 12,
SAY_DEATH = 13,
- //Thaladred the Darkener speech
+ // Thaladred the Darkener speech
SAY_THALADRED_AGGRO = 0,
SAY_THALADRED_DEATH = 1,
EMOTE_THALADRED_GAZE = 2,
@@ -56,15 +56,18 @@ enum eEnums
SAY_SANGUINAR_AGGRO = 0,
SAY_SANGUINAR_DEATH = 1,
- //Grand Astromancer Capernian speech
+ // Grand Astromancer Capernian speech
SAY_CAPERNIAN_AGGRO = 0,
SAY_CAPERNIAN_DEATH = 1,
- //Master Engineer Telonicus speech
+ // Master Engineer Telonicus speech
SAY_TELONICUS_AGGRO = 0,
- SAY_TELONICUS_DEATH = 1,
+ SAY_TELONICUS_DEATH = 1
+};
- //Phase 2 spells
+enum Spells
+{
+ // Phase 2 spells
SPELL_SUMMON_WEAPONS = 36976,
SPELL_SUMMON_WEAPONA = 36958,
SPELL_SUMMON_WEAPONB = 36959,
@@ -75,7 +78,7 @@ enum eEnums
SPELL_SUMMON_WEAPONG = 36964,
SPELL_RES_VISUAL = 24171,
- //Phase 4 spells
+ // Phase 4 spells
SPELL_FIREBALL = 22088, //wrong but works with CastCustomSpell
SPELL_PYROBLAST = 36819,
SPELL_FLAME_STRIKE = 36735,
@@ -86,7 +89,7 @@ enum eEnums
SPELL_PHOENIX_ANIMATION = 36723,
SPELL_MIND_CONTROL = 32830,
- //Phase 5 spells
+ // Phase 5 spells
SPELL_EXPLODE = 36092,
SPELL_FULLPOWER = 36187,
SPELL_KNOCKBACK = 11027,
@@ -94,12 +97,12 @@ enum eEnums
SPELL_GRAVITY_LAPSE_AURA = 39432,
SPELL_NETHER_BEAM = 35873,
- //Thaladred the Darkener spells
+ // Thaladred the Darkener spells
SPELL_PSYCHIC_BLOW = 10689,
SPELL_SILENCE = 30225,
- //Lord Sanguinar spells
+ // Lord Sanguinar spells
SPELL_BELLOWING_ROAR = 40636,
- //Grand Astromancer Capernian spells
+ // Grand Astromancer Capernian spells
SPELL_CAPERNIAN_FIREBALL = 36971,
SPELL_CONFLAGRATION = 37018,
@@ -112,16 +115,24 @@ enum eEnums
//Phoenix spell
SPELL_BURN = 36720,
SPELL_EMBER_BLAST = 34341,
- SPELL_REBIRTH = 41587,
+ SPELL_REBIRTH = 41587
+};
- //Creature IDs
+enum Creatures
+{
NPC_PHOENIX = 21362,
- NPC_PHOENIX_EGG = 21364,
+ NPC_PHOENIX_EGG = 21364
+};
+enum Models
+{
//Phoenix egg and phoenix model
MODEL_ID_PHOENIX = 19682,
- MODEL_ID_PHOENIX_EGG = 20245,
+ MODEL_ID_PHOENIX_EGG = 20245
+};
+enum Misc
+{
MAX_ADVISORS = 4
};
@@ -154,7 +165,7 @@ struct advisorbase_ai : public ScriptedAI
uint32 DelayRes_Timer;
uint64 DelayRes_Target;
- void Reset()
+ void Reset() OVERRIDE
{
if (m_bDoubled_Health)
{
@@ -176,7 +187,8 @@ struct advisorbase_ai : public ScriptedAI
Kaelthas->AI()->EnterEvadeMode();
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!who || FakeDeath || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -184,7 +196,7 @@ struct advisorbase_ai : public ScriptedAI
ScriptedAI::MoveInLineOfSight(who);
}
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (!who || FakeDeath || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -205,7 +217,7 @@ struct advisorbase_ai : public ScriptedAI
DelayRes_Timer = 2000;
}
- void DamageTaken(Unit* killer, uint32 &damage)
+ void DamageTaken(Unit* killer, uint32 &damage) OVERRIDE
{
if (damage < me->GetHealth())
return;
@@ -241,7 +253,7 @@ struct advisorbase_ai : public ScriptedAI
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (DelayRes_Timer)
{
@@ -306,7 +318,7 @@ class boss_kaelthas : public CreatureScript
uint64 m_auiAdvisorGuid[MAX_ADVISORS];
- void Reset()
+ void Reset() OVERRIDE
{
Fireball_Timer = 5000+rand()%10000;
ArcaneDisruption_Timer = 45000;
@@ -391,7 +403,8 @@ class boss_kaelthas : public CreatureScript
}
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!me->HasUnitState(UNIT_STATE_STUNNED) && me->CanCreatureAttack(who))
{
@@ -418,18 +431,18 @@ class boss_kaelthas : public CreatureScript
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (instance && !instance->GetData(DATA_KAELTHASEVENT) && !Phase)
StartEvent();
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
// if not phoenix, then it's one of the 7 weapons
if (summoned->GetEntry() != NPC_PHOENIX)
@@ -441,12 +454,12 @@ class boss_kaelthas : public CreatureScript
}
}
- void SummonedCreatureDespawn(Creature* summon)
+ void SummonedCreatureDespawn(Creature* summon) OVERRIDE
{
summons.Despawn(summon);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -465,7 +478,7 @@ class boss_kaelthas : public CreatureScript
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Phase 1
switch (Phase)
@@ -996,7 +1009,7 @@ class boss_kaelthas : public CreatureScript
}
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_kaelthasAI(creature);
}
@@ -1019,7 +1032,7 @@ class boss_thaladred_the_darkener : public CreatureScript
uint32 Silence_Timer;
uint32 PsychicBlow_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Gaze_Timer = 100;
Silence_Timer = 20000;
@@ -1028,7 +1041,7 @@ class boss_thaladred_the_darkener : public CreatureScript
advisorbase_ai::Reset();
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1040,13 +1053,13 @@ class boss_thaladred_the_darkener : public CreatureScript
me->AddThreat(who, 5000000.0f);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
Talk(SAY_THALADRED_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
advisorbase_ai::UpdateAI(diff);
@@ -1094,7 +1107,7 @@ class boss_thaladred_the_darkener : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_thaladred_the_darkenerAI(creature);
}
@@ -1115,13 +1128,13 @@ class boss_lord_sanguinar : public CreatureScript
uint32 Fear_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Fear_Timer = 20000;
advisorbase_ai::Reset();
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1132,13 +1145,13 @@ class boss_lord_sanguinar : public CreatureScript
Talk(SAY_SANGUINAR_AGGRO);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
Talk(SAY_SANGUINAR_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
advisorbase_ai::UpdateAI(diff);
@@ -1162,7 +1175,7 @@ class boss_lord_sanguinar : public CreatureScript
DoMeleeAttackIfReady();
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_lord_sanguinarAI(creature);
}
@@ -1186,7 +1199,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
uint32 Yell_Timer;
bool Yell;
- void Reset()
+ void Reset() OVERRIDE
{
Fireball_Timer = 2000;
Conflagration_Timer = 20000;
@@ -1197,13 +1210,13 @@ class boss_grand_astromancer_capernian : public CreatureScript
advisorbase_ai::Reset();
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
Talk(SAY_CAPERNIAN_DEATH);
}
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (!who || FakeDeath || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1218,7 +1231,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
}
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1227,7 +1240,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
return;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
advisorbase_ai::UpdateAI(diff);
@@ -1306,7 +1319,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_grand_astromancer_capernianAI(creature);
}
@@ -1328,7 +1341,7 @@ class boss_master_engineer_telonicus : public CreatureScript
uint32 Bomb_Timer;
uint32 RemoteToy_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Bomb_Timer = 10000;
RemoteToy_Timer = 5000;
@@ -1336,13 +1349,13 @@ class boss_master_engineer_telonicus : public CreatureScript
advisorbase_ai::Reset();
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (instance && instance->GetData(DATA_KAELTHASEVENT) == 3)
Talk(SAY_TELONICUS_DEATH);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -1353,7 +1366,7 @@ class boss_master_engineer_telonicus : public CreatureScript
Talk(SAY_TELONICUS_AGGRO);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
advisorbase_ai::UpdateAI(diff);
@@ -1389,7 +1402,7 @@ class boss_master_engineer_telonicus : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_master_engineer_telonicusAI(creature);
}
@@ -1415,7 +1428,7 @@ class npc_kael_flamestrike : public CreatureScript
bool Casting;
bool KillSelf;
- void Reset()
+ void Reset() OVERRIDE
{
Timer = 5000;
Casting = false;
@@ -1425,11 +1438,12 @@ class npc_kael_flamestrike : public CreatureScript
me->setFaction(14);
}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Casting)
{
@@ -1456,7 +1470,7 @@ class npc_kael_flamestrike : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_kael_flamestrikeAI(creature);
}
@@ -1477,20 +1491,20 @@ class npc_phoenix_tk : public CreatureScript
uint32 Cycle_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Cycle_Timer = 2000;
DoCast(me, SPELL_BURN, true);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
//is this spell in use anylonger?
//DoCast(me, SPELL_EMBER_BLAST, true);
me->SummonCreature(NPC_PHOENIX_EGG, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 16000);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1510,7 +1524,7 @@ class npc_phoenix_tk : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_phoenix_tkAI(creature);
}
@@ -1531,15 +1545,16 @@ class npc_phoenix_egg_tk : public CreatureScript
uint32 Rebirth_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Rebirth_Timer = 15000;
}
//ignore any
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (me->Attack(who, false))
{
@@ -1550,13 +1565,13 @@ class npc_phoenix_egg_tk : public CreatureScript
}
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
summoned->AddThreat(me->GetVictim(), 0.0f);
summoned->CastSpell(summoned, SPELL_REBIRTH, false);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Rebirth_Timer)
return;
@@ -1571,7 +1586,7 @@ class npc_phoenix_egg_tk : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_phoenix_egg_tkAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
index 26668a77742..f842ed19f3c 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp
@@ -27,13 +27,16 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "the_eye.h"
-enum eEnums
+enum Yells
{
SAY_AGGRO = 0,
SAY_SLAY = 1,
SAY_DEATH = 2,
- SAY_POUNDING = 3,
+ SAY_POUNDING = 3
+};
+enum Spells
+{
SPELL_POUNDING = 34162,
SPELL_ARCANE_ORB = 34172,
SPELL_KNOCK_AWAY = 25778,
@@ -65,7 +68,7 @@ class boss_void_reaver : public CreatureScript
bool Enraged;
- void Reset()
+ void Reset() OVERRIDE
{
Pounding_Timer = 15000;
ArcaneOrb_Timer = 3000;
@@ -78,12 +81,12 @@ class boss_void_reaver : public CreatureScript
instance->SetData(DATA_VOIDREAVEREVENT, NOT_STARTED);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
DoZoneInCombat();
@@ -92,7 +95,7 @@ class boss_void_reaver : public CreatureScript
instance->SetData(DATA_VOIDREAVEREVENT, DONE);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
@@ -100,7 +103,7 @@ class boss_void_reaver : public CreatureScript
instance->SetData(DATA_VOIDREAVEREVENT, IN_PROGRESS);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -167,7 +170,7 @@ class boss_void_reaver : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_void_reaverAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
index e43d2f9b13a..e47995befff 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp
@@ -113,7 +113,7 @@ class instance_the_eye : public InstanceMapScript
}
}
- uint64 GetData64(uint32 identifier) const
+ uint64 GetData64(uint32 identifier) const OVERRIDE
{
switch (identifier)
{
@@ -128,7 +128,7 @@ class instance_the_eye : public InstanceMapScript
return 0;
}
- void SetData(uint32 type, uint32 data)
+ void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -151,7 +151,7 @@ class instance_the_eye : public InstanceMapScript
SaveToDB();
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -192,7 +192,7 @@ class instance_the_eye : public InstanceMapScript
}
};
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_the_eye_InstanceMapScript(map);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
index 3fb42ced19f..ab9b6ab3046 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
@@ -31,7 +31,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "the_eye.h"
-enum eSpells
+enum Spells
{
SPELL_COUNTERCHARGE = 35035,
SPELL_KNOCKAWAY = 22893,
@@ -52,17 +52,17 @@ class npc_crystalcore_devastator : public CreatureScript
uint32 Knockaway_Timer;
uint32 Countercharge_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Countercharge_Timer = 9000;
Knockaway_Timer = 25000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -100,7 +100,7 @@ class npc_crystalcore_devastator : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_crystalcore_devastatorAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
index 20b920a95d2..b9e44aff0a9 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
+++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.h
@@ -19,16 +19,19 @@
#ifndef DEF_THE_EYE_H
#define DEF_THE_EYE_H
-#define DATA_ALAREVENT 1
-#define DATA_ASTROMANCER 2
-#define DATA_GRANDASTROMANCERCAPERNIAN 3
-#define DATA_HIGHASTROMANCERSOLARIANEVENT 4
-#define DATA_KAELTHAS 5
-#define DATA_KAELTHASEVENT 6
-#define DATA_LORDSANGUINAR 7
-#define DATA_MASTERENGINEERTELONICUS 8
-#define DATA_THALADREDTHEDARKENER 10
-#define DATA_VOIDREAVEREVENT 11
-#define DATA_ALAR 12
-#endif
+enum DataTypes
+{
+ DATA_ALAREVENT = 1,
+ DATA_ASTROMANCER = 2,
+ DATA_GRANDASTROMANCERCAPERNIAN = 3,
+ DATA_HIGHASTROMANCERSOLARIANEVENT = 4,
+ DATA_KAELTHAS = 5,
+ DATA_KAELTHASEVENT = 6,
+ DATA_LORDSANGUINAR = 7,
+ DATA_MASTERENGINEERTELONICUS = 8,
+ DATA_THALADREDTHEDARKENER = 10,
+ DATA_VOIDREAVEREVENT = 11,
+ DATA_ALAR = 12
+};
+#endif
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
index 18ea83f7121..a2c6ba399a3 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp
@@ -59,13 +59,13 @@ class boss_gatewatcher_gyrokill : public CreatureScript
{
boss_gatewatcher_gyrokillAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) {}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 10000);
@@ -74,12 +74,12 @@ class boss_gatewatcher_gyrokill : public CreatureScript
Talk(SAY_AGGRO);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -115,9 +115,9 @@ class boss_gatewatcher_gyrokill : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_gatewatcher_gyrokillAI (creature);
+ return new boss_gatewatcher_gyrokillAI(creature);
}
};
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
index 5e29a8d0c31..7dc073d82d7 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -62,7 +62,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript
{
boss_gatewatcher_iron_handAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND) {}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 55000);
@@ -71,19 +71,19 @@ class boss_gatewatcher_iron_hand : public CreatureScript
Talk(SAY_AGGRO);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
if (roll_chance_i(50))
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -122,7 +122,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_gatewatcher_iron_handAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
index 728b3f715b2..06296ca3ae2 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
@@ -75,7 +75,7 @@ class boss_mechano_lord_capacitus : public CreatureScript
{
boss_mechano_lord_capacitusAI(Creature* creature) : BossAI(creature, DATA_MECHANOLORD_CAPACITUS) { }
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
Talk(YELL_AGGRO);
@@ -88,18 +88,18 @@ class boss_mechano_lord_capacitus : public CreatureScript
events.ScheduleEvent(EVENT_POSITIVE_SHIFT, 15 * IN_MILLISECONDS);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(YELL_KILL);
}
- void JustDied(Unit* /*victim*/)
+ void JustDied(Unit* /*victim*/) OVERRIDE
{
_JustDied();
Talk(YELL_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -149,7 +149,7 @@ class boss_mechano_lord_capacitus : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_mechano_lord_capacitusAI(creature);
}
@@ -164,7 +164,7 @@ class spell_capacitus_polarity_charge : public SpellScriptLoader
{
PrepareSpellScript(spell_capacitus_polarity_charge_SpellScript);
- bool Validate(SpellInfo const* /*spell*/)
+ bool Validate(SpellInfo const* /*spell*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_POSITIVE_CHARGE))
return false;
@@ -210,14 +210,14 @@ class spell_capacitus_polarity_charge : public SpellScriptLoader
SetHitDamage(0);
}
- void Register()
+ void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_capacitus_polarity_charge_SpellScript::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_capacitus_polarity_charge_SpellScript::HandleTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_capacitus_polarity_charge_SpellScript();
}
@@ -232,7 +232,7 @@ class spell_capacitus_polarity_shift : public SpellScriptLoader
{
PrepareSpellScript(spell_capacitus_polarity_shift_SpellScript);
- bool Validate(SpellInfo const* /*spell*/)
+ bool Validate(SpellInfo const* /*spell*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_POSITIVE_POLARITY) || !sSpellMgr->GetSpellInfo(SPELL_NEGATIVE_POLARITY))
return false;
@@ -247,13 +247,13 @@ class spell_capacitus_polarity_shift : public SpellScriptLoader
target->CastSpell(target, roll_chance_i(50) ? SPELL_POSITIVE_POLARITY : SPELL_NEGATIVE_POLARITY, true, NULL, NULL, caster->GetGUID());
}
- void Register()
+ void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_capacitus_polarity_shift_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_capacitus_polarity_shift_SpellScript();
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
index fbafe03fddb..565aefbd6b9 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -27,7 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "mechanar.h"
-enum eSays
+enum Says
{
SAY_AGGRO = 0,
SAY_SUMMON = 1,
@@ -67,7 +67,7 @@ class boss_nethermancer_sepethrea : public CreatureScript
{
boss_nethermancer_sepethreaAI(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) {}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_FROST_ATTACK, urand(7000, 10000));
@@ -80,18 +80,18 @@ class boss_nethermancer_sepethrea : public CreatureScript
Talk(SAY_SUMMON);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -136,7 +136,7 @@ class boss_nethermancer_sepethrea : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_nethermancer_sepethreaAI(creature);
}
@@ -162,7 +162,7 @@ class npc_ragin_flames : public CreatureScript
bool onlyonce;
- void Reset()
+ void Reset() OVERRIDE
{
inferno_Timer = 10000;
flame_timer = 500;
@@ -173,11 +173,11 @@ class npc_ragin_flames : public CreatureScript
me->SetSpeed(MOVE_RUN, DUNGEON_MODE(0.5f, 0.7f));
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Check_Timer
if (Check_Timer <= diff)
@@ -221,7 +221,7 @@ class npc_ragin_flames : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_ragin_flamesAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
index adcfff10684..1bcdcd48fce 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
@@ -75,7 +75,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
{
boss_pathaleon_the_calculatorAI(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR) { }
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
events.ScheduleEvent(EVENT_SUMMON, 30000);
@@ -86,18 +86,18 @@ class boss_pathaleon_the_calculator : public CreatureScript
Talk(SAY_AGGRO);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
}
- void DamageTaken(Unit* /*attacker*/, uint32& damage)
+ void DamageTaken(Unit* /*attacker*/, uint32& damage) OVERRIDE
{
if (me->HealthBelowPctDamaged(20, damage) && !me->HasAura(SPELL_FRENZY))
{
@@ -106,7 +106,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -158,9 +158,9 @@ class boss_pathaleon_the_calculator : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_pathaleon_the_calculatorAI (creature);
+ return new boss_pathaleon_the_calculatorAI(creature);
}
};
@@ -179,7 +179,7 @@ class npc_nether_wraith : public CreatureScript
uint32 Die_Timer;
bool Detonation;
- void Reset()
+ void Reset() OVERRIDE
{
ArcaneMissiles_Timer = urand(1000, 4000);
Detonation_Timer = 20000;
@@ -187,9 +187,9 @@ class npc_nether_wraith : public CreatureScript
Detonation = false;
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -230,9 +230,9 @@ class npc_nether_wraith : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_nether_wraithAI (creature);
+ return new npc_nether_wraithAI(creature);
}
};
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
index 146569db284..64ebef52a87 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp
@@ -135,7 +135,7 @@ class instance_mechanar : public InstanceMapScript
}
};
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_mechanar_InstanceMapScript(map);
}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
index 43af42b1e72..f03cb033b0f 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
@@ -37,7 +37,7 @@ EndContentData */
# npc_millhouse_manastorm
#####*/
-enum eMillhouseSays
+enum MillhouseSays
{
SAY_INTRO_1 = 0,
SAY_INTRO_2 = 1,
@@ -53,7 +53,7 @@ enum eMillhouseSays
SAY_COMPLETE = 11,
};
-enum eMillhouseSpells
+enum MillhouseSpells
{
SPELL_CONJURE_WATER = 36879,
SPELL_ARCANE_INTELLECT = 36880,
@@ -91,7 +91,7 @@ class npc_millhouse_manastorm : public CreatureScript
uint32 Pyroblast_Timer;
uint32 Fireball_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
EventProgress_Timer = 2000;
LowHp = false;
@@ -111,7 +111,7 @@ class npc_millhouse_manastorm : public CreatureScript
}
}
- void AttackStart(Unit* who)
+ void AttackStart(Unit* who) OVERRIDE
{
if (me->Attack(who, true))
{
@@ -122,14 +122,14 @@ class npc_millhouse_manastorm : public CreatureScript
}
}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/)OVERRIDE {}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
@@ -138,7 +138,7 @@ class npc_millhouse_manastorm : public CreatureScript
->FailQuest();*/
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Init)
{
@@ -221,7 +221,7 @@ class npc_millhouse_manastorm : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_millhouse_manastormAI(creature);
}
@@ -230,7 +230,7 @@ class npc_millhouse_manastorm : public CreatureScript
# npc_warden_mellichar
#####*/
-enum eWardenSays
+enum WardenSays
{
YELL_INTRO1 = 0,
YELL_INTRO2 = 1,
@@ -242,7 +242,7 @@ enum eWardenSays
YELL_WELCOME = 7,
};
-enum eWardenUnits
+enum WardenUnits
{
//phase 2(acid mobs)
ENTRY_TRICKSTER = 20905,
@@ -259,7 +259,7 @@ enum eWardenUnits
ENTRY_SKYRISS = 20912,
};
-enum eWardenSpells
+enum WardenSpells
{
//TARGET_SCRIPT
SPELL_TARGET_ALPHA = 36856,
@@ -293,7 +293,7 @@ class npc_warden_mellichar : public CreatureScript
uint32 EventProgress_Timer;
uint32 Phase;
- void Reset()
+ void Reset() OVERRIDE
{
IsRunning = false;
CanSpawn = false;
@@ -308,9 +308,10 @@ class npc_warden_mellichar : public CreatureScript
instance->SetData(TYPE_HARBINGERSKYRISS, NOT_STARTED);
}
- void AttackStart(Unit* /*who*/) {}
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (IsRunning)
return;
@@ -328,7 +329,7 @@ class npc_warden_mellichar : public CreatureScript
}
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(YELL_INTRO1);
DoCast(me, SPELL_BUBBLE_VISUAL);
@@ -398,7 +399,7 @@ class npc_warden_mellichar : public CreatureScript
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!IsRunning)
return;
@@ -514,7 +515,7 @@ class npc_warden_mellichar : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_warden_mellicharAI(creature);
}
@@ -540,7 +541,7 @@ class npc_zerekethvoidzone : public CreatureScript
{
npc_zerekethvoidzoneAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset()
+ void Reset() OVERRIDE
{
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
me->setFaction(16);
@@ -549,10 +550,10 @@ class npc_zerekethvoidzone : public CreatureScript
DoCast(me, SPELL_VOID_ZONE_DAMAGE);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_zerekethvoidzoneAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
index 9c852196616..37839d4794d 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.h
@@ -16,20 +16,23 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef DEF_ARCATRAZ_H
-#define DEF_ARCATRAZ_H
+#ifndef ARCATRAZ_H_
+#define ARCATRAZ_H_
-#define TYPE_ZEREKETH 1
-#define TYPE_DALLIAH 2
-#define TYPE_SOCCOTHRATES 3
-#define TYPE_HARBINGERSKYRISS 4
-#define TYPE_WARDEN_1 5
-#define TYPE_WARDEN_2 6
-#define TYPE_WARDEN_3 7
-#define TYPE_WARDEN_4 8
-#define TYPE_WARDEN_5 9
-#define DATA_MELLICHAR 10
-#define TYPE_SHIELD_OPEN 11
-#define DATA_SPHERE_SHIELD 12
-#endif
+enum DataTypes
+{
+ TYPE_ZEREKETH = 1,
+ TYPE_DALLIAH = 2,
+ TYPE_SOCCOTHRATES = 3,
+ TYPE_HARBINGERSKYRISS = 4,
+ TYPE_WARDEN_1 = 5,
+ TYPE_WARDEN_2 = 6,
+ TYPE_WARDEN_3 = 7,
+ TYPE_WARDEN_4 = 8,
+ TYPE_WARDEN_5 = 9,
+ DATA_MELLICHAR = 10,
+ TYPE_SHIELD_OPEN = 11,
+ DATA_SPHERE_SHIELD = 12
+};
+#endif // ARCATRAZ_H_
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
index 3cf9f01a601..c7765eb24ad 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
@@ -32,7 +32,7 @@ EndContentData */
#include "ScriptedCreature.h"
#include "arcatraz.h"
-enum eSays
+enum Says
{
SAY_INTRO = 0,
SAY_AGGRO = 1,
@@ -43,16 +43,19 @@ enum eSays
SAY_DEATH = 6
};
-enum eSpells
+enum Spells
{
- SPELL_FEAR = 39415,
- SPELL_MIND_REND = 36924,
- H_SPELL_MIND_REND = 39017,
- SPELL_DOMINATION = 37162,
- H_SPELL_DOMINATION = 39019,
- H_SPELL_MANA_BURN = 39020,
- SPELL_66_ILLUSION = 36931, //entry 21466
- SPELL_33_ILLUSION = 36932, //entry 21467
+ SPELL_FEAR = 39415,
+ SPELL_MIND_REND = 36924,
+ H_SPELL_MIND_REND = 39017,
+ SPELL_DOMINATION = 37162,
+ H_SPELL_DOMINATION = 39019,
+ H_SPELL_MANA_BURN = 39020,
+ SPELL_66_ILLUSION = 36931, //entry 21466
+ SPELL_33_ILLUSION = 36932, //entry 21467
+
+ SPELL_MIND_REND_IMAGE = 36929,
+ H_SPELL_MIND_REND_IMAGE = 39021
};
class boss_harbinger_skyriss : public CreatureScript
@@ -84,7 +87,7 @@ class boss_harbinger_skyriss : public CreatureScript
uint32 Domination_Timer;
uint32 ManaBurn_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
if (!Intro)
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
@@ -100,7 +103,8 @@ class boss_harbinger_skyriss : public CreatureScript
ManaBurn_Timer = 25000;
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!Intro)
return;
@@ -108,16 +112,16 @@ class boss_harbinger_skyriss : public CreatureScript
ScriptedAI::MoveInLineOfSight(who);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_HARBINGERSKYRISS, DONE);
}
- void JustSummoned(Creature* summon)
+ void JustSummoned(Creature* summon) OVERRIDE
{
if (!summon)
return;
@@ -130,7 +134,7 @@ class boss_harbinger_skyriss : public CreatureScript
summon->AI()->AttackStart(target);
}
- void KilledUnit(Unit* victim)
+ void KilledUnit(Unit* victim) OVERRIDE
{
//won't yell killing pet/other unit
if (victim->GetEntry() == 21436)
@@ -152,7 +156,7 @@ class boss_harbinger_skyriss : public CreatureScript
DoCast(me, SPELL_33_ILLUSION);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Intro)
{
@@ -269,15 +273,12 @@ class boss_harbinger_skyriss : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_harbinger_skyrissAI (creature);
+ return new boss_harbinger_skyrissAI(creature);
}
};
-#define SPELL_MIND_REND_IMAGE 36929
-#define H_SPELL_MIND_REND_IMAGE 39021
-
class boss_harbinger_skyriss_illusion : public CreatureScript
{
public:
@@ -290,12 +291,12 @@ class boss_harbinger_skyriss_illusion : public CreatureScript
{
boss_harbinger_skyriss_illusionAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() { }
+ void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_harbinger_skyriss_illusionAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
index a70b6fb35b4..725c5c5aa17 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
@@ -29,7 +29,7 @@ EndScriptData */
#define MAX_ENCOUNTER 9
-enum eUnits
+enum Units
{
CONTAINMENT_CORE_SECURITY_FIELD_ALPHA = 184318, //door opened when Wrath-Scryer Soccothrates dies
CONTAINMENT_CORE_SECURITY_FIELD_BETA = 184319, //door opened when Dalliah the Doomsayer dies
@@ -148,7 +148,7 @@ class instance_arcatraz : public InstanceMapScript
MellicharGUID = creature->GetGUID();
}
- void SetData(uint32 type, uint32 data)
+ void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
{
@@ -230,7 +230,7 @@ class instance_arcatraz : public InstanceMapScript
}
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -244,7 +244,7 @@ class instance_arcatraz : public InstanceMapScript
return 0;
}
- uint64 GetData64(uint32 data) const
+ uint64 GetData64(uint32 data) const OVERRIDE
{
switch (data)
{
@@ -255,7 +255,7 @@ class instance_arcatraz : public InstanceMapScript
}
};
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_arcatraz_InstanceMapScript(map);
}
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
index 6775fb95824..bd67f4be8b7 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp
@@ -52,13 +52,13 @@ class boss_commander_sarannis : public CreatureScript
{
boss_commander_sarannisAI(Creature* creature) : BossAI(creature, DATA_COMMANDER_SARANNIS) { }
- void Reset()
+ void Reset() OVERRIDE
{
_Reset();
_phase = true;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
Talk(SAY_AGGRO);
@@ -66,18 +66,18 @@ class boss_commander_sarannis : public CreatureScript
events.ScheduleEvent(EVENT_ARCANE_DEVASTATION, 15200);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
}
- void DamageTaken(Unit* /*killer*/, uint32 &damage)
+ void DamageTaken(Unit* /*killer*/, uint32 &damage) OVERRIDE
{
if (me->HealthBelowPctDamaged(50, damage) && _phase)
{
@@ -88,12 +88,12 @@ class boss_commander_sarannis : public CreatureScript
}
}
- void JustSummoned(Creature* summon)
+ void JustSummoned(Creature* summon) OVERRIDE
{
BossAI::JustSummoned(summon);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -129,7 +129,7 @@ class boss_commander_sarannis : public CreatureScript
bool _phase;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_commander_sarannisAI(creature);
}
@@ -167,13 +167,13 @@ class spell_commander_sarannis_summon_reinforcements : public SpellScriptLoader
GetCaster()->SummonCreature(NPC_SUMMONED_BLOODWARDER_RESERVIST, PosSummonReinforcements[3], TEMPSUMMON_CORPSE_DESPAWN);
}
- void Register()
+ void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_commander_sarannis_summon_reinforcements_SpellScript::HandleCast, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_commander_sarannis_summon_reinforcements_SpellScript();
}
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
index f883918db75..1b362fe8a5a 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
@@ -27,7 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "the_botanica.h"
-enum eSays
+enum Says
{
SAY_AGGRO = 0,
SAY_KILL = 1,
@@ -37,7 +37,7 @@ enum eSays
SAY_OOC_RANDOM = 5
};
-enum eSpells
+enum Spells
{
SPELL_TRANQUILITY = 34550,
SPELL_TREE_FORM = 34551,
@@ -48,7 +48,10 @@ enum eSpells
SPELL_PLANT_RED = 34763
};
-#define ENTRY_FRAYER 19953
+enum Creatures
+{
+ NPC_FRAYER = 19953
+};
class boss_high_botanist_freywinn : public CreatureScript
{
@@ -71,7 +74,7 @@ class boss_high_botanist_freywinn : public CreatureScript
uint32 DeadAddsCount;
bool MoveFree;
- void Reset()
+ void Reset() OVERRIDE
{
Adds_List.clear();
@@ -82,14 +85,14 @@ class boss_high_botanist_freywinn : public CreatureScript
MoveFree = true;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
- if (summoned->GetEntry() == ENTRY_FRAYER)
+ if (summoned->GetEntry() == NPC_FRAYER)
Adds_List.push_back(summoned->GetGUID());
}
@@ -104,17 +107,17 @@ class boss_high_botanist_freywinn : public CreatureScript
}
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -197,7 +200,7 @@ class boss_high_botanist_freywinn : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_high_botanist_freywinnAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
index 91bf42351b4..fe9e7d87008 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
@@ -27,7 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "the_botanica.h"
-enum eSpells
+enum Spells
{
SPELL_ALLERGIC_REACTION = 34697,
SPELL_TELEPORT_SELF = 34673,
@@ -41,7 +41,7 @@ enum eSpells
SPELL_SUMMON_LASHER_4 = 34688,
SPELL_SUMMON_FLAYER_3 = 34690
};
-enum eOthers
+enum Misc
{
EMOTE_SUMMON = 0,
MODEL_DEFAULT = 13109,
@@ -70,7 +70,7 @@ class boss_laj : public CreatureScript
uint32 Transform_Timer;
uint32 Allergic_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
me->SetDisplayId(MODEL_DEFAULT);
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true);
@@ -157,17 +157,17 @@ class boss_laj : public CreatureScript
CanSummon = false;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
- void JustSummoned(Creature* summon)
+ void JustSummoned(Creature* summon) OVERRIDE
{
if (summon && me->GetVictim())
summon->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -213,7 +213,7 @@ class boss_laj : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_lajAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp
index 70b626190b7..d2a1b294698 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp
@@ -54,14 +54,14 @@ class boss_thorngrin_the_tender : public CreatureScript
{
boss_thorngrin_the_tenderAI(Creature* creature) : BossAI(creature, DATA_THORNGRIN_THE_TENDER) { }
- void Reset()
+ void Reset() OVERRIDE
{
_Reset();
_phase1 = true;
_phase2 = true;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
_EnterCombat();
Talk(SAY_AGGRO);
@@ -70,18 +70,18 @@ class boss_thorngrin_the_tender : public CreatureScript
events.ScheduleEvent(EVENT_ENRAGE, 12000);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_KILL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
_JustDied();
Talk(SAY_DEATH);
}
- void DamageTaken(Unit* /*killer*/, uint32 &damage)
+ void DamageTaken(Unit* /*killer*/, uint32 &damage) OVERRIDE
{
if (me->HealthBelowPctDamaged(50, damage) && _phase1)
{
@@ -95,7 +95,7 @@ class boss_thorngrin_the_tender : public CreatureScript
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -140,7 +140,7 @@ class boss_thorngrin_the_tender : public CreatureScript
bool _phase2;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_thorngrin_the_tenderAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
index 09ca90570b0..36a17996f94 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp
@@ -27,7 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "the_botanica.h"
-enum eSays
+enum Says
{
SAY_AGGRO = 0,
SAY_SLAY = 1,
@@ -35,7 +35,7 @@ enum eSays
SAY_DEATH = 3
};
-enum eSpells
+enum Spells
{
WAR_STOMP = 34716,
SUMMON_TREANTS = 34727, // DBC: 34727, 34731, 34733, 34734, 34736, 34739, 34741 (with Ancestral Life spell 34742) // won't work (guardian summon)
@@ -44,7 +44,7 @@ enum eSpells
SPELL_HEAL_FATHER = 6262
};
-enum eOthers
+enum Misc
{
CREATURE_TREANT = 19949,
TREANT_SPAWN_DIST = 50 //50 yards from Warp Splinter's spawn point
@@ -73,7 +73,7 @@ class npc_warp_splinter_treant : public CreatureScript
}
struct npc_warp_splinter_treantAI : public ScriptedAI
{
- npc_warp_splinter_treantAI (Creature* creature) : ScriptedAI(creature)
+ npc_warp_splinter_treantAI(Creature* creature) : ScriptedAI(creature)
{
WarpGuid = 0;
}
@@ -81,16 +81,17 @@ class npc_warp_splinter_treant : public CreatureScript
uint64 WarpGuid;
uint32 check_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
check_Timer = 0;
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void MoveInLineOfSight(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
{
@@ -118,7 +119,7 @@ class npc_warp_splinter_treant : public CreatureScript
DoMeleeAttackIfReady();
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_warp_splinter_treantAI(creature);
}
@@ -150,7 +151,7 @@ class boss_warp_splinter : public CreatureScript
float Treant_Spawn_Pos_X;
float Treant_Spawn_Pos_Y;
- void Reset()
+ void Reset() OVERRIDE
{
War_Stomp_Timer = urand(25000, 40000);
Summon_Treants_Timer = 45000;
@@ -159,17 +160,17 @@ class boss_warp_splinter : public CreatureScript
me->SetSpeed(MOVE_RUN, 0.7f, true);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void KilledUnit(Unit* /*victim*/)
+ void KilledUnit(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
}
@@ -190,7 +191,7 @@ class boss_warp_splinter : public CreatureScript
Talk(SAY_SUMMON);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -226,7 +227,7 @@ class boss_warp_splinter : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_warp_splinterAI(creature);
}
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp
index 69b95e8c813..443a8aa55fa 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/instance_the_botanica.cpp
@@ -59,7 +59,7 @@ class instance_the_botanica : public InstanceMapScript
}
}
- uint64 GetData64(uint32 type) const
+ uint64 GetData64(uint32 type) const OVERRIDE
{
switch (type)
{
@@ -152,7 +152,7 @@ class instance_the_botanica : public InstanceMapScript
uint64 WarpSplinterGUID;
};
- InstanceScript* GetInstanceScript(InstanceMap* map) const
+ InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
{
return new instance_the_botanica_InstanceMapScript(map);
}
diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
index 0e66893d3ac..82849691fcd 100644
--- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
+++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
@@ -69,7 +69,7 @@ class boss_doomlord_kazzak : public CreatureScript
{
}
- void Reset()
+ void Reset() OVERRIDE
{
_events.Reset();
_events.ScheduleEvent(EVENT_SHADOW_VOLLEY, urand(6000, 10000));
@@ -82,17 +82,17 @@ class boss_doomlord_kazzak : public CreatureScript
_events.ScheduleEvent(EVENT_BERSERK, 180000);
}
- void JustRespawned()
+ void JustRespawned() OVERRIDE
{
Talk(SAY_INTRO);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void KilledUnit(Unit* victim)
+ void KilledUnit(Unit* victim) OVERRIDE
{
// When Kazzak kills a player (not pets/totems), he regens some health
if (victim->GetTypeId() != TYPEID_PLAYER)
@@ -103,12 +103,12 @@ class boss_doomlord_kazzak : public CreatureScript
Talk(SAY_KILL);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
// Return since we have no target
if (!UpdateVictim())
@@ -169,9 +169,9 @@ class boss_doomlord_kazzak : public CreatureScript
EventMap _events;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_doomlordkazzakAI (creature);
+ return new boss_doomlordkazzakAI(creature);
}
};
@@ -184,7 +184,7 @@ class spell_mark_of_kazzak : public SpellScriptLoader
{
PrepareAuraScript(spell_mark_of_kazzak_AuraScript);
- bool Validate(SpellInfo const* /*spell*/)
+ bool Validate(SpellInfo const* /*spell*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_KAZZAK_DAMAGE))
return false;
@@ -209,14 +209,14 @@ class spell_mark_of_kazzak : public SpellScriptLoader
}
}
- void Register()
+ void Register() OVERRIDE
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mark_of_kazzak_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_MANA_LEECH);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mark_of_kazzak_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_MANA_LEECH);
}
};
- AuraScript* GetAuraScript() const
+ AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_mark_of_kazzak_AuraScript();
}
diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp
index 33896800ada..295d86bbce3 100644
--- a/src/server/scripts/Outland/boss_doomwalker.cpp
+++ b/src/server/scripts/Outland/boss_doomwalker.cpp
@@ -59,7 +59,7 @@ class boss_doomwalker : public CreatureScript
{
}
- void Reset()
+ void Reset() OVERRIDE
{
_events.Reset();
_events.ScheduleEvent(EVENT_ENRAGE, 0);
@@ -70,7 +70,7 @@ class boss_doomwalker : public CreatureScript
_inEnrage = false;
}
- void KilledUnit(Unit* victim)
+ void KilledUnit(Unit* victim) OVERRIDE
{
victim->CastSpell(victim, SPELL_MARK_DEATH, 0);
@@ -80,24 +80,25 @@ class boss_doomwalker : public CreatureScript
Talk(SAY_SLAY);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
Talk(SAY_AGGRO);
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (who && who->GetTypeId() == TYPEID_PLAYER && me->IsValidAttackTarget(who))
if (who->HasAura(SPELL_MARK_DEATH, 0))
who->CastSpell(who, SPELL_AURA_DEATH, 1);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -158,9 +159,9 @@ class boss_doomwalker : public CreatureScript
bool _inEnrage;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new boss_doomwalkerAI (creature);
+ return new boss_doomwalkerAI(creature);
}
};
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index 8ecf26b028a..6273731f292 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -60,18 +60,18 @@ class npc_bladespire_ogre : public CreatureScript
public:
npc_bladespire_ogre() : CreatureScript("npc_bladespire_ogre") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_bladespire_ogreAI (creature);
+ return new npc_bladespire_ogreAI(creature);
}
struct npc_bladespire_ogreAI : public ScriptedAI
{
npc_bladespire_ogreAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() { }
+ void Reset() OVERRIDE {}
- void UpdateAI(uint32 /*uiDiff*/)
+ void UpdateAI(uint32 /*uiDiff*/) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -85,7 +85,7 @@ public:
## npc_nether_drake
######*/
-enum eNetherdrake
+enum Netherdrake
{
//Used by 20021, 21817, 21820, 21821, 21823 but not existing in database
SAY_NIHIL_1 = 0,
@@ -112,9 +112,9 @@ class npc_nether_drake : public CreatureScript
public:
npc_nether_drake() : CreatureScript("npc_nether_drake") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_nether_drakeAI (creature);
+ return new npc_nether_drakeAI(creature);
}
struct npc_nether_drakeAI : public ScriptedAI
@@ -129,7 +129,7 @@ public:
uint32 ManaBurn_Timer;
uint32 IntangiblePresence_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
IsNihil = false;
NihilSpeech_Timer = 3000;
@@ -140,9 +140,10 @@ public:
IntangiblePresence_Timer = 15000;
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
return;
@@ -151,7 +152,7 @@ public:
}
//in case Creature was not summoned (not expected)
- void MovementInform(uint32 type, uint32 id)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -164,7 +165,7 @@ public:
}
}
- void SpellHit(Unit* caster, const SpellInfo* spell)
+ void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER)
{
@@ -195,7 +196,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (IsNihil)
{
@@ -265,7 +266,7 @@ public:
## npc_daranelle
######*/
-enum eDaranelle
+enum Daranelle
{
SAY_SPELL_INFLUENCE = 0,
SPELL_LASHHAN_CHANNEL = 36904
@@ -276,20 +277,21 @@ class npc_daranelle : public CreatureScript
public:
npc_daranelle() : CreatureScript("npc_daranelle") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_daranelleAI (creature);
+ return new npc_daranelleAI(creature);
}
struct npc_daranelleAI : public ScriptedAI
{
npc_daranelleAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() { }
+ void Reset() OVERRIDE {}
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void EnterCombat(Unit* /*who*/) {}
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (who->GetTypeId() == TYPEID_PLAYER)
{
@@ -317,7 +319,7 @@ class npc_overseer_nuaar : public CreatureScript
public:
npc_overseer_nuaar() : CreatureScript("npc_overseer_nuaar") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -328,7 +330,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -351,7 +353,7 @@ class npc_saikkal_the_elder : public CreatureScript
public:
npc_saikkal_the_elder() : CreatureScript("npc_saikkal_the_elder") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -368,7 +370,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_STE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -388,7 +390,7 @@ class go_legion_obelisk : public GameObjectScript
public:
go_legion_obelisk() : GameObjectScript("go_legion_obelisk") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE)
{
@@ -431,7 +433,7 @@ public:
## npc_bloodmaul_brutebane
######*/
-enum eBloodmaul
+enum Bloodmaul
{
NPC_OGRE_BRUTE = 19995,
NPC_QUEST_CREDIT = 21241,
@@ -445,7 +447,7 @@ class npc_bloodmaul_brutebane : public CreatureScript
public:
npc_bloodmaul_brutebane() : CreatureScript("npc_bloodmaul_brutebane") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_bloodmaul_brutebaneAI(creature);
}
@@ -463,12 +465,12 @@ public:
uint64 OgreGUID;
- void Reset()
+ void Reset() OVERRIDE
{
OgreGUID = 0;
}
- void UpdateAI(uint32 /*uiDiff*/) {}
+ void UpdateAI(uint32 /*uiDiff*/) OVERRIDE {}
};
};
@@ -481,7 +483,7 @@ class npc_ogre_brute : public CreatureScript
public:
npc_ogre_brute() : CreatureScript("npc_ogre_brute") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_ogre_bruteAI(creature);
}
@@ -492,12 +494,13 @@ public:
uint64 PlayerGUID;
- void Reset()
+ void Reset() OVERRIDE
{
PlayerGUID = 0;
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!who || (!who->IsAlive()))
return;
@@ -511,7 +514,7 @@ public:
}
}
- void MovementInform(uint32 /*type*/, uint32 id)
+ void MovementInform(uint32 /*type*/, uint32 id) OVERRIDE
{
Player* player = Unit::GetPlayer(*me, PlayerGUID);
if (id == 1)
@@ -528,7 +531,7 @@ public:
}
}
- void UpdateAI(uint32 /*diff*/)
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -552,7 +555,7 @@ class go_thunderspike : public GameObjectScript
public:
go_thunderspike() : GameObjectScript("go_thunderspike") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (player->GetQuestStatus(QUEST_THUNDERSPIKE) == QUEST_STATUS_INCOMPLETE && !go->FindNearestCreature(NPC_GOR_GRIMGUT, 25.0f, true))
if (Creature* gorGrimgut = go->SummonCreature(NPC_GOR_GRIMGUT, -2413.4f, 6914.48f, 25.01f, 3.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000))
@@ -654,7 +657,7 @@ class npc_simon_bunny : public CreatureScript
EventMap _events;
std::list<uint8> colorSequence, playableSequence, playerSequence;
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
_events.Update(diff);
@@ -708,7 +711,7 @@ class npc_simon_bunny : public CreatureScript
}
}
- void DoAction(int32 action)
+ void DoAction(int32 action) OVERRIDE
{
switch (action)
{
@@ -734,7 +737,7 @@ class npc_simon_bunny : public CreatureScript
}
// Called by color clusters script (go_simon_cluster) and used for knowing the button pressed by player
- void SetData(uint32 type, uint32 /*data*/)
+ void SetData(uint32 type, uint32 /*data*/) OVERRIDE
{
if (!listening)
return;
@@ -757,7 +760,7 @@ class npc_simon_bunny : public CreatureScript
}
// Used for getting involved player guid. Parameter id is used for defining if is a large(Monument) or small(Relic) node
- void SetGUID(uint64 guid, int32 id)
+ void SetGUID(uint64 guid, int32 id) OVERRIDE
{
me->SetCanFly(true);
@@ -1047,7 +1050,7 @@ class npc_simon_bunny : public CreatureScript
}
}
- void SpellHitTarget(Unit* target, const SpellInfo* spell)
+ void SpellHitTarget(Unit* target, const SpellInfo* spell) OVERRIDE
{
// Cast SPELL_BAD_PRESS_DAMAGE with scaled basepoints when the visual hits the target.
// Need Fix: When SPELL_BAD_PRESS_TRIGGER hits target it triggers spell SPELL_BAD_PRESS_DAMAGE by itself
@@ -1079,7 +1082,7 @@ class npc_simon_bunny : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_simon_bunnyAI(creature);
}
@@ -1090,7 +1093,7 @@ class go_simon_cluster : public GameObjectScript
public:
go_simon_cluster() : GameObjectScript("go_simon_cluster") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (Creature* bunny = go->FindNearestCreature(NPC_SIMON_BUNNY, 12.0f, true))
bunny->AI()->SetData(go->GetEntry(), 0);
@@ -1116,14 +1119,14 @@ class go_apexis_relic : public GameObjectScript
public:
go_apexis_relic() : GameObjectScript("go_apexis_relic") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
player->PrepareGossipMenu(go, go->GetGOInfo()->questgiver.gossipID);
player->SendPreparedGossip(go);
return true;
}
- bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 /*action*/)
+ bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
{
player->CLOSE_GOSSIP_MENU();
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index ea1fde3139f..fc7f4d2ae00 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -44,7 +44,7 @@ EndContentData */
## npc_aeranas
######*/
-enum eAeranas
+enum Aeranas
{
SAY_SUMMON = 0,
SAY_FREE = 1,
@@ -61,9 +61,9 @@ class npc_aeranas : public CreatureScript
public:
npc_aeranas() : CreatureScript("npc_aeranas") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_aeranasAI (creature);
+ return new npc_aeranasAI(creature);
}
struct npc_aeranasAI : public ScriptedAI
@@ -74,7 +74,7 @@ public:
uint32 EnvelopingWinds_Timer;
uint32 Shock_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Faction_Timer = 8000;
EnvelopingWinds_Timer = 9000;
@@ -86,7 +86,7 @@ public:
Talk(SAY_SUMMON);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (Faction_Timer)
{
@@ -132,7 +132,7 @@ public:
## npc_ancestral_wolf
######*/
-enum eAncestralWolf
+enum AncestralWolf
{
EMOTE_WOLF_LIFT_HEAD = 0,
EMOTE_WOLF_HOWL = 1,
@@ -148,7 +148,7 @@ class npc_ancestral_wolf : public CreatureScript
public:
npc_ancestral_wolf() : CreatureScript("npc_ancestral_wolf") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_ancestral_wolfAI(creature);
}
@@ -168,13 +168,14 @@ public:
Creature* pRyga;
- void Reset()
+ void Reset() OVERRIDE
{
pRyga = NULL;
DoCast(me, SPELL_ANCESTRAL_WOLF_BUFF, true);
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!pRyga && who->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(who, 15.0f))
if (Creature* temp = who->ToCreature())
@@ -183,7 +184,7 @@ public:
npc_escortAI::MoveInLineOfSight(who);
}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -208,7 +209,7 @@ public:
#define GOSSIP_NALADU_ITEM1 "Why don't you escape?"
-enum eNaladu
+enum Naladu
{
GOSSIP_TEXTID_NALADU1 = 9788
};
@@ -218,7 +219,7 @@ class npc_naladu : public CreatureScript
public:
npc_naladu() : CreatureScript("npc_naladu") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -227,7 +228,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -246,7 +247,7 @@ public:
#define GOSSIP_TRACY_PROUDWELL_ITEM1 "I heard that your dog Fei Fei took Klatu's prayer beads..."
#define GOSSIP_TRACY_PROUDWELL_ITEM2 "<back>"
-enum eTracy
+enum Tracy
{
GOSSIP_TEXTID_TRACY_PROUDWELL1 = 10689,
QUEST_DIGGING_FOR_PRAYER_BEADS = 10916
@@ -257,7 +258,7 @@ class npc_tracy_proudwell : public CreatureScript
public:
npc_tracy_proudwell() : CreatureScript("npc_tracy_proudwell") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -277,7 +278,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -301,7 +302,7 @@ public:
#define GOSSIP_TROLLBANE_ITEM2 "<more>"
#define GOSSIP_TROLLBANE_ITEM3 "Tell me of your homeland."
-enum eTrollbane
+enum Trollbane
{
GOSSIP_TEXTID_TROLLBANE1 = 9932,
GOSSIP_TEXTID_TROLLBANE2 = 9933,
@@ -313,7 +314,7 @@ class npc_trollbane : public CreatureScript
public:
npc_trollbane() : CreatureScript("npc_trollbane") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -333,7 +334,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -349,7 +350,7 @@ public:
## npc_wounded_blood_elf
######*/
-enum eWoundedBloodElf
+enum WoundedBloodElf
{
SAY_ELF_START = 0,
SAY_ELF_SUMMON1 = 1,
@@ -366,7 +367,7 @@ class npc_wounded_blood_elf : public CreatureScript
public:
npc_wounded_blood_elf() : CreatureScript("npc_wounded_blood_elf") { }
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
{
@@ -380,7 +381,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_wounded_blood_elfAI(creature);
}
@@ -389,7 +390,7 @@ public:
{
npc_wounded_blood_elfAI(Creature* creature) : npc_escortAI(creature) {}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -423,15 +424,15 @@ public:
}
}
- void Reset() { }
+ void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
Talk(SAY_ELF_AGGRO);
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
summoned->AI()->AttackStart(me);
}
@@ -442,7 +443,7 @@ public:
## npc_fel_guard_hound
######*/
-enum eFelGuard
+enum FelGuard
{
SPELL_SUMMON_POO = 37688,
@@ -454,7 +455,7 @@ class npc_fel_guard_hound : public CreatureScript
public:
npc_fel_guard_hound() : CreatureScript("npc_fel_guard_hound") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fel_guard_houndAI(creature);
}
@@ -466,13 +467,13 @@ public:
uint32 uiCheckTimer;
uint64 uiHelboarGUID;
- void Reset()
+ void Reset() OVERRIDE
{
uiCheckTimer = 5000; //check for creature every 5 sec
uiHelboarGUID = 0;
}
- void MovementInform(uint32 uiType, uint32 uiId)
+ void MovementInform(uint32 uiType, uint32 uiId) OVERRIDE
{
if (uiType != POINT_MOTION_TYPE || uiId != 1)
return;
@@ -487,7 +488,7 @@ public:
}
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 uiDiff) OVERRIDE
{
if (uiCheckTimer <= uiDiff)
{
diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp
index 2bb688026d1..1d5e1b8b6a5 100644
--- a/src/server/scripts/Outland/zone_nagrand.cpp
+++ b/src/server/scripts/Outland/zone_nagrand.cpp
@@ -60,7 +60,7 @@ class npc_greatmother_geyah : public CreatureScript
public:
npc_greatmother_geyah() : CreatureScript("npc_greatmother_geyah") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -121,7 +121,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -147,7 +147,7 @@ public:
## npc_maghar_captive
#####*/
-enum eMagharCaptive
+enum MagharCaptive
{
SAY_MAG_START = 0,
SAY_MAG_NO_ESCAPE = 0,
@@ -178,7 +178,7 @@ class npc_maghar_captive : public CreatureScript
public:
npc_maghar_captive() : CreatureScript("npc_maghar_captive") { }
- bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_TOTEM_KARDASH_H)
{
@@ -199,7 +199,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_maghar_captiveAI(creature);
}
@@ -212,19 +212,19 @@ public:
uint32 m_uiHealTimer;
uint32 m_uiFrostShockTimer;
- void Reset()
+ void Reset() OVERRIDE
{
m_uiChainLightningTimer = 1000;
m_uiHealTimer = 0;
m_uiFrostShockTimer = 6000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoCast(me, SPELL_EARTHBIND_TOTEM, false);
}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -249,7 +249,7 @@ public:
}
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned->GetEntry() == NPC_MURK_BRUTE)
summoned->AI()->Talk(SAY_MAG_NO_ESCAPE);
@@ -263,7 +263,7 @@ public:
}
- void SpellHitTarget(Unit* /*target*/, const SpellInfo* pSpell)
+ void SpellHitTarget(Unit* /*target*/, const SpellInfo* pSpell) OVERRIDE
{
if (pSpell->Id == SPELL_CHAIN_LIGHTNING)
{
@@ -274,7 +274,7 @@ public:
}
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 uiDiff) OVERRIDE
{
npc_escortAI::UpdateAI(uiDiff);
if (!me->GetVictim())
@@ -321,20 +321,21 @@ class npc_creditmarker_visit_with_ancestors : public CreatureScript
public:
npc_creditmarker_visit_with_ancestors() : CreatureScript("npc_creditmarker_visit_with_ancestors") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_creditmarker_visit_with_ancestorsAI (creature);
+ return new npc_creditmarker_visit_with_ancestorsAI(creature);
}
struct npc_creditmarker_visit_with_ancestorsAI : public ScriptedAI
{
npc_creditmarker_visit_with_ancestorsAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() {}
+ void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (!who)
return;
@@ -384,7 +385,7 @@ class go_corkis_prison : public GameObjectScript
public:
go_corkis_prison() : GameObjectScript("go_corkis_prison") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->SetGoState(GO_STATE_READY);
if (go->GetEntry() == GO_CORKIS_PRISON)
@@ -425,7 +426,7 @@ class npc_corki : public CreatureScript
public:
npc_corki() : CreatureScript("npc_corki") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_corkiAI(creature);
}
@@ -437,13 +438,13 @@ public:
uint32 Say_Timer;
bool ReleasedFromCage;
- void Reset()
+ void Reset() OVERRIDE
{
Say_Timer = 5000;
ReleasedFromCage = false;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (ReleasedFromCage)
{
@@ -457,7 +458,7 @@ public:
}
}
- void MovementInform(uint32 type, uint32 id)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type == POINT_MOTION_TYPE && id == 1)
{
@@ -509,7 +510,7 @@ class npc_kurenai_captive : public CreatureScript
public:
npc_kurenai_captive() : CreatureScript("npc_kurenai_captive") { }
- bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_TOTEM_KARDASH_A)
{
@@ -527,7 +528,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_kurenai_captiveAI(creature);
}
@@ -540,19 +541,19 @@ public:
uint32 HealTimer;
uint32 FrostShockTimer;
- void Reset()
+ void Reset() OVERRIDE
{
ChainLightningTimer = 1000;
HealTimer = 0;
FrostShockTimer = 6000;
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
DoCast(me, SPELL_KUR_EARTHBIND_TOTEM, false);
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (!HasEscortState(STATE_ESCORT_ESCORTING))
return;
@@ -564,7 +565,7 @@ public:
}
}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
switch (waypointId)
{
@@ -593,7 +594,7 @@ public:
}
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned->GetEntry() == NPC_KUR_MURK_BRUTE)
Talk(SAY_KUR_NO_ESCAPE);
@@ -607,7 +608,7 @@ public:
summoned->AI()->AttackStart(me);
}
- void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell)
+ void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) OVERRIDE
{
if (spell->Id == SPELL_KUR_CHAIN_LIGHTNING)
{
@@ -626,7 +627,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -677,7 +678,7 @@ class go_warmaul_prison : public GameObjectScript
public:
go_warmaul_prison() : GameObjectScript("go_warmaul_prison") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_FINDING_THE_SURVIVORS) != QUEST_STATUS_INCOMPLETE)
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index f8be2a43bf8..7c419243c20 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -43,7 +43,7 @@ EndContentData */
######*/
//used by 20209, 20417, 20418, 20440, signed for 20209
-enum eManaforgeConsoleData
+enum ManaforgeConsoleData
{
EMOTE_START = 0,
EMOTE_60 = 1,
@@ -74,9 +74,9 @@ class npc_manaforge_control_console : public CreatureScript
public:
npc_manaforge_control_console() : CreatureScript("npc_manaforge_control_console") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_manaforge_control_consoleAI (creature);
+ return new npc_manaforge_control_consoleAI(creature);
}
struct npc_manaforge_control_consoleAI : public ScriptedAI
@@ -91,7 +91,7 @@ public:
uint64 goConsole;
Creature* add;
- void Reset()
+ void Reset() OVERRIDE
{
Event_Timer = 3000;
Wave_Timer = 0;
@@ -102,9 +102,9 @@ public:
add = NULL;
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- /*void SpellHit(Unit* caster, const SpellInfo* spell)
+ /*void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
//we have no way of telling the Creature was hit by spell -> got aura applied after 10-12 seconds
//then no way for the mobs to actually stop the shutdown as intended.
@@ -112,7 +112,7 @@ public:
DoSay("Silence! I kill you!", LANG_UNIVERSAL, NULL);
}*/
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(EMOTE_ABORT);
@@ -234,7 +234,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (Event_Timer <= diff)
{
@@ -311,7 +311,7 @@ class go_manaforge_control_console : public GameObjectScript
public:
go_manaforge_control_console() : GameObjectScript("go_manaforge_control_console") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
{
@@ -360,7 +360,7 @@ public:
######*/
// The Speech of Dawnforge, Ardonis & Pathaleon
-enum eCommanderDawnforgeData
+enum CommanderDawnforgeData
{
SAY_COMMANDER_DAWNFORGE_1 = 0,
SAY_COMMANDER_DAWNFORGE_2 = 1,
@@ -393,7 +393,7 @@ class npc_commander_dawnforge : public CreatureScript
public:
npc_commander_dawnforge() : CreatureScript("npc_commander_dawnforge") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_commander_dawnforgeAI(creature);
}
@@ -414,7 +414,7 @@ public:
float angle_dawnforge;
float angle_ardonis;
- void Reset()
+ void Reset() OVERRIDE
{
PlayerGUID = 0;
ardonisGUID = 0;
@@ -426,9 +426,9 @@ public:
isEvent = false;
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
pathaleonGUID = summoned->GetGUID();
}
@@ -506,7 +506,7 @@ public:
return false;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Is event even running?
if (!isEvent)
@@ -644,7 +644,7 @@ class at_commander_dawnforge : public AreaTriggerScript
public:
at_commander_dawnforge() : AreaTriggerScript("at_commander_dawnforge") { }
- bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/)
+ bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE
{
//if player lost aura or not have at all, we should not try start event.
if (!player->HasAura(SPELL_SUNFURY_DISGUISE))
@@ -666,7 +666,7 @@ public:
/*######
## npc_professor_dabiri
######*/
-enum eProfessorDabiriData
+enum ProfessorDabiriData
{
SPELL_PHASE_DISTRUPTOR = 35780,
@@ -687,7 +687,7 @@ public:
//if (quest->GetQuestId() == QUEST_DIMENSIUS)
//creature->AI()->Talk(WHISPER_DABIRI, player->GetGUID());
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -699,7 +699,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -717,7 +717,7 @@ public:
## npc_phase_hunter
######*/
-enum ePhaseHunterData
+enum PhaseHunterData
{
QUEST_RECHARGING_THE_BATTERIES = 10190,
@@ -739,9 +739,9 @@ class npc_phase_hunter : public CreatureScript
public:
npc_phase_hunter() : CreatureScript("npc_phase_hunter") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_phase_hunterAI (creature);
+ return new npc_phase_hunterAI(creature);
}
struct npc_phase_hunterAI : public ScriptedAI
@@ -758,7 +758,7 @@ public:
uint32 ManaBurnTimer;
- void Reset()
+ void Reset() OVERRIDE
{
Weak = false;
Materialize = false;
@@ -773,18 +773,18 @@ public:
me->UpdateEntry(NPC_PHASE_HUNTER_ENTRY);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (who->GetTypeId() == TYPEID_PLAYER)
PlayerGUID = who->GetGUID();
}
- //void SpellHit(Unit* /*caster*/, const SpellInfo* /*spell*/)
+ //void SpellHit(Unit* /*caster*/, const SpellInfo* /*spell*/) OVERRIDE
//{
// DoCast(me, SPELL_DE_MATERIALIZE);
//}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Materialize)
{
@@ -850,7 +850,7 @@ public:
/*######
## npc_bessy
######*/
-enum eBessyData
+enum BessyData
{
Q_ALMABTRIEB = 10337,
N_THADELL = 20464,
@@ -865,7 +865,7 @@ class npc_bessy : public CreatureScript
public:
npc_bessy() : CreatureScript("npc_bessy") { }
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == Q_ALMABTRIEB)
{
@@ -876,7 +876,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_bessyAI(creature);
}
@@ -885,13 +885,13 @@ public:
{
npc_bessyAI(Creature* creature) : npc_escortAI(creature) {}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (Player* player = GetPlayerForEscort())
player->FailQuest(Q_ALMABTRIEB);
}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -920,12 +920,12 @@ public:
}
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
summoned->AI()->AttackStart(me);
}
- void Reset()
+ void Reset() OVERRIDE
{
me->RestoreFaction();
}
@@ -947,7 +947,7 @@ class npc_maxx_a_million_escort : public CreatureScript
public:
npc_maxx_a_million_escort() : CreatureScript("npc_maxx_a_million_escort") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_maxx_a_million_escortAI(creature);
}
@@ -959,13 +959,13 @@ public:
bool bTake;
uint32 uiTakeTimer;
- void Reset()
+ void Reset() OVERRIDE
{
bTake=false;
uiTakeTimer=3000;
}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -991,13 +991,13 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (Player* player = GetPlayerForEscort())
player->FailQuest(QUEST_MARK_V_IS_ALIVE);
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 uiDiff) OVERRIDE
{
npc_escortAI::UpdateAI(uiDiff);
@@ -1021,7 +1021,7 @@ public:
}
};
- bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_MARK_V_IS_ALIVE)
{
@@ -1050,7 +1050,7 @@ class go_captain_tyralius_prison : public GameObjectScript
public:
go_captain_tyralius_prison() : GameObjectScript("go_captain_tyralius_prison") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
if (Creature* tyralius = go->FindNearestCreature(NPC_CAPTAIN_TYRALIUS, 1.0f))
diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
index a51940a9143..b7cf46ad8ae 100644
--- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
@@ -53,7 +53,7 @@ EndContentData */
# npc_mature_netherwing_drake
#####*/
-enum eMatureNetherwing
+enum MatureNetherwing
{
SAY_JUST_EATEN = 0,
@@ -73,7 +73,7 @@ class npc_mature_netherwing_drake : public CreatureScript
public:
npc_mature_netherwing_drake() : CreatureScript("npc_mature_netherwing_drake") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_mature_netherwing_drakeAI(creature);
}
@@ -90,7 +90,7 @@ public:
uint32 EatTimer;
uint32 CastTimer;
- void Reset()
+ void Reset() OVERRIDE
{
uiPlayerGUID = 0;
@@ -101,7 +101,7 @@ public:
CastTimer = 5000;
}
- void SpellHit(Unit* pCaster, SpellInfo const* spell)
+ void SpellHit(Unit* pCaster, SpellInfo const* spell) OVERRIDE
{
if (bCanEat || bIsEating)
return;
@@ -113,7 +113,7 @@ public:
}
}
- void MovementInform(uint32 type, uint32 id)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -126,7 +126,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (bCanEat || bIsEating)
{
@@ -190,21 +190,28 @@ public:
# npc_enslaved_netherwing_drake
####*/
-#define FACTION_DEFAULT 62
-#define FACTION_FRIENDLY 1840 // Not sure if this is correct, it was taken off of Mordenai.
+enum EnshlavedNetherwingDrake
+{
+ // Factions
+ FACTION_DEFAULT = 62,
+ FACTION_FRIENDLY = 1840, // Not sure if this is correct, it was taken off of Mordenai.
+
+ // Spells
+ SPELL_HIT_FORCE_OF_NELTHARAKU = 38762,
+ SPELL_FORCE_OF_NELTHARAKU = 38775,
-#define SPELL_HIT_FORCE_OF_NELTHARAKU 38762
-#define SPELL_FORCE_OF_NELTHARAKU 38775
+ // Creatures
+ NPC_DRAGONMAW_SUBJUGATOR = 21718,
+ NPC_ESCAPE_DUMMY = 22317
-#define CREATURE_DRAGONMAW_SUBJUGATOR 21718
-#define CREATURE_ESCAPE_DUMMY 22317
+};
class npc_enslaved_netherwing_drake : public CreatureScript
{
public:
npc_enslaved_netherwing_drake() : CreatureScript("npc_enslaved_netherwing_drake") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_enslaved_netherwing_drakeAI(creature);
}
@@ -222,7 +229,7 @@ public:
uint32 FlyTimer;
bool Tapped;
- void Reset()
+ void Reset() OVERRIDE
{
if (!Tapped)
me->setFaction(FACTION_DEFAULT);
@@ -232,7 +239,7 @@ public:
me->SetVisible(true);
}
- void SpellHit(Unit* caster, const SpellInfo* spell)
+ void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
if (!caster)
return;
@@ -245,7 +252,7 @@ public:
me->setFaction(FACTION_FRIENDLY);
DoCast(caster, SPELL_FORCE_OF_NELTHARAKU, true);
- Unit* Dragonmaw = me->FindNearestCreature(CREATURE_DRAGONMAW_SUBJUGATOR, 50);
+ Unit* Dragonmaw = me->FindNearestCreature(NPC_DRAGONMAW_SUBJUGATOR, 50);
if (Dragonmaw)
{
me->AddThreat(Dragonmaw, 100000.0f);
@@ -258,7 +265,7 @@ public:
}
}
- void MovementInform(uint32 type, uint32 id)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -280,7 +287,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
{
@@ -304,7 +311,7 @@ public:
dz += 20; // so it's in the air, not ground*/
Position pos;
- if (Unit* EscapeDummy = me->FindNearestCreature(CREATURE_ESCAPE_DUMMY, 30))
+ if (Unit* EscapeDummy = me->FindNearestCreature(NPC_ESCAPE_DUMMY, 30))
EscapeDummy->GetPosition(&pos);
else
{
@@ -335,7 +342,7 @@ class npc_dragonmaw_peon : public CreatureScript
public:
npc_dragonmaw_peon() : CreatureScript("npc_dragonmaw_peon") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_dragonmaw_peonAI(creature);
}
@@ -348,14 +355,14 @@ public:
bool Tapped;
uint32 PoisonTimer;
- void Reset()
+ void Reset() OVERRIDE
{
PlayerGUID = 0;
Tapped = false;
PoisonTimer = 0;
}
- void SpellHit(Unit* caster, const SpellInfo* spell)
+ void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
{
if (!caster)
return;
@@ -373,7 +380,7 @@ public:
}
}
- void MovementInform(uint32 type, uint32 id)
+ void MovementInform(uint32 type, uint32 id) OVERRIDE
{
if (type != POINT_MOTION_TYPE)
return;
@@ -385,7 +392,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (PoisonTimer)
{
@@ -414,7 +421,7 @@ class npc_drake_dealer_hurlunk : public CreatureScript
public:
npc_drake_dealer_hurlunk() : CreatureScript("npc_drake_dealer_hurlunk") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_TRADE)
@@ -423,7 +430,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsVendor() && player->GetReputationRank(1015) == REP_EXALTED)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
@@ -446,7 +453,7 @@ class npcs_flanis_swiftwing_and_kagrosh : public CreatureScript
public:
npcs_flanis_swiftwing_and_kagrosh() : CreatureScript("npcs_flanis_swiftwing_and_kagrosh") { }
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -472,7 +479,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(30658, 1, true))
player->ADD_GOSSIP_ITEM(0, GOSSIP_HSK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -503,7 +510,7 @@ class npc_murkblood_overseer : public CreatureScript
public:
npc_murkblood_overseer() : CreatureScript("npc_murkblood_overseer") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -543,7 +550,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_11082) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(0, GOSSIP_HMO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -570,7 +577,7 @@ class npc_oronok_tornheart : public CreatureScript
public:
npc_oronok_tornheart() : CreatureScript("npc_oronok_tornheart") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -610,7 +617,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -647,7 +654,7 @@ class npc_karynaku : public CreatureScript
public:
npc_karynaku() : CreatureScript("npc_karynaku") { }
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_ALLY_OF_NETHER)
player->ActivateTaxiPathTo(TAXI_PATH_ID);
@@ -663,7 +670,7 @@ class npc_karynaku : public CreatureScript
# npc_overlord_morghor
# this whole script is wrong and needs a rewrite.even the illidan npc used is the wrong one.npc id 23467 may be the correct one
####*/
-enum eOverlordData
+enum OverlordData
{
QUEST_LORD_ILLIDAN_STORMRAGE = 11108,
@@ -701,7 +708,7 @@ class npc_overlord_morghor : public CreatureScript
public:
npc_overlord_morghor() : CreatureScript("npc_overlord_morghor") { }
- bool OnQuestAccept(Player* player, Creature* creature, const Quest *_Quest)
+ bool OnQuestAccept(Player* player, Creature* creature, const Quest *_Quest) OVERRIDE
{
if (_Quest->GetQuestId() == QUEST_LORD_ILLIDAN_STORMRAGE)
{
@@ -712,7 +719,7 @@ public:
return false;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_overlord_morghorAI(creature);
}
@@ -729,7 +736,7 @@ public:
bool Event;
- void Reset()
+ void Reset() OVERRIDE
{
PlayerGUID = 0;
IllidanGUID = 0;
@@ -962,7 +969,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!ConversationTimer)
return;
@@ -980,7 +987,7 @@ public:
# npc_earthmender_wilda
####*/
-enum eEarthmender
+enum Earthmender
{
SAY_WIL_START = 0,
SAY_WIL_AGGRO = 1,
@@ -1005,7 +1012,7 @@ class npc_earthmender_wilda : public CreatureScript
public:
npc_earthmender_wilda() : CreatureScript("npc_earthmender_wilda") { }
- bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_ESCAPE_COILSCAR)
{
@@ -1018,7 +1025,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_earthmender_wildaAI(creature);
}
@@ -1029,12 +1036,12 @@ public:
uint32 m_uiHealingTimer;
- void Reset()
+ void Reset() OVERRIDE
{
m_uiHealingTimer = 0;
}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -1092,7 +1099,7 @@ public:
}
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned) OVERRIDE
{
if (summoned->GetEntry() == NPC_COILSKAR_ASSASSIN)
summoned->AI()->AttackStart(me);
@@ -1110,7 +1117,7 @@ public:
DoSummon(NPC_COILSKAR_ASSASSIN, me, 15.0f, 5000, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
//don't always use
if (rand()%5)
@@ -1125,7 +1132,7 @@ public:
}
}
- void UpdateAI(uint32 uiDiff)
+ void UpdateAI(uint32 uiDiff) OVERRIDE
{
npc_escortAI::UpdateAI(uiDiff);
@@ -1248,7 +1255,7 @@ class npc_torloth_the_magnificent : public CreatureScript
public:
npc_torloth_the_magnificent() : CreatureScript("npc_torloth_the_magnificent") { }
- CreatureAI* GetAI(Creature* c) const
+ CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new npc_torloth_the_magnificentAI(c);
}
@@ -1266,7 +1273,7 @@ public:
bool Timers;
- void Reset()
+ void Reset() OVERRIDE
{
AnimationTimer = 4000;
AnimationCount = 0;
@@ -1279,7 +1286,7 @@ public:
me->SetTarget(0);
}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/)OVERRIDE {}
void HandleAnimation()
{
@@ -1326,7 +1333,7 @@ public:
++AnimationCount;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (AnimationTimer)
{
@@ -1371,7 +1378,7 @@ public:
DoMeleeAttackIfReady();
}
- void JustDied(Unit* killer)
+ void JustDied(Unit* killer) OVERRIDE
{
switch (killer->GetTypeId())
{
@@ -1403,7 +1410,7 @@ class npc_lord_illidan_stormrage : public CreatureScript
public:
npc_lord_illidan_stormrage() : CreatureScript("npc_lord_illidan_stormrage") { }
- CreatureAI* GetAI(Creature* c) const
+ CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new npc_lord_illidan_stormrageAI(c);
}
@@ -1424,7 +1431,7 @@ public:
bool Announced;
bool Failed;
- void Reset()
+ void Reset() OVERRIDE
{
PlayerGUID = 0;
@@ -1440,9 +1447,10 @@ public:
me->SetVisible(false);
}
- void EnterCombat(Unit* /*who*/) {}
- void MoveInLineOfSight(Unit* /*who*/) {}
- void AttackStart(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
+ void AttackStart(Unit* /*who*/) OVERRIDE {}
void SummonNextWave();
@@ -1513,7 +1521,7 @@ public:
Announced = false;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!PlayerGUID || !EventStarted)
return;
@@ -1551,7 +1559,7 @@ class npc_illidari_spawn : public CreatureScript
public:
npc_illidari_spawn() : CreatureScript("npc_illidari_spawn") { }
- CreatureAI* GetAI(Creature* c) const
+ CreatureAI* GetAI(Creature* c) const OVERRIDE
{
return new npc_illidari_spawnAI(c);
}
@@ -1564,15 +1572,15 @@ public:
uint32 SpellTimer1, SpellTimer2, SpellTimer3;
bool Timers;
- void Reset()
+ void Reset() OVERRIDE
{
LordIllidanGUID = 0;
Timers = false;
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
me->RemoveCorpse();
if (Creature* LordIllidan = (Unit::GetCreature(*me, LordIllidanGUID)))
@@ -1580,7 +1588,7 @@ public:
CAST_AI(npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI, LordIllidan->AI())->LiveCounter();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1737,7 +1745,7 @@ class go_crystal_prison : public GameObjectScript
public:
go_crystal_prison() : GameObjectScript("go_crystal_prison") { }
- bool OnQuestAccept(Player* player, GameObject* /*go*/, Quest const* quest)
+ bool OnQuestAccept(Player* player, GameObject* /*go*/, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH)
{
@@ -1758,52 +1766,55 @@ public:
# npc_enraged_spirits
####*/
-/* QUESTS */
-#define QUEST_ENRAGED_SPIRITS_FIRE_EARTH 10458
-#define QUEST_ENRAGED_SPIRITS_AIR 10481
-#define QUEST_ENRAGED_SPIRITS_WATER 10480
-
-/* Totem */
-#define ENTRY_TOTEM_OF_SPIRITS 21071
-#define RADIUS_TOTEM_OF_SPIRITS 15
-
-/* SPIRITS */
-#define ENTRY_ENRAGED_EARTH_SPIRIT 21050
-#define ENTRY_ENRAGED_FIRE_SPIRIT 21061
-#define ENTRY_ENRAGED_AIR_SPIRIT 21060
-#define ENTRY_ENRAGED_WATER_SPIRIT 21059
-
-/* SOULS */
-#define ENTRY_EARTHEN_SOUL 21073
-#define ENTRY_FIERY_SOUL 21097
-#define ENTRY_ENRAGED_AIRY_SOUL 21116
-#define ENTRY_ENRAGED_WATERY_SOUL 21109 // wrong model
-
-/* SPELL KILLCREDIT - not working!?! - using KilledMonsterCredit */
-#define SPELL_EARTHEN_SOUL_CAPTURED_CREDIT 36108
-#define SPELL_FIERY_SOUL_CAPTURED_CREDIT 36117
-#define SPELL_AIRY_SOUL_CAPTURED_CREDIT 36182
-#define SPELL_WATERY_SOUL_CAPTURED_CREDIT 36171
-
-/* KilledMonsterCredit Workaround */
-#define CREDIT_FIRE 21094
-#define CREDIT_WATER 21095
-#define CREDIT_AIR 21096
-#define CREDIT_EARTH 21092
-
-/* Captured Spell/Buff */
-#define SPELL_SOUL_CAPTURED 36115
-
-/* Factions */
-#define ENRAGED_SOUL_FRIENDLY 35
-#define ENRAGED_SOUL_HOSTILE 14
+enum Enraged_Dpirits
+{
+// QUESTS
+ QUEST_ENRAGED_SPIRITS_FIRE_EARTH = 10458,
+ QUEST_ENRAGED_SPIRITS_AIR = 10481,
+ QUEST_ENRAGED_SPIRITS_WATER = 10480,
+
+ // Totem
+ ENTRY_TOTEM_OF_SPIRITS = 21071,
+ RADIUS_TOTEM_OF_SPIRITS = 15,
+
+ // SPIRITS
+ NPC_ENRAGED_EARTH_SPIRIT = 21050,
+ NPC_ENRAGED_FIRE_SPIRIT = 21061,
+ NPC_ENRAGED_AIR_SPIRIT = 21060,
+ NPC_ENRAGED_WATER_SPIRIT = 21059,
+
+ // SOULS
+ NPC_EARTHEN_SOUL = 21073,
+ NPC_FIERY_SOUL = 21097,
+ NPC_ENRAGED_AIRY_SOUL = 21116,
+ NPC_ENRAGED_WATERY_SOUL = 21109, // wrong model
+
+ // SPELL KILLCREDIT - not working!?! - using KilledMonsterCredit
+ SPELL_EARTHEN_SOUL_CAPTURED_CREDIT = 36108,
+ SPELL_FIERY_SOUL_CAPTURED_CREDIT = 36117,
+ SPELL_AIRY_SOUL_CAPTURED_CREDIT = 36182,
+ SPELL_WATERY_SOUL_CAPTURED_CREDIT = 36171,
+
+ // KilledMonsterCredit Workaround
+ NPC_CREDIT_FIRE = 21094,
+ NPC_CREDIT_WATER = 21095,
+ NPC_CREDIT_AIR = 21096,
+ NPC_CREDIT_EARTH = 21092,
+
+ // Captured Spell / Buff
+ SPELL_SOUL_CAPTURED = 36115,
+
+ // Factions
+ FACTION_ENRAGED_SOUL_FRIENDLY = 35,
+ FACTION_ENRAGED_SOUL_HOSTILE = 14
+};
class npc_enraged_spirit : public CreatureScript
{
public:
npc_enraged_spirit() : CreatureScript("npc_enraged_spirit") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_enraged_spiritAI(creature);
}
@@ -1812,11 +1823,11 @@ public:
{
npc_enraged_spiritAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() { }
+ void Reset() OVERRIDE {}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/)OVERRIDE {}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
// always spawn spirit on death
// if totem around
@@ -1826,26 +1837,28 @@ public:
switch (me->GetEntry())
{
- case ENTRY_ENRAGED_FIRE_SPIRIT:
- entry = ENTRY_FIERY_SOUL;
- //credit = SPELL_FIERY_SOUL_CAPTURED_CREDIT;
- credit = CREDIT_FIRE;
- break;
- case ENTRY_ENRAGED_EARTH_SPIRIT:
- entry = ENTRY_EARTHEN_SOUL;
- //credit = SPELL_EARTHEN_SOUL_CAPTURED_CREDIT;
- credit = CREDIT_EARTH;
- break;
- case ENTRY_ENRAGED_AIR_SPIRIT:
- entry = ENTRY_ENRAGED_AIRY_SOUL;
- //credit = SPELL_AIRY_SOUL_CAPTURED_CREDIT;
- credit = CREDIT_AIR;
- break;
- case ENTRY_ENRAGED_WATER_SPIRIT:
- entry = ENTRY_ENRAGED_WATERY_SOUL;
- //credit = SPELL_WATERY_SOUL_CAPTURED_CREDIT;
- credit = CREDIT_WATER;
- break;
+ case NPC_ENRAGED_FIRE_SPIRIT:
+ entry = NPC_FIERY_SOUL;
+ //credit = SPELL_FIERY_SOUL_CAPTURED_CREDIT;
+ credit = NPC_CREDIT_FIRE;
+ break;
+ case NPC_ENRAGED_EARTH_SPIRIT:
+ entry = NPC_EARTHEN_SOUL;
+ //credit = SPELL_EARTHEN_SOUL_CAPTURED_CREDIT;
+ credit = NPC_CREDIT_EARTH;
+ break;
+ case NPC_ENRAGED_AIR_SPIRIT:
+ entry = NPC_ENRAGED_AIRY_SOUL;
+ //credit = SPELL_AIRY_SOUL_CAPTURED_CREDIT;
+ credit = NPC_CREDIT_AIR;
+ break;
+ case NPC_ENRAGED_WATER_SPIRIT:
+ entry = NPC_ENRAGED_WATERY_SOUL;
+ //credit = SPELL_WATERY_SOUL_CAPTURED_CREDIT;
+ credit = NPC_CREDIT_WATER;
+ break;
+ default:
+ break;
}
// Spawn Soul on Kill ALWAYS!
@@ -1861,7 +1874,7 @@ public:
totemOspirits = me->FindNearestCreature(ENTRY_TOTEM_OF_SPIRITS, RADIUS_TOTEM_OF_SPIRITS);
if (totemOspirits)
{
- Summoned->setFaction(ENRAGED_SOUL_FRIENDLY);
+ Summoned->setFaction(FACTION_ENRAGED_SOUL_FRIENDLY);
Summoned->GetMotionMaster()->MovePoint(0, totemOspirits->GetPositionX(), totemOspirits->GetPositionY(), Summoned->GetPositionZ());
if (Unit* owner = totemOspirits->GetOwner())
@@ -1896,13 +1909,13 @@ class spell_unlocking_zuluheds_chains : public SpellScriptLoader
GetCaster()->ToPlayer()->CastedCreatureOrGO(NPC_KARYNAKU, karynaku->GetGUID(), GetSpellInfo()->Id);
}
- void Register()
+ void Register() OVERRIDE
{
AfterHit += SpellHitFn(spell_unlocking_zuluheds_chains_SpellScript::HandleAfterHit);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_unlocking_zuluheds_chains_SpellScript();
}
@@ -1930,14 +1943,14 @@ public:
{
npc_shadowmoon_tuber_nodeAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset()
+ void Reset() OVERRIDE
{
tapped = false;
tuberGUID = 0;
resetTimer = 60000;
}
- void SetData(uint32 id, uint32 data)
+ void SetData(uint32 id, uint32 data) OVERRIDE
{
if (id == TYPE_BOAR && data == DATA_BOAR)
{
@@ -1954,7 +1967,7 @@ public:
}
}
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
+ void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE
{
if (!tapped && spell->Id == SPELL_WHISTLE)
{
@@ -1968,7 +1981,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (tapped)
{
@@ -1992,7 +2005,7 @@ public:
uint32 resetTimer;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_shadowmoon_tuber_nodeAI(creature);
}
diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp
index 06b34a8f0e2..6f4694a5924 100644
--- a/src/server/scripts/Outland/zone_shattrath_city.cpp
+++ b/src/server/scripts/Outland/zone_shattrath_city.cpp
@@ -46,7 +46,7 @@ EndContentData */
#define GOSSIP_RALIQ "You owe Sim'salabim money. Hand them over or die!"
-enum eRaliq
+enum Raliq
{
SPELL_UPPERCUT = 10966,
QUEST_CRACK_SKULLS = 10009,
@@ -58,7 +58,7 @@ class npc_raliq_the_drunk : public CreatureScript
public:
npc_raliq_the_drunk() : CreatureScript("npc_raliq_the_drunk") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -70,7 +70,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -79,9 +79,9 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_raliq_the_drunkAI (creature);
+ return new npc_raliq_the_drunkAI(creature);
}
struct npc_raliq_the_drunkAI : public ScriptedAI
@@ -94,13 +94,13 @@ public:
uint32 m_uiNormFaction;
uint32 Uppercut_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Uppercut_Timer = 5000;
me->RestoreFaction();
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -120,18 +120,26 @@ public:
# npc_salsalabim
######*/
-#define FACTION_HOSTILE_SA 90
-#define FACTION_FRIENDLY_SA 35
-#define QUEST_10004 10004
+enum Salsalabim
+{
+ // Factions
+ FACTION_HOSTILE_SA = 90,
+ FACTION_FRIENDLY_SA = 35,
+
+ // Quests
+ QUEST_10004 = 10004,
-#define SPELL_MAGNETIC_PULL 31705
+ // Spells
+ SPELL_MAGNETIC_PULL = 31705
+
+};
class npc_salsalabim : public CreatureScript
{
public:
npc_salsalabim() : CreatureScript("npc_salsalabim") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_10004) == QUEST_STATUS_INCOMPLETE)
{
@@ -147,9 +155,9 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_salsalabimAI (creature);
+ return new npc_salsalabimAI(creature);
}
struct npc_salsalabimAI : public ScriptedAI
@@ -158,13 +166,13 @@ public:
uint32 MagneticPull_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
MagneticPull_Timer = 15000;
me->RestoreFaction();
}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by->GetTypeId() == TYPEID_PLAYER && me->HealthBelowPctDamaged(20, damage))
{
@@ -174,7 +182,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -206,7 +214,7 @@ class npc_shattrathflaskvendors : public CreatureScript
public:
npc_shattrathflaskvendors() : CreatureScript("npc_shattrathflaskvendors") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_TRADE)
@@ -215,7 +223,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->GetEntry() == 23484)
{
@@ -260,7 +268,7 @@ class npc_zephyr : public CreatureScript
public:
npc_zephyr() : CreatureScript("npc_zephyr") { }
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -269,7 +277,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetReputationRank(989) >= REP_REVERED)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HZ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -315,7 +323,7 @@ class npc_kservant : public CreatureScript
public:
npc_kservant() : CreatureScript("npc_kservant") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_kservantAI(creature);
}
@@ -325,7 +333,7 @@ public:
public:
npc_kservantAI(Creature* creature) : npc_escortAI(creature) {}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -403,7 +411,8 @@ public:
}
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
return;
@@ -419,7 +428,7 @@ public:
}
}
- void Reset() { }
+ void Reset() OVERRIDE {}
};
};
@@ -435,7 +444,7 @@ class npc_ishanah : public CreatureScript
public:
npc_ishanah() : CreatureScript("npc_ishanah") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -446,7 +455,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -476,7 +485,7 @@ class npc_khadgar : public CreatureScript
public:
npc_khadgar() : CreatureScript("npc_khadgar") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -513,12 +522,12 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
- if (!player->hasQuest(10211))
+ if (player->GetQuestStatus(10211) != QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
player->SEND_GOSSIP_MENU(9243, creature->GetGUID());
diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp
index fc43dac2c5d..2cf82cce4d1 100644
--- a/src/server/scripts/Outland/zone_terokkar_forest.cpp
+++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp
@@ -61,9 +61,9 @@ class npc_unkor_the_ruthless : public CreatureScript
public:
npc_unkor_the_ruthless() : CreatureScript("npc_unkor_the_ruthless") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_unkor_the_ruthlessAI (creature);
+ return new npc_unkor_the_ruthlessAI(creature);
}
struct npc_unkor_the_ruthlessAI : public ScriptedAI
@@ -74,7 +74,7 @@ public:
uint32 UnkorUnfriendly_Timer;
uint32 Pulverize_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
CanDoQuest = false;
UnkorUnfriendly_Timer = 0;
@@ -83,7 +83,7 @@ public:
me->setFaction(FACTION_HOSTILE);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
void DoNice()
{
@@ -96,7 +96,7 @@ public:
UnkorUnfriendly_Timer = 60000;
}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
Player* player = done_by->ToPlayer();
@@ -126,7 +126,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (CanDoQuest)
{
@@ -168,19 +168,19 @@ class npc_infested_root_walker : public CreatureScript
public:
npc_infested_root_walker() : CreatureScript("npc_infested_root_walker") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_infested_root_walkerAI (creature);
+ return new npc_infested_root_walkerAI(creature);
}
struct npc_infested_root_walkerAI : public ScriptedAI
{
npc_infested_root_walkerAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() { }
- void EnterCombat(Unit* /*who*/) { }
+ void Reset() OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by && done_by->GetTypeId() == TYPEID_PLAYER)
if (me->GetHealth() <= damage)
@@ -199,7 +199,7 @@ class npc_skywing : public CreatureScript
public:
npc_skywing() : CreatureScript("npc_skywing") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_skywingAI(creature);
}
@@ -209,7 +209,7 @@ public:
public:
npc_skywingAI(Creature* creature) : npc_escortAI(creature) {}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -223,9 +223,10 @@ public:
}
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+
+ void MoveInLineOfSight(Unit* who) OVERRIDE
- void MoveInLineOfSight(Unit* who)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
return;
@@ -236,9 +237,9 @@ public:
Start(false, false, who->GetGUID());
}
- void Reset() { }
+ void Reset() OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
npc_escortAI::UpdateAI(diff);
}
@@ -254,19 +255,19 @@ class npc_rotting_forest_rager : public CreatureScript
public:
npc_rotting_forest_rager() : CreatureScript("npc_rotting_forest_rager") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_rotting_forest_ragerAI (creature);
+ return new npc_rotting_forest_ragerAI(creature);
}
struct npc_rotting_forest_ragerAI : public ScriptedAI
{
npc_rotting_forest_ragerAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() { }
- void EnterCombat(Unit* /*who*/) { }
+ void Reset() OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void DamageTaken(Unit* done_by, uint32 &damage)
+ void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE
{
if (done_by->GetTypeId() == TYPEID_PLAYER)
if (me->GetHealth() <= damage)
@@ -281,32 +282,37 @@ public:
## npc_netherweb_victim
######*/
-#define QUEST_TARGET 22459
-//#define SPELL_FREE_WEBBED 38950
+enum NetherwebVictim
+{
+ QUEST_TARGET = 22459
+ //SPELL_FREE_WEBBED = 38950
+};
const uint32 netherwebVictims[6] =
{
18470, 16805, 21242, 18452, 22482, 21285
};
+
class npc_netherweb_victim : public CreatureScript
{
public:
npc_netherweb_victim() : CreatureScript("npc_netherweb_victim") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_netherweb_victimAI (creature);
+ return new npc_netherweb_victimAI(creature);
}
struct npc_netherweb_victimAI : public ScriptedAI
{
npc_netherweb_victimAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() { }
- void EnterCombat(Unit* /*who*/) { }
- void MoveInLineOfSight(Unit* /*who*/) { }
+ void Reset() OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
+
- void JustDied(Unit* killer)
+ void JustDied(Unit* killer) OVERRIDE
{
Player* player = killer->ToPlayer();
if (!player)
@@ -338,7 +344,7 @@ public:
#define GOSSIP_FLOON1 "You owe Sim'salabim money. Hand them over or die!"
#define GOSSIP_FLOON2 "Hand over the money or die...again!"
-enum eFloon
+enum Floon
{
SAY_FLOON_ATTACK = 0,
@@ -355,7 +361,7 @@ class npc_floon : public CreatureScript
public:
npc_floon() : CreatureScript("npc_floon") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF)
@@ -373,7 +379,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
@@ -382,9 +388,9 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_floonAI (creature);
+ return new npc_floonAI(creature);
}
struct npc_floonAI : public ScriptedAI
@@ -399,7 +405,7 @@ public:
uint32 Frostbolt_Timer;
uint32 FrostNova_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
Silence_Timer = 2000;
Frostbolt_Timer = 4000;
@@ -408,9 +414,9 @@ public:
me->setFaction(m_uiNormFaction);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -441,7 +447,7 @@ public:
/*######
## npc_isla_starmane
######*/
-enum eIslaStarmaneData
+enum IslaStarmaneData
{
SAY_PROGRESS_1 = 0,
SAY_PROGRESS_2 = 1,
@@ -463,7 +469,7 @@ public:
{
npc_isla_starmaneAI(Creature* creature) : npc_escortAI(creature) {}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -502,12 +508,12 @@ public:
}
}
- void Reset()
+ void Reset() OVERRIDE
{
me->RestoreFaction();
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (Player* player = GetPlayerForEscort())
{
@@ -519,7 +525,7 @@ public:
}
};
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_EFTW_H || quest->GetQuestId() == QUEST_EFTW_A)
{
@@ -529,7 +535,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_isla_starmaneAI(creature);
}
@@ -548,7 +554,7 @@ class go_skull_pile : public GameObjectScript
public:
go_skull_pile() : GameObjectScript("go_skull_pile") { }
- bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action)
+ bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (sender)
@@ -558,7 +564,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if ((player->GetQuestStatus(11885) == QUEST_STATUS_INCOMPLETE) || player->GetQuestRewardStatus(11885))
{
@@ -596,7 +602,7 @@ public:
## npc_slim
######*/
-enum eSlim
+enum Slim
{
FACTION_CONSORTIUM = 933
};
@@ -606,7 +612,7 @@ class npc_slim : public CreatureScript
public:
npc_slim() : CreatureScript("npc_slim") { }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_TRADE)
@@ -615,7 +621,7 @@ public:
return true;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsVendor() && player->GetReputationRank(FACTION_CONSORTIUM) >= REP_FRIENDLY)
{
@@ -633,7 +639,7 @@ public:
####npc_akuno
#####*/
-enum eAkuno
+enum Akuno
{
QUEST_ESCAPING_THE_TOMB = 10887,
NPC_CABAL_SKRIMISHER = 21661
@@ -644,7 +650,7 @@ class npc_akuno : public CreatureScript
public:
npc_akuno() : CreatureScript("npc_akuno") { }
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_ESCAPING_THE_TOMB)
{
@@ -659,7 +665,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_akunoAI(creature);
}
@@ -668,7 +674,7 @@ public:
{
npc_akunoAI(Creature* creature) : npc_escortAI(creature) {}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -687,7 +693,7 @@ public:
}
}
- void JustSummoned(Creature* summon)
+ void JustSummoned(Creature* summon) OVERRIDE
{
summon->AI()->AttackStart(me);
}
diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp
index 1f98d4aa337..be938582d9c 100644
--- a/src/server/scripts/Outland/zone_zangarmarsh.cpp
+++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp
@@ -69,7 +69,7 @@ class npcs_ashyen_and_keleth : public CreatureScript
public:
npcs_ashyen_and_keleth() : CreatureScript("npcs_ashyen_and_keleth") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetReputationRank(942) > REP_NEUTRAL)
{
@@ -84,7 +84,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF+1)
@@ -161,7 +161,7 @@ public:
#define GOSSIP_COOSH "You owe Sim'salabim money. Hand them over or die!"
-enum eCooshhooosh
+enum Cooshhooosh
{
SPELL_LIGHTNING_BOLT = 9532,
QUEST_CRACK_SKULLS = 10009,
@@ -183,16 +183,16 @@ public:
uint32 m_uiNormFaction;
uint32 LightningBolt_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
LightningBolt_Timer = 2000;
if (me->getFaction() != m_uiNormFaction)
me->setFaction(m_uiNormFaction);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -207,12 +207,12 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
- return new npc_cooshcooshAI (creature);
+ return new npc_cooshcooshAI(creature);
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
@@ -221,7 +221,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF)
@@ -247,7 +247,7 @@ class npc_elder_kuruti : public CreatureScript
public:
npc_elder_kuruti() : CreatureScript("npc_elder_kuruti") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(9803) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
@@ -257,7 +257,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -300,7 +300,7 @@ class npc_mortog_steamhead : public CreatureScript
public:
npc_mortog_steamhead() : CreatureScript("npc_mortog_steamhead") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsVendor() && player->GetReputationRank(942) == REP_EXALTED)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
@@ -310,7 +310,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_TRADE)
@@ -323,7 +323,7 @@ public:
## npc_kayra_longmane
######*/
-enum eKayra
+enum Kayra
{
SAY_START = 0,
SAY_AMBUSH1 = 1,
@@ -344,9 +344,9 @@ public:
{
npc_kayra_longmaneAI(Creature* creature) : npc_escortAI(creature) {}
- void Reset() { }
+ void Reset() OVERRIDE {}
- void WaypointReached(uint32 waypointId)
+ void WaypointReached(uint32 waypointId) OVERRIDE
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -379,7 +379,7 @@ public:
}
};
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_ESCAPE_FROM)
{
@@ -391,7 +391,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_kayra_longmaneAI(creature);
}
@@ -404,7 +404,7 @@ public:
#define GOSSIP_TIMOTHY_DANIELS_ITEM1 "Specialist, eh? Just what kind of specialist are you, anyway?"
#define GOSSIP_TEXT_BROWSE_POISONS "Let me browse your reagents and poison supplies."
-enum eTimothy
+enum Timothy
{
GOSSIP_TEXTID_TIMOTHY_DANIELS1 = 9239
};
@@ -414,7 +414,7 @@ class npc_timothy_daniels : public CreatureScript
public:
npc_timothy_daniels() : CreatureScript("npc_timothy_daniels") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -427,7 +427,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)