diff options
| author | Nay <dnpd.dd@gmail.com> | 2013-07-14 16:10:20 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2013-07-14 16:10:20 +0100 |
| commit | b56b282eeeba5e21bc256c2ce2ff27edef5f08d9 (patch) | |
| tree | 4cddec28bf8323dce18e451bf038c2bba6071c6b /src/server/scripts/EasternKingdoms | |
| parent | f8ba2c066bc3dacafa98556aeabbfab04fc5f583 (diff) | |
| parent | bedb2e56e2ca35ad6790c2ef2c736a88b8f1fb16 (diff) | |
Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts:
src/server/game/Entities/Creature/GossipDef.cpp
src/server/game/Entities/Player/Player.cpp
src/server/game/Entities/Player/Player.h
src/server/game/Handlers/QuestHandler.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
src/server/scripts/EasternKingdoms/boss_kruul.cpp
src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp
src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
src/server/scripts/EasternKingdoms/zone_ironforge.cpp
src/server/scripts/EasternKingdoms/zone_loch_modan.cpp
src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp
src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
src/server/scripts/Kalimdor/zone_azshara.cpp
src/server/scripts/Kalimdor/zone_darkshore.cpp
src/server/scripts/Kalimdor/zone_desolace.cpp
src/server/scripts/Kalimdor/zone_durotar.cpp
src/server/scripts/Kalimdor/zone_felwood.cpp
src/server/scripts/Kalimdor/zone_feralas.cpp
src/server/scripts/Kalimdor/zone_mulgore.cpp
src/server/scripts/Kalimdor/zone_orgrimmar.cpp
src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
src/server/scripts/Kalimdor/zone_tanaris.cpp
src/server/scripts/Kalimdor/zone_thousand_needles.cpp
src/server/scripts/Kalimdor/zone_thunder_bluff.cpp
src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
src/server/scripts/Northrend/zone_dalaran.cpp
src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
src/server/scripts/Spells/spell_druid.cpp
src/server/scripts/Spells/spell_generic.cpp
src/server/scripts/Spells/spell_mage.cpp
src/server/scripts/Spells/spell_paladin.cpp
src/server/scripts/Spells/spell_priest.cpp
src/server/scripts/Spells/spell_shaman.cpp
src/server/scripts/Spells/spell_warlock.cpp
src/server/scripts/Spells/spell_warrior.cpp
src/server/scripts/World/item_scripts.cpp
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
150 files changed, 1856 insertions, 2062 deletions
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp index 081e717254d..7bc08b9a7c6 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp @@ -86,7 +86,7 @@ class npc_av_marshal_or_warmaster : public CreatureScript { npc_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) { } - void Reset() + void Reset() OVERRIDE { events.Reset(); events.ScheduleEvent(EVENT_CHARGE_TARGET, urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS)); @@ -99,12 +99,12 @@ class npc_av_marshal_or_warmaster : public CreatureScript _hasAura = false; } - void JustRespawned() + void JustRespawned() OVERRIDE { Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { // I have a feeling this isn't blizzlike, but owell, I'm only passing by and cleaning up. if (!_hasAura) @@ -170,7 +170,7 @@ class npc_av_marshal_or_warmaster : public CreatureScript bool _hasAura; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_av_marshal_or_warmasterAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index c8de8e163d8..a1f33e57907 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -56,13 +56,13 @@ public: uint64 balindaGUID; uint32 resetTimer; - void Reset() + void Reset() OVERRIDE { waterBoltTimer = 3 * IN_MILLISECONDS; resetTimer = 5 * IN_MILLISECONDS; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -86,7 +86,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_water_elementalAI(creature); } @@ -110,7 +110,7 @@ public: SummonList summons; - void Reset() + void Reset() OVERRIDE { arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); coneOfColdTimer = 8 * IN_MILLISECONDS; @@ -122,17 +122,17 @@ public: summons.DespawnAll(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(YELL_AGGRO); } - void JustRespawned() + void JustRespawned() OVERRIDE { Reset(); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { CAST_AI(npc_water_elemental::npc_water_elementalAI, summoned->AI())->balindaGUID = me->GetGUID(); summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true)); @@ -140,12 +140,12 @@ public: summons.Summon(summoned); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { summons.DespawnAll(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -196,7 +196,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_balindaAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index f423bca9372..8bddff621fa 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -54,7 +54,7 @@ public: uint32 YellTimer; uint32 ResetTimer; - void Reset() + void Reset() OVERRIDE { WhirlwindTimer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS); Whirlwind2Timer = urand(1 * IN_MILLISECONDS, 20 * IN_MILLISECONDS); @@ -64,18 +64,18 @@ public: YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); //20 to 30 seconds } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(YELL_AGGRO); } - void JustRespawned() + void JustRespawned() OVERRIDE { Reset(); Talk(YELL_RESPAWN); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -125,7 +125,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_drektharAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index 3622259ffcd..1dcf70d28b9 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -49,7 +49,7 @@ public: uint32 MortalStrikeTimer; uint32 ResetTimer; - void Reset() + void Reset() OVERRIDE { CleaveTimer = urand(1 * IN_MILLISECONDS, 9 * IN_MILLISECONDS); FrighteningShoutTimer = urand(2 * IN_MILLISECONDS, 19 * IN_MILLISECONDS); @@ -59,17 +59,17 @@ public: ResetTimer = 5 * IN_MILLISECONDS; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(YELL_AGGRO); } - void JustRespawned() + void JustRespawned() OVERRIDE { Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -119,7 +119,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_galvangarAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp index 034d8aff42a..f2ba479ac86 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp @@ -50,7 +50,7 @@ public: uint32 ResetTimer; uint32 YellTimer; - void Reset() + void Reset() OVERRIDE { AvatarTimer = 3 * IN_MILLISECONDS; ThunderclapTimer = 4 * IN_MILLISECONDS; @@ -59,12 +59,12 @@ public: YellTimer = urand(20 * IN_MILLISECONDS, 30 * IN_MILLISECONDS); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(YELL_AGGRO); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -108,7 +108,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_vanndarAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp index 8fe2778451b..e9a6b15dcf8 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp @@ -29,7 +29,7 @@ class go_shadowforge_brazier : public GameObjectScript public: go_shadowforge_brazier() : GameObjectScript("go_shadowforge_brazier") { } - bool OnGossipHello(Player* /*player*/, GameObject* go) + bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE { if (InstanceScript* instance = go->GetInstanceScript()) { @@ -48,7 +48,7 @@ public: }; // npc_grimstone -enum eGrimstone +enum Grimstone { NPC_GRIMSTONE = 10096, NPC_THELDREN = 16059, @@ -82,7 +82,7 @@ class at_ring_of_law : public AreaTriggerScript public: at_ring_of_law() : AreaTriggerScript("at_ring_of_law") { } - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE { if (InstanceScript* instance = player->GetInstanceScript()) { @@ -115,7 +115,7 @@ class npc_grimstone : public CreatureScript public: npc_grimstone() : CreatureScript("npc_grimstone") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_grimstoneAI(creature); } @@ -142,7 +142,7 @@ public: bool CanWalk; - void Reset() + void Reset() OVERRIDE { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -181,7 +181,7 @@ public: MobDeath_Timer = 2500; } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -222,7 +222,7 @@ public: instance->HandleGameObject(instance->GetData64(id), open); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!instance) return; @@ -352,9 +352,9 @@ class npc_phalanx : public CreatureScript public: npc_phalanx() : CreatureScript("npc_phalanx") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_phalanxAI (creature); + return new npc_phalanxAI(creature); } struct npc_phalanxAI : public ScriptedAI @@ -365,14 +365,14 @@ public: uint32 FireballVolley_Timer; uint32 MightyBlow_Timer; - void Reset() + void Reset() OVERRIDE { ThunderClap_Timer = 12000; FireballVolley_Timer = 0; MightyBlow_Timer = 15000; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) @@ -430,7 +430,7 @@ class npc_kharan_mighthammer : public CreatureScript public: npc_kharan_mighthammer() : CreatureScript("npc_kharan_mighthammer") { } - 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) @@ -479,7 +479,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); @@ -524,7 +524,7 @@ class npc_lokhtos_darkbargainer : public CreatureScript public: npc_lokhtos_darkbargainer() : CreatureScript("npc_lokhtos_darkbargainer") { } - 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) @@ -538,7 +538,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); @@ -577,7 +577,7 @@ class npc_dughal_stormwing : public CreatureScript public: npc_dughal_stormwing() : CreatureScript("npc_dughal_stormwing") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { npc_dughal_stormwingAI* dughal_stormwingAI = new npc_dughal_stormwingAI(creature); @@ -588,7 +588,7 @@ public: return dughal_stormwingAI; } - 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) @@ -601,7 +601,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS) { @@ -615,7 +615,7 @@ public: { npc_dughal_stormwingAI(Creature* creature) : npc_escortAI(creature) {} - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -634,10 +634,10 @@ public: } } - void EnterCombat(Unit* who) {} - void Reset() {} + void EnterCombat(Unit* who) OVERRIDE {} + void Reset() OVERRIDE {} - void JustDied(Unit* killer) + void JustDied(Unit* killer) OVERRIDE { if (IsBeingEscorted && killer == me) { @@ -648,7 +648,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return; if ((instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_FAILED || instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_ENDED)&& instance->GetData(DATA_DUGHAL) == ENCOUNTER_STATE_ENDED) @@ -680,7 +680,11 @@ public: #define SAY_WINDSOR_4_3 "Good work! We're almost there, $N. This way." #define SAY_WINDSOR_6 "This is it, $N. My stuff should be in that room. Cover me, I'm going in!" #define SAY_WINDSOR_9 "Ah, there it is!" -#define NPC_REGINALD_WINDSOR 9682 + +enum MarshalWindsor +{ + NPC_REGINALD_WINDSOR = 9682 +}; /* Player* playerStart; @@ -689,7 +693,7 @@ class npc_marshal_windsor : public CreatureScript public: npc_marshal_windsor() : CreatureScript("npc_marshal_windsor") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(creature); @@ -717,7 +721,7 @@ public: return marshal_windsorAI; } - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE { if (quest->GetQuestId() == 4322) { @@ -739,7 +743,7 @@ public: instance = creature->GetInstanceScript(); } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -784,7 +788,7 @@ public: } } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { switch (urand(0, 2)) { @@ -800,14 +804,14 @@ public: } } - void Reset() {} + void Reset() OVERRIDE {} - void JustDied(Unit* slayer) + void JustDied(Unit* slayer) OVERRIDE { instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return; @@ -859,8 +863,12 @@ public: #define SAY_REGINALD_WINDSOR_14_2 "Excellent work, $N. Let's find the exit. I think I know the way. Follow me!" #define SAY_REGINALD_WINDSOR_20_1 "We made it!" #define SAY_REGINALD_WINDSOR_20_2 "Meet me at Maxwell's encampment. We'll go over the next stages of the plan there and figure out a way to decode my tablets without the decryption ring." -#define NPC_SHILL_DINGER 9678 -#define NPC_CREST_KILLER 9680 + +enum MarshalReginaldWindor +{ + NPC_SHILL_DINGER = 9678, + NPC_CREST_KILLER = 9680 +}; /* int wp = 0; @@ -869,7 +877,7 @@ class npc_marshal_reginald_windsor : public CreatureScript public: npc_marshal_reginald_windsor() : CreatureScript("npc_marshal_reginald_windsor") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(creature); @@ -918,7 +926,7 @@ public: { } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { wp = waypointId; switch (waypointId) @@ -976,7 +984,8 @@ public: } } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; @@ -995,7 +1004,7 @@ public: } } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { switch (urand(0, 2)) { @@ -1010,14 +1019,14 @@ public: break; } } - void Reset() {} + void Reset() OVERRIDE {} - void JustDied(Unit* slayer) + void JustDied(Unit* slayer) OVERRIDE { instance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_FAILED); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return; @@ -1026,10 +1035,10 @@ public: { if (!instance->GetData(DATA_GATE_J) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_NOT_STARTED) { - instance->SetData(DATA_CREATURE_JAZ, 1); + instance->SetData(DATA_NPC_JAZ, 1); instance->SetData(DATA_JAZ, ENCOUNTER_STATE_IN_PROGRESS); } - if (instance->GetData(DATA_CREATURE_JAZ) && instance->GetData(DATA_CREATURE_OGRABISI) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS) + if (instance->GetData(DATA_NPC_JAZ) && instance->GetData(DATA_NPC_OGRABISI) && instance->GetData(DATA_JAZ) == ENCOUNTER_STATE_IN_PROGRESS) { SetEscortPaused(false); instance->SetData(DATA_JAZ, ENCOUNTER_STATE_ENDED); @@ -1039,10 +1048,10 @@ public: { if (!instance->GetData(DATA_GATE_S) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_NOT_STARTED) { - instance->SetData(DATA_CREATURE_SHILL, 1); + instance->SetData(DATA_NPC_SHILL, 1); instance->SetData(DATA_SHILL, ENCOUNTER_STATE_IN_PROGRESS); } - if (instance->GetData(DATA_CREATURE_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS) + if (instance->GetData(DATA_NPC_SHILL) && instance->GetData(DATA_SHILL) == ENCOUNTER_STATE_IN_PROGRESS) { instance->SetData(DATA_SHILL, ENCOUNTER_STATE_ENDED); SetEscortPaused(false); @@ -1052,11 +1061,11 @@ public: { if (!instance->GetData(DATA_GATE_C) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_NOT_STARTED) { - instance->SetData(DATA_CREATURE_CREST, 1); + instance->SetData(DATA_NPC_CREST, 1); me->Say(SAY_REGINALD_WINDSOR_13_2, LANG_UNIVERSAL, PlayerGUID); instance->SetData(DATA_CREST, ENCOUNTER_STATE_IN_PROGRESS); } - if (instance->GetData(DATA_CREATURE_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS) + if (instance->GetData(DATA_NPC_CREST) && instance->GetData(DATA_CREST) == ENCOUNTER_STATE_IN_PROGRESS) { SetEscortPaused(false); instance->SetData(DATA_CREST, ENCOUNTER_STATE_ENDED); @@ -1078,7 +1087,7 @@ class npc_tobias_seecher : public CreatureScript public: npc_tobias_seecher() : CreatureScript("npc_tobias_seecher") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { npc_tobias_seecherAI* tobias_seecherAI = new npc_tobias_seecherAI(creature); @@ -1091,7 +1100,7 @@ public: return tobias_seecherAI; } - 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) @@ -1104,7 +1113,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (player->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS) { @@ -1118,10 +1127,10 @@ public: { npc_tobias_seecherAI(Creature* creature) : npc_escortAI(creature) {} - void EnterCombat(Unit* who) {} - void Reset() {} + void EnterCombat(Unit* who) OVERRIDE {} + void Reset() OVERRIDE {} - void JustDied(Unit* killer) + void JustDied(Unit* killer) OVERRIDE { if (IsBeingEscorted && killer == me) { @@ -1132,7 +1141,7 @@ public: } } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -1151,7 +1160,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (instance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED) return; @@ -1196,7 +1205,7 @@ class npc_rocknot : public CreatureScript public: npc_rocknot() : CreatureScript("npc_rocknot") { } - bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/) + bool OnQuestReward(Player* /*player*/, Creature* creature, Quest const* quest, uint32 /*item*/) OVERRIDE { InstanceScript* instance = creature->GetInstanceScript(); if (!instance) @@ -1226,7 +1235,7 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_rocknotAI(creature); } @@ -1243,7 +1252,7 @@ public: uint32 BreakKeg_Timer; uint32 BreakDoor_Timer; - void Reset() + void Reset() OVERRIDE { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; @@ -1258,7 +1267,7 @@ public: go->SetGoState((GOState)state); } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { if (!instance) return; @@ -1284,7 +1293,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!instance) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h index dcce7d0c374..b279012bbf7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h @@ -19,11 +19,14 @@ #ifndef DEF_BRD_H #define DEF_BRD_H -#define FACTION_NEUTRAL 734 -#define FACTION_HOSTILE 754 -#define FACTION_FRIEND 35 +enum FactionIds +{ + FACTION_NEUTRAL = 734, + FACTION_HOSTILE = 754, + FACTION_FRIEND = 35 +}; -enum eTypes +enum DataTypes { TYPE_RING_OF_LAW = 1, TYPE_VAULT = 2, @@ -57,4 +60,5 @@ enum eTypes DATA_SF_BRAZIER_S = 26, DATA_MOIRA = 27, }; + #endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp index 97de0b1b2da..3a4f734429c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -29,9 +29,9 @@ class boss_ambassador_flamelash : public CreatureScript public: boss_ambassador_flamelash() : CreatureScript("boss_ambassador_flamelash") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ambassador_flamelashAI (creature); + return new boss_ambassador_flamelashAI(creature); } struct boss_ambassador_flamelashAI : public ScriptedAI @@ -41,13 +41,13 @@ public: uint32 FireBlast_Timer; uint32 Spirit_Timer; - void Reset() + void Reset() OVERRIDE { FireBlast_Timer = 2000; Spirit_Timer = 24000; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} void SummonSpirits(Unit* victim) { @@ -55,7 +55,7 @@ public: Spirit->AI()->AttackStart(victim); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp index 66458a30113..63a94ca616a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp @@ -33,9 +33,9 @@ class boss_anubshiah : public CreatureScript public: boss_anubshiah() : CreatureScript("boss_anubshiah") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_anubshiahAI (creature); + return new boss_anubshiahAI(creature); } struct boss_anubshiahAI : public ScriptedAI @@ -48,7 +48,7 @@ public: uint32 DemonArmor_Timer; uint32 EnvelopingWeb_Timer; - void Reset() + void Reset() OVERRIDE { ShadowBolt_Timer = 7000; CurseOfTongues_Timer = 24000; @@ -57,9 +57,9 @@ public: EnvelopingWeb_Timer = 16000; } - 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/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp index 3a058e1b9bb..25f93a2b6b7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -37,9 +37,9 @@ class boss_emperor_dagran_thaurissan : public CreatureScript public: boss_emperor_dagran_thaurissan() : CreatureScript("boss_emperor_dagran_thaurissan") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_draganthaurissanAI (creature); + return new boss_draganthaurissanAI(creature); } struct boss_draganthaurissanAI : public ScriptedAI @@ -54,25 +54,25 @@ public: uint32 AvatarOfFlame_Timer; //uint32 Counter; - void Reset() + void Reset() OVERRIDE { HandOfThaurissan_Timer = 4000; AvatarOfFlame_Timer = 25000; //Counter= 0; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); me->CallForHelp(VISIBLE_RANGE); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_SLAY); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MOIRA) : 0)) { @@ -81,7 +81,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/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp index 85256d763c3..80bfa651301 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp @@ -31,9 +31,9 @@ class boss_general_angerforge : public CreatureScript public: boss_general_angerforge() : CreatureScript("boss_general_angerforge") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_general_angerforgeAI (creature); + return new boss_general_angerforgeAI(creature); } struct boss_general_angerforgeAI : public ScriptedAI @@ -46,7 +46,7 @@ public: uint32 Adds_Timer; bool Medics; - void Reset() + void Reset() OVERRIDE { MightyBlow_Timer = 8000; HamString_Timer = 12000; @@ -55,7 +55,7 @@ public: Medics = false; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} void SummonAdds(Unit* victim) { @@ -69,7 +69,7 @@ public: SummonedMedic->AI()->AttackStart(victim); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp index b70bbf670bc..d79c4d191b6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp @@ -30,9 +30,9 @@ class boss_gorosh_the_dervish : public CreatureScript public: boss_gorosh_the_dervish() : CreatureScript("boss_gorosh_the_dervish") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_gorosh_the_dervishAI (creature); + return new boss_gorosh_the_dervishAI(creature); } struct boss_gorosh_the_dervishAI : public ScriptedAI @@ -42,17 +42,17 @@ public: uint32 WhirlWind_Timer; uint32 MortalStrike_Timer; - void Reset() + void Reset() OVERRIDE { WhirlWind_Timer = 12000; MortalStrike_Timer = 22000; } - 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/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp index e3f4a665e03..504fca44c4c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp @@ -31,9 +31,9 @@ class boss_grizzle : public CreatureScript public: boss_grizzle() : CreatureScript("boss_grizzle") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_grizzleAI (creature); + return new boss_grizzleAI(creature); } struct boss_grizzleAI : public ScriptedAI @@ -43,15 +43,15 @@ public: uint32 GroundTremor_Timer; uint32 Frenzy_Timer; - void Reset() + void Reset() OVERRIDE { GroundTremor_Timer = 12000; Frenzy_Timer =0; } - 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/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp index 680b358418c..7a98cc321dc 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp @@ -32,9 +32,9 @@ class boss_high_interrogator_gerstahn : public CreatureScript public: boss_high_interrogator_gerstahn() : CreatureScript("boss_high_interrogator_gerstahn") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_high_interrogator_gerstahnAI (creature); + return new boss_high_interrogator_gerstahnAI(creature); } struct boss_high_interrogator_gerstahnAI : public ScriptedAI @@ -46,7 +46,7 @@ public: uint32 PsychicScream_Timer; uint32 ShadowShield_Timer; - void Reset() + void Reset() OVERRIDE { ShadowWordPain_Timer = 4000; ManaBurn_Timer = 14000; @@ -54,9 +54,9 @@ public: ShadowShield_Timer = 8000; } - 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/EasternKingdoms/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp index edcb1b5ca42..998e7b17897 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp @@ -25,7 +25,7 @@ enum Spells SPELL_WARSTOMP = 24375 }; -enum eEnums +enum Misc { DATA_THRONE_DOOR = 24 // not id or guid of doors but number of enum in blackrock_depths.h }; @@ -35,9 +35,9 @@ class boss_magmus : public CreatureScript public: boss_magmus() : CreatureScript("boss_magmus") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_magmusAI (creature); + return new boss_magmusAI(creature); } struct boss_magmusAI : public ScriptedAI @@ -47,15 +47,15 @@ public: uint32 FieryBurst_Timer; uint32 WarStomp_Timer; - void Reset() + void Reset() OVERRIDE { FieryBurst_Timer = 5000; WarStomp_Timer =0; } - 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()) @@ -81,7 +81,7 @@ public: DoMeleeAttackIfReady(); } // When he die open door to last chamber - void JustDied(Unit* killer) + void JustDied(Unit* killer) OVERRIDE { if (InstanceScript* instance = killer->GetInstanceScript()) instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true); diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp index 6de2a4999af..9021649a61e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp @@ -34,9 +34,9 @@ class boss_moira_bronzebeard : public CreatureScript public: boss_moira_bronzebeard() : CreatureScript("boss_moira_bronzebeard") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_moira_bronzebeardAI (creature); + return new boss_moira_bronzebeardAI(creature); } struct boss_moira_bronzebeardAI : public ScriptedAI @@ -48,7 +48,7 @@ public: uint32 ShadowWordPain_Timer; uint32 Smite_Timer; - void Reset() + void Reset() OVERRIDE { Heal_Timer = 12000; //These times are probably wrong MindBlast_Timer = 16000; @@ -56,9 +56,9 @@ public: Smite_Timer = 8000; } - 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/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp index 4931608ea00..55e6862bda7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp @@ -48,7 +48,7 @@ class boss_gloomrel : public CreatureScript public: boss_gloomrel() : CreatureScript("boss_gloomrel") { } - 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) @@ -77,7 +77,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (player->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 1 && player->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN && !player->HasSpell(SPELL_SMELT_DARK_IRON)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); @@ -107,7 +107,7 @@ class boss_doomrel : public CreatureScript public: boss_doomrel() : CreatureScript("boss_doomrel") { } - 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) @@ -130,7 +130,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(2601, creature->GetGUID()); @@ -138,9 +138,9 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_doomrelAI (creature); + return new boss_doomrelAI(creature); } struct boss_doomrelAI : public ScriptedAI @@ -157,7 +157,7 @@ public: uint32 DemonArmor_Timer; bool Voidwalkers; - void Reset() + void Reset() OVERRIDE { ShadowVolley_Timer = 10000; Immolate_Timer = 18000; @@ -179,11 +179,11 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } - void EnterEvadeMode() + void EnterEvadeMode() OVERRIDE { me->RemoveAllAuras(); me->DeleteThreatList(); @@ -196,13 +196,13 @@ public: instance->SetData64(DATA_EVENSTARTER, 0); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) instance->SetData(DATA_GHOSTKILL, 1); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp index 2718797aa34..b9ff40f8285 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp @@ -22,11 +22,10 @@ #include "blackrock_depths.h" #define TIMER_TOMBOFTHESEVEN 15000 +#define MAX_ENCOUNTER 6 -enum eEnums +enum Creatures { - MAX_ENCOUNTER = 6, - NPC_EMPEROR = 9019, NPC_PHALANX = 9502, NPC_ANGERREL = 9035, @@ -37,8 +36,11 @@ enum eEnums NPC_GLOOMREL = 9037, NPC_DOOMREL = 9039, NPC_MAGMUS = 9938, - NPC_MOIRA = 8929, + NPC_MOIRA = 8929 +}; +enum GameObjects +{ GO_ARENA1 = 161525, GO_ARENA2 = 161522, GO_ARENA3 = 161524, @@ -67,7 +69,7 @@ class instance_blackrock_depths : public InstanceMapScript public: instance_blackrock_depths() : InstanceMapScript("instance_blackrock_depths", 230) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_blackrock_depths_InstanceMapScript(map); } @@ -210,7 +212,7 @@ public: } } - void SetData64(uint32 type, uint64 data) + void SetData64(uint32 type, uint64 data) OVERRIDE { TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data); @@ -226,7 +228,7 @@ public: } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { TC_LOG_DEBUG(LOG_FILTER_TSCR, "Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data); @@ -273,7 +275,7 @@ public: } } - uint32 GetData(uint32 type) const + uint32 GetData(uint32 type) const OVERRIDE { switch (type) { @@ -298,7 +300,7 @@ public: return 0; } - uint64 GetData64(uint32 data) const + uint64 GetData64(uint32 data) const OVERRIDE { switch (data) { diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp index dfd808041bd..59581204b05 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp @@ -45,12 +45,12 @@ public: { boss_drakkisathAI(Creature* creature) : BossAI(creature, DATA_GENERAL_DRAKKISATH) {} - void Reset() + void Reset() OVERRIDE { _Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_FIRE_NOVA, 6000); @@ -59,12 +59,12 @@ public: events.ScheduleEvent(EVENT_THUNDERCLAP, 17000); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -100,7 +100,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_drakkisathAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp index e0b4d6cab18..f1bd81f2e6a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp @@ -48,29 +48,29 @@ public: { boss_gizrul_the_slavenerAI(Creature* creature) : BossAI(creature, DATA_GIZRUL_THE_SLAVENER) {} - void Reset() + void Reset() OVERRIDE { _Reset(); } - void IsSummonedBy(Unit* /*summoner*/) + void IsSummonedBy(Unit* /*summoner*/) OVERRIDE { me->GetMotionMaster()->MovePath(GIZRUL_PATH, false); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_FATAL_BITE, urand(17000,20000)); events.ScheduleEvent(EVENT_INFECTED_BITE, urand(10000,12000)); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -100,7 +100,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_gizrul_the_slavenerAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp index f20798d64fb..dbc3056b1ff 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp @@ -57,7 +57,7 @@ public: bool SummonedRend; - void Reset() + void Reset() OVERRIDE { SummonedRend = false; if (instance->GetBossState(DATA_GYTH) == IN_PROGRESS) @@ -67,7 +67,7 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); @@ -77,12 +77,12 @@ public: events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(12000, 18000)); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { instance->SetBossState(DATA_GYTH, DONE); } - void SetData(uint32 /*type*/, uint32 data) + void SetData(uint32 /*type*/, uint32 data) OVERRIDE { switch (data) { @@ -94,7 +94,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!SummonedRend && HealthBelowPct(5)) @@ -160,7 +160,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_gythAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp index 71c3efdfda2..630d6ff2a0d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp @@ -47,20 +47,20 @@ public: { boss_halyconAI(Creature* creature) : BossAI(creature, DATA_HALYCON) {} - void Reset() + void Reset() OVERRIDE { _Reset(); Summoned = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_REND, urand(17000,20000)); events.ScheduleEvent(EVENT_THRASH, urand(10000,12000)); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { me->SummonCreature(NPC_GIZRUL_THE_SLAVENER, SummonLocation, TEMPSUMMON_TIMED_DESPAWN, 300000); Talk(EMOTE_DEATH); @@ -68,7 +68,7 @@ public: Summoned = true; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -99,7 +99,7 @@ public: bool Summoned; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_halyconAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp index 3bd46be1c1b..54ed5d44e34 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp @@ -37,7 +37,7 @@ class boss_highlord_omokk : public CreatureScript public: boss_highlord_omokk() : CreatureScript("boss_highlord_omokk") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_highlordomokkAI(creature); } @@ -46,24 +46,24 @@ public: { boss_highlordomokkAI(Creature* creature) : BossAI(creature, DATA_HIGHLORD_OMOKK) {} - void Reset() + void Reset() OVERRIDE { _Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_FRENZY, 20000); events.ScheduleEvent(EVENT_KNOCK_AWAY, 18000); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp index fc6d3f7d4db..608cb75bbb2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp @@ -38,7 +38,7 @@ class boss_mother_smolderweb : public CreatureScript public: boss_mother_smolderweb() : CreatureScript("boss_mother_smolderweb") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_mothersmolderwebAI(creature); } @@ -47,30 +47,30 @@ public: { boss_mothersmolderwebAI(Creature* creature) : BossAI(creature, DATA_MOTHER_SMOLDERWEB) {} - void Reset() + void Reset() OVERRIDE { _Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_CRYSTALIZE, 20 * IN_MILLISECONDS); events.ScheduleEvent(EVENT_MOTHERS_MILK, 10 * IN_MILLISECONDS); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (me->GetHealth() <= damage) DoCast(me, SPELL_SUMMON_SPIRE_SPIDERLING, true); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp index b792a49b714..2b68b640720 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp @@ -50,7 +50,7 @@ class boss_overlord_wyrmthalak : public CreatureScript public: boss_overlord_wyrmthalak() : CreatureScript("boss_overlord_wyrmthalak") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_overlordwyrmthalakAI(creature); } @@ -61,13 +61,13 @@ public: bool Summoned; - void Reset() + void Reset() OVERRIDE { _Reset(); Summoned = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_BLAST_WAVE, 20 * IN_MILLISECONDS); @@ -76,12 +76,12 @@ public: events.ScheduleEvent(EVENT_KNOCK_AWAY, 12 * IN_MILLISECONDS); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp index fdf3f0066ba..b84be2feb17 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -77,7 +77,7 @@ public: { boss_pyroguard_emberseerAI(Creature* creature) : BossAI(creature, DATA_PYROGAURD_EMBERSEER) {} - void Reset() + void Reset() OVERRIDE { if (instance) { @@ -98,7 +98,7 @@ public: } } - void SetData(uint32 /*type*/, uint32 data) + void SetData(uint32 /*type*/, uint32 data) OVERRIDE { switch (data) { @@ -122,7 +122,7 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { // ### TODO Check combat timing ### events.ScheduleEvent(EVENT_FIRENOVA, 6000); @@ -130,7 +130,7 @@ public: events.ScheduleEvent(EVENT_PYROBLAST, 14000); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) { @@ -143,7 +143,7 @@ public: } } - void SpellHit(Unit* /*caster*/, SpellInfo const* spell) + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE { if (spell->Id == SPELL_ENCAGE_EMBERSEER) { @@ -205,7 +205,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) { @@ -314,7 +314,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_pyroguard_emberseerAI(creature); } @@ -342,19 +342,19 @@ public: { npc_blackhand_incarceratorAI(Creature* creature) : ScriptedAI(creature) {} - void Reset() + void Reset() OVERRIDE { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC); if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) Emberseer->AI()->SetData(1, 3); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { me->DespawnOrUnsummon(10000); } - void SetData(uint32 data, uint32 value) + void SetData(uint32 data, uint32 value) OVERRIDE { if (data == 1 && value == 1) { @@ -369,7 +369,7 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { // Used to close doors if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) @@ -388,7 +388,7 @@ public: _events.ScheduleEvent(EVENT_ENCAGE, urand(10000, 20000)); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { @@ -401,11 +401,14 @@ public: switch (eventId) { case EVENT_ENCAGED_EMBERSEER: - if(me->GetPositionX() == me->GetHomePosition().GetPositionX()) - if(!me->HasAura(SPELL_ENCAGE_EMBERSEER)) + { + if (me->GetPositionX() == me->GetHomePosition().GetPositionX()) + if (!me->HasAura(SPELL_ENCAGE_EMBERSEER)) if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) DoCast(Emberseer, SPELL_ENCAGE_EMBERSEER); break; + + } } } return; @@ -429,6 +432,7 @@ public: break; } } + DoMeleeAttackIfReady(); } @@ -436,7 +440,7 @@ public: EventMap _events; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_blackhand_incarceratorAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp index fec82982504..a20822839e6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -42,24 +42,24 @@ public: { boss_quatermasterzigrisAI(Creature* creature) : BossAI(creature, DATA_QUARTERMASTER_ZIGRIS) {} - void Reset() + void Reset() OVERRIDE { _Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_SHOOT, 1000); events.ScheduleEvent(EVENT_STUN_BOMB, 16000); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -87,7 +87,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_quatermasterzigrisAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp index eca24289945..275b3802764 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp @@ -166,29 +166,29 @@ public: { boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND) { } - void Reset() + void Reset() OVERRIDE { _Reset(); gythEvent = false; victorGUID = 0; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); - events.ScheduleEvent(EVENT_WHIRLWIND, urand (13000, 15000)); - events.ScheduleEvent(EVENT_CLEAVE, urand (15000, 17000)); - events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand (17000, 19000)); + events.ScheduleEvent(EVENT_WHIRLWIND, urand(13000, 15000)); + events.ScheduleEvent(EVENT_CLEAVE, urand(15000, 17000)); + events.ScheduleEvent(EVENT_MORTAL_STRIKE, urand(17000, 19000)); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true)) victor->AI()->SetData(1, 2); } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { if (instance && type == AREATRIGGER && data == AREATRIGGER_BLACKROCK_STADIUM) { @@ -208,7 +208,7 @@ public: } } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 type, uint32 id) OVERRIDE { if (type == WAYPOINT_MOTION_TYPE) { @@ -226,7 +226,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (gythEvent) { @@ -435,7 +435,7 @@ public: uint64 portcullisGUID; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_rend_blackhandAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp index b4a62ecb918..1936e5e72d0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp @@ -39,7 +39,7 @@ class boss_shadow_hunter_voshgajin : public CreatureScript public: boss_shadow_hunter_voshgajin() : CreatureScript("boss_shadow_hunter_voshgajin") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_shadowvoshAI(creature); } @@ -48,13 +48,13 @@ public: { boss_shadowvoshAI(Creature* creature) : BossAI(creature, DATA_SHADOW_HUNTER_VOSHGAJIN) {} - void Reset() + void Reset() OVERRIDE { _Reset(); //DoCast(me, SPELL_ICEARMOR, true); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 2 * IN_MILLISECONDS); @@ -62,12 +62,12 @@ public: events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp index ff4b080282e..c4abaac158c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp @@ -39,7 +39,7 @@ class boss_the_beast : public CreatureScript public: boss_the_beast() : CreatureScript("boss_the_beast") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_thebeastAI(creature); } @@ -48,12 +48,12 @@ public: { boss_thebeastAI(Creature* creature) : BossAI(creature, DATA_THE_BEAST) {} - void Reset() + void Reset() OVERRIDE { _Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_FLAME_BREAK, 12 * IN_MILLISECONDS); @@ -61,12 +61,12 @@ public: events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 23 * IN_MILLISECONDS); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp index dd21d6ebdb0..afee357aad5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp @@ -48,12 +48,12 @@ public: { boss_urok_doomhowlAI(Creature* creature) : BossAI(creature, DATA_UROK_DOOMHOWL) {} - void Reset() + void Reset() OVERRIDE { _Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(SPELL_REND, urand(17000,20000)); @@ -61,12 +61,12 @@ public: Talk(SAY_AGGRO); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -96,7 +96,7 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_urok_doomhowlAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp index 7c4a976bca8..e3423fd02b6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp @@ -45,7 +45,7 @@ class boss_warmaster_voone : public CreatureScript public: boss_warmaster_voone() : CreatureScript("boss_warmaster_voone") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_warmastervooneAI(creature); } @@ -54,12 +54,12 @@ public: { boss_warmastervooneAI(Creature* creature) : BossAI(creature, DATA_WARMASTER_VOONE) {} - void Reset() + void Reset() OVERRIDE { _Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_SNAP_KICK, 8 * IN_MILLISECONDS); @@ -70,12 +70,12 @@ public: events.ScheduleEvent(EVENT_THROW_AXE, 1 * IN_MILLISECONDS); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp index ff0ff496b5a..b334c5c44b6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp @@ -280,7 +280,7 @@ public: } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { switch (type) { @@ -295,7 +295,7 @@ public: } } - uint64 GetData64(uint32 type) const + uint64 GetData64(uint32 type) const OVERRIDE { switch (type) { @@ -592,7 +592,7 @@ public: uint64 go_portcullis_tobossrooms; }; - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_blackrock_spireMapScript(map); } @@ -607,7 +607,7 @@ class at_dragonspire_hall : public AreaTriggerScript public: at_dragonspire_hall() : AreaTriggerScript("at_dragonspire_hall") { } - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE { if (player && player->IsAlive()) { @@ -631,7 +631,7 @@ class at_blackrock_stadium : public AreaTriggerScript public: at_blackrock_stadium() : AreaTriggerScript("at_blackrock_stadium") { } - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE { if (player && player->IsAlive()) { diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp index d4a9d81fdb0..c9dc3d8f134 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -52,7 +52,7 @@ public: { boss_broodlordAI(Creature* creature) : BossAI(creature, BOSS_BROODLORD) { } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (instance->GetBossState(BOSS_VAELASTRAZ) != DONE) { @@ -70,7 +70,7 @@ public: events.ScheduleEvent(EVENT_CHECK, 1000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -114,9 +114,9 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_broodlordAI (creature); + return new boss_broodlordAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp index b6eb97ac64c..05effabe557 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp @@ -173,7 +173,7 @@ public: EnterEvadeMode(); } - void Reset() + void Reset() OVERRIDE { _Reset(); @@ -181,7 +181,7 @@ public: Enraged = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (instance && instance->GetBossState(BOSS_FLAMEGOR) != DONE) { @@ -197,7 +197,7 @@ public: events.ScheduleEvent(EVENT_FRENZY, 15000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -280,9 +280,9 @@ public: bool Enraged; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_chromaggusAI (creature); + return new boss_chromaggusAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp index 7d21825851a..0d79f3faeee 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp @@ -43,7 +43,7 @@ public: { boss_ebonrocAI(Creature* creature) : BossAI(creature, BOSS_EBONROC) { } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) { @@ -57,7 +57,7 @@ public: events.ScheduleEvent(EVENT_SHADOWOFEBONROC, urand(8000, 10000)); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -90,9 +90,9 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ebonrocAI (creature); + return new boss_ebonrocAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp index b32db2be450..369e4e02f5a 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp @@ -43,7 +43,7 @@ public: { boss_firemawAI(Creature* creature) : BossAI(creature, BOSS_FIREMAW) { } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) { @@ -57,7 +57,7 @@ public: events.ScheduleEvent(EVENT_FLAMEBUFFET, 5000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -92,9 +92,9 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_firemawAI (creature); + return new boss_firemawAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp index f5a3cd3e45f..060bfeb60b3 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp @@ -48,7 +48,7 @@ public: { boss_flamegorAI(Creature* creature) : BossAI(creature, BOSS_FLAMEGOR) { } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) { @@ -62,7 +62,7 @@ public: events.ScheduleEvent(EVENT_FRENZY, 10000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -98,9 +98,9 @@ public: } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_flamegorAI (creature); + return new boss_flamegorAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp index 97595e55b5e..c24f533d41c 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp @@ -168,7 +168,7 @@ public: { boss_victor_nefariusAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { } - void Reset() + void Reset() OVERRIDE { if (me->GetMapId() == 469) { @@ -185,7 +185,7 @@ public: } } - void JustReachedHome() + void JustReachedHome() OVERRIDE { Reset(); } @@ -207,7 +207,7 @@ public: events.ScheduleEvent(EVENT_SPAWN_ADD, 10000); } - void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) + void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) OVERRIDE { if (summon->GetEntry() != NPC_NEFARIAN) { @@ -218,9 +218,9 @@ public: } } - void JustSummoned(Creature* /*summon*/) {} + void JustSummoned(Creature* /*summon*/) OVERRIDE {} - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { if (instance && type == 1 && data == 1) { @@ -234,7 +234,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) { @@ -360,7 +360,7 @@ public: } } - void sGossipSelect(Player* player, uint32 sender, uint32 action) + void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE { if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) { @@ -374,9 +374,9 @@ public: uint32 SpawnedAdds; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_victor_nefariusAI (creature); + return new boss_victor_nefariusAI(creature); } }; @@ -389,19 +389,19 @@ public: { boss_nefarianAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { } - void Reset() + void Reset() OVERRIDE { Phase3 = false; canDespawn = false; DespawnTimer = 30000; } - void JustReachedHome() + void JustReachedHome() OVERRIDE { canDespawn = true; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { events.ScheduleEvent(EVENT_SHADOWFLAME, 12000); events.ScheduleEvent(EVENT_FEAR, urand(25000, 35000)); @@ -412,13 +412,13 @@ public: Talk(SAY_RANDOM); } - void JustDied(Unit* /*Killer*/) + void JustDied(Unit* /*Killer*/) OVERRIDE { _JustDied(); Talk(SAY_DEATH); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* victim) OVERRIDE { if (rand()%5) return; @@ -426,7 +426,7 @@ public: Talk(SAY_SLAY, victim->GetGUID()); } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 type, uint32 id) OVERRIDE { if (type != POINT_MOTION_TYPE) return; @@ -439,7 +439,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (canDespawn && DespawnTimer <= diff) { @@ -570,9 +570,9 @@ public: }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_nefarianAI (creature); + return new boss_nefarianAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp index 6e20b58a6d6..be2aeb9e223 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp @@ -70,7 +70,7 @@ public: { boss_razorgoreAI(Creature* creature) : BossAI(creature, BOSS_RAZORGORE) { } - void Reset() + void Reset() OVERRIDE { _Reset(); @@ -79,7 +79,7 @@ public: instance->SetData(DATA_EGG_EVENT, NOT_STARTED); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); Talk(SAY_DEATH); @@ -100,19 +100,19 @@ public: me->SetHealth(me->GetMaxHealth()); } - void DoAction(int32 action) + void DoAction(int32 action) OVERRIDE { if (action == ACTION_PHASE_TWO) DoChangePhase(); } - void DamageTaken(Unit* /*who*/, uint32& damage) + void DamageTaken(Unit* /*who*/, uint32& damage) OVERRIDE { if (!secondPhase) damage = 0; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -154,9 +154,9 @@ public: bool secondPhase; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_razorgoreAI (creature); + return new boss_razorgoreAI(creature); } }; @@ -165,7 +165,7 @@ class go_orb_of_domination : public GameObjectScript public: go_orb_of_domination() : GameObjectScript("go_orb_of_domination") { } - bool OnGossipHello(Player* player, GameObject* go) + bool OnGossipHello(Player* player, GameObject* go) OVERRIDE { if (InstanceScript* instance = go->GetInstanceScript()) if (instance->GetData(DATA_EGG_EVENT) != DONE) @@ -193,13 +193,13 @@ class spell_egg_event : public SpellScriptLoader instance->SetData(DATA_EGG_EVENT, SPECIAL); } - void Register() + void Register() OVERRIDE { OnHit += SpellHitFn(spell_egg_eventSpellScript::HandleOnHit); } }; - SpellScript* GetSpellScript() const + SpellScript* GetSpellScript() const OVERRIDE { return new spell_egg_eventSpellScript(); } diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp index e7626c92ec0..c595f3acaff 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp @@ -75,7 +75,7 @@ public: creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void Reset() + void Reset() OVERRIDE { _Reset(); @@ -85,7 +85,7 @@ public: HasYelled = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); @@ -109,7 +109,7 @@ public: events.ScheduleEvent(EVENT_SPEECH_1, 1000); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* victim) OVERRIDE { if (rand()%5) return; @@ -117,7 +117,7 @@ public: Talk(SAY_KILLTARGET, victim->GetGUID()); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { events.Update(diff); @@ -216,7 +216,7 @@ public: DoMeleeAttackIfReady(); } - void sGossipSelect(Player* player, uint32 sender, uint32 action) + void sGossipSelect(Player* player, uint32 sender, uint32 action) OVERRIDE { if (sender == GOSSIP_ID && action == 0) { @@ -230,9 +230,9 @@ public: bool HasYelled; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_vaelAI (creature); + return new boss_vaelAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp index e0a813a6590..d904e0a89f8 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp @@ -215,7 +215,7 @@ public: return true; } - uint64 GetData64(uint32 id) const + uint64 GetData64(uint32 id) const OVERRIDE { switch (id) { @@ -233,7 +233,7 @@ public: return 0; } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { if (type == DATA_EGG_EVENT) { @@ -343,7 +343,7 @@ public: uint64 NefarianGUID; }; - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_blackwing_lair_InstanceMapScript(map); } diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp index 04ae634eb55..8a7836b310e 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp @@ -25,7 +25,7 @@ EndScriptData */ #include "ScriptedCreature.h" #include "deadmines.h" -enum eSpels +enum Spels { SPELL_TRASH = 3391, SPELL_SMITE_STOMP = 6432, @@ -43,9 +43,9 @@ class boss_mr_smite : public CreatureScript public: boss_mr_smite() : CreatureScript("boss_mr_smite") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_mr_smiteAI (creature); + return new boss_mr_smiteAI(creature); } struct boss_mr_smiteAI : public ScriptedAI @@ -66,7 +66,7 @@ public: uint32 uiPhase; uint32 uiTimer; - void Reset() + void Reset() OVERRIDE { uiTrashTimer = urand(5000, 9000); uiSlamTimer = 9000; @@ -80,7 +80,7 @@ public: SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); } @@ -94,7 +94,7 @@ public: return true; } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { if (!UpdateVictim()) return; @@ -166,7 +166,7 @@ public: DoMeleeAttackIfReady(); } - void MovementInform(uint32 uiType, uint32 /*uiId*/) + void MovementInform(uint32 uiType, uint32 /*uiId*/) OVERRIDE { if (uiType != POINT_MOTION_TYPE) return; diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 991056d0ce0..38d10107094 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -39,7 +39,7 @@ class item_defias_gunpowder : public ItemScript public: item_defias_gunpowder() : ItemScript("item_defias_gunpowder") { } - bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) + bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) OVERRIDE { InstanceScript* instance = player->GetInstanceScript(); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index d9e355a0a1a..3a6b5893ef3 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -200,7 +200,7 @@ class instance_deadmines : public InstanceMapScript } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { switch (type) { @@ -216,7 +216,7 @@ class instance_deadmines : public InstanceMapScript } } - uint32 GetData(uint32 type) const + uint32 GetData(uint32 type) const OVERRIDE { switch (type) { @@ -227,7 +227,7 @@ class instance_deadmines : public InstanceMapScript return 0; } - uint64 GetData64(uint32 data) const + uint64 GetData64(uint32 data) const OVERRIDE { switch (data) { @@ -247,7 +247,7 @@ class instance_deadmines : public InstanceMapScript } }; - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_deadmines_InstanceMapScript(map); } diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index f8fc6e7cfdf..46683442a60 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -88,12 +88,12 @@ class npc_blastmaster_emi_shortfuse : public CreatureScript public: npc_blastmaster_emi_shortfuse() : CreatureScript("npc_blastmaster_emi_shortfuse") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_blastmaster_emi_shortfuseAI(creature); } - 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) @@ -109,7 +109,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { InstanceScript* instance = creature->GetInstanceScript(); @@ -138,7 +138,7 @@ public: std::list<uint64> SummonList; std::list<uint64> GoSummonList; - void Reset() + void Reset() OVERRIDE { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -264,7 +264,7 @@ public: } } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { //just in case if (GetPlayerForEscort()) @@ -308,7 +308,7 @@ public: } } - void SetData(uint32 uiI, uint32 uiValue) + void SetData(uint32 uiI, uint32 uiValue) OVERRIDE { switch (uiI) { @@ -408,7 +408,7 @@ public: } } - void UpdateEscortAI(const uint32 uiDiff) + void UpdateEscortAI(const uint32 uiDiff) OVERRIDE { if (uiPhase) { @@ -537,7 +537,7 @@ public: DoMeleeAttackIfReady(); } - void JustSummoned(Creature* summon) + void JustSummoned(Creature* summon) OVERRIDE { SummonList.push_back(summon->GetGUID()); AggroAllPlayers(summon); @@ -551,7 +551,7 @@ class boss_grubbis : public CreatureScript public: boss_grubbis() : CreatureScript("boss_grubbis") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_grubbisAI(creature); } @@ -573,7 +573,7 @@ public: creature->AI()->SetData(2, 1); } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { if (!UpdateVictim()) return; @@ -581,7 +581,7 @@ public: DoMeleeAttackIfReady(); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (!me->IsSummon()) return; diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h index 328f22656f6..c0d4f1d57cf 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h @@ -18,14 +18,14 @@ #ifndef DEF_GNOMEREGAN_H #define DEF_GNOMEREGAN_H -enum eGameObjects +enum GameObjectIds { GO_CAVE_IN_LEFT = 146085, GO_CAVE_IN_RIGHT = 146086, GO_RED_ROCKET = 103820 }; -enum eCreatures +enum CreatureIds { NPC_BLASTMASTER_EMI_SHORTFUSE = 7998, NPC_CAVERNDEEP_AMBUSHER = 6207, @@ -33,12 +33,12 @@ enum eCreatures NPC_CHOMPER = 6215 }; -enum eData +enum Data { TYPE_EVENT = 1 }; -enum eData64 +enum Data64 { DATA_GO_CAVE_IN_LEFT, DATA_GO_CAVE_IN_RIGHT, diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index de3606b7b55..a00e9d9abe5 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -27,7 +27,7 @@ class instance_gnomeregan : public InstanceMapScript public: instance_gnomeregan() : InstanceMapScript("instance_gnomeregan", 90) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_gnomeregan_InstanceMapScript(map); } @@ -102,7 +102,7 @@ public: } } - void SetData(uint32 uiType, uint32 uiData) + void SetData(uint32 uiType, uint32 uiData) OVERRIDE { switch (uiType) { @@ -114,7 +114,7 @@ public: } } - uint32 GetData(uint32 uiType) const + uint32 GetData(uint32 uiType) const OVERRIDE { switch (uiType) { @@ -123,7 +123,7 @@ public: return 0; } - uint64 GetData64(uint32 uiType) const + uint64 GetData64(uint32 uiType) const OVERRIDE { switch (uiType) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 9dab7439136..6599af7c2aa 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -53,9 +53,9 @@ class boss_curator : public CreatureScript public: boss_curator() : CreatureScript("boss_curator") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_curatorAI (creature); + return new boss_curatorAI(creature); } struct boss_curatorAI : public ScriptedAI @@ -69,7 +69,7 @@ public: bool Enraged; bool Evocating; - void Reset() + void Reset() OVERRIDE { AddTimer = 10000; HatefulBoltTimer = 15000; //This time may be wrong @@ -80,22 +80,22 @@ public: me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); } - 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 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/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index ff31074617c..0a9aee6269c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -45,9 +45,9 @@ class boss_maiden_of_virtue : public CreatureScript public: boss_maiden_of_virtue() : CreatureScript("boss_maiden_of_virtue") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_maiden_of_virtueAI (creature); + return new boss_maiden_of_virtueAI(creature); } struct boss_maiden_of_virtueAI : public ScriptedAI @@ -62,7 +62,7 @@ public: bool Enraged; - void Reset() + void Reset() OVERRIDE { Repentance_Timer = 25000+(rand()%15000); Holyfire_Timer = 8000+(rand()%17000); @@ -73,23 +73,23 @@ public: Enraged = false; } - void KilledUnit(Unit* /*Victim*/) + void KilledUnit(Unit* /*Victim*/) OVERRIDE { if (urand(0, 1) == 0) 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 UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index be6eac01cc4..0b11d425e85 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -53,9 +53,9 @@ class boss_attumen : public CreatureScript public: boss_attumen() : CreatureScript("boss_attumen") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_attumenAI (creature); + return new boss_attumenAI(creature); } struct boss_attumenAI : public ScriptedAI @@ -79,34 +79,34 @@ public: uint32 ChargeTimer; //only when mounted uint32 ResetTimer; - void Reset() + void Reset() OVERRIDE { ResetTimer = 0; } - void EnterEvadeMode() + void EnterEvadeMode() OVERRIDE { ScriptedAI::EnterEvadeMode(); ResetTimer = 2000; } - 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); if (Unit* midnight = Unit::GetUnit(*me, Midnight)) midnight->Kill(midnight); } - void UpdateAI(uint32 diff); + void UpdateAI(uint32 diff) OVERRIDE; - void SpellHit(Unit* /*source*/, const SpellInfo* spell) + void SpellHit(Unit* /*source*/, const SpellInfo* spell) OVERRIDE { if (spell->Mechanic == MECHANIC_DISARM) Talk(SAY_DISARMED); @@ -119,7 +119,7 @@ class boss_midnight : public CreatureScript public: boss_midnight() : CreatureScript("boss_midnight") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_midnightAI(creature); } @@ -132,7 +132,7 @@ public: uint8 Phase; uint32 Mount_Timer; - void Reset() + void Reset() OVERRIDE { Phase = 1; Attumen = 0; @@ -142,9 +142,9 @@ public: me->SetVisible(true); } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { if (Phase == 2) { @@ -153,7 +153,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index 69631ca90b9..473fe000939 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -27,20 +27,51 @@ EndScriptData */ #include "ScriptedCreature.h" #include "karazhan.h" -enum Moroes +enum Yells { SAY_AGGRO = 0, SAY_SPECIAL = 1, SAY_KILL = 2, - SAY_DEATH = 3, - - SPELL_VANISH = 29448, - SPELL_GARROTE = 37066, - SPELL_BLIND = 34694, - SPELL_GOUGE = 29425, - SPELL_FRENZY = 37023, + SAY_DEATH = 3 }; +enum Spells +{ + SPELL_VANISH = 29448, + SPELL_GARROTE = 37066, + SPELL_BLIND = 34694, + SPELL_GOUGE = 29425, + SPELL_FRENZY = 37023, + + // Adds + SPELL_MANABURN = 29405, + SPELL_MINDFLY = 29570, + SPELL_SWPAIN = 34441, + SPELL_SHADOWFORM = 29406, + + SPELL_HAMMEROFJUSTICE = 13005, + SPELL_JUDGEMENTOFCOMMAND = 29386, + SPELL_SEALOFCOMMAND = 29385, + + SPELL_DISPELMAGIC = 15090, + SPELL_GREATERHEAL = 29564, + SPELL_HOLYFIRE = 29563, + SPELL_PWSHIELD = 29408, + + SPELL_CLEANSE = 29380, + SPELL_GREATERBLESSOFMIGHT = 29381, + SPELL_HOLYLIGHT = 29562, + SPELL_DIVINESHIELD = 41367, + + SPELL_HAMSTRING = 9080, + SPELL_MORTALSTRIKE = 29572, + SPELL_WHIRLWIND = 29573, + + SPELL_DISARM = 8379, + SPELL_HEROICSTRIKE = 29567, + SPELL_SHIELDBASH = 11972, + SPELL_SHIELDWALL = 29390 +}; #define POS_Z 81.73f @@ -67,9 +98,9 @@ class boss_moroes : public CreatureScript public: boss_moroes() : CreatureScript("boss_moroes") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_moroesAI (creature); + return new boss_moroesAI(creature); } struct boss_moroesAI : public ScriptedAI @@ -96,7 +127,7 @@ public: bool InVanish; bool Enrage; - void Reset() + void Reset() OVERRIDE { Vanish_Timer = 30000; Blind_Timer = 35000; @@ -121,7 +152,7 @@ public: DoZoneInCombat(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { StartEvent(); @@ -130,12 +161,12 @@ public: DoZoneInCombat(); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_KILL); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); @@ -228,7 +259,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -324,7 +355,7 @@ struct boss_moroes_guestAI : public ScriptedAI instance = creature->GetInstanceScript(); } - void Reset() + void Reset() OVERRIDE { if (instance) instance->SetData(TYPE_MOROES, NOT_STARTED); @@ -354,7 +385,7 @@ struct boss_moroes_guestAI : public ScriptedAI return me; } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { if (instance && !instance->GetData(TYPE_MOROES)) EnterEvadeMode(); @@ -363,42 +394,14 @@ struct boss_moroes_guestAI : public ScriptedAI } }; -#define SPELL_MANABURN 29405 -#define SPELL_MINDFLY 29570 -#define SPELL_SWPAIN 34441 -#define SPELL_SHADOWFORM 29406 - -#define SPELL_HAMMEROFJUSTICE 13005 -#define SPELL_JUDGEMENTOFCOMMAND 29386 -#define SPELL_SEALOFCOMMAND 29385 - -#define SPELL_DISPELMAGIC 15090 //Self or other guest+Moroes -#define SPELL_GREATERHEAL 29564 //Self or other guest+Moroes -#define SPELL_HOLYFIRE 29563 -#define SPELL_PWSHIELD 29408 - -#define SPELL_CLEANSE 29380 //Self or other guest+Moroes -#define SPELL_GREATERBLESSOFMIGHT 29381 //Self or other guest+Moroes -#define SPELL_HOLYLIGHT 29562 //Self or other guest+Moroes -#define SPELL_DIVINESHIELD 41367 - -#define SPELL_HAMSTRING 9080 -#define SPELL_MORTALSTRIKE 29572 -#define SPELL_WHIRLWIND 29573 - -#define SPELL_DISARM 8379 -#define SPELL_HEROICSTRIKE 29567 -#define SPELL_SHIELDBASH 11972 -#define SPELL_SHIELDWALL 29390 - class boss_baroness_dorothea_millstipe : public CreatureScript { public: boss_baroness_dorothea_millstipe() : CreatureScript("boss_baroness_dorothea_millstipe") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baroness_dorothea_millstipeAI (creature); + return new boss_baroness_dorothea_millstipeAI(creature); } struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI @@ -410,7 +413,7 @@ public: uint32 MindFlay_Timer; uint32 ShadowWordPain_Timer; - void Reset() + void Reset() OVERRIDE { ManaBurn_Timer = 7000; MindFlay_Timer = 1000; @@ -421,7 +424,7 @@ public: boss_moroes_guestAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -459,9 +462,9 @@ class boss_baron_rafe_dreuger : public CreatureScript public: boss_baron_rafe_dreuger() : CreatureScript("boss_baron_rafe_dreuger") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baron_rafe_dreugerAI (creature); + return new boss_baron_rafe_dreugerAI(creature); } struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI @@ -473,7 +476,7 @@ public: uint32 SealOfCommand_Timer; uint32 JudgementOfCommand_Timer; - void Reset() + void Reset() OVERRIDE { HammerOfJustice_Timer = 1000; SealOfCommand_Timer = 7000; @@ -482,7 +485,7 @@ public: boss_moroes_guestAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -516,9 +519,9 @@ class boss_lady_catriona_von_indi : public CreatureScript public: boss_lady_catriona_von_indi() : CreatureScript("boss_lady_catriona_von_indi") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lady_catriona_von_indiAI (creature); + return new boss_lady_catriona_von_indiAI(creature); } struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI @@ -531,7 +534,7 @@ public: uint32 HolyFire_Timer; uint32 PowerWordShield_Timer; - void Reset() + void Reset() OVERRIDE { DispelMagic_Timer = 11000; GreaterHeal_Timer = 1500; @@ -543,7 +546,7 @@ public: boss_moroes_guestAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -586,9 +589,9 @@ class boss_lady_keira_berrybuck : public CreatureScript public: boss_lady_keira_berrybuck() : CreatureScript("boss_lady_keira_berrybuck") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lady_keira_berrybuckAI (creature); + return new boss_lady_keira_berrybuckAI(creature); } struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI @@ -601,7 +604,7 @@ public: uint32 HolyLight_Timer; uint32 DivineShield_Timer; - void Reset() + void Reset() OVERRIDE { Cleanse_Timer = 13000; GreaterBless_Timer = 1000; @@ -613,7 +616,7 @@ public: boss_moroes_guestAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -660,9 +663,9 @@ class boss_lord_robin_daris : public CreatureScript public: boss_lord_robin_daris() : CreatureScript("boss_lord_robin_daris") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lord_robin_darisAI (creature); + return new boss_lord_robin_darisAI(creature); } struct boss_lord_robin_darisAI : public boss_moroes_guestAI @@ -674,7 +677,7 @@ public: uint32 MortalStrike_Timer; uint32 WhirlWind_Timer; - void Reset() + void Reset() OVERRIDE { Hamstring_Timer = 7000; MortalStrike_Timer = 10000; @@ -683,7 +686,7 @@ public: boss_moroes_guestAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -716,9 +719,9 @@ class boss_lord_crispin_ference : public CreatureScript public: boss_lord_crispin_ference() : CreatureScript("boss_lord_crispin_ference") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lord_crispin_ferenceAI (creature); + return new boss_lord_crispin_ferenceAI(creature); } struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI @@ -731,7 +734,7 @@ public: uint32 ShieldBash_Timer; uint32 ShieldWall_Timer; - void Reset() + void Reset() OVERRIDE { Disarm_Timer = 6000; HeroicStrike_Timer = 10000; @@ -741,7 +744,7 @@ public: boss_moroes_guestAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index 66c6994f2b6..f80ff5b6028 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -69,7 +69,7 @@ class boss_netherspite : public CreatureScript public: boss_netherspite() : CreatureScript("boss_netherspite") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_netherspiteAI(creature); } @@ -127,7 +127,7 @@ public: return sqrt((xa-xb)*(xa-xb) + (ya-yb)*(ya-yb)); } - void Reset() + void Reset() OVERRIDE { Berserk = false; NetherInfusionTimer = 540000; @@ -257,19 +257,19 @@ public: Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { HandleDoors(false); SwitchToPortalPhase(); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { HandleDoors(true); DestroyPortals(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index cccf45d9c32..984ef902f05 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -69,9 +69,9 @@ class boss_nightbane : public CreatureScript public: boss_nightbane() : CreatureScript("boss_nightbane") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_nightbaneAI (creature); + return new boss_nightbaneAI(creature); } struct boss_nightbaneAI : public ScriptedAI @@ -109,7 +109,7 @@ public: uint32 WaitTimer; uint32 MovePhase; - void Reset() + void Reset() OVERRIDE { BellowingRoarTimer = 30000; CharredEarthTimer = 15000; @@ -160,7 +160,7 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (instance) instance->SetData(TYPE_NIGHTBANE, IN_PROGRESS); @@ -169,13 +169,13 @@ public: Talk(YELL_AGGRO); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (!Intro && !Flying) ScriptedAI::AttackStart(who); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) instance->SetData(TYPE_NIGHTBANE, DONE); @@ -183,13 +183,14 @@ public: HandleTerraceDoors(true); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!Intro && !Flying) ScriptedAI::MoveInLineOfSight(who); } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 type, uint32 id) OVERRIDE { if (type != POINT_MOTION_TYPE) return; @@ -235,7 +236,7 @@ public: } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { summoned->AI()->AttackStart(me->GetVictim()); } @@ -260,7 +261,7 @@ public: Skeletons = false; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { /* The timer for this was never setup apparently, not sure if the code works properly: if (WaitTimer <= diff) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index bb9f36f36c9..2abfcead826 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -102,9 +102,9 @@ class netherspite_infernal : public CreatureScript public: netherspite_infernal() : CreatureScript("netherspite_infernal") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new netherspite_infernalAI (creature); + return new netherspite_infernalAI(creature); } struct netherspite_infernalAI : public ScriptedAI @@ -117,11 +117,12 @@ public: uint64 malchezaar; InfernalPoint *point; - void Reset() {} - void EnterCombat(Unit* /*who*/) {} - void MoveInLineOfSight(Unit* /*who*/) {} + void Reset() OVERRIDE {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} + void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {} - void UpdateAI(uint32 diff) + + void UpdateAI(uint32 diff) OVERRIDE { if (HellfireTimer) { @@ -143,14 +144,14 @@ public: } } - void KilledUnit(Unit* who) + void KilledUnit(Unit* who) OVERRIDE { if (Unit* unit = Unit::GetUnit(*me, malchezaar)) if (Creature* creature = unit->ToCreature()) creature->AI()->KilledUnit(who); } - void SpellHit(Unit* /*who*/, const SpellInfo* spell) + void SpellHit(Unit* /*who*/, const SpellInfo* spell) OVERRIDE { if (spell->Id == SPELL_INFERNAL_RELAY) { @@ -161,7 +162,7 @@ public: } } - void DamageTaken(Unit* done_by, uint32 &damage) + void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE { if (done_by->GetGUID() != malchezaar) damage = 0; @@ -176,9 +177,9 @@ class boss_malchezaar : public CreatureScript public: boss_malchezaar() : CreatureScript("boss_malchezaar") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_malchezaarAI (creature); + return new boss_malchezaarAI(creature); } struct boss_malchezaarAI : public ScriptedAI @@ -210,7 +211,7 @@ public: uint32 phase; - void Reset() + void Reset() OVERRIDE { AxesCleanup(); ClearWeapons(); @@ -242,12 +243,12 @@ public: instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_SLAY); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); @@ -263,7 +264,7 @@ public: instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); @@ -386,7 +387,7 @@ public: Talk(SAY_SUMMON); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index c4cded87665..7999524f853 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -84,9 +84,9 @@ class boss_shade_of_aran : public CreatureScript public: boss_shade_of_aran() : CreatureScript("boss_shade_of_aran") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_aranAI (creature); + return new boss_aranAI(creature); } struct boss_aranAI : public ScriptedAI @@ -123,7 +123,7 @@ public: bool Drinking; bool DrinkInturrupted; - void Reset() + void Reset() OVERRIDE { SecondarySpellTimer = 5000; NormalCastTimer = 0; @@ -155,12 +155,12 @@ public: } } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_KILL); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); @@ -171,7 +171,7 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); @@ -217,7 +217,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -478,13 +478,13 @@ public: DoMeleeAttackIfReady(); } - void DamageTaken(Unit* /*pAttacker*/, uint32 &damage) + void DamageTaken(Unit* /*pAttacker*/, uint32 &damage) OVERRIDE { if (!DrinkInturrupted && Drinking && damage) DrinkInturrupted = true; } - void SpellHit(Unit* /*pAttacker*/, const SpellInfo* Spell) + void SpellHit(Unit* /*pAttacker*/, const SpellInfo* Spell) OVERRIDE { //We only care about interrupt effects and only if they are durring a spell currently being casted if ((Spell->Effects[0].Effect != SPELL_EFFECT_INTERRUPT_CAST && @@ -513,9 +513,9 @@ class npc_aran_elemental : public CreatureScript public: npc_aran_elemental() : CreatureScript("npc_aran_elemental") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new water_elementalAI (creature); + return new water_elementalAI(creature); } struct water_elementalAI : public ScriptedAI @@ -524,14 +524,14 @@ public: uint32 CastTimer; - void Reset() + void Reset() OVERRIDE { CastTimer = 2000 + (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/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index df291c161b2..f348cf95a82 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -34,8 +34,11 @@ enum TerestianIllhoof SAY_DEATH = 2, SAY_AGGRO = 3, SAY_SACRIFICE = 4, - SAY_SUMMON = 5, + SAY_SUMMON = 5 +}; +enum Spells +{ SPELL_SUMMON_DEMONCHAINS = 30120, // Summons demonic chains that maintain the ritual of sacrifice. SPELL_DEMON_CHAINS = 30206, // Instant - Visual Effect SPELL_ENRAGE = 23537, // Increases the caster's attack speed by 50% and the Physical damage it deals by 219 to 281 for 10 min. @@ -51,11 +54,14 @@ enum TerestianIllhoof SPELL_FIREBOLT = 30050, // Blasts a target for 150 Fire damage. SPELL_BROKEN_PACT = 30065, // All damage taken increased by 25%. SPELL_AMPLIFY_FLAMES = 30053, // Increases the Fire damage taken by an enemy by 500 for 25 sec. +}; - CREATURE_DEMONCHAINS = 17248, - CREATURE_FIENDISHIMP = 17267, - CREATURE_PORTAL = 17265, - CREATURE_KILREK = 17229, +enum Creatures +{ + NPC_DEMONCHAINS = 17248, + NPC_FIENDISHIMP = 17267, + NPC_PORTAL = 17265, + NPC_KILREK = 17229 }; @@ -64,9 +70,9 @@ class npc_kilrek : public CreatureScript public: npc_kilrek() : CreatureScript("npc_kilrek") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_kilrekAI (creature); + return new npc_kilrekAI(creature); } struct npc_kilrekAI : public ScriptedAI @@ -82,13 +88,13 @@ public: uint32 AmplifyTimer; - void Reset() + void Reset() OVERRIDE { TerestianGUID = 0; AmplifyTimer = 2000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (!instance) { @@ -97,7 +103,7 @@ public: } } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) { @@ -111,7 +117,7 @@ public: } else ERROR_INST_DATA(me); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) @@ -135,7 +141,7 @@ class npc_demon_chain : public CreatureScript public: npc_demon_chain() : CreatureScript("npc_demon_chain") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_demon_chainAI(creature); } @@ -146,16 +152,17 @@ public: uint64 SacrificeGUID; - void Reset() + void Reset() OVERRIDE { SacrificeGUID = 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 JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (SacrificeGUID) { @@ -172,9 +179,9 @@ class npc_fiendish_portal : public CreatureScript public: npc_fiendish_portal() : CreatureScript("npc_fiendish_portal") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_fiendish_portalAI (creature); + return new npc_fiendish_portalAI(creature); } struct npc_fiendish_portalAI : public PassiveAI @@ -183,12 +190,12 @@ public: SummonList summons; - void Reset() + void Reset() OVERRIDE { DespawnAllImp(); } - void JustSummoned(Creature* summon) + void JustSummoned(Creature* summon) OVERRIDE { summons.Summon(summon); DoZoneInCombat(summon); @@ -201,16 +208,14 @@ public: }; }; -#define SPELL_FIREBOLT 30050 // Blasts a target for 181-209 Fire damage. - class npc_fiendish_imp : public CreatureScript { public: npc_fiendish_imp() : CreatureScript("npc_fiendish_imp") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_fiendish_impAI (creature); + return new npc_fiendish_impAI(creature); } struct npc_fiendish_impAI : public ScriptedAI @@ -219,16 +224,16 @@ public: uint32 FireboltTimer; - void Reset() + void Reset() OVERRIDE { FireboltTimer = 2000; me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, 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()) @@ -250,9 +255,9 @@ class boss_terestian_illhoof : public CreatureScript public: boss_terestian_illhoof() : CreatureScript("boss_terestian_illhoof") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_terestianAI (creature); + return new boss_terestianAI(creature); } struct boss_terestianAI : public ScriptedAI @@ -277,7 +282,7 @@ public: bool SummonedPortals; bool Berserk; - void Reset() + void Reset() OVERRIDE { for (uint8 i = 0; i < 2; ++i) { @@ -318,14 +323,14 @@ public: else DoCast(me, SPELL_SUMMON_IMP, 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() == CREATURE_PORTAL) + if (summoned->GetEntry() == NPC_PORTAL) { PortalGUID[PortalsCount] = summoned->GetGUID(); ++PortalsCount; @@ -338,12 +343,12 @@ public: } } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_SLAY); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { for (uint8 i = 0; i < 2; ++i) { @@ -362,7 +367,7 @@ public: instance->SetData(TYPE_TERESTIAN, DONE); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -375,7 +380,7 @@ public: DoCast(target, SPELL_SACRIFICE, true); DoCast(target, SPELL_SUMMON_DEMONCHAINS, true); - if (Creature* Chains = me->FindNearestCreature(CREATURE_DEMONCHAINS, 5000)) + if (Creature* Chains = me->FindNearestCreature(NPC_DEMONCHAINS, 5000)) { CAST_AI(npc_demon_chain::npc_demon_chainAI, Chains->AI())->SacrificeGUID = target->GetGUID(); Chains->CastSpell(Chains, SPELL_DEMON_CHAINS, true); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 17546c66e26..29ae4890fdc 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -116,7 +116,7 @@ class boss_dorothee : public CreatureScript public: boss_dorothee() : CreatureScript("boss_dorothee") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_dorotheeAI(creature); } @@ -139,7 +139,7 @@ public: bool SummonedTito; bool TitoDied; - void Reset() + void Reset() OVERRIDE { AggroTimer = 500; @@ -151,19 +151,19 @@ public: TitoDied = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_DOROTHEE_AGGRO); } - void JustReachedHome() + void JustReachedHome() OVERRIDE { me->DespawnOrUnsummon(); } void SummonTito(); - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DOROTHEE_DEATH); @@ -171,7 +171,7 @@ public: SummonCroneIfReady(instance, me); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -179,7 +179,8 @@ public: ScriptedAI::AttackStart(who); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -187,7 +188,7 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (AggroTimer) { @@ -230,7 +231,7 @@ class npc_tito : public CreatureScript public: npc_tito() : CreatureScript("npc_tito") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_titoAI(creature); } @@ -242,15 +243,15 @@ public: uint64 DorotheeGUID; uint32 YipTimer; - void Reset() + void Reset() OVERRIDE { DorotheeGUID = 0; YipTimer = 10000; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (DorotheeGUID) { @@ -263,7 +264,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -296,7 +297,7 @@ class boss_strawman : public CreatureScript public: boss_strawman() : CreatureScript("boss_strawman") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_strawmanAI(creature); } @@ -314,14 +315,14 @@ public: uint32 BrainBashTimer; uint32 BrainWipeTimer; - void Reset() + void Reset() OVERRIDE { AggroTimer = 13000; BrainBashTimer = 5000; BrainWipeTimer = 7000; } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -329,7 +330,8 @@ public: ScriptedAI::AttackStart(who); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -337,17 +339,17 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_STRAWMAN_AGGRO); } - void JustReachedHome() + void JustReachedHome() OVERRIDE { me->DespawnOrUnsummon(); } - void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) OVERRIDE { if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10))) { @@ -360,7 +362,7 @@ public: } } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_STRAWMAN_DEATH); @@ -368,12 +370,12 @@ public: SummonCroneIfReady(instance, me); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_STRAWMAN_SLAY); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (AggroTimer) { @@ -410,7 +412,7 @@ class boss_tinhead : public CreatureScript public: boss_tinhead() : CreatureScript("boss_tinhead") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_tinheadAI(creature); } @@ -430,7 +432,7 @@ public: uint8 RustCount; - void Reset() + void Reset() OVERRIDE { AggroTimer = 15000; CleaveTimer = 5000; @@ -439,17 +441,17 @@ public: RustCount = 0; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_TINHEAD_AGGRO); } - void JustReachedHome() + void JustReachedHome() OVERRIDE { me->DespawnOrUnsummon(); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -457,7 +459,8 @@ public: ScriptedAI::AttackStart(who); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -465,7 +468,7 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_TINHEAD_DEATH); @@ -473,12 +476,12 @@ public: SummonCroneIfReady(instance, me); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_TINHEAD_SLAY); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (AggroTimer) { @@ -519,7 +522,7 @@ class boss_roar : public CreatureScript public: boss_roar() : CreatureScript("boss_roar") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_roarAI(creature); } @@ -538,7 +541,7 @@ public: uint32 ShredTimer; uint32 ScreamTimer; - void Reset() + void Reset() OVERRIDE { AggroTimer = 20000; MangleTimer = 5000; @@ -546,7 +549,8 @@ public: ScreamTimer = 15000; } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -554,7 +558,7 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -562,17 +566,17 @@ public: ScriptedAI::AttackStart(who); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_ROAR_AGGRO); } - void JustReachedHome() + void JustReachedHome() OVERRIDE { me->DespawnOrUnsummon(); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_ROAR_DEATH); @@ -580,12 +584,12 @@ public: SummonCroneIfReady(instance, me); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_ROAR_SLAY); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (AggroTimer) { @@ -627,7 +631,7 @@ class boss_crone : public CreatureScript public: boss_crone() : CreatureScript("boss_crone") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_croneAI(creature); } @@ -644,30 +648,30 @@ public: uint32 CycloneTimer; uint32 ChainLightningTimer; - void Reset() + void Reset() OVERRIDE { CycloneTimer = 30000; ChainLightningTimer = 10000; } - void JustReachedHome() + void JustReachedHome() OVERRIDE { me->DespawnOrUnsummon(); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_CRONE_SLAY); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_CRONE_AGGRO); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_CRONE_DEATH); @@ -682,7 +686,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -713,7 +717,7 @@ class npc_cyclone : public CreatureScript public: npc_cyclone() : CreatureScript("npc_cyclone") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_cycloneAI(creature); } @@ -724,18 +728,19 @@ public: uint32 MoveTimer; - void Reset() + void Reset() OVERRIDE { MoveTimer = 1000; } - 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 (!me->HasAura(SPELL_KNOCKBACK)) DoCast(me, SPELL_KNOCKBACK, true); @@ -778,7 +783,7 @@ class npc_grandmother : public CreatureScript public: npc_grandmother() : CreatureScript("npc_grandmother") { } - 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) @@ -792,7 +797,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); player->SEND_GOSSIP_MENU(8990, creature->GetGUID()); @@ -806,7 +811,7 @@ class boss_bigbadwolf : public CreatureScript public: boss_bigbadwolf() : CreatureScript("boss_bigbadwolf") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_bigbadwolfAI(creature); } @@ -829,7 +834,7 @@ public: bool IsChasing; - void Reset() + void Reset() OVERRIDE { ChaseTimer = 30000; FearTimer = urand(25000, 35000); @@ -841,22 +846,22 @@ public: IsChasing = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_WOLF_AGGRO); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_WOLF_SLAY); } - void JustReachedHome() + void JustReachedHome() OVERRIDE { me->DespawnOrUnsummon(); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { DoPlaySoundToSet(me, SOUND_WOLF_DEATH); @@ -871,7 +876,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -1008,7 +1013,7 @@ class boss_julianne : public CreatureScript public: boss_julianne() : CreatureScript("boss_julianne") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_julianneAI(creature); } @@ -1045,7 +1050,7 @@ public: bool SummonedRomulo; bool RomuloDead; - void Reset() + void Reset() OVERRIDE { RomuloGUID = 0; Phase = PHASE_JULIANNE; @@ -1068,9 +1073,9 @@ public: RomuloDead = false; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -1078,7 +1083,8 @@ public: ScriptedAI::AttackStart(who); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -1086,12 +1092,12 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void JustReachedHome() + void JustReachedHome() OVERRIDE { me->DespawnOrUnsummon(); } - void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) OVERRIDE { if (Spell->Id == SPELL_DRINK_POISON) { @@ -1100,9 +1106,9 @@ public: } } - void DamageTaken(Unit* /*done_by*/, uint32 &damage); + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE; - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_JULIANNE_DEATH02); @@ -1116,12 +1122,12 @@ public: } } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_JULIANNE_SLAY); } - void UpdateAI(uint32 diff); + void UpdateAI(uint32 diff) OVERRIDE; }; }; @@ -1130,7 +1136,7 @@ class boss_romulo : public CreatureScript public: boss_romulo() : CreatureScript("boss_romulo") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_romuloAI(creature); } @@ -1160,7 +1166,7 @@ public: bool IsFakingDeath; bool JulianneDead; - void Reset() + void Reset() OVERRIDE { JulianneGUID = 0; Phase = PHASE_ROMULO; @@ -1175,12 +1181,12 @@ public: JulianneDead = false; } - void JustReachedHome() + void JustReachedHome() OVERRIDE { me->DespawnOrUnsummon(); } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (damage < me->GetHealth()) return; @@ -1234,7 +1240,7 @@ public: TC_LOG_ERROR(LOG_FILTER_TSCR, "boss_romuloAI: DamageTaken reach end of code, that should not happen."); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_ROMULO_AGGRO); if (JulianneGUID) @@ -1248,7 +1254,8 @@ public: } } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) return; @@ -1256,7 +1263,7 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_ROMULO_DEATH); @@ -1271,12 +1278,12 @@ public: } } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_ROMULO_SLAY); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim() || IsFakingDeath) return; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 412fcae76b1..eef61f0c051 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -49,7 +49,7 @@ class instance_karazhan : public InstanceMapScript public: instance_karazhan() : InstanceMapScript("instance_karazhan", 532) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_karazhan_InstanceMapScript(map); } @@ -127,7 +127,7 @@ public: } } - void SetData(uint32 type, uint32 uiData) + void SetData(uint32 type, uint32 uiData) OVERRIDE { switch (type) { @@ -182,7 +182,7 @@ public: } } - void SetData64(uint32 identifier, uint64 data) + void SetData64(uint32 identifier, uint64 data) OVERRIDE { switch (identifier) { @@ -241,7 +241,7 @@ public: return strSaveData; } - uint32 GetData(uint32 uiData) const + uint32 GetData(uint32 uiData) const OVERRIDE { switch (uiData) { @@ -264,7 +264,7 @@ public: return 0; } - uint64 GetData64(uint32 uiData) const + uint64 GetData64(uint32 uiData) const OVERRIDE { switch (uiData) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 3c78c2daa7c..679f52343eb 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -36,6 +36,28 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "Player.h" +enum Spells +{ + // Barnes + SPELL_SPOTLIGHT = 25824, + SPELL_TUXEDO = 32616, + + // Berthold + SPELL_TELEPORT = 39567, + + // Image of Medivh + SPELL_FIRE_BALL = 30967, + SPELL_UBER_FIREBALL = 30971, + SPELL_CONFLAGRATION_BLAST = 30977, + SPELL_MANA_SHIELD = 31635 +}; + +enum Creatures +{ + NPC_ARCANAGOS = 17652, + NPC_SPOTLIGHT = 19525 +}; + /*###### # npc_barnesAI ######*/ @@ -96,11 +118,6 @@ float Spawns[6][2]= {17534, -10900}, // Julianne }; -#define CREATURE_SPOTLIGHT 19525 - -#define SPELL_SPOTLIGHT 25824 -#define SPELL_TUXEDO 32616 - #define SPAWN_Z 90.5f #define SPAWN_Y -1758 #define SPAWN_O 4.738f @@ -131,7 +148,7 @@ public: bool PerformanceReady; bool RaidWiped; - void Reset() + void Reset() OVERRIDE { m_uiSpotlightGUID = 0; @@ -159,9 +176,9 @@ public: Start(false, false); } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { if (!instance) return; @@ -176,13 +193,13 @@ public: TalkCount = 0; SetEscortPaused(true); - if (Creature* pSpotlight = me->SummonCreature(CREATURE_SPOTLIGHT, + if (Creature* spotlight = me->SummonCreature(NPC_SPOTLIGHT, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000)) { - pSpotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pSpotlight->CastSpell(pSpotlight, SPELL_SPOTLIGHT, false); - m_uiSpotlightGUID = pSpotlight->GetGUID(); + spotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + spotlight->CastSpell(spotlight, SPELL_SPOTLIGHT, false); + m_uiSpotlightGUID = spotlight->GetGUID(); } break; case 8: @@ -266,7 +283,7 @@ public: RaidWiped = false; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { npc_escortAI::UpdateAI(diff); @@ -326,7 +343,7 @@ public: } }; - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE { player->PlayerTalkClass->ClearMenus(); npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, creature->AI()); @@ -361,7 +378,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (InstanceScript* instance = creature->GetInstanceScript()) { @@ -393,7 +410,7 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_barnesAI(creature); } @@ -403,11 +420,6 @@ public: # npc_berthold ####*/ -enum eBerthold -{ - SPELL_TELEPORT = 39567 -}; - #define GOSSIP_ITEM_TELEPORT "Teleport me to the Guardian's Library" class npc_berthold : public CreatureScript @@ -415,7 +427,7 @@ class npc_berthold : public CreatureScript public: npc_berthold() : CreatureScript("npc_berthold") { } - 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) @@ -425,7 +437,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (InstanceScript* instance = creature->GetInstanceScript()) { @@ -453,11 +465,6 @@ public: #define SAY_DIALOG_ARCANAGOS_8 "What have you done, wizard? This cannot be! I'm burning from... within!" #define SAY_DIALOG_MEDIVH_9 "He should not have angered me. I must go... recover my strength now..." -#define NPC_ARCANAGOS 17652 -#define SPELL_FIRE_BALL 30967 -#define SPELL_UBER_FIREBALL 30971 -#define SPELL_CONFLAGRATION_BLAST 30977 -#define SPELL_MANA_SHIELD 31635 static float MedivPos[4] = {-11161.49f, -1902.24f, 91.48f, 1.94f}; static float ArcanagosPos[4] = {-11169.75f, -1881.48f, 95.39f, 4.83f}; @@ -467,7 +474,7 @@ class npc_image_of_medivh : public CreatureScript public: npc_image_of_medivh() : CreatureScript("npc_image_of_medivh") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_image_of_medivhAI(creature); } @@ -490,7 +497,7 @@ public: bool EventStarted; - void Reset() + void Reset() OVERRIDE { ArcanagosGUID = 0; @@ -505,9 +512,9 @@ public: me->RemoveCorpse(); } } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 type, uint32 id) OVERRIDE { if (type != POINT_MOTION_TYPE) return; @@ -613,7 +620,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (YellTimer <= diff) { diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index 208971f85dd..d50aac36bca 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -19,7 +19,7 @@ #ifndef DEF_KARAZHAN_H #define DEF_KARAZHAN_H -enum eEnums +enum DataTypes { TYPE_ATTUMEN = 1, TYPE_MOROES = 2, diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index 619bc4e921c..74d65480611 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -94,7 +94,7 @@ class boss_felblood_kaelthas : public CreatureScript public: boss_felblood_kaelthas() : CreatureScript("boss_felblood_kaelthas") { } - CreatureAI* GetAI(Creature* c) const + CreatureAI* GetAI(Creature* c) const OVERRIDE { return new boss_felblood_kaelthasAI(c); } @@ -132,7 +132,7 @@ public: // 1 = Fireball; Summon Phoenix; Flamestrike // 2 = Gravity Lapses - void Reset() + void Reset() OVERRIDE { /// @todo Timers FireballTimer = 0; @@ -154,7 +154,7 @@ public: instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); @@ -168,13 +168,13 @@ public: escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (damage > me->GetHealth()) RemoveGravityLapse(); // Remove Gravity Lapse so that players fall to ground if they kill him when in air. } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (!instance) return; @@ -182,7 +182,8 @@ public: instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!HasTaunted && me->IsWithinDistInMap(who, 40.0f)) { @@ -280,7 +281,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) @@ -437,7 +438,7 @@ class npc_felkael_flamestrike : public CreatureScript public: npc_felkael_flamestrike() : CreatureScript("npc_felkael_flamestrike") { } - CreatureAI* GetAI(Creature* c) const + CreatureAI* GetAI(Creature* c) const OVERRIDE { return new npc_felkael_flamestrikeAI(c); } @@ -450,7 +451,7 @@ public: uint32 FlameStrikeTimer; - void Reset() + void Reset() OVERRIDE { FlameStrikeTimer = 5000; @@ -460,9 +461,10 @@ public: DoCast(me, SPELL_FLAMESTRIKE2, true); } - void EnterCombat(Unit* /*who*/) {} - void MoveInLineOfSight(Unit* /*who*/) {} - void UpdateAI(uint32 diff) + void EnterCombat(Unit* /*who*/) OVERRIDE {} + void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {} + + void UpdateAI(uint32 diff) OVERRIDE { if (FlameStrikeTimer <= diff) { @@ -478,7 +480,7 @@ class npc_felkael_phoenix : public CreatureScript public: npc_felkael_phoenix() : CreatureScript("npc_felkael_phoenix") { } - CreatureAI* GetAI(Creature* c) const + CreatureAI* GetAI(Creature* c) const OVERRIDE { return new npc_felkael_phoenixAI(c); } @@ -496,7 +498,7 @@ public: bool Rebirth; bool FakeDeath; - void Reset() + void Reset() OVERRIDE { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); me->SetDisableGravity(true); @@ -507,9 +509,9 @@ public: FakeDeath = false; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void DamageTaken(Unit* /*killer*/, uint32 &damage) + void DamageTaken(Unit* /*killer*/, uint32 &damage) OVERRIDE { if (damage < me->GetHealth()) return; @@ -543,12 +545,12 @@ public: } } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { me->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { //If we are fake death, we cast revbirth and after that we kill the phoenix to spawn the egg. if (FakeDeath) @@ -591,7 +593,7 @@ class npc_felkael_phoenix_egg : public CreatureScript public: npc_felkael_phoenix_egg() : CreatureScript("npc_felkael_phoenix_egg") { } - CreatureAI* GetAI(Creature* c) const + CreatureAI* GetAI(Creature* c) const OVERRIDE { return new npc_felkael_phoenix_eggAI(c); } @@ -602,15 +604,16 @@ public: uint32 HatchTimer; - void Reset() + void Reset() OVERRIDE { HatchTimer = 10000; } - void EnterCombat(Unit* /*who*/) {} - void MoveInLineOfSight(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} + void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {} + - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (HatchTimer <= diff) { @@ -626,7 +629,7 @@ class npc_arcane_sphere : public CreatureScript public: npc_arcane_sphere() : CreatureScript("npc_arcane_sphere") { } - CreatureAI* GetAI(Creature* c) const + CreatureAI* GetAI(Creature* c) const OVERRIDE { return new npc_arcane_sphereAI(c); } @@ -638,7 +641,7 @@ public: uint32 DespawnTimer; uint32 ChangeTargetTimer; - void Reset() + void Reset() OVERRIDE { DespawnTimer = 30000; ChangeTargetTimer = urand(6000, 12000); @@ -649,9 +652,9 @@ public: DoCast(me, SPELL_ARCANE_SPHERE_PASSIVE, true); } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (DespawnTimer <= diff) me->Kill(me); diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index 687cc9d393c..03c06664edf 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -49,19 +49,34 @@ static Speech PlayerDeath[]= {9}, }; -enum eEnums +enum Yells { SAY_AGGRO = 0, SAY_DEATH = 10, +}; - SPELL_DISPEL_MAGIC = 27609, - SPELL_FLASH_HEAL = 17843, - SPELL_SW_PAIN_NORMAL = 14032, - SPELL_SW_PAIN_HEROIC = 15654, - SPELL_SHIELD = 44291, - SPELL_RENEW_NORMAL = 44174, - SPELL_RENEW_HEROIC = 46192, +enum Spells +{ + SPELL_DISPEL_MAGIC = 27609, + SPELL_FLASH_HEAL = 17843, + SPELL_SW_PAIN_NORMAL = 14032, + SPELL_SW_PAIN_HEROIC = 15654, + SPELL_SHIELD = 44291, + SPELL_RENEW_NORMAL = 44174, + SPELL_RENEW_HEROIC = 46192, + + // Apoko + SPELL_WINDFURY_TOTEM = 27621, + SPELL_WAR_STOMP = 46026, + SPELL_PURGE = 27626, + SPELL_LESSER_HEALING_WAVE = 44256, + SPELL_FROST_SHOCK = 21401, + SPELL_FIRE_NOVA_TOTEM = 44257, + SPELL_EARTHBIND_TOTEM = 15786 +}; +enum Misc +{ MAX_ACTIVE_LACKEY = 4 }; @@ -93,7 +108,7 @@ class boss_priestess_delrissa : public CreatureScript public: boss_priestess_delrissa() : CreatureScript("boss_priestess_delrissa") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_priestess_delrissaAI(creature); } @@ -121,7 +136,7 @@ public: uint32 DispelTimer; uint32 ResetTimer; - void Reset() + void Reset() OVERRIDE { PlayersKilled = 0; @@ -136,13 +151,13 @@ public: } //this mean she at some point evaded - void JustReachedHome() + void JustReachedHome() OVERRIDE { if (instance) instance->SetData(DATA_DELRISSA_EVENT, FAIL); } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { Talk(SAY_AGGRO); @@ -211,7 +226,7 @@ public: } } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* victim) OVERRIDE { if (victim->GetTypeId() != TYPEID_PLAYER) return; @@ -222,7 +237,7 @@ public: ++PlayersKilled; } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); @@ -238,7 +253,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -333,7 +348,7 @@ public: }; }; -enum eHealingPotion +enum HealingPotion { SPELL_HEALING_POTION = 15503 }; @@ -355,7 +370,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI bool UsedPotion; - void Reset() + void Reset() OVERRIDE { UsedPotion = false; @@ -373,7 +388,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI } } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { if (!who) return; @@ -403,7 +418,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI } } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (!instance) return; @@ -435,7 +450,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI } } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* victim) OVERRIDE { if (!instance) return; @@ -456,7 +471,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UsedPotion && HealthBelowPct(25)) { @@ -472,7 +487,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI } }; -enum eRogueSpells +enum RogueSpells { SPELL_KIDNEY_SHOT = 27615, SPELL_GOUGE = 12540, @@ -487,7 +502,7 @@ class boss_kagani_nightstrike : public CreatureScript public: boss_kagani_nightstrike() : CreatureScript("boss_kagani_nightstrike") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_kagani_nightstrikeAI(creature); } @@ -504,7 +519,7 @@ public: uint32 Wait_Timer; bool InVanish; - void Reset() + void Reset() OVERRIDE { Gouge_Timer = 5500; Kick_Timer = 7000; @@ -517,7 +532,7 @@ public: boss_priestess_lackey_commonAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -575,7 +590,7 @@ public: }; }; -enum eWarlockSpells +enum WarlockSpells { SPELL_IMMOLATE = 44267, SPELL_SHADOW_BOLT = 12471, @@ -591,7 +606,7 @@ class boss_ellris_duskhallow : public CreatureScript public: boss_ellris_duskhallow() : CreatureScript("boss_ellris_duskhallow") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_ellris_duskhallowAI(creature); } @@ -607,7 +622,7 @@ public: uint32 Curse_of_Agony_Timer; uint32 Fear_Timer; - void Reset() + void Reset() OVERRIDE { Immolate_Timer = 6000; Shadow_Bolt_Timer = 3000; @@ -618,12 +633,12 @@ public: boss_priestess_lackey_commonAI::Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { DoCast(me, SPELL_SUMMON_IMP); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -671,7 +686,7 @@ public: }; }; -enum eKickDown +enum KickDown { SPELL_KNOCKDOWN = 11428, SPELL_SNAP_KICK = 46182 @@ -682,7 +697,7 @@ class boss_eramas_brightblaze : public CreatureScript public: boss_eramas_brightblaze() : CreatureScript("boss_eramas_brightblaze") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_eramas_brightblazeAI(creature); } @@ -695,7 +710,7 @@ public: uint32 Knockdown_Timer; uint32 Snap_Kick_Timer; - void Reset() + void Reset() OVERRIDE { Knockdown_Timer = 6000; Snap_Kick_Timer = 4500; @@ -703,7 +718,7 @@ public: boss_priestess_lackey_commonAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -727,7 +742,7 @@ public: }; }; -enum eMageSpells +enum MageSpells { SPELL_POLYMORPH = 13323, SPELL_ICE_BLOCK = 27619, @@ -743,7 +758,7 @@ class boss_yazzai : public CreatureScript public: boss_yazzai() : CreatureScript("boss_yazzai") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_yazzaiAI(creature); } @@ -764,7 +779,7 @@ public: uint32 Frostbolt_Timer; uint32 Blink_Timer; - void Reset() + void Reset() OVERRIDE { HasIceBlocked = false; @@ -780,7 +795,7 @@ public: boss_priestess_lackey_commonAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -857,7 +872,7 @@ public: }; }; -enum eWarriorSpells +enum WarriorSpells { SPELL_INTERCEPT_STUN = 27577, SPELL_DISARM = 27581, @@ -873,7 +888,7 @@ class boss_warlord_salaris : public CreatureScript public: boss_warlord_salaris() : CreatureScript("boss_warlord_salaris") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_warlord_salarisAI(creature); } @@ -890,7 +905,7 @@ public: uint32 Hamstring_Timer; uint32 Mortal_Strike_Timer; - void Reset() + void Reset() OVERRIDE { Intercept_Stun_Timer = 500; Disarm_Timer = 6000; @@ -902,12 +917,12 @@ public: boss_priestess_lackey_commonAI::Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { DoCast(me, SPELL_BATTLE_SHOUT); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -976,7 +991,7 @@ public: }; }; -enum eHunterSpells +enum HunterSpells { SPELL_AIMED_SHOT = 44271, SPELL_SHOOT = 15620, @@ -993,7 +1008,7 @@ class boss_garaxxas : public CreatureScript public: boss_garaxxas() : CreatureScript("boss_garaxxas") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_garaxxasAI(creature); } @@ -1015,7 +1030,7 @@ public: uint32 Wing_Clip_Timer; uint32 Freezing_Trap_Timer; - void Reset() + void Reset() OVERRIDE { Aimed_Shot_Timer = 6000; Shoot_Timer = 2500; @@ -1031,12 +1046,12 @@ public: boss_priestess_lackey_commonAI::Reset(); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { m_uiPetGUID = summoned->GetGUID(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -1099,23 +1114,12 @@ public: }; }; -enum Spells -{ - SPELL_WINDFURY_TOTEM = 27621, - SPELL_WAR_STOMP = 46026, - SPELL_PURGE = 27626, - SPELL_LESSER_HEALING_WAVE = 44256, - SPELL_FROST_SHOCK = 21401, - SPELL_FIRE_NOVA_TOTEM = 44257, - SPELL_EARTHBIND_TOTEM = 15786 -}; - class boss_apoko : public CreatureScript { public: boss_apoko() : CreatureScript("boss_apoko") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_apokoAI(creature); } @@ -1132,7 +1136,7 @@ public: uint32 Healing_Wave_Timer; uint32 Frost_Shock_Timer; - void Reset() + void Reset() OVERRIDE { Totem_Timer = 2000; Totem_Amount = 1; @@ -1144,7 +1148,7 @@ public: boss_priestess_lackey_commonAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -1198,7 +1202,7 @@ public: }; }; -enum eEngineerSpells +enum EngineerSpells { SPELL_GOBLIN_DRAGON_GUN = 44272, SPELL_ROCKET_LAUNCH = 44137, @@ -1213,7 +1217,7 @@ class boss_zelfan : public CreatureScript public: boss_zelfan() : CreatureScript("boss_zelfan") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_zelfanAI(creature); } @@ -1229,7 +1233,7 @@ public: uint32 High_Explosive_Sheep_Timer; uint32 Fel_Iron_Bomb_Timer; - void Reset() + void Reset() OVERRIDE { Goblin_Dragon_Gun_Timer = 20000; Rocket_Launch_Timer = 7000; @@ -1240,7 +1244,7 @@ public: boss_priestess_lackey_commonAI::Reset(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -1298,9 +1302,9 @@ class npc_high_explosive_sheep : public CreatureScript public: npc_high_explosive_sheep() : CreatureScript("npc_high_explosive_sheep") { } - //CreatureAI* GetAI(Creature* creature) const + //CreatureAI* GetAI(Creature* creature) const OVERRIDE //{ - // return new npc_high_explosive_sheepAI (creature); + // return new npc_high_explosive_sheepAI(creature); //}; }; */ diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 969a9abcbbf..668f7ec58f4 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -64,9 +64,9 @@ class boss_selin_fireheart : public CreatureScript public: boss_selin_fireheart() : CreatureScript("boss_selin_fireheart") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_selin_fireheartAI (creature); + return new boss_selin_fireheartAI(creature); }; struct boss_selin_fireheartAI : public ScriptedAI @@ -105,7 +105,7 @@ public: uint64 CrystalGUID; // This will help us create a pointer to the crystal we are draining. We store GUIDs, never units in case unit is deleted/offline (offline if player of course). - void Reset() + void Reset() OVERRIDE { if (instance) { @@ -197,19 +197,19 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); if (instance) instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_KILL); } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 type, uint32 id) OVERRIDE { if (type == POINT_MOTION_TYPE && id == 1) { @@ -231,7 +231,7 @@ public: } } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_DEATH); @@ -242,7 +242,7 @@ public: ShatterRemainingCrystals(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -325,22 +325,23 @@ class npc_fel_crystal : public CreatureScript public: npc_fel_crystal() : CreatureScript("npc_fel_crystal") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_fel_crystalAI (creature); + return new npc_fel_crystalAI(creature); }; struct npc_fel_crystalAI : public ScriptedAI { npc_fel_crystalAI(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 JustDied(Unit* /*killer*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE {} + + void JustDied(Unit* /*killer*/) OVERRIDE { if (InstanceScript* instance = me->GetInstanceScript()) { diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index d9de112992b..3694fa4a864 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -27,35 +27,44 @@ EndScriptData */ #include "ScriptedCreature.h" #include "magisters_terrace.h" -enum eEnums +enum Yells { SAY_AGGRO = 0, SAY_ENERGY = 1, SAY_OVERLOAD = 2, SAY_KILL = 3, - EMOTE_DISCHARGE_ENERGY = 4, + EMOTE_DISCHARGE_ENERGY = 4 //is this text for real? //#define SAY_DEATH "What...happen...ed." +}; - //Pure energy spell info +enum Spells +{ + // Pure energy spell info SPELL_ENERGY_BOLT = 46156, SPELL_ENERGY_FEEDBACK = 44335, - //Vexallus spell info + // Vexallus spell info SPELL_CHAIN_LIGHTNING = 44318, - SPELL_H_CHAIN_LIGHTNING = 46380, //heroic spell + SPELL_H_CHAIN_LIGHTNING = 46380, // heroic spell SPELL_OVERLOAD = 44353, SPELL_ARCANE_SHOCK = 44319, - SPELL_H_ARCANE_SHOCK = 46381, //heroic spell + SPELL_H_ARCANE_SHOCK = 46381, // heroic spell - SPELL_SUMMON_PURE_ENERGY = 44322, //mod scale -10 - H_SPELL_SUMMON_PURE_ENERGY1 = 46154, //mod scale -5 - H_SPELL_SUMMON_PURE_ENERGY2 = 46159, //mod scale -5 + SPELL_SUMMON_PURE_ENERGY = 44322, // mod scale -10 + H_SPELL_SUMMON_PURE_ENERGY1 = 46154, // mod scale -5 + H_SPELL_SUMMON_PURE_ENERGY2 = 46159 // mod scale -5 + +}; - //Creatures +enum Creatures +{ NPC_PURE_ENERGY = 24745, +}; +enum Misc +{ INTERVAL_MODIFIER = 15, INTERVAL_SWITCH = 6 }; @@ -65,9 +74,9 @@ class boss_vexallus : public CreatureScript public: boss_vexallus() : CreatureScript("boss_vexallus") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_vexallusAI (creature); + return new boss_vexallusAI(creature); }; struct boss_vexallusAI : public BossAI @@ -85,7 +94,7 @@ public: uint32 IntervalHealthAmount; bool Enraged; - void Reset() + void Reset() OVERRIDE { summons.DespawnAll(); ChainLightningTimer = 8000; @@ -98,19 +107,19 @@ public: instance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_KILL); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { summons.DespawnAll(); if (instance) instance->SetData(DATA_VEXALLUS_EVENT, DONE); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); @@ -118,7 +127,7 @@ public: instance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { if (Unit* temp = SelectTarget(SELECT_TARGET_RANDOM, 0)) summoned->GetMotionMaster()->MoveFollow(temp, 0, 0); @@ -127,7 +136,7 @@ public: summoned->CastSpell(summoned, SPELL_ENERGY_BOLT, false, 0, 0, me->GetGUID()); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -201,9 +210,9 @@ class npc_pure_energy : public CreatureScript public: npc_pure_energy() : CreatureScript("npc_pure_energy") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_pure_energyAI (creature); + return new npc_pure_energyAI(creature); }; struct npc_pure_energyAI : public ScriptedAI @@ -213,9 +222,9 @@ public: me->SetDisplayId(me->GetCreatureTemplate()->Modelid2); } - void Reset() {} + void Reset() OVERRIDE {} - void JustDied(Unit* slayer) + void JustDied(Unit* slayer) OVERRIDE { if (Unit* temp = me->GetOwner()) { @@ -224,9 +233,10 @@ public: } } - 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 {} }; }; diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index 2eb9bc83178..6fcc050a55e 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -37,11 +37,19 @@ EndContentData */ ## npc_kalecgos ######*/ -enum eEnums +enum Spells { SPELL_TRANSFORM_TO_KAEL = 44670, - SPELL_ORB_KILL_CREDIT = 46307, - NPC_KAEL = 24848, //human form entry + SPELL_ORB_KILL_CREDIT = 46307 +}; + +enum Creatures +{ + NPC_KAEL = 24848 //human form entry +}; + +enum Misc +{ POINT_ID_LAND = 1 }; @@ -60,7 +68,7 @@ class npc_kalecgos : public CreatureScript public: npc_kalecgos() : CreatureScript("npc_kalecgos") { } - 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) @@ -89,7 +97,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); @@ -100,7 +108,7 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_kalecgosAI(creature); } @@ -111,7 +119,7 @@ public: uint32 m_uiTransformTimer; - void Reset() + void Reset() OVERRIDE { m_uiTransformTimer = 0; @@ -120,7 +128,7 @@ public: me->GetMotionMaster()->MovePoint(POINT_ID_LAND, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]); } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) OVERRIDE { if (uiType != POINT_MOTION_TYPE) return; @@ -154,7 +162,7 @@ public: } } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { if (m_uiTransformTimer) { diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp index 645322768e3..e9ac15147f9 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp @@ -59,7 +59,7 @@ class boss_baron_geddon : public CreatureScript { } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { BossAI::EnterCombat(victim); events.ScheduleEvent(EVENT_INFERNO, 45000); @@ -67,7 +67,7 @@ class boss_baron_geddon : public CreatureScript events.ScheduleEvent(EVENT_LIVING_BOMB, 35000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -113,9 +113,9 @@ class boss_baron_geddon : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baron_geddonAI (creature); + return new boss_baron_geddonAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp index 562af075b98..5eabc11618b 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp @@ -57,14 +57,14 @@ class boss_garr : public CreatureScript { } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { BossAI::EnterCombat(victim); events.ScheduleEvent(EVENT_ANTIMAGIC_PULSE, 25000); events.ScheduleEvent(EVENT_MAGMA_SHACKLES, 15000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -95,7 +95,7 @@ class boss_garr : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_garrAI(creature); } @@ -112,12 +112,12 @@ class npc_firesworn : public CreatureScript uint32 immolateTimer; - void Reset() + void Reset() OVERRIDE { immolateTimer = 4000; //These times are probably wrong } - void DamageTaken(Unit* /*attacker*/, uint32& damage) + void DamageTaken(Unit* /*attacker*/, uint32& damage) OVERRIDE { uint32 const health10pct = me->CountPctFromMaxHealth(10); uint32 health = me->GetHealth(); @@ -129,7 +129,7 @@ class npc_firesworn : public CreatureScript } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -147,7 +147,7 @@ class npc_firesworn : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_fireswornAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp index 9007d16d2f9..15079953a34 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp @@ -53,7 +53,7 @@ class boss_gehennas : public CreatureScript { } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { BossAI::EnterCombat(victim); events.ScheduleEvent(EVENT_GEHENNAS_CURSE, 12000); @@ -61,7 +61,7 @@ class boss_gehennas : public CreatureScript events.ScheduleEvent(EVENT_SHADOW_BOLT, 6000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -98,7 +98,7 @@ class boss_gehennas : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_gehennasAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp index 7e798aa815e..0fdb88923b3 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp @@ -63,19 +63,19 @@ class boss_golemagg : public CreatureScript { } - void Reset() + void Reset() OVERRIDE { BossAI::Reset(); DoCast(me, SPELL_MAGMASPLASH, true); } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { BossAI::EnterCombat(victim); events.ScheduleEvent(EVENT_PYROBLAST, 7000); } - void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) + void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE { if (!HealthBelowPct(10) || me->HasAura(SPELL_ENRAGE)) return; @@ -84,7 +84,7 @@ class boss_golemagg : public CreatureScript events.ScheduleEvent(EVENT_EARTHQUAKE, 3000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -116,7 +116,7 @@ class boss_golemagg : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_golemaggAI(creature); } @@ -134,12 +134,12 @@ class npc_core_rager : public CreatureScript instance = creature->GetInstanceScript(); } - void Reset() + void Reset() OVERRIDE { mangleTimer = 7*IN_MILLISECONDS; // These times are probably wrong } - void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) + void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE { if (HealthAbovePct(50) || !instance) return; @@ -155,7 +155,7 @@ class npc_core_rager : public CreatureScript } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -177,7 +177,7 @@ class npc_core_rager : public CreatureScript uint32 mangleTimer; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_core_ragerAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp index cb91cfc3cae..31f4e40552f 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp @@ -53,7 +53,7 @@ class boss_lucifron : public CreatureScript { } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { BossAI::EnterCombat(victim); events.ScheduleEvent(EVENT_IMPENDING_DOOM, 10000); @@ -61,7 +61,7 @@ class boss_lucifron : public CreatureScript events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -96,7 +96,7 @@ class boss_lucifron : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_lucifronAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp index c4b338d635d..7d40b9630ae 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp @@ -59,13 +59,13 @@ class boss_magmadar : public CreatureScript { } - void Reset() + void Reset() OVERRIDE { BossAI::Reset(); DoCast(me, SPELL_MAGMA_SPIT, true); } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { BossAI::EnterCombat(victim); events.ScheduleEvent(EVENT_FRENZY, 30000); @@ -73,7 +73,7 @@ class boss_magmadar : public CreatureScript events.ScheduleEvent(EVENT_LAVA_BOMB, 12000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -110,7 +110,7 @@ class boss_magmadar : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_magmadarAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp index a221e2829dd..1001516d42e 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp @@ -78,13 +78,13 @@ class boss_majordomo : public CreatureScript { } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { if (urand(0, 99) < 25) Talk(SAY_SLAY); } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { BossAI::EnterCombat(who); Talk(SAY_AGGRO); @@ -94,7 +94,7 @@ class boss_majordomo : public CreatureScript events.ScheduleEvent(EVENT_TELEPORT, 20000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (instance && instance->GetBossState(BOSS_MAJORDOMO_EXECUTUS) != DONE) { @@ -174,7 +174,7 @@ class boss_majordomo : public CreatureScript } } - void DoAction(int32 action) + void DoAction(int32 action) OVERRIDE { if (action == ACTION_START_RAGNAROS) { @@ -191,21 +191,21 @@ class boss_majordomo : public CreatureScript } }; - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(GOSSIP_HELLO, creature->GetGUID()); return true; } - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) + bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 /*action*/) OVERRIDE { player->CLOSE_GOSSIP_MENU(); creature->AI()->DoAction(ACTION_START_RAGNAROS); return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_majordomoAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp index c67272ac068..d03f756f366 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp @@ -87,7 +87,7 @@ class boss_ragnaros : public CreatureScript me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } - void Reset() + void Reset() OVERRIDE { BossAI::Reset(); _emergeTimer = 90000; @@ -97,7 +97,7 @@ class boss_ragnaros : public CreatureScript me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0); } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { BossAI::EnterCombat(victim); events.ScheduleEvent(EVENT_ERUPTION, 15000); @@ -109,13 +109,13 @@ class boss_ragnaros : public CreatureScript events.ScheduleEvent(EVENT_SUBMERGE, 180000); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { if (urand(0, 99) < 25) Talk(SAY_KILL); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (_introState != 2) { @@ -304,7 +304,7 @@ class boss_ragnaros : public CreatureScript bool _isBanished; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_ragnarosAI(creature); } @@ -322,13 +322,13 @@ class npc_son_of_flame : public CreatureScript instance = me->GetInstanceScript(); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) instance->SetData(DATA_RAGNAROS_ADDS, 1); } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { if (!UpdateVictim()) return; @@ -340,7 +340,7 @@ class npc_son_of_flame : public CreatureScript InstanceScript* instance; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_son_of_flameAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp index 435082b5a98..7c1d1af7d29 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp @@ -56,7 +56,7 @@ class boss_shazzrah : public CreatureScript { } - void EnterCombat(Unit* target) + void EnterCombat(Unit* target) OVERRIDE { BossAI::EnterCombat(target); events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 6000); @@ -66,7 +66,7 @@ class boss_shazzrah : public CreatureScript events.ScheduleEvent(EVENT_BLINK, 30000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -117,7 +117,7 @@ class boss_shazzrah : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_shazzrahAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp index 0a2ddb9c43d..681f4f72bc6 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp @@ -67,7 +67,7 @@ class boss_sulfuron : public CreatureScript { } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { BossAI::EnterCombat(victim); events.ScheduleEvent(EVENT_DARK_STRIKE, 10000); @@ -77,7 +77,7 @@ class boss_sulfuron : public CreatureScript events.ScheduleEvent(EVENT_FLAMESPEAR, 2000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -127,7 +127,7 @@ class boss_sulfuron : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_sulfuronAI(creature); } @@ -144,17 +144,17 @@ class npc_flamewaker_priest : public CreatureScript { } - void Reset() + void Reset() OVERRIDE { events.Reset(); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { events.Reset(); } - void EnterCombat(Unit* victim) + void EnterCombat(Unit* victim) OVERRIDE { ScriptedAI::EnterCombat(victim); events.ScheduleEvent(EVENT_HEAL, urand(15000, 30000)); @@ -162,7 +162,7 @@ class npc_flamewaker_priest : public CreatureScript events.ScheduleEvent(EVENT_IMMOLATE, 8000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -203,7 +203,7 @@ class npc_flamewaker_priest : public CreatureScript EventMap events; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_flamewaker_priestAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp index ec912440fa7..04e652b7f80 100644 --- a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp @@ -106,7 +106,7 @@ class instance_molten_core : public InstanceMapScript } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { if (type == DATA_RAGNAROS_ADDS) { @@ -117,7 +117,7 @@ class instance_molten_core : public InstanceMapScript } } - uint32 GetData(uint32 type) const + uint32 GetData(uint32 type) const OVERRIDE { switch (type) { @@ -128,7 +128,7 @@ class instance_molten_core : public InstanceMapScript return 0; } - uint64 GetData64(uint32 type) const + uint64 GetData64(uint32 type) const OVERRIDE { switch (type) { @@ -252,7 +252,7 @@ class instance_molten_core : public InstanceMapScript bool _summonedExecutus; }; - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_molten_core_InstanceMapScript(map); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 373d497e077..f49432853fb 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -92,7 +92,7 @@ class npc_unworthy_initiate : public CreatureScript public: npc_unworthy_initiate() : CreatureScript("npc_unworthy_initiate") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_unworthy_initiateAI(creature); } @@ -114,7 +114,7 @@ public: EventMap events; - void Reset() + void Reset() OVERRIDE { anchorGUID = 0; phase = PHASE_CHAINED; @@ -125,7 +125,7 @@ public: me->LoadEquipment(0, true); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { events.ScheduleEvent(EVENT_ICY_TOUCH, 1000, GCD_CAST); events.ScheduleEvent(EVENT_PLAGUE_STRIKE, 3000, GCD_CAST); @@ -133,7 +133,7 @@ public: events.ScheduleEvent(EVENT_DEATH_COIL, 5000, GCD_CAST); } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 type, uint32 id) OVERRIDE { if (type != POINT_MOTION_TYPE) return; @@ -166,7 +166,7 @@ public: Talk(SAY_EVENT_START); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { switch (phase) { @@ -281,7 +281,7 @@ class npc_unworthy_initiate_anchor : public CreatureScript public: npc_unworthy_initiate_anchor() : CreatureScript("npc_unworthy_initiate_anchor") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_unworthy_initiate_anchorAI(creature); } @@ -292,13 +292,13 @@ public: uint64 prisonerGUID; - void SetGUID(uint64 guid, int32 /*id*/) + void SetGUID(uint64 guid, int32 /*id*/) OVERRIDE { if (!prisonerGUID) prisonerGUID = guid; } - uint64 GetGUID(int32 /*id*/) const + uint64 GetGUID(int32 /*id*/) const OVERRIDE { return prisonerGUID; } @@ -310,7 +310,7 @@ class go_acherus_soul_prison : public GameObjectScript public: go_acherus_soul_prison() : GameObjectScript("go_acherus_soul_prison") { } - bool OnGossipHello(Player* player, GameObject* go) + bool OnGossipHello(Player* player, GameObject* go) OVERRIDE { if (Creature* anchor = go->FindNearestCreature(29521, 15)) if (uint64 prisonerGUID = anchor->AI()->GetGUID()) @@ -352,7 +352,7 @@ class npc_death_knight_initiate : public CreatureScript public: npc_death_knight_initiate() : CreatureScript("npc_death_knight_initiate") { } - 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) @@ -379,7 +379,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (player->GetQuestStatus(QUEST_DEATH_CHALLENGE) == QUEST_STATUS_INCOMPLETE && creature->IsFullHealth()) { @@ -395,7 +395,7 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_death_knight_initiateAI(creature); } @@ -412,7 +412,7 @@ public: uint32 m_uiDuelTimer; bool m_bIsDuelInProgress; - void Reset() + void Reset() OVERRIDE { lose = false; me->RestoreFaction(); @@ -425,7 +425,7 @@ public: m_bIsDuelInProgress = false; } - void SpellHit(Unit* pCaster, const SpellInfo* pSpell) + void SpellHit(Unit* pCaster, const SpellInfo* pSpell) OVERRIDE { if (!m_bIsDuelInProgress && pSpell->Id == SPELL_DUEL) { @@ -434,7 +434,7 @@ public: } } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) OVERRIDE { if (m_bIsDuelInProgress && pDoneBy->IsControlledByPlayer()) { @@ -457,7 +457,7 @@ public: } } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { if (!UpdateVictim()) { @@ -520,7 +520,7 @@ class npc_dark_rider_of_acherus : public CreatureScript public: npc_dark_rider_of_acherus() : CreatureScript("npc_dark_rider_of_acherus") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_dark_rider_of_acherusAI(creature); } @@ -534,7 +534,7 @@ public: bool Intro; uint64 TargetGUID; - void Reset() + void Reset() OVERRIDE { PhaseTimer = 4000; Phase = 0; @@ -542,7 +542,7 @@ public: TargetGUID = 0; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!Intro || !TargetGUID) return; @@ -612,7 +612,7 @@ class npc_salanar_the_horseman : public CreatureScript public: npc_salanar_the_horseman() : CreatureScript("npc_salanar_the_horseman") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_salanar_the_horsemanAI(creature); } @@ -621,7 +621,7 @@ public: { npc_salanar_the_horsemanAI(Creature* creature) : ScriptedAI(creature) {} - void SpellHit(Unit* caster, const SpellInfo* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { if (spell->Id == SPELL_DELIVER_STOLEN_HORSE) { @@ -643,7 +643,8 @@ public: } } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { ScriptedAI::MoveInLineOfSight(who); @@ -684,7 +685,7 @@ class npc_ros_dark_rider : public CreatureScript public: npc_ros_dark_rider() : CreatureScript("npc_ros_dark_rider") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_ros_dark_riderAI(creature); } @@ -693,12 +694,12 @@ public: { npc_ros_dark_riderAI(Creature* creature) : ScriptedAI(creature) {} - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { me->ExitVehicle(); } - void Reset() + void Reset() OVERRIDE { Creature* deathcharger = me->FindNearestCreature(28782, 30); if (!deathcharger) @@ -711,7 +712,7 @@ public: me->EnterVehicle(deathcharger); } - void JustDied(Unit* killer) + void JustDied(Unit* killer) OVERRIDE { Creature* deathcharger = me->FindNearestCreature(28782, 30); if (!deathcharger) @@ -739,7 +740,7 @@ class npc_dkc1_gothik : public CreatureScript public: npc_dkc1_gothik() : CreatureScript("npc_dkc1_gothik") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_dkc1_gothikAI(creature); } @@ -748,7 +749,8 @@ public: { npc_dkc1_gothikAI(Creature* creature) : ScriptedAI(creature) {} - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { ScriptedAI::MoveInLineOfSight(who); @@ -782,7 +784,7 @@ class npc_scarlet_ghoul : public CreatureScript public: npc_scarlet_ghoul() : CreatureScript("npc_scarlet_ghoul") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_scarlet_ghoulAI(creature); } @@ -818,7 +820,7 @@ public: } } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { if (!me->IsInCombat()) { @@ -884,7 +886,7 @@ class npc_scarlet_miner_cart : public CreatureScript me->SetDisplayId(me->GetCreatureTemplate()->Modelid1); // Modelid2 is a horse. } - void JustSummoned(Creature* summon) + void JustSummoned(Creature* summon) OVERRIDE { if (summon->GetEntry() == NPC_MINER) { @@ -893,13 +895,13 @@ class npc_scarlet_miner_cart : public CreatureScript } } - void SummonedCreatureDespawn(Creature* summon) + void SummonedCreatureDespawn(Creature* summon) OVERRIDE { if (summon->GetEntry() == NPC_MINER) _minerGUID = 0; } - void DoAction(int32 /*param*/) + void DoAction(int32 /*param*/) OVERRIDE { if (Creature* miner = ObjectAccessor::GetCreature(*me, _minerGUID)) { @@ -913,7 +915,7 @@ class npc_scarlet_miner_cart : public CreatureScript } } - void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) + void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) OVERRIDE { if (apply) { @@ -933,7 +935,7 @@ class npc_scarlet_miner_cart : public CreatureScript uint64 _playerGUID; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_scarlet_miner_cartAI(creature); } @@ -965,14 +967,14 @@ class npc_scarlet_miner : public CreatureScript uint32 IntroPhase; uint64 carGUID; - void Reset() + void Reset() OVERRIDE { carGUID = 0; IntroTimer = 0; IntroPhase = 0; } - void IsSummonedBy(Unit* summoner) + void IsSummonedBy(Unit* summoner) OVERRIDE { carGUID = summoner->GetGUID(); } @@ -1010,14 +1012,14 @@ class npc_scarlet_miner : public CreatureScript } } - void SetGUID(uint64 guid, int32 /*id = 0*/) + void SetGUID(uint64 guid, int32 /*id = 0*/) OVERRIDE { InitWaypoint(); Start(false, false, guid); SetDespawnAtFar(false); } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -1044,7 +1046,7 @@ class npc_scarlet_miner : public CreatureScript } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (IntroPhase) { @@ -1071,7 +1073,7 @@ class npc_scarlet_miner : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_scarlet_minerAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 024ef01ce6d..44eef7602c8 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -44,9 +44,9 @@ class npc_crusade_persuaded : public CreatureScript public: npc_crusade_persuaded() : CreatureScript("npc_crusade_persuaded") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_crusade_persuadedAI (creature); + return new npc_crusade_persuadedAI(creature); } struct npc_crusade_persuadedAI : public ScriptedAI @@ -57,7 +57,7 @@ public: uint32 speechCounter; uint64 playerGUID; - void Reset() + void Reset() OVERRIDE { speechTimer = 0; speechCounter = 0; @@ -66,7 +66,7 @@ public: me->RestoreFaction(); } - void SpellHit(Unit* caster, const SpellInfo* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->IsAlive() && !speechCounter) { @@ -90,7 +90,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (speechCounter) { @@ -191,7 +191,7 @@ class npc_koltira_deathweaver : public CreatureScript public: npc_koltira_deathweaver() : CreatureScript("npc_koltira_deathweaver") { } - bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) + bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) OVERRIDE { if (quest->GetQuestId() == QUEST_BREAKOUT) { @@ -210,7 +210,7 @@ public: me->SetReactState(REACT_DEFENSIVE); } - void Reset() + void Reset() OVERRIDE { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -224,7 +224,7 @@ public: } } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -258,7 +258,7 @@ public: } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { if (Player* player = GetPlayerForEscort()) summoned->AI()->AttackStart(player); @@ -275,7 +275,7 @@ public: me->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { npc_escortAI::UpdateAI(uiDiff); @@ -347,7 +347,7 @@ public: }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_koltira_deathweaverAI(creature); } @@ -368,9 +368,9 @@ class npc_scarlet_courier : public CreatureScript public: npc_scarlet_courier() : CreatureScript("npc_scarlet_courier") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_scarlet_courierAI (creature); + return new npc_scarlet_courierAI(creature); } struct npc_scarlet_courierAI : public ScriptedAI @@ -380,21 +380,21 @@ public: uint32 uiStage; uint32 uiStage_timer; - void Reset() + void Reset() OVERRIDE { me->Mount(14338); // not sure about this id uiStage = 1; uiStage_timer = 3000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_TREE2); me->Dismount(); uiStage = 0; } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 type, uint32 id) OVERRIDE { if (type != POINT_MOTION_TYPE) return; @@ -403,7 +403,7 @@ public: uiStage = 2; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (uiStage && !me->IsInCombat()) { @@ -460,9 +460,9 @@ class npc_high_inquisitor_valroth : public CreatureScript public: npc_high_inquisitor_valroth() : CreatureScript("npc_high_inquisitor_valroth") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_high_inquisitor_valrothAI (creature); + return new npc_high_inquisitor_valrothAI(creature); } struct npc_high_inquisitor_valrothAI : public ScriptedAI @@ -473,20 +473,20 @@ public: uint32 uiInquisitor_Penance_timer; uint32 uiValroth_Smite_timer; - void Reset() + void Reset() OVERRIDE { uiRenew_timer = 1000; uiInquisitor_Penance_timer = 2000; uiValroth_Smite_timer = 1000; } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { Talk(SAY_VALROTH_AGGRO); DoCast(who, SPELL_VALROTH_SMITE); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (uiRenew_timer <= diff) { @@ -518,7 +518,7 @@ public: Talk(SAY_VALROTH_RAND); } - void JustDied(Unit* killer) + void JustDied(Unit* killer) OVERRIDE { Talk(SAY_VALROTH_DEATH); killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true); @@ -596,7 +596,7 @@ class npc_a_special_surprise : public CreatureScript public: npc_a_special_surprise() : CreatureScript("npc_a_special_surprise") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_a_special_surpriseAI(creature); } @@ -609,7 +609,7 @@ public: uint32 ExecuteSpeech_Counter; uint64 PlayerGUID; - void Reset() + void Reset() OVERRIDE { ExecuteSpeech_Timer = 0; ExecuteSpeech_Counter = 0; @@ -667,7 +667,8 @@ public: return false; } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (PlayerGUID || who->GetTypeId() != TYPEID_PLAYER || !who->IsWithinDist(me, INTERACTION_DISTANCE)) return; @@ -676,7 +677,7 @@ public: PlayerGUID = who->GetGUID(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (PlayerGUID && !me->GetVictim() && me->IsAlive()) { diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 4aff2e93212..382a0002065 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -275,7 +275,7 @@ class npc_highlord_darion_mograine : public CreatureScript public: npc_highlord_darion_mograine() : CreatureScript("npc_highlord_darion_mograine") { } - 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) @@ -289,7 +289,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); @@ -302,7 +302,7 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_highlord_darion_mograineAI(creature); } @@ -353,7 +353,7 @@ public: uint64 uiGhoulGUID[ENCOUNTER_GHOUL_NUMBER]; uint64 uiWarriorGUID[ENCOUNTER_WARRIOR_NUMBER]; - void Reset() + void Reset() OVERRIDE { if (!HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -453,7 +453,7 @@ public: } } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (!who) return; @@ -470,7 +470,8 @@ public: } } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!who) return; @@ -485,7 +486,7 @@ public: SetEscortPaused(bOnHold); } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -600,13 +601,13 @@ public: } } - void EnterEvadeMode() + void EnterEvadeMode() OVERRIDE { if (!bIsBattle)//do not reset self if we are in battle npc_escortAI::EnterEvadeMode(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { npc_escortAI::UpdateAI(diff); @@ -1652,18 +1653,18 @@ class npc_the_lich_king_tirion_dawn : public CreatureScript public: npc_the_lich_king_tirion_dawn() : CreatureScript("npc_the_lich_king_tirion_dawn") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_the_lich_king_tirion_dawnAI (creature); + return new npc_the_lich_king_tirion_dawnAI(creature); } struct npc_the_lich_king_tirion_dawnAI : public ScriptedAI { npc_the_lich_king_tirion_dawnAI(Creature* creature) : ScriptedAI(creature) { Reset(); } - void Reset() {} - void AttackStart(Unit* /*who*/) {} // very sample, just don't make them aggreesive - void UpdateAI(uint32 /*diff*/) {} - void JustDied(Unit* /*killer*/) {} + void Reset() OVERRIDE {} + void AttackStart(Unit* /*who*/) {} // very sample, just don't make them aggreesive OVERRIDE + void UpdateAI(uint32 /*diff*/) OVERRIDE {} + void JustDied(Unit* /*killer*/) OVERRIDE {} }; }; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp index 03edcaa882d..d0399a73f7b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -39,9 +39,9 @@ class npc_valkyr_battle_maiden : public CreatureScript public: npc_valkyr_battle_maiden() : CreatureScript("npc_valkyr_battle_maiden") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_valkyr_battle_maidenAI (creature); + return new npc_valkyr_battle_maidenAI(creature); } struct npc_valkyr_battle_maidenAI : public PassiveAI @@ -52,7 +52,7 @@ public: float x, y, z; uint32 phase; - void Reset() + void Reset() OVERRIDE { me->setActive(true); me->SetVisible(false); @@ -69,7 +69,7 @@ public: me->SetPosition(x, y, z, 0.0f); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (FlyBackTimer <= diff) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp index 1e7ae1d16b7..4cf6c069648 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp @@ -26,16 +26,19 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -enum eEnums +enum Yells { SAY_AGGRO = 0, - SAY_SPECIALAE = 1, + SAY_SPECIALAE = 1 +}; +enum Spells +{ SPELL_POLYMORPH = 13323, SPELL_AOESILENCE = 8988, SPELL_ARCANEEXPLOSION = 9433, SPELL_FIREAOE = 9435, - SPELL_ARCANEBUBBLE = 9438, + SPELL_ARCANEBUBBLE = 9438 }; class boss_arcanist_doan : public CreatureScript @@ -43,9 +46,9 @@ class boss_arcanist_doan : public CreatureScript public: boss_arcanist_doan() : CreatureScript("boss_arcanist_doan") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_arcanist_doanAI (creature); + return new boss_arcanist_doanAI(creature); } struct boss_arcanist_doanAI : public ScriptedAI @@ -58,7 +61,7 @@ public: bool bCanDetonate; bool bShielded; - void Reset() + void Reset() OVERRIDE { Polymorph_Timer = 20000; AoESilence_Timer = 15000; @@ -67,12 +70,12 @@ public: bShielded = false; } - 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/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp index b225faa04e0..a88ff8b2977 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp @@ -38,9 +38,9 @@ class boss_azshir_the_sleepless : public CreatureScript public: boss_azshir_the_sleepless() : CreatureScript("boss_azshir_the_sleepless") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_azshir_the_sleeplessAI (creature); + return new boss_azshir_the_sleeplessAI(creature); } struct boss_azshir_the_sleeplessAI : public ScriptedAI @@ -51,16 +51,16 @@ public: uint32 CallOftheGrave_Timer; uint32 Terrify_Timer; - void Reset() + void Reset() OVERRIDE { SoulSiphon_Timer = 1; CallOftheGrave_Timer = 30000; Terrify_Timer = 20000; } - 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/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp index cdd67645213..f10ac0b5ba2 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp @@ -26,12 +26,15 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -enum eEnums +enum Yells { SAY_AGGRO = 0, SAY_HEALTH = 1, - SAY_KILL = 2, + SAY_KILL = 2 +}; +enum Spells +{ SPELL_FLAMESHOCK = 8053, SPELL_SHADOWBOLT = 1106, SPELL_FLAMESPIKE = 8814, @@ -43,9 +46,9 @@ class boss_bloodmage_thalnos : public CreatureScript public: boss_bloodmage_thalnos() : CreatureScript("boss_bloodmage_thalnos") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_bloodmage_thalnosAI (creature); + return new boss_bloodmage_thalnosAI(creature); } struct boss_bloodmage_thalnosAI : public ScriptedAI @@ -58,7 +61,7 @@ public: uint32 FlameSpike_Timer; uint32 FireNova_Timer; - void Reset() + void Reset() OVERRIDE { HpYell = false; FlameShock_Timer = 10000; @@ -67,17 +70,17 @@ public: FireNova_Timer = 40000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); } - void KilledUnit(Unit* /*Victim*/) + void KilledUnit(Unit* /*Victim*/) OVERRIDE { Talk(SAY_KILL); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 4334242641c..fb2d8374c18 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -146,9 +146,9 @@ class npc_wisp_invis : public CreatureScript public: npc_wisp_invis() : CreatureScript("npc_wisp_invis") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_wisp_invisAI (creature); + return new npc_wisp_invisAI(creature); } struct npc_wisp_invisAI : public ScriptedAI @@ -162,8 +162,8 @@ public: uint32 delay; uint32 spell; uint32 spell2; - void Reset() {} - void EnterCombat(Unit* /*who*/) {} + void Reset() OVERRIDE {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} void SetType(uint32 _type) { switch (Creaturetype = _type) @@ -189,13 +189,14 @@ public: DoCast(me, spell); } - void SpellHit(Unit* /*caster*/, const SpellInfo* spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE { if (spell->Id == SPELL_WISP_FLIGHT_PORT && Creaturetype == 4) me->SetDisplayId(2027); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!who || Creaturetype != 1 || !who->isTargetableForAttack()) return; @@ -204,7 +205,7 @@ public: DoCast(who, SPELL_SQUASH_SOUL); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (delay) { @@ -225,9 +226,9 @@ class npc_head : public CreatureScript public: npc_head() : CreatureScript("npc_head") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_headAI (creature); + return new npc_headAI(creature); } struct npc_headAI : public ScriptedAI @@ -243,7 +244,7 @@ public: bool withbody; bool die; - void Reset() + void Reset() OVERRIDE { Phase = 0; bodyGUID = 0; @@ -253,7 +254,7 @@ public: laugh = urand(15000, 30000); } - void EnterCombat(Unit* /*who*/) { } + void EnterCombat(Unit* /*who*/) OVERRIDE {} void SaySound(uint8 textEntry, Unit* target = 0) { @@ -268,7 +269,7 @@ public: laugh += 3000; } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (withbody) return; @@ -299,7 +300,7 @@ public: } } - void SpellHit(Unit* caster, const SpellInfo* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { if (!withbody) return; @@ -325,7 +326,7 @@ public: } void Disappear(); - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!withbody) { @@ -374,9 +375,9 @@ class boss_headless_horseman : public CreatureScript public: boss_headless_horseman() : CreatureScript("boss_headless_horseman") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_headless_horsemanAI (creature); + return new boss_headless_horsemanAI(creature); } struct boss_headless_horsemanAI : public ScriptedAI @@ -410,7 +411,7 @@ public: bool wp_reached; bool burned; - void Reset() + void Reset() OVERRIDE { Phase = 1; conflagrate = 15000; @@ -453,7 +454,7 @@ public: Phase = 0; } - void MovementInform(uint32 type, uint32 i) + void MovementInform(uint32 type, uint32 i) OVERRIDE { if (type != POINT_MOTION_TYPE || !IsFlying || i != id) return; @@ -494,25 +495,26 @@ public: ++id; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (instance) instance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS); DoZoneInCombat(); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { ScriptedAI::AttackStart(who); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (withhead && Phase != 0) ScriptedAI::MoveInLineOfSight(who); } - void KilledUnit(Unit* player) + void KilledUnit(Unit* player) OVERRIDE { if (player->GetTypeId() == TYPEID_PLAYER) { @@ -558,13 +560,13 @@ public: return NULL; } - void SpellHitTarget(Unit* unit, const SpellInfo* spell) + void SpellHitTarget(Unit* unit, const SpellInfo* spell) OVERRIDE { if (spell->Id == SPELL_CONFLAGRATION && unit->HasAura(SPELL_CONFLAGRATION)) SaySound(SAY_CONFLAGRATION, unit); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { me->StopMoving(); //me->GetMotionMaster()->MoveIdle(); @@ -581,7 +583,7 @@ public: sLFGMgr->FinishDungeon(players.begin()->GetSource()->GetGroup()->GetGUID(), 285); } - void SpellHit(Unit* caster, const SpellInfo* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { if (withhead) return; @@ -611,7 +613,7 @@ public: } } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (damage >= me->GetHealth() && withhead) { @@ -640,7 +642,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (withhead) { @@ -783,9 +785,9 @@ class npc_pulsing_pumpkin : public CreatureScript public: npc_pulsing_pumpkin() : CreatureScript("npc_pulsing_pumpkin") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_pulsing_pumpkinAI (creature); + return new npc_pulsing_pumpkinAI(creature); } struct npc_pulsing_pumpkinAI : public ScriptedAI @@ -795,7 +797,7 @@ public: bool sprouted; uint64 debuffGUID; - void Reset() + void Reset() OVERRIDE { float x, y, z; me->GetPosition(x, y, z); //this visual aura some under ground @@ -815,9 +817,9 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void SpellHit(Unit* /*caster*/, const SpellInfo* spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE { if (spell->Id == SPELL_SPROUTING) { @@ -843,13 +845,14 @@ public: } } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (!sprouted) Despawn(); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!who || !me->IsValidAttackTarget(who) || me->GetVictim()) return; @@ -859,7 +862,7 @@ public: DoStartMovement(who); } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { if (sprouted && UpdateVictim()) DoMeleeAttackIfReady(); @@ -872,7 +875,7 @@ class go_loosely_turned_soil : public GameObjectScript public: go_loosely_turned_soil() : GameObjectScript("go_loosely_turned_soil") { } - bool OnGossipHello(Player* player, GameObject* soil) + bool OnGossipHello(Player* player, GameObject* soil) OVERRIDE { InstanceScript* instance = player->GetInstanceScript(); if (instance) diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp index ff0bc877686..3c662fae9f8 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp @@ -55,7 +55,7 @@ class boss_herod : public CreatureScript public: boss_herod() : CreatureScript("boss_herod") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_herodAI(creature); } @@ -69,31 +69,31 @@ public: uint32 Cleave_Timer; uint32 Whirlwind_Timer; - void Reset() + void Reset() OVERRIDE { Enrage = false; Cleave_Timer = 12000; Whirlwind_Timer = 60000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); DoCast(me, SPELL_RUSHINGCHARGE); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_KILL); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { for (uint8 i = 0; i < 20; ++i) me->SummonCreature(ENTRY_SCARLET_TRAINEE, 1939.18f, -431.58f, 17.09f, 6.22f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -134,7 +134,7 @@ class npc_scarlet_trainee : public CreatureScript public: npc_scarlet_trainee() : CreatureScript("npc_scarlet_trainee") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_scarlet_traineeAI(creature); } @@ -148,11 +148,11 @@ public: uint32 Start_Timer; - void Reset() {} - void WaypointReached(uint32 /*waypointId*/) {} - void EnterCombat(Unit* /*who*/) {} + void Reset() OVERRIDE {} + void WaypointReached(uint32 /*waypointId*/) OVERRIDE {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (Start_Timer) { diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp index 8db98127f65..38fb663a073 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp @@ -26,7 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -enum eSpells +enum Spells { SPELL_CURSEOFBLOOD = 8282, SPELL_DISPELMAGIC = 15090, @@ -41,9 +41,9 @@ class boss_high_inquisitor_fairbanks : public CreatureScript public: boss_high_inquisitor_fairbanks() : CreatureScript("boss_high_inquisitor_fairbanks") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_high_inquisitor_fairbanksAI (creature); + return new boss_high_inquisitor_fairbanksAI(creature); } struct boss_high_inquisitor_fairbanksAI : public ScriptedAI @@ -58,7 +58,7 @@ public: uint32 Dispel_Timer; bool PowerWordShield; - void Reset() + void Reset() OVERRIDE { CurseOfBlood_Timer = 10000; DispelMagic_Timer = 30000; @@ -71,13 +71,13 @@ public: me->SetUInt32Value(UNIT_FIELD_BYTES_1, 7); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { me->SetStandState(UNIT_STAND_STATE_STAND); me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp index 6bdf1a16b03..10d60eb15cd 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp @@ -26,9 +26,13 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -enum eEnums +enum Yells { SAY_AGGRO = 0, +}; + +enum Spells +{ SPELL_SUMMONSCARLETHOUND = 17164, SPELL_BLOODLUST = 6742 }; @@ -38,9 +42,9 @@ class boss_houndmaster_loksey : public CreatureScript public: boss_houndmaster_loksey() : CreatureScript("boss_houndmaster_loksey") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_houndmaster_lokseyAI (creature); + return new boss_houndmaster_lokseyAI(creature); } struct boss_houndmaster_lokseyAI : public ScriptedAI @@ -49,17 +53,17 @@ public: uint32 BloodLust_Timer; - void Reset() + void Reset() OVERRIDE { BloodLust_Timer = 20000; } - 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/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp index 857e046ec04..a57c237c21a 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp @@ -46,9 +46,9 @@ class boss_interrogator_vishas : public CreatureScript public: boss_interrogator_vishas() : CreatureScript("boss_interrogator_vishas") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_interrogator_vishasAI (creature); + return new boss_interrogator_vishasAI(creature); } struct boss_interrogator_vishasAI : public ScriptedAI @@ -64,22 +64,22 @@ public: bool Yell60; uint32 ShadowWordPain_Timer; - void Reset() + void Reset() OVERRIDE { ShadowWordPain_Timer = 5000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); } - void KilledUnit(Unit* /*Victim*/) + void KilledUnit(Unit* /*Victim*/) OVERRIDE { Talk(SAY_KILL); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (!instance) return; @@ -89,7 +89,7 @@ public: vorrel->AI()->Talk(SAY_TRIGGER_VORREL); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index 3169bf754f3..403416bb202 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -63,9 +63,9 @@ class boss_scarlet_commander_mograine : public CreatureScript public: boss_scarlet_commander_mograine() : CreatureScript("boss_scarlet_commander_mograine") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_scarlet_commander_mograineAI (creature); + return new boss_scarlet_commander_mograineAI(creature); } struct boss_scarlet_commander_mograineAI : public ScriptedAI @@ -84,7 +84,7 @@ public: bool _bHeal; bool _bFakeDeath; - void Reset() + void Reset() OVERRIDE { CrusaderStrike_Timer = 10000; HammerOfJustice_Timer = 10000; @@ -103,7 +103,7 @@ public: _bFakeDeath = false; } - void JustReachedHome() + void JustReachedHome() OVERRIDE { if (instance) { @@ -112,7 +112,7 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_MO_AGGRO); DoCast(me, SPELL_RETRIBUTIONAURA); @@ -120,12 +120,12 @@ public: me->CallForHelp(VISIBLE_RANGE); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_MO_KILL); } - void DamageTaken(Unit* /*doneBy*/, uint32 &damage) + void DamageTaken(Unit* /*doneBy*/, uint32 &damage) OVERRIDE { if (damage < me->GetHealth() || _bHasDied || _bFakeDeath) return; @@ -162,7 +162,7 @@ public: } } - void SpellHit(Unit* /*who*/, const SpellInfo* spell) + void SpellHit(Unit* /*who*/, const SpellInfo* spell) OVERRIDE { //When hit with ressurection say text if (spell->Id == SPELL_SCARLETRESURRECTION) @@ -175,7 +175,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -229,9 +229,9 @@ class boss_high_inquisitor_whitemane : public CreatureScript public: boss_high_inquisitor_whitemane() : CreatureScript("boss_high_inquisitor_whitemane") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_high_inquisitor_whitemaneAI (creature); + return new boss_high_inquisitor_whitemaneAI(creature); } struct boss_high_inquisitor_whitemaneAI : public ScriptedAI @@ -251,7 +251,7 @@ public: bool _bCanResurrectCheck; bool _bCanResurrect; - void Reset() + void Reset() OVERRIDE { Wait_Timer = 7000; Heal_Timer = 10000; @@ -266,7 +266,7 @@ public: instance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (instance && instance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED) return; @@ -274,23 +274,23 @@ public: ScriptedAI::AttackStart(who); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_WH_INTRO); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_WH_KILL); } - void DamageTaken(Unit* /*attacker*/, uint32& damage) + void DamageTaken(Unit* /*attacker*/, uint32& damage) OVERRIDE { if (!_bCanResurrectCheck && damage >= me->GetHealth()) damage = me->GetHealth() - 1; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp index 8a61b3088e1..fcd0975fbc0 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp @@ -39,9 +39,9 @@ class boss_scorn : public CreatureScript public: boss_scorn() : CreatureScript("boss_scorn") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_scornAI (creature); + return new boss_scornAI(creature); } struct boss_scornAI : public ScriptedAI @@ -53,7 +53,7 @@ public: uint32 MindFlay_Timer; uint32 FrostNova_Timer; - void Reset() + void Reset() OVERRIDE { LichSlap_Timer = 45000; FrostboltVolley_Timer = 30000; @@ -61,9 +61,9 @@ public: FrostNova_Timer = 30000; } - 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/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 2e1f1e554b5..3bd00cf243f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -42,7 +42,7 @@ class instance_scarlet_monastery : public InstanceMapScript public: instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", 189) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_scarlet_monastery_InstanceMapScript(map); } @@ -100,7 +100,7 @@ public: } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { switch (type) { @@ -132,7 +132,7 @@ public: } } - uint64 GetData64(uint32 type) const + uint64 GetData64(uint32 type) const OVERRIDE { switch (type) { @@ -147,7 +147,7 @@ public: return 0; } - uint32 GetData(uint32 type) const + uint32 GetData(uint32 type) const OVERRIDE { if (type == TYPE_MOGRAINE_AND_WHITE_EVENT) return encounter[0]; diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h index 52710cd348e..fbbca46738c 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h @@ -16,10 +16,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DEF_SCARLET_M -#define DEF_SCARLET_M +#ifndef SCARLET_M_ +#define SCARLET_M_ -enum eEnums +enum DataTypes { TYPE_MOGRAINE_AND_WHITE_EVENT = 1, @@ -32,4 +32,5 @@ enum eEnums DATA_VORREL = 7 }; -#endif + +#endif // SCARLET_M_ diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index dccb7ccbaa0..cb6da60bf28 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -56,21 +56,21 @@ class boss_darkmaster_gandling : public CreatureScript { boss_darkmaster_gandlingAI(Creature* creature) : BossAI(creature, DATA_DARKMASTERGANDLING) {} - void Reset() + void Reset() OVERRIDE { _Reset(); if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_GANDLING))) gate->SetGoState(GO_STATE_ACTIVE); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { _JustDied(); if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_GANDLING))) gate->SetGoState(GO_STATE_ACTIVE); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_ARCANEMISSILES, 4500); @@ -82,13 +82,13 @@ class boss_darkmaster_gandling : public CreatureScript gate->SetGoState(GO_STATE_READY); } - void IsSummonedBy(Unit* /*summoner*/) + void IsSummonedBy(Unit* /*summoner*/) OVERRIDE { Talk(YELL_SUMMONED); me->GetMotionMaster()->MoveRandom(5); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -126,9 +126,9 @@ class boss_darkmaster_gandling : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_darkmaster_gandlingAI (creature); + return new boss_darkmaster_gandlingAI(creature); } }; @@ -211,13 +211,13 @@ class spell_shadow_portal : public SpellScriptLoader } } - void Register() + void Register() OVERRIDE { OnEffectHitTarget += SpellEffectFn(spell_shadow_portal_SpellScript::HandleCast, EFFECT_0, SPELL_EFFECT_DUMMY); } }; - SpellScript* GetSpellScript() const + SpellScript* GetSpellScript() const OVERRIDE { return new spell_shadow_portal_SpellScript(); } @@ -341,13 +341,13 @@ class spell_shadow_portal_rooms : public SpellScriptLoader } } - void Register() + void Register() OVERRIDE { OnEffectHit += SpellEffectFn(spell_shadow_portal_rooms_SpellScript::HandleSendEvent, EFFECT_1, SPELL_EFFECT_SEND_EVENT); } }; - SpellScript* GetSpellScript() const + SpellScript* GetSpellScript() const OVERRIDE { return new spell_shadow_portal_rooms_SpellScript(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp index fffcc7cdf11..8ca8f04f33a 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp @@ -31,26 +31,26 @@ class boss_death_knight_darkreaver : public CreatureScript public: boss_death_knight_darkreaver() : CreatureScript("boss_death_knight_darkreaver") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_death_knight_darkreaverAI (creature); + return new boss_death_knight_darkreaverAI(creature); } struct boss_death_knight_darkreaverAI : public ScriptedAI { boss_death_knight_darkreaverAI(Creature* creature) : ScriptedAI(creature) {} - void Reset() + void Reset() OVERRIDE { } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (me->GetHealth() <= damage) DoCast(me, 23261, true); //Summon Darkreaver's Fallen Charger } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp index 0f1999b112f..3dae50ebf44 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp @@ -53,7 +53,7 @@ class boss_doctor_theolen_krastinov : public CreatureScript { boss_theolenkrastinovAI(Creature* creature) : BossAI(creature, DATA_DOCTORTHEOLENKRASTINOV) {} - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_REND, 8000); @@ -61,7 +61,7 @@ class boss_doctor_theolen_krastinov : public CreatureScript events.ScheduleEvent(EVENT_FRENZY, 1000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -97,9 +97,9 @@ class boss_doctor_theolen_krastinov : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_theolenkrastinovAI (creature); + return new boss_theolenkrastinovAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index 5ea6c86d23e..5da1bf14c7d 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -50,7 +50,7 @@ class boss_illucia_barov : public CreatureScript { boss_illuciabarovAI(Creature* creature) : BossAI(creature, DATA_LADYILLUCIABAROV) {} - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_CURSEOFAGONY, 18000); @@ -59,7 +59,7 @@ class boss_illucia_barov : public CreatureScript events.ScheduleEvent(EVENT_FEAR, 30000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -98,9 +98,9 @@ class boss_illucia_barov : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_illuciabarovAI (creature); + return new boss_illuciabarovAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index 1d311a7bd2c..c3bd97c9a0b 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -55,14 +55,14 @@ class boss_instructor_malicia : public CreatureScript uint32 FlashCounter; uint32 TouchCounter; - void Reset() + void Reset() OVERRIDE { _Reset(); FlashCounter = 0; TouchCounter = 0; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_CALLOFGRAVES, 4000); @@ -72,7 +72,7 @@ class boss_instructor_malicia : public CreatureScript events.ScheduleEvent(EVENT_HEALINGTOUCH, 45000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -135,9 +135,9 @@ class boss_instructor_malicia : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_instructormaliciaAI (creature); + return new boss_instructormaliciaAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index d233b09bed2..ab259680c07 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -26,20 +26,23 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -#define SPELL_CURSEOFBLOOD 24673 -//#define SPELL_ILLUSION 17773 +enum Spells +{ + SPELL_CURSEOFBLOOD = 24673, + //SPELL_ILLUSION = 17773, -//Spells of Illusion of Jandice Barov -#define SPELL_CLEAVE 15584 + // Spells of Illusion of Jandice Barov + SPELL_CLEAVE = 15584 +}; class boss_jandice_barov : public CreatureScript { public: boss_jandice_barov() : CreatureScript("boss_jandice_barov") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_jandicebarovAI (creature); + return new boss_jandicebarovAI(creature); } struct boss_jandicebarovAI : public ScriptedAI @@ -52,7 +55,7 @@ public: uint32 Invisible_Timer; bool Invisible; - void Reset() + void Reset() OVERRIDE { CurseOfBlood_Timer = 15000; Illusion_Timer = 30000; @@ -60,7 +63,7 @@ public: Invisible = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } @@ -70,7 +73,7 @@ public: Illusion->AI()->AttackStart(victim); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (Invisible && Invisible_Timer <= diff) { @@ -159,9 +162,9 @@ class npc_illusionofjandicebarov : public CreatureScript public: npc_illusionofjandicebarov() : CreatureScript("npc_illusionofjandicebarov") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_illusionofjandicebarovAI (creature); + return new npc_illusionofjandicebarovAI(creature); } struct npc_illusionofjandicebarovAI : public ScriptedAI @@ -170,17 +173,17 @@ public: uint32 Cleave_Timer; - void Reset() + void Reset() OVERRIDE { Cleave_Timer = urand(2000, 8000); me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, 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/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp index 3585debb1c2..2433390f8f5 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp @@ -57,7 +57,7 @@ enum Events EVENT_KIRTONOS_TRANSFORM = 14 }; -enum eMisc +enum Misc { WEAPON_KIRTONOS_STAFF = 11365, POINT_KIRTONOS_LAND = 13, @@ -78,12 +78,12 @@ class boss_kirtonos_the_herald : public CreatureScript { boss_kirtonos_the_heraldAI(Creature* creature) : BossAI(creature, DATA_KIRTONOS) { } - void Reset() + void Reset() OVERRIDE { _Reset(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { events.ScheduleEvent(EVENT_SWOOP, urand(8000, 8000)); events.ScheduleEvent(EVENT_WING_FLAP, urand(15000, 15000)); @@ -96,7 +96,7 @@ class boss_kirtonos_the_herald : public CreatureScript _EnterCombat(); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS))) gate->SetGoState(GO_STATE_ACTIVE); @@ -108,7 +108,7 @@ class boss_kirtonos_the_herald : public CreatureScript _JustDied(); } - void EnterEvadeMode() + void EnterEvadeMode() OVERRIDE { if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS))) gate->SetGoState(GO_STATE_ACTIVE); @@ -120,7 +120,7 @@ class boss_kirtonos_the_herald : public CreatureScript me->DespawnOrUnsummon(5000); } - void IsSummonedBy(Unit* /*summoner*/) + void IsSummonedBy(Unit* /*summoner*/) OVERRIDE { events.ScheduleEvent(INTRO_1, 500); me->SetDisableGravity(true); @@ -129,12 +129,12 @@ class boss_kirtonos_the_herald : public CreatureScript Talk(EMOTE_SUMMONED); } - void JustSummoned(Creature* summon) + void JustSummoned(Creature* summon) OVERRIDE { BossAI::JustSummoned(summon); } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 type, uint32 id) OVERRIDE { if (type == WAYPOINT_MOTION_TYPE && id == POINT_KIRTONOS_LAND) { @@ -142,7 +142,7 @@ class boss_kirtonos_the_herald : public CreatureScript } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { events.Update(diff); @@ -251,7 +251,7 @@ class boss_kirtonos_the_herald : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_kirtonos_the_heraldAI(creature); } @@ -277,7 +277,7 @@ class go_brazier_of_the_herald : public GameObjectScript public: go_brazier_of_the_herald() : GameObjectScript("go_brazier_of_the_herald") { } - bool OnGossipHello(Player* player, GameObject* go) + bool OnGossipHello(Player* player, GameObject* go) OVERRIDE { go->UseDoorOrButton(); go->PlayDirectSound(SOUND_SCREECH, 0); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index b7556334691..0ba0ab4cb92 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -26,17 +26,20 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -#define SPELL_SHADOWBOLTVOLLEY 20741 -#define SPELL_BONESHIELD 27688 +enum Spells +{ + SPELL_SHADOWBOLTVOLLEY = 20741, + SPELL_BONESHIELD = 27688 +}; class boss_kormok : public CreatureScript { public: boss_kormok() : CreatureScript("boss_kormok") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kormokAI (creature); + return new boss_kormokAI(creature); } struct boss_kormokAI : public ScriptedAI @@ -49,7 +52,7 @@ public: uint32 Mage_Timer; bool Mages; - void Reset() + void Reset() OVERRIDE { ShadowVolley_Timer = 10000; BoneShield_Timer = 2000; @@ -58,7 +61,7 @@ public: Mages = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } @@ -74,7 +77,7 @@ public: SummonedMage->AI()->AttackStart(victim); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp index d0028894067..26028590f5c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -46,20 +46,20 @@ class boss_lord_alexei_barov : public CreatureScript { boss_lordalexeibarovAI(Creature* creature) : BossAI(creature, DATA_LORDALEXEIBAROV) {} - void Reset() + void Reset() OVERRIDE { _Reset(); me->LoadCreaturesAddon(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_IMMOLATE, 7000); events.ScheduleEvent(EVENT_VEILOFSHADOW, 15000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -90,9 +90,9 @@ class boss_lord_alexei_barov : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lordalexeibarovAI (creature); + return new boss_lordalexeibarovAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp index f7170a0618f..bc6646be633 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp @@ -50,7 +50,7 @@ class boss_lorekeeper_polkelt : public CreatureScript { boss_lorekeeperpolkeltAI(Creature* creature) : BossAI(creature, DATA_LOREKEEPERPOLKELT) {} - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_VOLATILEINFECTION, 38000); @@ -59,7 +59,7 @@ class boss_lorekeeper_polkelt : public CreatureScript events.ScheduleEvent(EVENT_NOXIOUSCATALYST, 35000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -98,9 +98,9 @@ class boss_lorekeeper_polkelt : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_lorekeeperpolkeltAI (creature); + return new boss_lorekeeperpolkeltAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp index 00fb2220210..62922289821 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp @@ -41,9 +41,9 @@ class boss_boss_ras_frostwhisper : public CreatureScript public: boss_boss_ras_frostwhisper() : CreatureScript("boss_boss_ras_frostwhisper") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_rasfrostAI (creature); + return new boss_rasfrostAI(creature); } struct boss_rasfrostAI : public ScriptedAI @@ -57,7 +57,7 @@ public: uint32 ChillNova_Timer; uint32 FrostVolley_Timer; - void Reset() + void Reset() OVERRIDE { IceArmor_Timer = 2000; Frostbolt_Timer = 8000; @@ -69,9 +69,9 @@ public: DoCast(me, SPELL_ICEARMOR, true); } - 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/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp index 14caccb8b00..1e2c38fc487 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp @@ -50,7 +50,7 @@ class boss_the_ravenian : public CreatureScript { boss_theravenianAI(Creature* creature) : BossAI(creature, DATA_THERAVENIAN) {} - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { _EnterCombat(); events.ScheduleEvent(EVENT_TRAMPLE, 24000); @@ -59,7 +59,7 @@ class boss_the_ravenian : public CreatureScript events.ScheduleEvent(EVENT_KNOCKAWAY, 32000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -98,9 +98,9 @@ class boss_the_ravenian : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_theravenianAI (creature); + return new boss_theravenianAI(creature); } }; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp index e606ff2229f..e426fb4ec11 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp @@ -26,13 +26,17 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -enum eEnums +enum Emotes +{ + EMOTE_FRENZY_KILL = 0 +}; + +enum Spells { - EMOTE_FRENZY_KILL = 0, SPELL_FLAMESTRIKE = 18399, SPELL_BLAST_WAVE = 16046, SPELL_FIRESHIELD = 19626, - SPELL_FRENZY = 8269 //28371, + SPELL_FRENZY = 8269 // 28371 }; class boss_vectus : public CreatureScript @@ -40,9 +44,9 @@ class boss_vectus : public CreatureScript public: boss_vectus() : CreatureScript("boss_vectus") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_vectusAI (creature); + return new boss_vectusAI(creature); } struct boss_vectusAI : public ScriptedAI @@ -53,14 +57,14 @@ public: uint32 m_uiBlastWave_Timer; uint32 m_uiFrenzy_Timer; - void Reset() + void Reset() OVERRIDE { m_uiFireShield_Timer = 2000; m_uiBlastWave_Timer = 14000; m_uiFrenzy_Timer = 0; } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index 0da31fbe428..abe79a89522 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -27,7 +27,7 @@ class instance_scholomance : public InstanceMapScript public: instance_scholomance() : InstanceMapScript("instance_scholomance", 289) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_scholomance_InstanceMapScript(map); } @@ -106,7 +106,7 @@ class instance_scholomance : public InstanceMapScript return true; } - uint64 GetData64(uint32 type) const + uint64 GetData64(uint32 type) const OVERRIDE { switch (type) { diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index 4afefa5a688..346c9f0f038 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -31,21 +31,30 @@ EndScriptData */ #define MAX_ENCOUNTER 4 -enum eEnums +enum Yells { SAY_BOSS_DIE_AD = 4, SAY_BOSS_DIE_AS = 3, - SAY_ARCHMAGE = 0, + SAY_ARCHMAGE = 0 +}; +enum Creatures +{ NPC_ASH = 3850, NPC_ADA = 3849, NPC_ARCHMAGE_ARUGAL = 4275, - NPC_ARUGAL_VOIDWALKER = 4627, + NPC_ARUGAL_VOIDWALKER = 4627 +}; - GO_COURTYARD_DOOR = 18895, //door to open when talking to NPC's - GO_SORCERER_DOOR = 18972, //door to open when Fenrus the Devourer - GO_ARUGAL_DOOR = 18971, //door to open when Wolf Master Nandos +enum GameObjects +{ + GO_COURTYARD_DOOR = 18895, //door to open when talking to NPC's + GO_SORCERER_DOOR = 18972, //door to open when Fenrus the Devourer + GO_ARUGAL_DOOR = 18971 //door to open when Wolf Master Nandos +}; +enum Spells +{ SPELL_ASHCROMBE_TELEPORT = 15742 }; @@ -62,7 +71,7 @@ class instance_shadowfang_keep : public InstanceMapScript public: instance_shadowfang_keep() : InstanceMapScript("instance_shadowfang_keep", 33) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_shadowfang_keep_InstanceMapScript(map); } @@ -145,7 +154,7 @@ public: } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { switch (type) { @@ -193,7 +202,7 @@ public: } } - uint32 GetData(uint32 type) const + uint32 GetData(uint32 type) const OVERRIDE { switch (type) { diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 156d31c804f..d5c3d27eed3 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -40,7 +40,7 @@ EndContentData */ ## npc_shadowfang_prisoner ######*/ -enum eEnums +enum Yells { SAY_FREE_AS = 0, SAY_OPEN_DOOR_AS = 1, @@ -48,14 +48,21 @@ enum eEnums SAY_FREE_AD = 0, SAY_OPEN_DOOR_AD = 1, SAY_POST1_DOOR_AD = 2, - SAY_POST2_DOOR_AD = 3, + SAY_POST2_DOOR_AD = 3 +}; +enum Spells +{ SPELL_UNLOCK = 6421, - NPC_ASH = 3850, SPELL_DARK_OFFERING = 7154 }; +enum Creatures +{ + NPC_ASH = 3850 +}; + #define GOSSIP_ITEM_DOOR "Thanks, I'll follow you to the door." class npc_shadowfang_prisoner : public CreatureScript @@ -63,12 +70,12 @@ class npc_shadowfang_prisoner : public CreatureScript public: npc_shadowfang_prisoner() : CreatureScript("npc_shadowfang_prisoner") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_shadowfang_prisonerAI(creature); } - 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) @@ -81,7 +88,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { InstanceScript* instance = creature->GetInstanceScript(); @@ -102,7 +109,7 @@ public: InstanceScript* instance; - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -138,8 +145,8 @@ public: } } - void Reset() {} - void EnterCombat(Unit* /*who*/) {} + void Reset() OVERRIDE {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} }; }; @@ -149,7 +156,7 @@ class npc_arugal_voidwalker : public CreatureScript public: npc_arugal_voidwalker() : CreatureScript("npc_arugal_voidwalker") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_arugal_voidwalkerAI(creature); } @@ -165,12 +172,12 @@ public: uint32 uiDarkOffering; - void Reset() + void Reset() OVERRIDE { uiDarkOffering = urand(200, 1000); } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { if (!UpdateVictim()) return; @@ -187,7 +194,7 @@ public: DoMeleeAttackIfReady(); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) instance->SetData(TYPE_FENRUS, instance->GetData(TYPE_FENRUS) + 1); @@ -221,7 +228,7 @@ class spell_shadowfang_keep_haunting_spirits : public SpellScriptLoader aurEff->CalculatePeriodic(GetCaster()); } - void Register() + void Register() OVERRIDE { DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_shadowfang_keep_haunting_spirits_AuraScript::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_shadowfang_keep_haunting_spirits_AuraScript::HandleDummyTick, EFFECT_0, SPELL_AURA_DUMMY); @@ -229,7 +236,7 @@ class spell_shadowfang_keep_haunting_spirits : public SpellScriptLoader } }; - AuraScript* GetAuraScript() const + AuraScript* GetAuraScript() const OVERRIDE { return new spell_shadowfang_keep_haunting_spirits_AuraScript(); } diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h index cee4e5ffc1e..1823d24ab2e 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h @@ -19,7 +19,7 @@ #ifndef DEF_SHADOWFANG_H #define DEF_SHADOWFANG_H -enum eData +enum DataTypes { TYPE_FREE_NPC = 1, TYPE_RETHILGORE = 2, diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp index d2b884188c6..16ec442d963 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp @@ -66,9 +66,9 @@ class boss_baron_rivendare : public CreatureScript public: boss_baron_rivendare() : CreatureScript("boss_baron_rivendare") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baron_rivendareAI (creature); + return new boss_baron_rivendareAI(creature); } struct boss_baron_rivendareAI : public ScriptedAI @@ -86,7 +86,7 @@ public: // uint32 RaiseDead_Timer; uint32 SummonSkeletons_Timer; - void Reset() + void Reset() OVERRIDE { ShadowBolt_Timer = 5000; Cleave_Timer = 8000; @@ -97,26 +97,26 @@ public: instance->SetData(TYPE_BARON, NOT_STARTED); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (instance)//can't use entercombat(), boss' dmg aura sets near players in combat, before entering the room's door instance->SetData(TYPE_BARON, IN_PROGRESS); ScriptedAI::AttackStart(who); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) summoned->AI()->AttackStart(target); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) instance->SetData(TYPE_BARON, DONE); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index 258bef64612..1812e2efd8d 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -27,19 +27,22 @@ EndScriptData */ #include "ScriptedCreature.h" #include "stratholme.h" -#define SPELL_BANSHEEWAIL 16565 -#define SPELL_BANSHEECURSE 16867 -#define SPELL_SILENCE 18327 -//#define SPELL_POSSESS 17244 +enum Spells +{ + SPELL_BANSHEEWAIL = 16565, + SPELL_BANSHEECURSE = 16867, + SPELL_SILENCE = 18327 + //SPELL_POSSESS = 17244 +}; class boss_baroness_anastari : public CreatureScript { public: boss_baroness_anastari() : CreatureScript("boss_baroness_anastari") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_baroness_anastariAI (creature); + return new boss_baroness_anastariAI(creature); } struct boss_baroness_anastariAI : public ScriptedAI @@ -56,7 +59,7 @@ public: uint32 Silence_Timer; //uint32 Possess_Timer; - void Reset() + void Reset() OVERRIDE { BansheeWail_Timer = 1000; BansheeCurse_Timer = 11000; @@ -64,17 +67,17 @@ public: //Possess_Timer = 35000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) instance->SetData(TYPE_BARONESS, IN_PROGRESS); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp index 345f42d21c8..319afb3deb2 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp @@ -72,19 +72,22 @@ EndScriptData */ #define ADD_9Z 125.001015f #define ADD_9O 0.592007f -#define SPELL_KNOCKAWAY 10101 -#define SPELL_PUMMEL 15615 -#define SPELL_SHOOT 16496 -//#define SPELL_SUMMONCRIMSONRIFLEMAN 17279 +enum Spells +{ + SPELL_KNOCKAWAY = 10101, + SPELL_PUMMEL = 15615, + SPELL_SHOOT = 16496 + //SPELL_SUMMONCRIMSONRIFLEMAN = 17279 +}; class boss_cannon_master_willey : public CreatureScript { public: boss_cannon_master_willey() : CreatureScript("boss_cannon_master_willey") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_cannon_master_willeyAI (creature); + return new boss_cannon_master_willeyAI(creature); } struct boss_cannon_master_willeyAI : public ScriptedAI @@ -96,7 +99,7 @@ public: uint32 Shoot_Timer; uint32 SummonRifleman_Timer; - void Reset() + void Reset() OVERRIDE { Shoot_Timer = 1000; Pummel_Timer = 7000; @@ -104,7 +107,7 @@ public: SummonRifleman_Timer = 15000; } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 240000); me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 240000); @@ -115,11 +118,11 @@ public: me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 240000); } - 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/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp index 593b2fd53b1..21320ed738f 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp @@ -26,7 +26,7 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" -enum eEnums +enum Spells { //Dathrohan spells SPELL_CRUSADERSHAMMER = 17286, //AOE stun @@ -41,8 +41,11 @@ enum eEnums SPELL_MINDBLAST = 17287, SPELL_PSYCHICSCREAM = 13704, SPELL_SLEEP = 12098, - SPELL_MINDCONTROL = 15690, + SPELL_MINDCONTROL = 15690 +}; +enum Creatures +{ NPC_DATHROHAN = 10812, NPC_BALNAZZAR = 10813, NPC_ZOMBIE = 10698 //probably incorrect @@ -71,9 +74,9 @@ class boss_dathrohan_balnazzar : public CreatureScript public: boss_dathrohan_balnazzar() : CreatureScript("boss_dathrohan_balnazzar") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_dathrohan_balnazzarAI (creature); + return new boss_dathrohan_balnazzarAI(creature); } struct boss_dathrohan_balnazzarAI : public ScriptedAI @@ -90,7 +93,7 @@ public: uint32 m_uiMindControl_Timer; bool m_bTransformed; - void Reset() + void Reset() OVERRIDE { m_uiCrusadersHammer_Timer = 8000; m_uiCrusaderStrike_Timer = 12000; @@ -106,7 +109,7 @@ public: me->UpdateEntry(NPC_DATHROHAN); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef); @@ -116,11 +119,11 @@ public: TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILLISECONDS); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp index db5509662ef..1c5f0c72153 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp @@ -27,22 +27,28 @@ EndScriptData */ #include "ScriptedCreature.h" #include "stratholme.h" -#define SPELL_DRAININGBLOW 16793 -#define SPELL_CROWDPUMMEL 10887 -#define SPELL_MIGHTYBLOW 14099 -#define SPELL_FURIOUS_ANGER 16791 +enum Spells +{ + SPELL_DRAININGBLOW = 16793, + SPELL_CROWDPUMMEL = 10887, + SPELL_MIGHTYBLOW = 14099, + SPELL_FURIOUS_ANGER = 16791 +}; -#define MODEL_NORMAL 10433 -#define MODEL_HUMAN 3637 +enum Models +{ + MODEL_NORMAL = 10433, + MODEL_HUMAN = 3637 +}; class boss_magistrate_barthilas : public CreatureScript { public: boss_magistrate_barthilas() : CreatureScript("boss_magistrate_barthilas") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_magistrate_barthilasAI (creature); + return new boss_magistrate_barthilasAI(creature); } struct boss_magistrate_barthilasAI : public ScriptedAI @@ -55,7 +61,7 @@ public: uint32 FuriousAnger_Timer; uint32 AngerCount; - void Reset() + void Reset() OVERRIDE { DrainingBlow_Timer = 20000; CrowdPummel_Timer = 15000; @@ -69,23 +75,24 @@ public: me->SetDisplayId(MODEL_HUMAN); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { //nothing to see here yet ScriptedAI::MoveInLineOfSight(who); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { me->SetDisplayId(MODEL_HUMAN); } - 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/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp index 83fbcac20fd..0f8340891a8 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -27,19 +27,23 @@ EndScriptData */ #include "ScriptedCreature.h" #include "stratholme.h" -#define SPELL_FROSTBOLT 17503 -#define SPELL_DRAINLIFE 20743 -#define SPELL_DRAIN_MANA 17243 -#define SPELL_ICETOMB 16869 +enum Spells +{ + SPELL_FROSTBOLT = 17503, + SPELL_DRAINLIFE = 20743, + SPELL_DRAIN_MANA = 17243, + SPELL_ICETOMB = 16869 + +}; class boss_maleki_the_pallid : public CreatureScript { public: boss_maleki_the_pallid() : CreatureScript("boss_maleki_the_pallid") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_maleki_the_pallidAI (creature); + return new boss_maleki_the_pallidAI(creature); } struct boss_maleki_the_pallidAI : public ScriptedAI @@ -55,24 +59,24 @@ public: uint32 IceTomb_Timer; uint32 DrainLife_Timer; - void Reset() + void Reset() OVERRIDE { Frostbolt_Timer = 1000; IceTomb_Timer = 16000; DrainLife_Timer = 31000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) instance->SetData(TYPE_PALLID, IN_PROGRESS); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index 51fa2418560..2cacf80e27c 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -40,9 +40,9 @@ class boss_nerubenkan : public CreatureScript public: boss_nerubenkan() : CreatureScript("boss_nerubenkan") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_nerubenkanAI (creature); + return new boss_nerubenkanAI(creature); } struct boss_nerubenkanAI : public ScriptedAI @@ -59,7 +59,7 @@ public: uint32 CryptScarabs_Timer; uint32 RaiseUndeadScarab_Timer; - void Reset() + void Reset() OVERRIDE { CryptScarabs_Timer = 3000; EncasingWebs_Timer = 7000; @@ -67,11 +67,11 @@ public: RaiseUndeadScarab_Timer = 3000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (instance) instance->SetData(TYPE_NERUB, IN_PROGRESS); @@ -84,7 +84,7 @@ public: pUndeadScarab->AI()->AttackStart(victim); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index 7c6ea86dfa5..706c2e7b6fb 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -56,9 +56,9 @@ class boss_silver_hand_bosses : public CreatureScript public: boss_silver_hand_bosses() : CreatureScript("boss_silver_hand_bosses") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_silver_hand_bossesAI (creature); + return new boss_silver_hand_bossesAI(creature); } struct boss_silver_hand_bossesAI : public ScriptedAI @@ -73,7 +73,7 @@ public: uint32 HolyLight_Timer; uint32 DivineShield_Timer; - void Reset() + void Reset() OVERRIDE { HolyLight_Timer = 20000; DivineShield_Timer = 20000; @@ -101,11 +101,11 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } - void JustDied(Unit* killer) + void JustDied(Unit* killer) OVERRIDE { if (!instance) return; @@ -136,7 +136,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/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp index 3d0eaba9022..5f169ece0d5 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp @@ -61,9 +61,9 @@ class boss_postmaster_malown : public CreatureScript { boss_postmaster_malownAI(Creature* creature) : BossAI(creature, TYPE_MALOWN) {} - void Reset() {} + void Reset() OVERRIDE {} - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { events.ScheduleEvent(EVENT_WAILINGDEAD, 19000); // lasts 6 sec events.ScheduleEvent(EVENT_BACKHAND, 8000); // 2 sec stun @@ -72,12 +72,12 @@ class boss_postmaster_malown : public CreatureScript events.ScheduleEvent(EVENT_CALLOFTHEGRAVE, 25000); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_KILL); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -124,7 +124,7 @@ class boss_postmaster_malown : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_postmaster_malownAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp index 3d876671238..79b8dd7dfe2 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp @@ -43,9 +43,9 @@ class boss_ramstein_the_gorger : public CreatureScript public: boss_ramstein_the_gorger() : CreatureScript("boss_ramstein_the_gorger") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_ramstein_the_gorgerAI (creature); + return new boss_ramstein_the_gorgerAI(creature); } struct boss_ramstein_the_gorgerAI : public ScriptedAI @@ -60,17 +60,17 @@ public: uint32 Trample_Timer; uint32 Knockout_Timer; - void Reset() + void Reset() OVERRIDE { Trample_Timer = 3000; Knockout_Timer = 12000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { for (uint8 i = 0; i < 30; ++i) { @@ -82,7 +82,7 @@ public: instance->SetData(TYPE_RAMSTEIN, DONE); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp index df00dfcaa4f..020b14f4823 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp @@ -41,9 +41,9 @@ class boss_timmy_the_cruel : public CreatureScript public: boss_timmy_the_cruel() : CreatureScript("boss_timmy_the_cruel") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_timmy_the_cruelAI (creature); + return new boss_timmy_the_cruelAI(creature); } struct boss_timmy_the_cruelAI : public ScriptedAI @@ -53,13 +53,13 @@ public: uint32 RavenousClaw_Timer; bool HasYelled; - void Reset() + void Reset() OVERRIDE { RavenousClaw_Timer = 10000; HasYelled = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (!HasYelled) { @@ -68,7 +68,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/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 98ea4a19cbc..383b9307523 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -213,7 +213,7 @@ class instance_stratholme : public InstanceMapScript } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { switch (type) { @@ -384,7 +384,7 @@ class instance_stratholme : public InstanceMapScript OUT_LOAD_INST_DATA_COMPLETE; } - uint32 GetData(uint32 type) const + uint32 GetData(uint32 type) const OVERRIDE { switch (type) { @@ -408,7 +408,7 @@ class instance_stratholme : public InstanceMapScript return 0; } - uint64 GetData64(uint32 data) const + uint64 GetData64(uint32 data) const OVERRIDE { switch (data) { @@ -451,7 +451,7 @@ class instance_stratholme : public InstanceMapScript } }; - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_stratholme_InstanceMapScript(map); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index a8b981dc44f..ff2bc1cb15c 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -46,7 +46,7 @@ class go_gauntlet_gate : public GameObjectScript public: go_gauntlet_gate() : GameObjectScript("go_gauntlet_gate") { } - bool OnGossipHello(Player* player, GameObject* go) + bool OnGossipHello(Player* player, GameObject* go) OVERRIDE { InstanceScript* instance = go->GetInstanceScript(); @@ -93,21 +93,21 @@ class npc_freed_soul : public CreatureScript public: npc_freed_soul() : CreatureScript("npc_freed_soul") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_freed_soulAI (creature); + return new npc_freed_soulAI(creature); } struct npc_freed_soulAI : public ScriptedAI { npc_freed_soulAI(Creature* creature) : ScriptedAI(creature) {} - void Reset() + void Reset() OVERRIDE { Talk(SAY_ZAPPED); } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} }; }; @@ -116,20 +116,28 @@ public: ## npc_restless_soul ######*/ -#define SPELL_EGAN_BLASTER 17368 -#define SPELL_SOUL_FREED 17370 -#define QUEST_RESTLESS_SOUL 5282 -#define ENTRY_RESTLESS 11122 -#define ENTRY_FREED 11136 +enum RestlessSoul +{ + // Spells + SPELL_EGAN_BLASTER = 17368, + SPELL_SOUL_FREED = 17370, + + // Quest + QUEST_RESTLESS_SOUL = 5282, + + // Creatures + NPC_RESTLESS = 11122, + NPC_FREED = 11136 +}; class npc_restless_soul : public CreatureScript { public: npc_restless_soul() : CreatureScript("npc_restless_soul") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_restless_soulAI (creature); + return new npc_restless_soulAI(creature); } struct npc_restless_soulAI : public ScriptedAI @@ -140,16 +148,16 @@ public: uint32 Die_Timer; bool Tagged; - void Reset() + void Reset() OVERRIDE { Tagger = 0; Die_Timer = 5000; Tagged = false; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void SpellHit(Unit* caster, const SpellInfo* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { if (Tagged || spell->Id != SPELL_EGAN_BLASTER) return; @@ -162,18 +170,18 @@ public: Tagger = caster->GetGUID(); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { summoned->CastSpell(summoned, SPELL_SOUL_FREED, false); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (Tagged) - me->SummonCreature(ENTRY_FREED, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 300000); + me->SummonCreature(NPC_FREED, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 300000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (Tagged) { @@ -182,7 +190,7 @@ public: if (Unit* temp = Unit::GetUnit(*me, Tagger)) { if (Player* player = temp->ToPlayer()) - player->KilledMonsterCredit(ENTRY_RESTLESS, me->GetGUID()); + player->KilledMonsterCredit(NPC_RESTLESS, me->GetGUID()); me->Kill(me); } } @@ -198,7 +206,7 @@ public: ## npc_spectral_ghostly_citizen ######*/ -enum eGhostlyCitizenSpells +enum GhostlyCitizenSpells { SPELL_HAUNTING_PHANTOM = 16336, SPELL_SLAP = 6754 @@ -209,9 +217,9 @@ class npc_spectral_ghostly_citizen : public CreatureScript public: npc_spectral_ghostly_citizen() : CreatureScript("npc_spectral_ghostly_citizen") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_spectral_ghostly_citizenAI (creature); + return new npc_spectral_ghostly_citizenAI(creature); } struct npc_spectral_ghostly_citizenAI : public ScriptedAI @@ -221,21 +229,21 @@ public: uint32 Die_Timer; bool Tagged; - void Reset() + void Reset() OVERRIDE { Die_Timer = 5000; Tagged = false; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void SpellHit(Unit* /*caster*/, const SpellInfo* spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE { if (!Tagged && spell->Id == SPELL_EGAN_BLASTER) Tagged = true; } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (Tagged) { @@ -243,12 +251,12 @@ public: { //100%, 50%, 33%, 25% chance to spawn if (urand(1, i) == 1) - DoSummon(ENTRY_RESTLESS, me, 20.0f, 600000); + DoSummon(NPC_RESTLESS, me, 20.0f, 600000); } } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (Tagged) { @@ -263,7 +271,7 @@ public: DoMeleeAttackIfReady(); } - void ReceiveEmote(Player* player, uint32 emote) + void ReceiveEmote(Player* player, uint32 emote) OVERRIDE { switch (emote) { diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index ee0d9bb64f3..2239b4a6ed3 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -51,7 +51,7 @@ class instance_sunken_temple : public InstanceMapScript public: instance_sunken_temple() : InstanceMapScript("instance_sunken_temple", 109) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_sunken_temple_InstanceMapScript(map); } @@ -193,13 +193,13 @@ public: } */ - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { if (type == EVENT_STATE) State = data; } - uint32 GetData(uint32 type) const + uint32 GetData(uint32 type) const OVERRIDE { if (type == EVENT_STATE) return State; diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp index 027080404f6..ac0c3a556f3 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp @@ -41,7 +41,7 @@ class at_malfurion_stormrage : public AreaTriggerScript public: at_malfurion_stormrage() : AreaTriggerScript("at_malfurion_stormrage") { } - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE { if (player->GetInstanceScript() && !player->FindNearestCreature(15362, 15)) player->SummonCreature(15362, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000); @@ -58,7 +58,7 @@ class go_atalai_statue : public GameObjectScript public: go_atalai_statue() : GameObjectScript("go_atalai_statue") { } - bool OnGossipHello(Player* player, GameObject* go) + bool OnGossipHello(Player* player, GameObject* go) OVERRIDE { if (InstanceScript* instance = player->GetInstanceScript()) instance->SetData(EVENT_STATE, go->GetEntry()); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index ca6464f2080..4460fb99f2b 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -68,9 +68,9 @@ class boss_brutallus : public CreatureScript public: boss_brutallus() : CreatureScript("boss_brutallus") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_brutallusAI (creature); + return new boss_brutallusAI(creature); } struct boss_brutallusAI : public ScriptedAI @@ -96,7 +96,7 @@ public: bool IsIntro; bool Enraged; - void Reset() + void Reset() OVERRIDE { SlashTimer = 11000; StompTimer = 30000; @@ -116,7 +116,7 @@ public: instance->SetData(DATA_BRUTALLUS_EVENT, NOT_STARTED); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(YELL_AGGRO); @@ -124,12 +124,12 @@ public: instance->SetData(DATA_BRUTALLUS_EVENT, IN_PROGRESS); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(YELL_KILL); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(YELL_DEATH); @@ -142,7 +142,7 @@ public: } } - void EnterEvadeMode() + void EnterEvadeMode() OVERRIDE { if (!Intro) ScriptedAI::EnterEvadeMode(); @@ -179,7 +179,7 @@ public: IsIntro = false; } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (!who || Intro || IsIntro) return; @@ -264,7 +264,8 @@ public: } } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!me->IsValidAttackTarget(who)) return; @@ -277,7 +278,7 @@ public: ScriptedAI::MoveInLineOfSight(who); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (IsIntro) { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 31f93d70e00..0e58cb85c4b 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -84,9 +84,9 @@ class boss_sacrolash : public CreatureScript public: boss_sacrolash() : CreatureScript("boss_sacrolash") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_sacrolashAI (creature); + return new boss_sacrolashAI(creature); }; struct boss_sacrolashAI : public ScriptedAI @@ -108,7 +108,7 @@ public: uint32 ConflagrationTimer; uint32 EnrageTimer; - void Reset() + void Reset() OVERRIDE { Enraged = false; @@ -139,7 +139,7 @@ public: instance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED); } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { DoZoneInCombat(); @@ -154,13 +154,13 @@ public: instance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { if (rand()%4 == 0) Talk(YELL_SAC_KILL); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { // only if ALY death if (SisterDeath) @@ -174,7 +174,7 @@ public: me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - void SpellHitTarget(Unit* target, const SpellInfo* spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) OVERRIDE { switch (spell->Id) { @@ -217,7 +217,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!SisterDeath) { @@ -340,9 +340,9 @@ class boss_alythess : public CreatureScript public: boss_alythess() : CreatureScript("boss_alythess") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_alythessAI (creature); + return new boss_alythessAI(creature); }; struct boss_alythessAI : public ScriptedAI @@ -370,7 +370,7 @@ public: uint32 FlamesearTimer; uint32 EnrageTimer; - void Reset() + void Reset() OVERRIDE { Enraged = false; @@ -402,7 +402,7 @@ public: instance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED); } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { DoZoneInCombat(); @@ -417,13 +417,14 @@ public: instance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (!me->IsInCombat()) ScriptedAI::AttackStart(who); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!who || me->GetVictim()) return; @@ -445,7 +446,7 @@ public: } } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { if (rand()%4 == 0) { @@ -453,7 +454,7 @@ public: } } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (SisterDeath) { @@ -466,7 +467,7 @@ public: me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - void SpellHitTarget(Unit* target, const SpellInfo* spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) OVERRIDE { switch (spell->Id) { @@ -542,7 +543,7 @@ public: return 10000; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (IntroStepCounter < 9) { @@ -666,9 +667,9 @@ class npc_shadow_image : public CreatureScript public: npc_shadow_image() : CreatureScript("npc_shadow_image") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_shadow_imageAI (creature); + return new npc_shadow_imageAI(creature); }; struct npc_shadow_imageAI : public ScriptedAI @@ -679,7 +680,7 @@ public: uint32 KillTimer; uint32 DarkstrikeTimer; - void Reset() + void Reset() OVERRIDE { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); ShadowfuryTimer = 5000 + (rand()%15000); @@ -687,9 +688,9 @@ public: KillTimer = 15000; } - void EnterCombat(Unit* /*who*/){} + void EnterCombat(Unit* /*who*/)OVERRIDE {} - void SpellHitTarget(Unit* target, const SpellInfo* spell) + void SpellHitTarget(Unit* target, const SpellInfo* spell) OVERRIDE { switch (spell->Id) { @@ -707,7 +708,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!me->HasAura(SPELL_IMAGE_VISUAL)) DoCast(me, SPELL_IMAGE_VISUAL); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index e7bc4d18a95..a74e2cc87b1 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -112,7 +112,7 @@ class boss_felmyst : public CreatureScript public: boss_felmyst() : CreatureScript("boss_felmyst") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_felmystAI(creature); } @@ -133,7 +133,7 @@ public: float breathX, breathY; - void Reset() + void Reset() OVERRIDE { phase = PHASE_NONE; @@ -152,7 +152,7 @@ public: instance->SetData(DATA_FELMYST_EVENT, NOT_STARTED); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { events.ScheduleEvent(EVENT_BERSERK, 600000); @@ -166,29 +166,30 @@ public: instance->SetData(DATA_FELMYST_EVENT, IN_PROGRESS); } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (phase != PHASE_FLIGHT) ScriptedAI::AttackStart(who); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (phase != PHASE_FLIGHT) ScriptedAI::MoveInLineOfSight(who); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(YELL_KILL); } - void JustRespawned() + void JustRespawned() OVERRIDE { Talk(YELL_BIRTH); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(YELL_DEATH); @@ -196,7 +197,7 @@ public: instance->SetData(DATA_FELMYST_EVENT, DONE); } - void SpellHit(Unit* caster, const SpellInfo* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { // workaround for linked aura /*if (spell->Id == SPELL_VAPOR_FORCE) @@ -219,7 +220,7 @@ public: } } - void JustSummoned(Creature* summon) + void JustSummoned(Creature* summon) OVERRIDE { if (summon->GetEntry() == NPC_DEAD) { @@ -229,13 +230,13 @@ public: } } - void MovementInform(uint32, uint32) + void MovementInform(uint32, uint32) OVERRIDE { if (phase == PHASE_FLIGHT) events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1); } - void DamageTaken(Unit*, uint32 &damage) + void DamageTaken(Unit*, uint32 &damage) OVERRIDE { if (phase != PHASE_GROUND && damage >= me->GetHealth()) damage = 0; @@ -404,7 +405,7 @@ public: ++uiFlightCount; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) { @@ -518,7 +519,7 @@ class npc_felmyst_vapor : public CreatureScript public: npc_felmyst_vapor() : CreatureScript("npc_felmyst_vapor") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_felmyst_vaporAI(creature); } @@ -530,13 +531,13 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetSpeed(MOVE_RUN, 0.8f); } - void Reset() {} - void EnterCombat(Unit* /*who*/) + void Reset() OVERRIDE {} + void EnterCombat(Unit* /*who*/) OVERRIDE { DoZoneInCombat(); //DoCast(me, SPELL_VAPOR_FORCE, true); core bug } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { if (!me->GetVictim()) if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) @@ -550,7 +551,7 @@ class npc_felmyst_trail : public CreatureScript public: npc_felmyst_trail() : CreatureScript("npc_felmyst_trail") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_felmyst_trailAI(creature); } @@ -564,11 +565,12 @@ public: me->SetTarget(me->GetGUID()); me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 0.01f); // core bug } - 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 {} }; }; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index cce84e3714a..820f1e7a615 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -103,9 +103,9 @@ class boss_kalecgos : public CreatureScript public: boss_kalecgos() : CreatureScript("boss_kalecgos") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kalecgosAI (creature); + return new boss_kalecgosAI(creature); } struct boss_kalecgosAI : public ScriptedAI @@ -139,7 +139,7 @@ public: uint64 SathGUID; uint64 DoorGUID; - void Reset() + void Reset() OVERRIDE { if (instance) { @@ -174,7 +174,7 @@ public: isBanished = false; } - void EnterEvadeMode() + void EnterEvadeMode() OVERRIDE { bJustReset = true; me->SetVisible(false); @@ -182,7 +182,7 @@ public: ScriptedAI::EnterEvadeMode(); } - void DoAction(int32 param) + void DoAction(int32 param) OVERRIDE { switch (param) { @@ -197,7 +197,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (TalkTimer) { @@ -330,7 +330,8 @@ public: } } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (bJustReset)//boss is invisible, don't attack return; @@ -343,13 +344,13 @@ public: } } - void DamageTaken(Unit* done_by, uint32 &damage) + void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE { if (damage >= me->GetHealth() && done_by != me) damage = 0; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { me->SetStandState(UNIT_STAND_STATE_STAND); Talk(SAY_EVIL_AGGRO); @@ -359,12 +360,12 @@ public: instance->SetData(DATA_KALECGOS_EVENT, IN_PROGRESS); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_EVIL_SLAY); } - void MovementInform(uint32 type, uint32 /*id*/) + void MovementInform(uint32 type, uint32 /*id*/) OVERRIDE { if (type != POINT_MOTION_TYPE) return; @@ -441,9 +442,9 @@ class boss_kalec : public CreatureScript public: boss_kalec() : CreatureScript("boss_kalec") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kalecAI (creature); + return new boss_kalecAI(creature); } struct boss_kalecAI : public ScriptedAI @@ -464,7 +465,7 @@ public: instance = creature->GetInstanceScript(); } - void Reset() + void Reset() OVERRIDE { if (instance) SathGUID = instance->GetData64(DATA_SATHROVARR); @@ -477,7 +478,7 @@ public: isEnraged = false; } - void DamageTaken(Unit* done_by, uint32 &damage) + void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE { if (done_by->GetGUID() != SathGUID) damage = 0; @@ -485,7 +486,7 @@ public: damage *= 3; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!me->HasAura(AURA_SPECTRAL_INVISIBILITY)) me->CastSpell(me, AURA_SPECTRAL_INVISIBILITY, true); @@ -542,7 +543,7 @@ class kalecgos_teleporter : public GameObjectScript public: kalecgos_teleporter() : GameObjectScript("kalecgos_teleporter") { } - bool OnGossipHello(Player* player, GameObject* go) + bool OnGossipHello(Player* player, GameObject* go) OVERRIDE { uint8 SpectralPlayers = 0; Map* map = go->GetMap(); @@ -569,9 +570,9 @@ class boss_sathrovarr : public CreatureScript public: boss_sathrovarr() : CreatureScript("boss_sathrovarr") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_sathrovarrAI (creature); + return new boss_sathrovarrAI(creature); } struct boss_sathrovarrAI : public ScriptedAI @@ -597,7 +598,7 @@ public: bool isEnraged; bool isBanished; - void Reset() + void Reset() OVERRIDE { me->SetFullHealth();//dunno why it does not resets health at evade.. me->setActive(true); @@ -625,7 +626,7 @@ public: TeleportAllPlayersBack(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (Creature* Kalec = me->SummonCreature(NPC_KALEC, me->GetPositionX() + 10, me->GetPositionY() + 5, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0)) { @@ -637,13 +638,13 @@ public: Talk(SAY_SATH_AGGRO); } - void DamageTaken(Unit* done_by, uint32 &damage) + void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE { if (damage >= me->GetHealth() && done_by != me) damage = 0; } - void KilledUnit(Unit* target) + void KilledUnit(Unit* target) OVERRIDE { if (target->GetGUID() == KalecGUID) { @@ -659,7 +660,7 @@ public: Talk(SAY_SATH_SLAY); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_SATH_DEATH); me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation()); @@ -691,7 +692,7 @@ public: } } - void DoAction(int32 param) + void DoAction(int32 param) OVERRIDE { switch (param) { @@ -706,7 +707,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!me->HasAura(AURA_SPECTRAL_INVISIBILITY)) me->CastSpell(me, AURA_SPECTRAL_INVISIBILITY, true); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 9f4e8edc8cc..b994821cce9 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -234,9 +234,9 @@ class boss_kalecgos_kj : public CreatureScript public: boss_kalecgos_kj() : CreatureScript("boss_kalecgos_kj") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kalecgos_kjAI (creature); + return new boss_kalecgos_kjAI(creature); } struct boss_kalecgos_kjAI : public ScriptedAI @@ -250,7 +250,7 @@ public: uint8 OrbsEmpowered; uint8 EmpowerCount; - void Reset() + void Reset() OVERRIDE { OrbsEmpowered = 0; EmpowerCount = 0; @@ -335,7 +335,7 @@ public: } } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { } @@ -363,7 +363,7 @@ class go_orb_of_the_blue_flight : public GameObjectScript public: go_orb_of_the_blue_flight() : GameObjectScript("go_orb_of_the_blue_flight") { } - bool OnGossipHello(Player* player, GameObject* go) + bool OnGossipHello(Player* player, GameObject* go) OVERRIDE { if (go->GetUInt32Value(GAMEOBJECT_FACTION) == 35) { @@ -387,9 +387,9 @@ class npc_kiljaeden_controller : public CreatureScript public: npc_kiljaeden_controller() : CreatureScript("npc_kiljaeden_controller") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_kiljaeden_controllerAI (creature); + return new npc_kiljaeden_controllerAI(creature); } struct npc_kiljaeden_controllerAI : public ScriptedAI @@ -411,7 +411,7 @@ public: uint32 phase; uint8 deceiverDeathCount; - void InitializeAI() + void InitializeAI() OVERRIDE { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -420,7 +420,7 @@ public: ScriptedAI::InitializeAI(); } - void Reset() + void Reset() OVERRIDE { phase = PHASE_DECEIVERS; @@ -434,7 +434,7 @@ public: summons.DespawnAll(); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { switch (summoned->GetEntry()) { @@ -454,7 +454,7 @@ public: summons.Summon(summoned); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (uiRandomSayTimer < diff) { @@ -489,9 +489,9 @@ class boss_kiljaeden : public CreatureScript public: boss_kiljaeden() : CreatureScript("boss_kiljaeden") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_kiljaedenAI (creature); + return new boss_kiljaedenAI(creature); } struct boss_kiljaedenAI : public ScriptedAI @@ -522,12 +522,12 @@ public: bool OrbActivated; bool SpeechBegins; - void InitializeAI() + void InitializeAI() OVERRIDE { // Scripted_NoMovementAI::InitializeAI(); } - void Reset() + void Reset() OVERRIDE { TimerIsDeactivated[TIMER_SPEECH] = false; Timer[TIMER_SPEECH] = 0; @@ -588,7 +588,7 @@ public: TimerIsDeactivated[TIMER_SUMMON_SHILEDORB] = true; } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { if (summoned->GetEntry() == CREATURE_ARMAGEDDON_TARGET) { @@ -603,7 +603,7 @@ public: summons.Summon(summoned); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Talk(SAY_KJ_DEATH); summons.DespawnAll(); @@ -612,12 +612,12 @@ public: instance->SetData(DATA_KILJAEDEN_EVENT, DONE); } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_KJ_SLAY); } - void EnterEvadeMode() + void EnterEvadeMode() OVERRIDE { ScriptedAI::EnterEvadeMode(); @@ -631,7 +631,7 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { DoZoneInCombat(); } @@ -666,7 +666,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim() || Phase < PHASE_NORMAL) return; @@ -899,9 +899,9 @@ class npc_hand_of_the_deceiver : public CreatureScript public: npc_hand_of_the_deceiver() : CreatureScript("npc_hand_of_the_deceiver") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_hand_of_the_deceiverAI (creature); + return new npc_hand_of_the_deceiverAI(creature); } struct npc_hand_of_the_deceiverAI : public ScriptedAI @@ -916,7 +916,7 @@ public: uint32 ShadowBoltVolleyTimer; uint32 FelfirePortalTimer; - void Reset() + void Reset() OVERRIDE { /// @todo Timers! ShadowBoltVolleyTimer = urand(8000, 14000); // So they don't all cast it in the same moment. @@ -925,13 +925,13 @@ public: instance->SetData(DATA_KILJAEDEN_EVENT, NOT_STARTED); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { summoned->setFaction(me->getFaction()); summoned->SetLevel(me->getLevel()); } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { if (instance) { @@ -942,7 +942,7 @@ public: me->InterruptNonMeleeSpells(true); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (!instance) return; @@ -951,7 +951,7 @@ public: ++(CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->deceiverDeathCount); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!me->IsInCombat()) DoCast(me, SPELL_SHADOW_CHANNELING); @@ -999,9 +999,9 @@ class npc_felfire_portal : public CreatureScript public: npc_felfire_portal() : CreatureScript("npc_felfire_portal") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_felfire_portalAI (creature); + return new npc_felfire_portalAI(creature); } struct npc_felfire_portalAI : public ScriptedAI @@ -1013,19 +1013,19 @@ public: uint32 uiSpawnFiendTimer; - void Reset() + void Reset() OVERRIDE { uiSpawnFiendTimer = 5000; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { summoned->setFaction(me->getFaction()); summoned->SetLevel(me->getLevel()); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -1046,9 +1046,9 @@ class npc_volatile_felfire_fiend : public CreatureScript public: npc_volatile_felfire_fiend() : CreatureScript("npc_volatile_felfire_fiend") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_volatile_felfire_fiendAI (creature); + return new npc_volatile_felfire_fiendAI(creature); } struct npc_volatile_felfire_fiendAI : public ScriptedAI @@ -1059,19 +1059,19 @@ public: bool bLockedTarget; - void Reset() + void Reset() OVERRIDE { uiExplodeTimer = 2000; bLockedTarget = false; } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (damage > me->GetHealth()) DoCast(me, SPELL_FELFIRE_FISSION, true); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -1103,9 +1103,9 @@ class npc_armageddon : public CreatureScript public: npc_armageddon() : CreatureScript("npc_armageddon") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_armageddonAI (creature); + return new npc_armageddonAI(creature); } struct npc_armageddonAI : public ScriptedAI @@ -1118,13 +1118,13 @@ public: uint8 spell; uint32 uiTimer; - void Reset() + void Reset() OVERRIDE { spell = 0; uiTimer = 0; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (uiTimer <= diff) { @@ -1160,9 +1160,9 @@ class npc_shield_orb : public CreatureScript public: npc_shield_orb() : CreatureScript("npc_shield_orb") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_shield_orbAI (creature); + return new npc_shield_orbAI(creature); } struct npc_shield_orbAI : public ScriptedAI @@ -1180,7 +1180,7 @@ public: uint32 uiCheckTimer; float x, y, r, c, mx, my; - void Reset() + void Reset() OVERRIDE { me->SetDisableGravity(true); bPointReached = true; @@ -1193,7 +1193,7 @@ public: bClockwise = urand(0, 1); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (bPointReached) { @@ -1231,7 +1231,7 @@ public: } else uiTimer -= diff; } - void MovementInform(uint32 type, uint32 /*id*/) + void MovementInform(uint32 type, uint32 /*id*/) OVERRIDE { if (type != POINT_MOTION_TYPE) return; @@ -1247,9 +1247,9 @@ class npc_sinster_reflection : public CreatureScript public: npc_sinster_reflection() : CreatureScript("npc_sinster_reflection") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_sinster_reflectionAI (creature); + return new npc_sinster_reflectionAI(creature); } struct npc_sinster_reflectionAI : public ScriptedAI @@ -1259,7 +1259,7 @@ public: uint8 victimClass; uint32 uiTimer[3]; - void Reset() + void Reset() OVERRIDE { uiTimer[0] = 0; uiTimer[1] = 0; @@ -1267,7 +1267,7 @@ public: victimClass = 0; } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index dd5edc969b7..aa53790ee5f 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -109,9 +109,9 @@ class boss_entropius : public CreatureScript public: boss_entropius() : CreatureScript("boss_entropius") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_entropiusAI (creature); + return new boss_entropiusAI(creature); } struct boss_entropiusAI : public ScriptedAI @@ -126,7 +126,7 @@ public: uint32 BlackHoleSummonTimer; - void Reset() + void Reset() OVERRIDE { BlackHoleSummonTimer = 15000; DoCastAOE(SPELL_NEGATIVE_ENERGY_E, false); @@ -137,7 +137,7 @@ public: instance->SetData(DATA_MURU_EVENT, NOT_STARTED); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true); DoCast(me, SPELL_ENTROPIUS_SPAWN, false); @@ -146,7 +146,7 @@ public: instance->SetData(DATA_MURU_EVENT, IN_PROGRESS); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { switch (summoned->GetEntry()) { @@ -164,7 +164,7 @@ public: Summons.Summon(summoned); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { Summons.DespawnAll(); @@ -172,7 +172,7 @@ public: instance->SetData(DATA_MURU_EVENT, DONE); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -208,9 +208,9 @@ class boss_muru : public CreatureScript public: boss_muru() : CreatureScript("boss_muru") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_muruAI (creature); + return new boss_muruAI(creature); } struct boss_muruAI : public ScriptedAI @@ -229,7 +229,7 @@ public: bool DarkFiend; - void Reset() + void Reset() OVERRIDE { DarkFiend = false; Phase = 1; @@ -249,7 +249,7 @@ public: instance->SetData(DATA_MURU_EVENT, NOT_STARTED); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { DoCastAOE(SPELL_NEGATIVE_ENERGY, false); @@ -257,7 +257,7 @@ public: instance->SetData(DATA_MURU_EVENT, IN_PROGRESS); } - void DamageTaken(Unit* /*done_by*/, uint32 &damage) + void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE { if (damage > me->GetHealth() && Phase == 1) { @@ -271,7 +271,7 @@ public: damage = 0; } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { switch (summoned->GetEntry()) { @@ -286,7 +286,7 @@ public: Summons.Summon(summoned); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -373,9 +373,9 @@ class npc_muru_portal : public CreatureScript public: npc_muru_portal() : CreatureScript("npc_muru_portal") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_muru_portalAI (creature); + return new npc_muru_portalAI(creature); } struct npc_muru_portalAI : public ScriptedAI @@ -395,7 +395,7 @@ public: uint32 SummonTimer; - void Reset() + void Reset() OVERRIDE { SummonTimer = 5000; @@ -407,7 +407,7 @@ public: Summons.DespawnAll(); } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { if (instance) if (Player* Target = Unit::GetPlayer(*me, instance->GetData64(DATA_PLAYER_GUID))) @@ -416,7 +416,7 @@ public: Summons.Summon(summoned); } - void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) OVERRIDE { float x, y, z, o; me->GetHomePosition(x, y, z, o); @@ -434,7 +434,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!SummonSentinel) { @@ -457,9 +457,9 @@ class npc_dark_fiend : public CreatureScript public: npc_dark_fiend() : CreatureScript("npc_dark_fiend") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_dark_fiendAI (creature); + return new npc_dark_fiendAI(creature); } struct npc_dark_fiendAI : public ScriptedAI @@ -469,7 +469,7 @@ public: uint32 WaitTimer; bool InAction; - void Reset() + void Reset() OVERRIDE { WaitTimer = 2000; InAction = false; @@ -477,14 +477,14 @@ public: me->AddUnitState(UNIT_STATE_STUNNED); } - void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* Spell) OVERRIDE { for (uint8 i = 0; i < 3; ++i) if (Spell->Effects[i].Effect == 38) me->DisappearAndDie(); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -518,9 +518,9 @@ class npc_void_sentinel : public CreatureScript public: npc_void_sentinel() : CreatureScript("npc_void_sentinel") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_void_sentinelAI (creature); + return new npc_void_sentinelAI(creature); } struct npc_void_sentinelAI : public ScriptedAI @@ -530,7 +530,7 @@ public: uint32 PulseTimer; uint32 VoidBlastTimer; - void Reset() + void Reset() OVERRIDE { PulseTimer = 3000; VoidBlastTimer = 45000; //is this a correct timer? @@ -540,13 +540,13 @@ public: DoTeleportTo(x, y, 71); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { for (uint8 i = 0; i < 8; ++i) me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; @@ -573,9 +573,9 @@ class npc_blackhole : public CreatureScript public: npc_blackhole() : CreatureScript("npc_blackhole") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_blackholeAI (creature); + return new npc_blackholeAI(creature); } struct npc_blackholeAI : public ScriptedAI @@ -592,7 +592,7 @@ public: uint8 Phase; uint8 NeedForAHack; - void Reset() + void Reset() OVERRIDE { DespawnTimer = 15000; SpellTimer = 5000; @@ -602,7 +602,7 @@ public: DoCastAOE(SPELL_BLACKHOLE_SPAWN, true); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (SpellTimer <= diff) { diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index 050275bc94c..ac5adde9e73 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -44,7 +44,7 @@ class instance_sunwell_plateau : public InstanceMapScript public: instance_sunwell_plateau() : InstanceMapScript("instance_sunwell_plateau", 580) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_sunwell_plateau_InstanceMapScript(map); } @@ -182,7 +182,7 @@ public: } } - uint32 GetData(uint32 id) const + uint32 GetData(uint32 id) const OVERRIDE { switch (id) { @@ -196,7 +196,7 @@ public: return 0; } - uint64 GetData64(uint32 id) const + uint64 GetData64(uint32 id) const OVERRIDE { switch (id) { @@ -221,7 +221,7 @@ public: return 0; } - void SetData(uint32 id, uint32 data) + void SetData(uint32 id, uint32 data) OVERRIDE { switch (id) { diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index ed7332510fc..69ee53f0762 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -76,7 +76,7 @@ class boss_archaedas : public CreatureScript bool bVaultWalkersAwake; InstanceScript* instance; - void Reset() + void Reset() OVERRIDE { uiTremorTimer = 60000; iAwakenTimer = 0; @@ -107,14 +107,14 @@ class boss_archaedas : public CreatureScript } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { me->setFaction(14); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); } - void SpellHit(Unit* /*caster*/, const SpellInfo* spell) + void SpellHit(Unit* /*caster*/, const SpellInfo* spell) OVERRIDE { // Being woken up from the altar, start the awaken sequence if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN)) @@ -125,12 +125,12 @@ class boss_archaedas : public CreatureScript } } - void KilledUnit(Unit* /*victim*/) + void KilledUnit(Unit* /*victim*/) OVERRIDE { Talk(SAY_KILL); } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { if (!instance) return; @@ -204,7 +204,7 @@ class boss_archaedas : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_archaedasAI(creature); } @@ -240,7 +240,7 @@ class npc_archaedas_minions : public CreatureScript bool bAmIAwake; InstanceScript* instance; - void Reset() + void Reset() OVERRIDE { uiArcing_Timer = 3000; iAwakenTimer = 0; @@ -254,7 +254,7 @@ class npc_archaedas_minions : public CreatureScript me->RemoveAllAuras(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { me->setFaction (14); me->RemoveAllAuras(); @@ -263,7 +263,8 @@ class npc_archaedas_minions : public CreatureScript bAmIAwake = true; } - void SpellHit (Unit* /*caster*/, const SpellInfo* spell) { + void SpellHit(Unit * /*caster*/, const SpellInfo* spell) OVERRIDE + { // time to wake up, start animation if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN)) { @@ -272,13 +273,14 @@ class npc_archaedas_minions : public CreatureScript } } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (bAmIAwake) ScriptedAI::MoveInLineOfSight(who); } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { // we're still in the awaken animation if (bWakingUp && iAwakenTimer >= 0) @@ -301,7 +303,7 @@ class npc_archaedas_minions : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_archaedas_minionsAI(creature); } @@ -332,7 +334,7 @@ class npc_stonekeepers : public CreatureScript InstanceScript* instance; - void Reset() + void Reset() OVERRIDE { me->setFaction(35); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -340,14 +342,14 @@ class npc_stonekeepers : public CreatureScript me->RemoveAllAuras(); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { me->setFaction(14); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { //Return since we have no target if (!UpdateVictim()) @@ -356,7 +358,7 @@ class npc_stonekeepers : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*attacker*/) + void JustDied(Unit* /*attacker*/) OVERRIDE { DoCast (me, SPELL_SELF_DESTRUCT, true); if (instance) @@ -364,7 +366,7 @@ class npc_stonekeepers : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_stonekeepersAI(creature); } @@ -386,7 +388,7 @@ class go_altar_of_archaedas : public GameObjectScript { } - bool OnGossipHello(Player* player, GameObject* /*go*/) + bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE { InstanceScript* instance = player->GetInstanceScript(); if (!instance) diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp index 7d745d4f89a..1a41becfad5 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp @@ -51,19 +51,19 @@ class boss_ironaya : public CreatureScript bool bHasCastedWstomp; bool bHasCastedKnockaway; - void Reset() + void Reset() OVERRIDE { uiArcingTimer = 3000; bHasCastedKnockaway = false; bHasCastedWstomp = false; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) @@ -104,7 +104,7 @@ class boss_ironaya : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new boss_ironayaAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 016b0aad62d..7da755b5313 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -27,7 +27,7 @@ EndScriptData */ #include "InstanceScript.h" #include "uldaman.h" -enum eSpells +enum Spells { SPELL_ARCHAEDAS_AWAKEN = 10347, SPELL_AWAKEN_VAULT_WALKER = 10258, @@ -327,7 +327,7 @@ class instance_uldaman : public InstanceMapScript ironayaSealDoorTimer -= diff; } - void SetData(uint32 type, uint32 data) + void SetData(uint32 type, uint32 data) OVERRIDE { switch (type) { @@ -393,7 +393,7 @@ class instance_uldaman : public InstanceMapScript } } - void SetData64(uint32 type, uint64 data) + void SetData64(uint32 type, uint64 data) OVERRIDE { // Archaedas if (type == 0) @@ -469,7 +469,7 @@ class instance_uldaman : public InstanceMapScript } } - uint64 GetData64(uint32 identifier) const + uint64 GetData64(uint32 identifier) const OVERRIDE { switch (identifier) { @@ -507,7 +507,7 @@ class instance_uldaman : public InstanceMapScript } }; - InstanceScript* GetInstanceScript(InstanceMap* map) const + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE { return new instance_uldaman_InstanceMapScript(map); } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 5f9577e12fa..4dcb6af2392 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -38,7 +38,7 @@ EndContentData */ ## npc_jadespine_basilisk ######*/ -enum eSpells +enum Spells { SPELL_CRYSTALLINE_SLUMBER = 3636, }; @@ -58,16 +58,16 @@ class npc_jadespine_basilisk : public CreatureScript uint32 uiCslumberTimer; - void Reset() + void Reset() OVERRIDE { uiCslumberTimer = 2000; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { //Return since we have no target if (!UpdateVictim()) @@ -96,7 +96,7 @@ class npc_jadespine_basilisk : public CreatureScript } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_jadespine_basiliskAI(creature); } @@ -111,7 +111,7 @@ class go_keystone_chamber : public GameObjectScript public: go_keystone_chamber() : GameObjectScript("go_keystone_chamber") { } - bool OnGossipHello(Player* /*player*/, GameObject* go) + bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE { if (InstanceScript* instance = go->GetInstanceScript()) instance->SetData(DATA_IRONAYA_SEAL, IN_PROGRESS); //door animation and save state. @@ -135,7 +135,7 @@ class AreaTrigger_at_map_chamber : public AreaTriggerScript { } - bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) + bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE { if (player->GetQuestStatus(QUEST_HIDDEN_CHAMBER) == QUEST_STATUS_INCOMPLETE) player->AreaExploredOrEventHappens(QUEST_HIDDEN_CHAMBER); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h index 86f3d3b6d1e..15583312f5a 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h @@ -19,16 +19,9 @@ #ifndef DEF_ULDAMAN_H #define DEF_ULDAMAN_H -enum eObjects -{ - GO_ARCHAEDAS_TEMPLE_DOOR = 141869, - GO_ALTAR_OF_THE_KEEPER_TEMPLE_DOOR = 124367, - GO_ANCIENT_VAULT_DOOR = 124369, - GO_IRONAYA_SEAL_DOOR = 124372, - GO_KEYSTONE = 124371, -}; +#define MAX_ENCOUNTER 3 -enum eData +enum DataTypes { DATA_ALTAR_DOORS = 1, DATA_ANCIENT_DOOR = 2, @@ -38,6 +31,13 @@ enum eData DATA_IRONAYA_SEAL = 6, }; -#define MAX_ENCOUNTER 3 +enum GameObjectIds +{ + GO_ARCHAEDAS_TEMPLE_DOOR = 141869, + GO_ALTAR_OF_THE_KEEPER_TEMPLE_DOOR = 124367, + GO_ANCIENT_VAULT_DOOR = 124369, + GO_IRONAYA_SEAL_DOOR = 124372, + GO_KEYSTONE = 124371, +}; #endif diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp index 091eb5e3d93..b2f27bd619a 100644 --- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp @@ -36,8 +36,9 @@ EndContentData */ ## npc_professor_phizzlethorpe ######*/ -enum eEnums +enum ProfessorPhizzlethorpe { + // Yells SAY_PROGRESS_1 = 0, SAY_PROGRESS_2 = 1, SAY_PROGRESS_3 = 2, @@ -52,8 +53,12 @@ enum eEnums EVENT_SAY_3 = 1, EVENT_SAY_6 = 2, EVENT_SAY_8 = 3, - + + // Quests + QUEST_SUNKEN_TREASURE = 665, QUEST_GOGGLE_BOGGLE = 26050, + + // Creatures NPC_VENGEFUL_SURGE = 2776 }; @@ -70,7 +75,7 @@ class npc_professor_phizzlethorpe : public CreatureScript { npc_professor_phizzlethorpeAI(Creature* creature) : npc_escortAI(creature) {} - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { Player* player = GetPlayerForEscort(); if (!player) @@ -98,17 +103,17 @@ class npc_professor_phizzlethorpe : public CreatureScript } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { summoned->AI()->AttackStart(me); } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(SAY_AGGRO); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { Player* player = GetPlayerForEscort(); if (!player) @@ -140,12 +145,12 @@ class npc_professor_phizzlethorpe : public CreatureScript EventMap events; }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_professor_phizzlethorpeAI(creature); } - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE { if (quest->GetQuestId() == QUEST_GOGGLE_BOGGLE) { diff --git a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp index 4f76edf4406..b102873e940 100644 --- a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp @@ -38,16 +38,19 @@ EndContentData */ #define GOSSIP_ITEM_USHER "I wish to to visit the Rise of the Defiler." -#define SPELL_TELEPORT_SINGLE 12885 -#define SPELL_TELEPORT_SINGLE_IN_GROUP 13142 -#define SPELL_TELEPORT_GROUP 27686 +enum DeathlyUsher +{ + SPELL_TELEPORT_SINGLE = 12885, + SPELL_TELEPORT_SINGLE_IN_GROUP = 13142, + SPELL_TELEPORT_GROUP = 27686 +}; class npc_deathly_usher : public CreatureScript { public: npc_deathly_usher() : CreatureScript("npc_deathly_usher") { } - 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) @@ -59,7 +62,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (player->GetQuestStatus(3628) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(10757)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_USHER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp index df9265e5621..23b9d99935b 100644 --- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp @@ -44,7 +44,7 @@ class at_twilight_grove : public AreaTriggerScript public: at_twilight_grove() : AreaTriggerScript("at_twilight_grove") { } - bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE { if (player->HasQuestForItem(21149)) { @@ -68,18 +68,21 @@ public: # boss_twilight_corrupter ######*/ -#define SPELL_SOUL_CORRUPTION 25805 -#define SPELL_CREATURE_OF_NIGHTMARE 25806 -#define SPELL_LEVEL_UP 24312 +enum TwilightCorrupter +{ + SPELL_SOUL_CORRUPTION = 25805, + SPELL_CREATURE_OF_NIGHTMARE = 25806, + SPELL_LEVEL_UP = 24312 +}; class boss_twilight_corrupter : public CreatureScript { public: boss_twilight_corrupter() : CreatureScript("boss_twilight_corrupter") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new boss_twilight_corrupterAI (creature); + return new boss_twilight_corrupterAI(creature); } struct boss_twilight_corrupterAI : public ScriptedAI @@ -90,18 +93,18 @@ public: uint32 CreatureOfNightmare_Timer; uint8 KillCount; - void Reset() + void Reset() OVERRIDE { SoulCorruption_Timer = 15000; CreatureOfNightmare_Timer = 30000; KillCount = 0; } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { Talk(YELL_TWILIGHTCORRUPTOR_AGGRO); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* victim) OVERRIDE { if (victim->GetTypeId() == TYPEID_PLAYER) { @@ -116,7 +119,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; diff --git a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp index 0a68ade7e6b..ea8f3cd056a 100644 --- a/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp @@ -45,20 +45,20 @@ public: { npc_ghoul_flayerAI(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 { if (killer->GetTypeId() == TYPEID_PLAYER) me->SummonCreature(11064, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000); } }; - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_ghoul_flayerAI (creature); + return new npc_ghoul_flayerAI(creature); } }; @@ -71,7 +71,7 @@ class npc_augustus_the_touched : public CreatureScript public: npc_augustus_the_touched() : CreatureScript("npc_augustus_the_touched") { } - 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) @@ -79,7 +79,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); @@ -96,14 +96,17 @@ public: ## npc_darrowshire_spirit ######*/ -#define SPELL_SPIRIT_SPAWNIN 17321 +enum DarrowshireSpirit +{ + SPELL_SPIRIT_SPAWNIN = 17321 +}; class npc_darrowshire_spirit : public CreatureScript { public: npc_darrowshire_spirit() : CreatureScript("npc_darrowshire_spirit") { } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { player->SEND_GOSSIP_MENU(3873, creature->GetGUID()); player->TalkedToCreature(creature->GetEntry(), creature->GetGUID()); @@ -111,22 +114,22 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_darrowshire_spiritAI (creature); + return new npc_darrowshire_spiritAI(creature); } struct npc_darrowshire_spiritAI : public ScriptedAI { npc_darrowshire_spiritAI(Creature* creature) : ScriptedAI(creature) {} - void Reset() + void Reset() OVERRIDE { DoCast(me, SPELL_SPIRIT_SPAWNIN); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} }; }; @@ -144,7 +147,7 @@ class npc_tirion_fordring : public CreatureScript public: npc_tirion_fordring() : CreatureScript("npc_tirion_fordring") { } - 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) @@ -169,7 +172,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); diff --git a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp index be0f4b47fed..d8750a82bc4 100644 --- a/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/zone_eversong_woods.cpp @@ -19,16 +19,13 @@ /* ScriptData SDName: Eversong_Woods SD%Complete: 100 -SDComment: Quest support: 8483, 8488, 8490, 9686 +SDComment: Quest support: 8488, 8490 SDCategory: Eversong Woods EndScriptData */ /* ContentData -npc_prospector_anvilward npc_apprentice_mirveda npc_infused_crystal -npc_kelerun_bloodmourn -go_harbinger_second_trial EndContentData */ #include "ScriptMgr.h" @@ -37,413 +34,22 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "Player.h" -/*###### -## Quest 9686 Second Trial -######*/ - -enum SeconTrial -{ - QUEST_SECOND_TRIAL = 9686, - OFFSET_NEXT_ATTACK = 750, -}; - -enum eSpells -{ - SPELL_FLASH_OF_LIGHT = 19939, - SPELL_SEAL_OF_JUSTICE = 20164, - SPELL_JUDGEMENT_OF_LIGHT = 20271, - SPELL_SEAL_OF_COMMAND = 20375, -}; - -enum eNpc -{ - MASTER_KELERUN_BLOODMOURN = 17807, - CHAMPION_BLOODWRATH = 17809, - CHAMPION_LIGHTREND = 17810, - CHAMPION_SWIFTBLADE = 17811, - CHAMPION_SUNSTRIKER = 17812, -}; - -enum eFaction -{ - FACTION_HOSTILE = 45, - FACTION_FRIENDLY = 7, -}; - -enum eSays +enum UnexpectedResults { - TEXT_SECOND_TRIAL_1 = 0, - TEXT_SECOND_TRIAL_2 = 1, - TEXT_SECOND_TRIAL_3 = 2, - TEXT_SECOND_TRIAL_4 = 3, -}; - -struct Locations -{ - float x, y, z, o; -}; - -static Locations SpawnPosition[]= -{ - {5.3f, -11.8f, 0.361f, 4.2f}, - {11.2f, -29.17f, 0.361f, 2.7f}, - {-5.7f, -34.85f, 0.361f, 1.09f}, - {-11.9f, -18, 0.361f, 5.87f} -}; - -static uint32 PaladinEntry[] = {CHAMPION_BLOODWRATH, CHAMPION_LIGHTREND, CHAMPION_SWIFTBLADE, CHAMPION_SUNSTRIKER}; - -/*###### -## npc_second_trial_paladin -######*/ - -class npc_second_trial_paladin : public CreatureScript -{ -public: - npc_second_trial_paladin() : CreatureScript("npc_second_trial_paladin") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_secondTrialAI (creature); - } - - struct npc_secondTrialAI : public ScriptedAI - { - npc_secondTrialAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 timer; - uint8 questPhase; - uint64 summonerGuid; - - bool spellFlashLight; - bool spellJustice; - bool spellJudLight; - bool spellCommand; - - uint32 timerFlashLight; - uint32 timerJustice; - uint32 timerJudLight; - uint32 timerCommand; - - void Reset() - { - timer = 2000; - questPhase = 0; - summonerGuid = 0; - - me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_KNEEL); - me->setFaction(FACTION_FRIENDLY); - - spellFlashLight = false; - spellJustice = false; - spellJudLight = false; - spellCommand = false; - - switch (me->GetEntry()) - { - case CHAMPION_BLOODWRATH: - spellFlashLight = true; - timerFlashLight = 3225; - break; - case CHAMPION_LIGHTREND: - spellJustice = true; - timerJustice = 500; - break; - case CHAMPION_SWIFTBLADE: - spellJudLight = false; // Misses Script Effect // http://www.wowhead.com/?spell=20271 - timerJudLight = 500; - break; - case CHAMPION_SUNSTRIKER: - spellFlashLight = true; - spellJudLight = false; // Misses Script Effect // http://www.wowhead.com/?spell=20271 - spellCommand = false; // Misses Dummy // http://www.wowhead.com/?spell=20375 - timerFlashLight = 3225; - timerJudLight = 500; - timerCommand = 1500; - break; - } - } - - void EnterCombat(Unit* /*who*/) {} - - void UpdateAI(uint32 diff) - { - if (questPhase == 1) - { - if (timer <= diff) - { - me->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND); - me->setFaction(FACTION_HOSTILE); - questPhase = 0; - - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - { - me->AddThreat(target, 5000000.0f); - AttackStart(target); - } - } - else - timer -= diff; - } - - if (!UpdateVictim()) - return; - - // healer - if (spellFlashLight && HealthBelowPct(70)) - { - if (timerFlashLight <= diff) - { - DoCast(me, SPELL_FLASH_OF_LIGHT); - timerFlashLight = 3225 + rand()%3225; - } - else - timerFlashLight -= diff; - } - - if (spellJustice) - { - if (timerJustice <= diff) - { - DoCast(me, SPELL_SEAL_OF_JUSTICE); - timerJustice = urand(10000, 20000); - } - else - timerJustice -= diff; - } + // Quest + QUEST_UNEXPECTED_RESULT = 8488, - if (spellJudLight) - { - if (timerJudLight <= diff) - { - DoCast(me, SPELL_JUDGEMENT_OF_LIGHT); - timerJudLight = urand(10000, 20000); - } - else - timerJudLight -= diff; - } - - if (spellCommand) - { - if (timerCommand <= diff) - { - DoCast(me, SPELL_SEAL_OF_COMMAND); - timerCommand = urand(20000, 40000); - } - else - timerCommand -= diff; - } - - DoMeleeAttackIfReady(); - } - - void Activate(uint64 summonerguid) - { - questPhase = 1; - summonerGuid = summonerguid; - } - - void KilledUnit(Unit* unit) - { - if (Player* player = unit->ToPlayer()) - if (player->GetQuestStatus(QUEST_SECOND_TRIAL) == QUEST_STATUS_INCOMPLETE) - player->FailQuest(QUEST_SECOND_TRIAL); - } - - void JustDied(Unit* killer); - }; + // Creatures + NPC_GHARZUL = 15958, + NPC_ANGERSHADE = 15656 }; -/*###### -## npc_second_trial_controller -######*/ - -class npc_second_trial_controller : public CreatureScript -{ -public: - npc_second_trial_controller() : CreatureScript("npc_second_trial_controller") { } - - bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest) - { - // One Player exclusive quest, wait for user go activation - if (quest->GetQuestId() == QUEST_SECOND_TRIAL) - CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, creature->AI())->questPhase = 1; - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) - { - // quest only available if not already started - // Quest_template flag is set to : QUEST_FLAGS_EVENT - // Escort quests or any other event-driven quests. If player in party, all players that can accept this quest will receive confirmation box to accept quest. - // !not sure if this really works! - - if (CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, creature->AI())->questPhase == 0) - { - player->PrepareQuestMenu(creature->GetGUID()); - player->SendPreparedQuest(creature->GetGUID()); - } - - player->SEND_GOSSIP_MENU(creature->GetEntry(), creature->GetGUID()); - return true; - } - - CreatureAI* GetAI(Creature* creature) const - { - return new master_kelerun_bloodmournAI (creature); - } - - struct master_kelerun_bloodmournAI : public ScriptedAI - { - master_kelerun_bloodmournAI(Creature* creature) : ScriptedAI(creature) {} - - uint8 questPhase; - uint8 paladinPhase; - uint32 timer; - - uint64 paladinGuid[4]; - - void Reset() - { - questPhase = 0; - timer = 60000; - paladinPhase = 0; - for (uint8 i = 0; i < 4; ++i) - paladinGuid[i] = 0; - } - - void EnterCombat(Unit* /*who*/) {} - - void UpdateAI(uint32 diff) - { - // Quest accepted but object not activated, object despawned (if in sync 1 minute!) - if (questPhase == 1) - { - if (timer <= diff) - Reset(); - else - timer -= diff; - } - // fight the 4 paladin mobs phase - else if (questPhase == 2) - { - if (timer <= diff) - { - if (Creature* paladinSpawn = Unit::GetCreature((*me), paladinGuid[paladinPhase])) - { - CAST_AI(npc_second_trial_paladin::npc_secondTrialAI, paladinSpawn->AI())->Activate(me->GetGUID()); - - switch (paladinPhase) - { - case 0: - Talk(TEXT_SECOND_TRIAL_1); - break; - case 1: - Talk(TEXT_SECOND_TRIAL_2); - break; - case 2: - Talk(TEXT_SECOND_TRIAL_3); - break; - case 3: - Talk(TEXT_SECOND_TRIAL_4); - break; - } - } - else - Reset(); - - questPhase = 4; - timer = OFFSET_NEXT_ATTACK; - } - else - timer -= diff; - } - - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - - void StartEvent() - { - if (questPhase == 1) - { // no player check, quest can be finished as group, so no complex PlayerGUID/group search code - for (uint8 i = 0; i < 4; ++i) - if (Creature* summoned = DoSpawnCreature(PaladinEntry[i], SpawnPosition[i].x, SpawnPosition[i].y, SpawnPosition[i].z, SpawnPosition[i].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 180000)) - paladinGuid[i] = summoned->GetGUID(); - - timer = OFFSET_NEXT_ATTACK; - questPhase = 2; - } - } - - void SecondTrialKill() - { - if (questPhase > 0) - { - ++paladinPhase; - - if (paladinPhase < 4) - questPhase = 2; - else - Reset(); // Quest Complete, QuestComplete handler is - } - } - - void SummonedCreatureDespawn(Creature* /*c*/) {} - }; -}; - -void npc_second_trial_paladin::npc_secondTrialAI::JustDied(Unit* Killer) -{ - if (Killer->GetTypeId() == TYPEID_PLAYER) - { - if (Creature* summoner = Unit::GetCreature((*me), summonerGuid)) - CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, summoner->AI())->SecondTrialKill(); - - // last kill quest complete for group - if (me->GetEntry() == CHAMPION_SUNSTRIKER) - { - if (Killer->GetTypeId() == TYPEID_PLAYER) - Killer->ToPlayer()->GroupEventHappens(QUEST_SECOND_TRIAL, Killer); - } - } -} - -/*###### -## go_second_trial -######*/ -class go_second_trial : public GameObjectScript -{ -public: - go_second_trial() : GameObjectScript("go_second_trial") { } - - bool OnGossipHello(Player* /*player*/, GameObject* go) - { - // find spawn :: master_kelerun_bloodmourn - if (Creature* creature = go->FindNearestCreature(MASTER_KELERUN_BLOODMOURN, 30.0f)) - CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, creature->AI())->StartEvent(); - - return true; - } -}; - -/*###### -## npc_apprentice_mirveda -######*/ - -#define QUEST_UNEXPECTED_RESULT 8488 -#define NPC_GHARZUL 15958 -#define NPC_ANGERSHADE 15656 - class npc_apprentice_mirveda : public CreatureScript { public: npc_apprentice_mirveda() : CreatureScript("npc_apprentice_mirveda") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE { if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT) { @@ -453,9 +59,9 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_apprentice_mirvedaAI (creature); + return new npc_apprentice_mirvedaAI(creature); } struct npc_apprentice_mirvedaAI : public ScriptedAI @@ -467,7 +73,7 @@ public: bool Summon; SummonList Summons; - void Reset() + void Reset() OVERRIDE { KillCount = 0; PlayerGUID = 0; @@ -475,28 +81,28 @@ public: Summon = false; } - void EnterCombat(Unit* /*who*/){} + void EnterCombat(Unit* /*who*/)OVERRIDE {} - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { summoned->AI()->AttackStart(me); Summons.Summon(summoned); } - void SummonedCreatureDespawn(Creature* summoned) + void SummonedCreatureDespawn(Creature* summoned) OVERRIDE { Summons.Despawn(summoned); ++KillCount; } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (PlayerGUID) if (Player* player = Unit::GetPlayer(*me, PlayerGUID)) player->FailQuest(QUEST_UNEXPECTED_RESULT); } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { if (KillCount >= 3 && PlayerGUID) if (Player* player = Unit::GetPlayer(*me, PlayerGUID)) @@ -519,9 +125,14 @@ public: enum InfusedCrystal { - NPC_ENRAGED_WRAITH = 17086, - EMOTE = 0, - QUEST_POWERING_OUR_DEFENSES = 8490 + // Quest + QUEST_POWERING_OUR_DEFENSES = 8490, + + // Says + EMOTE = 0, + + // Creatures + NPC_ENRAGED_WRAITH = 17086 }; struct Location @@ -546,9 +157,9 @@ class npc_infused_crystal : public CreatureScript public: npc_infused_crystal() : CreatureScript("npc_infused_crystal") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_infused_crystalAI (creature); + return new npc_infused_crystalAI(creature); } struct npc_infused_crystalAI : public ScriptedAI @@ -564,7 +175,7 @@ public: bool Progress; uint64 PlayerGUID; - void Reset() + void Reset() OVERRIDE { EndTimer = 0; Completed = false; @@ -573,7 +184,8 @@ public: WaveTimer = 0; } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!Progress && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 10.0f)) { @@ -587,19 +199,19 @@ public: } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { summoned->AI()->AttackStart(me); } - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (PlayerGUID && !Completed) if (Player* player = Unit::GetPlayer(*me, PlayerGUID)) player->FailQuest(QUEST_POWERING_OUR_DEFENSES); } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (EndTimer < diff && Progress) { @@ -629,9 +241,6 @@ public: void AddSC_eversong_woods() { - new npc_second_trial_controller(); - new npc_second_trial_paladin(); - new go_second_trial(); new npc_apprentice_mirveda(); new npc_infused_crystal(); } diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp index 23e67b63a1a..8e1d8792aae 100644 --- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp @@ -44,7 +44,7 @@ class npc_rathis_tomber : public CreatureScript public: npc_rathis_tomber() : CreatureScript("npc_rathis_tomber") { } - 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) @@ -52,7 +52,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); @@ -73,8 +73,9 @@ public: ## npc_ranger_lilatha ######*/ -enum eEnums +enum RangerLilatha { + // Yells SAY_START = 0, SAY_PROGRESS1 = 1, SAY_PROGRESS2 = 2, @@ -83,9 +84,16 @@ enum eEnums SAY_END2 = 5, SAY_CAPTAIN_ANSWER = 0, + // Quests QUEST_ESCAPE_FROM_THE_CATACOMBS = 9212, + + // Gameobjects GO_CAGE = 181152, + + // Creature NPC_CAPTAIN_HELIOS = 16220, + + // Factions FACTION_SMOON_E = 1603 }; @@ -98,7 +106,7 @@ public: { npc_ranger_lilathaAI(Creature* creature) : npc_escortAI(creature) {} - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { Player* player = GetPlayerForEscort(); if (!player) @@ -155,14 +163,14 @@ public: } } - void Reset() + void Reset() OVERRIDE { if (GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 20)) Cage->SetGoState(GO_STATE_READY); } }; - 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_THE_CATACOMBS) { @@ -174,7 +182,7 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_ranger_lilathaAI(creature); } diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp index 8f7a6b68932..3ebcd315eaf 100644 --- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp @@ -50,9 +50,9 @@ class npc_converted_sentry : public CreatureScript public: npc_converted_sentry() : CreatureScript("npc_converted_sentry") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_converted_sentryAI (creature); + return new npc_converted_sentryAI(creature); } struct npc_converted_sentryAI : public ScriptedAI @@ -62,16 +62,17 @@ public: bool Credit; uint32 Timer; - void Reset() + void Reset() OVERRIDE { Credit = false; Timer = 2500; } - void MoveInLineOfSight(Unit* /*who*/) {} - void EnterCombat(Unit* /*who*/) {} + void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {} - void UpdateAI(uint32 diff) + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void UpdateAI(uint32 diff) OVERRIDE { if (!Credit) { @@ -103,7 +104,7 @@ class npc_greengill_slave : public CreatureScript public: npc_greengill_slave() : CreatureScript("npc_greengill_slave") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_greengill_slaveAI(creature); } @@ -114,14 +115,14 @@ public: uint64 PlayerGUID; - void EnterCombat(Unit* /*who*/){} + void EnterCombat(Unit* /*who*/)OVERRIDE {} - void Reset() + void Reset() OVERRIDE { PlayerGUID = 0; } - void SpellHit(Unit* caster, const SpellInfo* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { if (!caster) return; @@ -145,7 +146,7 @@ public: } } - void UpdateAI(uint32 /*diff*/) + void UpdateAI(uint32 /*diff*/) OVERRIDE { DoMeleeAttackIfReady(); } diff --git a/src/server/scripts/EasternKingdoms/zone_silvermoon_city.cpp b/src/server/scripts/EasternKingdoms/zone_silvermoon_city.cpp index 0e7472fc63b..b5f85d38105 100644 --- a/src/server/scripts/EasternKingdoms/zone_silvermoon_city.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silvermoon_city.cpp @@ -35,7 +35,7 @@ EndContentData */ /*####### # npc_blood_knight_stillblade #######*/ -enum eStillbladeData +enum StillbladeData { SAY_HEAL = 0, @@ -49,9 +49,9 @@ class npc_blood_knight_stillblade : public CreatureScript public: npc_blood_knight_stillblade() : CreatureScript("npc_blood_knight_stillblade") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_blood_knight_stillbladeAI (creature); + return new npc_blood_knight_stillbladeAI(creature); } struct npc_blood_knight_stillbladeAI : public ScriptedAI @@ -61,7 +61,7 @@ public: uint32 lifeTimer; bool spellHit; - void Reset() + void Reset() OVERRIDE { lifeTimer = 120000; me->SetStandState(UNIT_STAND_STATE_DEAD); @@ -69,15 +69,16 @@ public: spellHit = false; } - 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 (me->IsStandState()) { @@ -88,7 +89,7 @@ public: } } - void SpellHit(Unit* caster, const SpellInfo* Spellkind) + void SpellHit(Unit* caster, const SpellInfo* Spellkind) OVERRIDE { if (Spellkind->Id != SPELL_SHIMMERING_VESSEL || spellHit) return; diff --git a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp index 45b651872ac..4dc41e5551c 100644 --- a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp @@ -41,9 +41,9 @@ class npc_yenniku : public CreatureScript public: npc_yenniku() : CreatureScript("npc_yenniku") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_yennikuAI (creature); + return new npc_yennikuAI(creature); } struct npc_yennikuAI : public ScriptedAI @@ -56,13 +56,13 @@ public: uint32 Reset_Timer; bool bReset; - void Reset() + void Reset() OVERRIDE { Reset_Timer = 0; me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); } - void SpellHit(Unit* caster, const SpellInfo* spell) + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE { if (bReset || spell->Id != 3607) return; @@ -82,9 +82,9 @@ public: } } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (bReset) { diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index 892402251dc..33f884408e2 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -77,7 +77,7 @@ class npc_lady_sylvanas_windrunner : public CreatureScript public: npc_lady_sylvanas_windrunner() : CreatureScript("npc_lady_sylvanas_windrunner") { } - bool OnQuestReward(Player* /*player*/, Creature* creature, const Quest *_Quest, uint32 /*slot*/) + bool OnQuestReward(Player* /*player*/, Creature* creature, const Quest *_Quest, uint32 /*slot*/) OVERRIDE { if (_Quest->GetQuestId() == QUEST_JOURNEY_TO_UNDERCITY) { @@ -92,9 +92,9 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_lady_sylvanas_windrunnerAI (creature); + return new npc_lady_sylvanas_windrunnerAI(creature); } struct npc_lady_sylvanas_windrunnerAI : public ScriptedAI @@ -111,7 +111,7 @@ public: uint32 ShotTimer; uint32 MultiShotTimer; - void Reset() + void Reset() OVERRIDE { LamentEventTimer = 5000; LamentEvent = false; @@ -124,9 +124,9 @@ public: MultiShotTimer = 10000; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { if (summoned->GetEntry() == ENTRY_HIGHBORNE_BUNNY) { @@ -142,7 +142,7 @@ public: } } - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (LamentEvent) { @@ -224,9 +224,9 @@ class npc_highborne_lamenter : public CreatureScript public: npc_highborne_lamenter() : CreatureScript("npc_highborne_lamenter") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_highborne_lamenterAI (creature); + return new npc_highborne_lamenterAI(creature); } struct npc_highborne_lamenterAI : public ScriptedAI @@ -238,7 +238,7 @@ public: bool EventMove; bool EventCast; - void Reset() + void Reset() OVERRIDE { EventMoveTimer = 10000; EventCastTimer = 17500; @@ -246,9 +246,9 @@ public: EventCast = true; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} - void UpdateAI(uint32 diff) + void UpdateAI(uint32 diff) OVERRIDE { if (EventMove) { @@ -276,18 +276,21 @@ public: ## npc_parqual_fintallas ######*/ -#define SPELL_MARK_OF_SHAME 6767 +enum ParqualFintallas +{ + SPELL_MARK_OF_SHAME = 6767 +}; -#define GOSSIP_HPF1 "Gul'dan" -#define GOSSIP_HPF2 "Kel'Thuzad" -#define GOSSIP_HPF3 "Ner'zhul" +#define GOSSIP_HPF1 "Gul'dan" +#define GOSSIP_HPF2 "Kel'Thuzad" +#define GOSSIP_HPF3 "Ner'zhul" class npc_parqual_fintallas : public CreatureScript { public: npc_parqual_fintallas() : CreatureScript("npc_parqual_fintallas") { } - 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) @@ -303,7 +306,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp index 1e099a07844..4057f4070b1 100644 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp @@ -53,7 +53,7 @@ class npcs_dithers_and_arbington : public CreatureScript public: npcs_dithers_and_arbington() : CreatureScript("npcs_dithers_and_arbington") { } - 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) @@ -85,7 +85,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); @@ -112,7 +112,7 @@ public: ## npc_myranda_the_hag ######*/ -enum eMyranda +enum Myranda { QUEST_SUBTERFUGE = 5862, QUEST_IN_DREAMS = 5944, @@ -126,7 +126,7 @@ class npc_myranda_the_hag : public CreatureScript public: npc_myranda_the_hag() : CreatureScript("npc_myranda_the_hag") { } - 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) @@ -137,7 +137,7 @@ public: return true; } - bool OnGossipHello(Player* player, Creature* creature) + bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); @@ -165,18 +165,18 @@ class npc_the_scourge_cauldron : public CreatureScript public: npc_the_scourge_cauldron() : CreatureScript("npc_the_scourge_cauldron") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_the_scourge_cauldronAI (creature); + return new npc_the_scourge_cauldronAI(creature); } struct npc_the_scourge_cauldronAI : public ScriptedAI { npc_the_scourge_cauldronAI(Creature* creature) : ScriptedAI(creature) {} - void Reset() {} + void Reset() OVERRIDE {} - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) OVERRIDE {} void DoDie() { @@ -188,7 +188,8 @@ public: me->SetRespawnDelay(600); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!who) return; @@ -240,7 +241,7 @@ public: ## npcs_andorhal_tower ######*/ -enum eAndorhalTower +enum AndorhalTower { GO_BEACON_TORCH = 176093 }; @@ -250,9 +251,9 @@ class npc_andorhal_tower : public CreatureScript public: npc_andorhal_tower() : CreatureScript("npc_andorhal_tower") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { - return new npc_andorhal_towerAI (creature); + return new npc_andorhal_towerAI(creature); } struct npc_andorhal_towerAI : public ScriptedAI @@ -262,7 +263,8 @@ public: SetCombatMovement(false); } - void MoveInLineOfSight(Unit* who) + void MoveInLineOfSight(Unit* who) OVERRIDE + { if (!who || who->GetTypeId() != TYPEID_PLAYER) return; @@ -278,7 +280,7 @@ public: ## npc_anchorite_truuen ######*/ -enum eTruuen +enum Truuen { NPC_GHOST_UTHER = 17233, NPC_THEL_DANIS = 1854, @@ -300,7 +302,7 @@ class npc_anchorite_truuen : public CreatureScript public: npc_anchorite_truuen() : CreatureScript("npc_anchorite_truuen") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE { npc_escortAI* pEscortAI = CAST_AI(npc_anchorite_truuen::npc_anchorite_truuenAI, creature->AI()); @@ -309,7 +311,7 @@ public: return false; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_anchorite_truuenAI(creature); } @@ -326,18 +328,18 @@ public: Creature* Ughost; Creature* Theldanis; - void Reset() + void Reset() OVERRIDE { m_uiChatTimer = 7000; } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { if (summoned->GetEntry() == NPC_GHOUL) summoned->AI()->AttackStart(me); } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { Player* player = GetPlayerForEscort(); @@ -392,15 +394,15 @@ public: } } - void EnterCombat(Unit* /*who*/){} + void EnterCombat(Unit* /*who*/)OVERRIDE {} - void JustDied(Unit* /*killer*/) + void JustDied(Unit* /*killer*/) OVERRIDE { if (Player* player = GetPlayerForEscort()) player->FailQuest(QUEST_TOMB_LIGHTBRINGER); } - void UpdateAI(uint32 uiDiff) + void UpdateAI(uint32 uiDiff) OVERRIDE { npc_escortAI::UpdateAI(uiDiff); DoMeleeAttackIfReady(); diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp index a0c1c01d3a2..0ded937d5a8 100644 --- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp +++ b/src/server/scripts/EasternKingdoms/zone_westfall.cpp @@ -37,17 +37,25 @@ EndContentData */ ## npc_daphne_stilwell ######*/ -enum eEnums +enum DaphneStilwell { + // Yells SAY_DS_START = 0, SAY_DS_DOWN_1 = 1, SAY_DS_DOWN_2 = 2, SAY_DS_DOWN_3 = 3, SAY_DS_PROLOGUE = 4, + // Spells SPELL_SHOOT = 6660, + + // Quests QUEST_TOME_VALOR = 1651, + + // Creatures NPC_DEFIAS_RAIDER = 6180, + + // Equips EQUIP_ID_RIFLE = 2511 }; @@ -56,7 +64,7 @@ class npc_daphne_stilwell : public CreatureScript public: npc_daphne_stilwell() : CreatureScript("npc_daphne_stilwell") { } - bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) + bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) OVERRIDE { if (quest->GetQuestId() == QUEST_TOME_VALOR) { @@ -69,7 +77,7 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_daphne_stilwellAI(creature); } @@ -81,7 +89,7 @@ public: uint32 uiWPHolder; uint32 uiShootTimer; - void Reset() + void Reset() OVERRIDE { if (HasEscortState(STATE_ESCORT_ESCORTING)) { @@ -104,7 +112,7 @@ public: uiShootTimer = 0; } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { Player* player = GetPlayerForEscort(); if (!player) @@ -156,7 +164,7 @@ public: } } - void AttackStart(Unit* who) + void AttackStart(Unit* who) OVERRIDE { if (!who) return; @@ -171,7 +179,7 @@ public: } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { summoned->AI()->AttackStart(me); } @@ -213,7 +221,7 @@ class npc_defias_traitor : public CreatureScript public: npc_defias_traitor() : CreatureScript("npc_defias_traitor") { } - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE { if (quest->GetQuestId() == QUEST_DEFIAS_BROTHERHOOD) { @@ -226,7 +234,7 @@ public: return true; } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_defias_traitorAI(creature); } @@ -235,7 +243,7 @@ public: { npc_defias_traitorAI(Creature* creature) : npc_escortAI(creature) { Reset(); } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { Player* player = GetPlayerForEscort(); if (!player) @@ -256,12 +264,12 @@ public: } } - void EnterCombat(Unit* who) + void EnterCombat(Unit* who) OVERRIDE { Talk(SAY_AGGRO, who->GetGUID()); } - void Reset() {} + void Reset() OVERRIDE {} }; }; diff --git a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp index faaeeaea8bd..dc4154c3d3e 100644 --- a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp @@ -37,7 +37,7 @@ EndContentData */ ## npc_tapoke_slim_jahn ######*/ -enum eTapokeSlim +enum TapokeSlim { QUEST_MISSING_DIPLO_PT11 = 1249, FACTION_ENEMY = 168, @@ -52,7 +52,7 @@ class npc_tapoke_slim_jahn : public CreatureScript public: npc_tapoke_slim_jahn() : CreatureScript("npc_tapoke_slim_jahn") { } - CreatureAI* GetAI(Creature* creature) const + CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_tapoke_slim_jahnAI(creature); } @@ -63,13 +63,13 @@ public: bool IsFriendSummoned; - void Reset() + void Reset() OVERRIDE { if (!HasEscortState(STATE_ESCORT_ESCORTING)) IsFriendSummoned = false; } - void WaypointReached(uint32 waypointId) + void WaypointReached(uint32 waypointId) OVERRIDE { switch (waypointId) { @@ -82,7 +82,7 @@ public: } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) OVERRIDE { if (HasEscortState(STATE_ESCORT_ESCORTING) && !IsFriendSummoned && GetPlayerForEscort()) { @@ -93,13 +93,13 @@ public: } } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* summoned) OVERRIDE { if (Player* player = GetPlayerForEscort()) summoned->AI()->AttackStart(player); } - void AttackedBy(Unit* pAttacker) + void AttackedBy(Unit* pAttacker) OVERRIDE { if (me->GetVictim()) return; @@ -110,7 +110,7 @@ public: AttackStart(pAttacker); } - void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) + void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) OVERRIDE { if (HealthBelowPct(20)) { @@ -141,7 +141,7 @@ class npc_mikhail : public CreatureScript public: npc_mikhail() : CreatureScript("npc_mikhail") { } - bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) + bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) OVERRIDE { if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT11) { |
