aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2013-07-14 16:10:20 +0100
committerNay <dnpd.dd@gmail.com>2013-07-14 16:10:20 +0100
commitb56b282eeeba5e21bc256c2ce2ff27edef5f08d9 (patch)
tree4cddec28bf8323dce18e451bf038c2bba6071c6b /src/server/scripts/World
parentf8ba2c066bc3dacafa98556aeabbfab04fc5f583 (diff)
parentbedb2e56e2ca35ad6790c2ef2c736a88b8f1fb16 (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/World')
-rw-r--r--src/server/scripts/World/achievement_scripts.cpp30
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp32
-rw-r--r--src/server/scripts/World/boss_emerald_dragons.cpp78
-rw-r--r--src/server/scripts/World/go_scripts.cpp99
-rw-r--r--src/server/scripts/World/guards.cpp22
-rw-r--r--src/server/scripts/World/item_scripts.cpp32
-rw-r--r--src/server/scripts/World/mob_generic_creature.cpp16
-rw-r--r--src/server/scripts/World/npc_innkeeper.cpp18
-rw-r--r--src/server/scripts/World/npc_professions.cpp22
-rw-r--r--src/server/scripts/World/npc_taxi.cpp4
-rw-r--r--src/server/scripts/World/npcs_special.cpp304
11 files changed, 345 insertions, 312 deletions
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index d0ffe5214db..774c4e63071 100644
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
@@ -31,7 +31,7 @@ class achievement_resilient_victory : public AchievementCriteriaScript
public:
achievement_resilient_victory() : AchievementCriteriaScript("achievement_resilient_victory") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
Battleground* bg = source->GetBattleground();
if (!bg)
@@ -52,7 +52,7 @@ class achievement_bg_control_all_nodes : public AchievementCriteriaScript
public:
achievement_bg_control_all_nodes() : AchievementCriteriaScript("achievement_bg_control_all_nodes") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
Battleground* bg = source->GetBattleground();
if (!bg)
@@ -70,7 +70,7 @@ class achievement_save_the_day : public AchievementCriteriaScript
public:
achievement_save_the_day() : AchievementCriteriaScript("achievement_save_the_day") { }
- bool OnCheck(Player* source, Unit* target)
+ bool OnCheck(Player* source, Unit* target) OVERRIDE
{
if (!target)
return false;
@@ -96,7 +96,7 @@ class achievement_bg_ic_resource_glut : public AchievementCriteriaScript
public:
achievement_bg_ic_resource_glut() : AchievementCriteriaScript("achievement_bg_ic_resource_glut") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
if (source->HasAura(SPELL_OIL_REFINERY) && source->HasAura(SPELL_QUARRY))
return true;
@@ -110,7 +110,7 @@ class achievement_bg_ic_glaive_grave : public AchievementCriteriaScript
public:
achievement_bg_ic_glaive_grave() : AchievementCriteriaScript("achievement_bg_ic_glaive_grave") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
if (Creature* vehicle = source->GetVehicleCreatureBase())
{
@@ -127,7 +127,7 @@ class achievement_bg_ic_mowed_down : public AchievementCriteriaScript
public:
achievement_bg_ic_mowed_down() : AchievementCriteriaScript("achievement_bg_ic_mowed_down") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
if (Creature* vehicle = source->GetVehicleCreatureBase())
{
@@ -144,7 +144,7 @@ class achievement_bg_sa_artillery : public AchievementCriteriaScript
public:
achievement_bg_sa_artillery() : AchievementCriteriaScript("achievement_bg_sa_artillery") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
if (Creature* vehicle = source->GetVehicleCreatureBase())
{
@@ -164,7 +164,7 @@ class achievement_arena_kills : public AchievementCriteriaScript
{
}
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
// this checks GetBattleground() for NULL already
if (!source->InArena())
@@ -182,7 +182,7 @@ class achievement_sickly_gazelle : public AchievementCriteriaScript
public:
achievement_sickly_gazelle() : AchievementCriteriaScript("achievement_sickly_gazelle") { }
- bool OnCheck(Player* /*source*/, Unit* target)
+ bool OnCheck(Player* /*source*/, Unit* target) OVERRIDE
{
if (!target)
return false;
@@ -200,7 +200,7 @@ class achievement_everything_counts : public AchievementCriteriaScript
public:
achievement_everything_counts() : AchievementCriteriaScript("achievement_everything_counts") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
Battleground* bg = source->GetBattleground();
if (!bg)
@@ -221,7 +221,7 @@ class achievement_bg_av_perfection : public AchievementCriteriaScript
public:
achievement_bg_av_perfection() : AchievementCriteriaScript("achievement_bg_av_perfection") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
Battleground* bg = source->GetBattleground();
if (!bg)
@@ -244,7 +244,7 @@ class achievement_bg_sa_defense_of_ancients : public AchievementCriteriaScript
{
}
- bool OnCheck(Player* player, Unit* /*target*/)
+ bool OnCheck(Player* player, Unit* /*target*/) OVERRIDE
{
if (!player)
return false;
@@ -278,7 +278,7 @@ class achievement_tilted : public AchievementCriteriaScript
public:
achievement_tilted() : AchievementCriteriaScript("achievement_tilted") {}
- bool OnCheck(Player* player, Unit* /*target*/)
+ bool OnCheck(Player* player, Unit* /*target*/) OVERRIDE
{
if (!player)
return false;
@@ -299,7 +299,7 @@ class achievement_not_even_a_scratch : public AchievementCriteriaScript
public:
achievement_not_even_a_scratch() : AchievementCriteriaScript("achievement_not_even_a_scratch") { }
- bool OnCheck(Player* source, Unit* /*target*/)
+ bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
if (!source)
return false;
@@ -327,7 +327,7 @@ class achievement_flirt_with_disaster_perf_check : public AchievementCriteriaScr
public:
achievement_flirt_with_disaster_perf_check() : AchievementCriteriaScript("achievement_flirt_with_disaster_perf_check") { }
- bool OnCheck(Player* player, Unit* /*target*/)
+ bool OnCheck(Player* player, Unit* /*target*/) OVERRIDE
{
if (!player)
return false;
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index 391c7b75c89..1b43ee30cd1 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -43,7 +43,7 @@ EndContentData */
## at_coilfang_waterfall
######*/
-enum eCoilfangGOs
+enum CoilfangGOs
{
GO_COILFANG_WATERFALL = 184212
};
@@ -57,7 +57,7 @@ class AreaTrigger_at_coilfang_waterfall : public AreaTriggerScript
{
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
if (GameObject* go = GetClosestGameObjectWithEntry(player, GO_COILFANG_WATERFALL, 35.0f))
if (go->getLootState() == GO_READY)
@@ -71,7 +71,7 @@ class AreaTrigger_at_coilfang_waterfall : public AreaTriggerScript
## at_legion_teleporter
#####*/
-enum eLegionTeleporter
+enum LegionTeleporter
{
SPELL_TELE_A_TO = 37387,
QUEST_GAINING_ACCESS_A = 10589,
@@ -89,7 +89,7 @@ class AreaTrigger_at_legion_teleporter : public AreaTriggerScript
{
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
if (player->IsAlive() && !player->IsInCombat())
{
@@ -115,7 +115,7 @@ class AreaTrigger_at_legion_teleporter : public AreaTriggerScript
## at_stormwright_shelf
######*/
-enum eStormwrightShelf
+enum StormwrightShelf
{
QUEST_STRENGTH_OF_THE_TEMPEST = 12741,
@@ -131,7 +131,7 @@ class AreaTrigger_at_stormwright_shelf : public AreaTriggerScript
{
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
if (!player->isDead() && player->GetQuestStatus(QUEST_STRENGTH_OF_THE_TEMPEST) == QUEST_STATUS_INCOMPLETE)
player->CastSpell(player, SPELL_CREATE_TRUE_POWER_OF_THE_TEMPEST, false);
@@ -144,7 +144,7 @@ class AreaTrigger_at_stormwright_shelf : public AreaTriggerScript
## at_scent_larkorwi
######*/
-enum eScentLarkorwi
+enum ScentLarkorwi
{
QUEST_SCENT_OF_LARKORWI = 4291,
NPC_LARKORWI_MATE = 9683
@@ -159,7 +159,7 @@ class AreaTrigger_at_scent_larkorwi : public AreaTriggerScript
{
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
if (!player->isDead() && player->GetQuestStatus(QUEST_SCENT_OF_LARKORWI) == QUEST_STATUS_INCOMPLETE)
{
@@ -175,7 +175,7 @@ class AreaTrigger_at_scent_larkorwi : public AreaTriggerScript
## at_last_rites
#####*/
-enum eAtLastRites
+enum AtLastRites
{
QUEST_LAST_RITES = 12019,
QUEST_BREAKING_THROUGH = 11898,
@@ -190,7 +190,7 @@ class AreaTrigger_at_last_rites : public AreaTriggerScript
{
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) OVERRIDE
{
if (!(player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_INCOMPLETE ||
player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_COMPLETE ||
@@ -226,7 +226,7 @@ class AreaTrigger_at_last_rites : public AreaTriggerScript
## at_sholazar_waygate
######*/
-enum eWaygate
+enum Waygate
{
SPELL_SHOLAZAR_TO_UNGORO_TELEPORT = 52056,
SPELL_UNGORO_TO_SHOLAZAR_TELEPORT = 52057,
@@ -245,7 +245,7 @@ class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript
AreaTrigger_at_sholazar_waygate() : AreaTriggerScript("at_sholazar_waygate") {}
- bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) OVERRIDE
{
if (!player->isDead() && (player->GetQuestStatus(QUEST_MEETING_A_GREAT_ONE) != QUEST_STATUS_NONE ||
(player->GetQuestStatus(QUEST_THE_MAKERS_OVERLOOK) == QUEST_STATUS_REWARDED && player->GetQuestStatus(QUEST_THE_MAKERS_PERCH) == QUEST_STATUS_REWARDED)))
@@ -282,7 +282,7 @@ class AreaTrigger_at_nats_landing : public AreaTriggerScript
public:
AreaTrigger_at_nats_landing() : AreaTriggerScript("at_nats_landing") { }
- bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
if (!player->IsAlive() || !player->HasAura(SPELL_FISH_PASTE))
return false;
@@ -327,7 +327,7 @@ class AreaTrigger_at_brewfest : public AreaTriggerScript
_triggerTimes[AT_BREWFEST_DUROTAR] = _triggerTimes[AT_BREWFEST_DUN_MOROGH] = 0;
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) OVERRIDE
{
uint32 triggerId = trigger->id;
// Second trigger happened too early after first, skip for now
@@ -380,7 +380,7 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript
_triggerTimes[AT_AREA_52_SOUTH] = _triggerTimes[AT_AREA_52_NORTH] = _triggerTimes[AT_AREA_52_WEST] = _triggerTimes[AT_AREA_52_EAST] = 0;
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) OVERRIDE
{
float x = 0.0f, y = 0.0f, z = 0.0f;
@@ -452,7 +452,7 @@ public:
stormforgedEradictorGUID = 0;
}
- bool OnTrigger(Player* player, AreaTriggerEntry const* /* trigger */)
+ bool OnTrigger(Player* player, AreaTriggerEntry const* /* trigger */) OVERRIDE
{
if (player->GetQuestStatus(QUEST_THE_LONESOME_WATCHER) != QUEST_STATUS_INCOMPLETE)
return false;
diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp
index 663127e8cf3..ca0083a1268 100644
--- a/src/server/scripts/World/boss_emerald_dragons.cpp
+++ b/src/server/scripts/World/boss_emerald_dragons.cpp
@@ -94,7 +94,7 @@ struct emerald_dragonAI : public WorldBossAI
{
}
- void Reset()
+ void Reset() OVERRIDE
{
WorldBossAI::Reset();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
@@ -106,14 +106,14 @@ struct emerald_dragonAI : public WorldBossAI
}
// Target killed during encounter, mark them as suspectible for Aura Of Nature
- void KilledUnit(Unit* who)
+ void KilledUnit(Unit* who) OVERRIDE
{
if (who->GetTypeId() == TYPEID_PLAYER)
who->CastSpell(who, SPELL_MARK_OF_NATURE, true);
}
// Execute and reschedule base events shared between all Emerald Dragons
- void ExecuteEvent(uint32 eventId)
+ void ExecuteEvent(uint32 eventId) OVERRIDE
{
switch (eventId)
{
@@ -137,7 +137,7 @@ struct emerald_dragonAI : public WorldBossAI
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -172,12 +172,12 @@ class npc_dream_fog : public CreatureScript
{
}
- void Reset()
+ void Reset() OVERRIDE
{
_roamTimer = 0;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -209,7 +209,7 @@ class npc_dream_fog : public CreatureScript
uint32 _roamTimer;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_dream_fogAI(creature);
}
@@ -249,21 +249,21 @@ class boss_ysondre : public CreatureScript
{
}
- void Reset()
+ void Reset() OVERRIDE
{
_stage = 1;
emerald_dragonAI::Reset();
events.ScheduleEvent(EVENT_LIGHTNING_WAVE, 12000);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
Talk(SAY_YSONDRE_AGGRO);
WorldBossAI::EnterCombat(who);
}
// Summon druid spirits on 75%, 50% and 25% health
- void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
{
if (!HealthAbovePct(100 - 25 * _stage))
{
@@ -275,7 +275,7 @@ class boss_ysondre : public CreatureScript
}
}
- void ExecuteEvent(uint32 eventId)
+ void ExecuteEvent(uint32 eventId) OVERRIDE
{
switch (eventId)
{
@@ -293,7 +293,7 @@ class boss_ysondre : public CreatureScript
uint8 _stage;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_ysondreAI(creature);
}
@@ -337,20 +337,20 @@ class boss_lethon : public CreatureScript
{
}
- void Reset()
+ void Reset() OVERRIDE
{
_stage = 1;
emerald_dragonAI::Reset();
events.ScheduleEvent(EVENT_SHADOW_BOLT_WHIRL, 10000);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
Talk(SAY_LETHON_AGGRO);
WorldBossAI::EnterCombat(who);
}
- void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
{
if (!HealthAbovePct(100 - 25 * _stage))
{
@@ -360,7 +360,7 @@ class boss_lethon : public CreatureScript
}
}
- void SpellHitTarget(Unit* target, SpellInfo const* spell)
+ void SpellHitTarget(Unit* target, SpellInfo const* spell) OVERRIDE
{
if (spell->Id == SPELL_DRAW_SPIRIT && target->GetTypeId() == TYPEID_PLAYER)
{
@@ -370,7 +370,7 @@ class boss_lethon : public CreatureScript
}
}
- void ExecuteEvent(uint32 eventId)
+ void ExecuteEvent(uint32 eventId) OVERRIDE
{
switch (eventId)
{
@@ -388,7 +388,7 @@ class boss_lethon : public CreatureScript
uint8 _stage;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_lethonAI(creature);
}
@@ -405,13 +405,13 @@ class npc_spirit_shade : public CreatureScript
{
}
- void IsSummonedBy(Unit* summoner)
+ void IsSummonedBy(Unit* summoner) OVERRIDE
{
_summonerGuid = summoner->GetGUID();
me->GetMotionMaster()->MoveFollow(summoner, 0.0f, 0.0f);
}
- void MovementInform(uint32 moveType, uint32 data)
+ void MovementInform(uint32 moveType, uint32 data) OVERRIDE
{
if (moveType == FOLLOW_MOTION_TYPE && data == _summonerGuid)
{
@@ -424,7 +424,7 @@ class npc_spirit_shade : public CreatureScript
uint64 _summonerGuid;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_spirit_shadeAI(creature);
}
@@ -460,27 +460,27 @@ class boss_emeriss : public CreatureScript
{
}
- void Reset()
+ void Reset() OVERRIDE
{
_stage = 1;
emerald_dragonAI::Reset();
events.ScheduleEvent(EVENT_VOLATILE_INFECTION, 12000);
}
- void KilledUnit(Unit* who)
+ void KilledUnit(Unit* who) OVERRIDE
{
if (who->GetTypeId() == TYPEID_PLAYER)
DoCast(who, SPELL_PUTRID_MUSHROOM, true);
emerald_dragonAI::KilledUnit(who);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
Talk(SAY_EMERISS_AGGRO);
WorldBossAI::EnterCombat(who);
}
- void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
{
if (!HealthAbovePct(100 - 25 * _stage))
{
@@ -490,7 +490,7 @@ class boss_emeriss : public CreatureScript
}
}
- void ExecuteEvent(uint32 eventId)
+ void ExecuteEvent(uint32 eventId) OVERRIDE
{
switch (eventId)
{
@@ -508,7 +508,7 @@ class boss_emeriss : public CreatureScript
uint8 _stage;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_emerissAI(creature);
}
@@ -552,7 +552,7 @@ class boss_taerar : public CreatureScript
{
}
- void Reset()
+ void Reset() OVERRIDE
{
me->RemoveAurasDueToSpell(SPELL_SHADE);
_stage = 1;
@@ -566,18 +566,18 @@ class boss_taerar : public CreatureScript
events.ScheduleEvent(EVENT_BELLOWING_ROAR, 30000);
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
Talk(SAY_TAERAR_AGGRO);
emerald_dragonAI::EnterCombat(who);
}
- void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/)
+ void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) OVERRIDE
{
--_shades;
}
- void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
{
// At 75, 50 or 25 percent health, we need to activate the shades and go "banished"
// Note: _stage holds the amount of times they have been summoned
@@ -604,7 +604,7 @@ class boss_taerar : public CreatureScript
}
}
- void ExecuteEvent(uint32 eventId)
+ void ExecuteEvent(uint32 eventId) OVERRIDE
{
switch (eventId)
{
@@ -622,7 +622,7 @@ class boss_taerar : public CreatureScript
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!me->IsInCombat())
return;
@@ -658,7 +658,7 @@ class boss_taerar : public CreatureScript
uint8 _stage; // check which "shade phase" we're at (75-50-25 percentage counters)
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new boss_taerarAI(creature);
}
@@ -695,13 +695,13 @@ class spell_dream_fog_sleep : public SpellScriptLoader
targets.remove_if(DreamFogTargetSelector());
}
- void Register()
+ void Register() OVERRIDE
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_dream_fog_sleep_SpellScript();
}
@@ -734,7 +734,7 @@ class spell_mark_of_nature : public SpellScriptLoader
{
PrepareSpellScript(spell_mark_of_nature_SpellScript);
- bool Validate(SpellInfo const* /*spellInfo*/)
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_NATURE))
return false;
@@ -754,14 +754,14 @@ class spell_mark_of_nature : public SpellScriptLoader
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_NATURE, true);
}
- void Register()
+ void Register() OVERRIDE
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_mark_of_nature_SpellScript();
}
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index 393244c9ac5..1847e3390ef 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -72,7 +72,7 @@ class go_cat_figurine : public GameObjectScript
public:
go_cat_figurine() : GameObjectScript("go_cat_figurine") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
player->CastSpell(player, SPELL_SUMMON_GHOST_SABER, true);
return false;
@@ -87,7 +87,7 @@ class go_northern_crystal_pylon : public GameObjectScript
public:
go_northern_crystal_pylon() : GameObjectScript("go_northern_crystal_pylon") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
{
@@ -107,7 +107,7 @@ class go_eastern_crystal_pylon : public GameObjectScript
public:
go_eastern_crystal_pylon() : GameObjectScript("go_eastern_crystal_pylon") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
{
@@ -127,7 +127,7 @@ class go_western_crystal_pylon : public GameObjectScript
public:
go_western_crystal_pylon() : GameObjectScript("go_western_crystal_pylon") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
{
@@ -151,7 +151,7 @@ class go_barov_journal : public GameObjectScript
public:
go_barov_journal() : GameObjectScript("go_barov_journal") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
if (player->HasSkill(SKILL_TAILORING) && player->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !player->HasSpell(26086))
player->CastSpell(player, 26095, false);
@@ -169,7 +169,7 @@ class go_field_repair_bot_74A : public GameObjectScript
public:
go_field_repair_bot_74A() : GameObjectScript("go_field_repair_bot_74A") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
if (player->HasSkill(SKILL_ENGINEERING) && player->GetBaseSkillValue(SKILL_ENGINEERING) >= 300 && !player->HasSpell(22704))
player->CastSpell(player, 22864, false);
@@ -192,7 +192,7 @@ class go_gilded_brazier : public GameObjectScript
public:
go_gilded_brazier() : GameObjectScript("go_gilded_brazier") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
{
@@ -215,7 +215,7 @@ class go_orb_of_command : public GameObjectScript
public:
go_orb_of_command() : GameObjectScript("go_orb_of_command") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
if (player->GetQuestRewardStatus(7761))
player->CastSpell(player, 23460, true);
@@ -233,7 +233,7 @@ class go_tablet_of_madness : public GameObjectScript
public:
go_tablet_of_madness() : GameObjectScript("go_tablet_of_madness") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
if (player->HasSkill(SKILL_ALCHEMY) && player->GetSkillValue(SKILL_ALCHEMY) >= 300 && !player->HasSpell(24266))
player->CastSpell(player, 24267, false);
@@ -252,7 +252,7 @@ public:
go_tablet_of_the_seven() : GameObjectScript("go_tablet_of_the_seven") { }
/// @todo use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
return true;
@@ -273,7 +273,7 @@ class go_jump_a_tron : public GameObjectScript
public:
go_jump_a_tron() : GameObjectScript("go_jump_a_tron") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
if (player->GetQuestStatus(10111) == QUEST_STATUS_INCOMPLETE)
player->CastSpell(player, 33382, true);
@@ -307,7 +307,7 @@ class go_ethereum_prison : public GameObjectScript
public:
go_ethereum_prison() : GameObjectScript("go_ethereum_prison") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
int Random = rand() % (sizeof(NpcPrisonEntry) / sizeof(uint32));
@@ -357,7 +357,7 @@ class go_ethereum_stasis : public GameObjectScript
public:
go_ethereum_stasis() : GameObjectScript("go_ethereum_stasis") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
int Random = rand() % (sizeof(NpcStasisEntry) / sizeof(uint32));
@@ -383,7 +383,7 @@ class go_resonite_cask : public GameObjectScript
public:
go_resonite_cask() : GameObjectScript("go_resonite_cask") { }
- bool OnGossipHello(Player* /*player*/, GameObject* go)
+ bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
go->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
@@ -396,14 +396,17 @@ public:
## go_sacred_fire_of_life
######*/
-#define NPC_ARIKARA 10882
+enum SacredFireOfLife
+{
+ NPC_ARIKARA = 10882
+};
class go_sacred_fire_of_life : public GameObjectScript
{
public:
go_sacred_fire_of_life() : GameObjectScript("go_sacred_fire_of_life") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
player->SummonCreature(NPC_ARIKARA, -5008.338f, -2118.894f, 83.657f, 0.874f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
@@ -431,7 +434,7 @@ class go_shrine_of_the_birds : public GameObjectScript
public:
go_shrine_of_the_birds() : GameObjectScript("go_shrine_of_the_birds") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
uint32 BirdEntry = 0;
@@ -474,7 +477,7 @@ class go_southfury_moonstone : public GameObjectScript
public:
go_southfury_moonstone() : GameObjectScript("go_southfury_moonstone") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
//implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose
//player->CastSpell(player, SPELL_SUMMON_RIZZLE, false);
@@ -503,7 +506,7 @@ class go_tele_to_dalaran_crystal : public GameObjectScript
public:
go_tele_to_dalaran_crystal() : GameObjectScript("go_tele_to_dalaran_crystal") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
if (player->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG))
return false;
@@ -523,7 +526,7 @@ class go_tele_to_violet_stand : public GameObjectScript
public:
go_tele_to_violet_stand() : GameObjectScript("go_tele_to_violet_stand") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
if (player->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || player->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE)
return false;
@@ -553,7 +556,7 @@ class go_fel_crystalforge : public GameObjectScript
public:
go_fel_crystalforge() : GameObjectScript("go_fel_crystalforge") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
player->PrepareQuestMenu(go->GetGUID()); /* return true*/
@@ -566,7 +569,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -612,7 +615,7 @@ class go_bashir_crystalforge : public GameObjectScript
public:
go_bashir_crystalforge() : GameObjectScript("go_bashir_crystalforge") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) /* != GAMEOBJECT_TYPE_QUESTGIVER) */
player->PrepareQuestMenu(go->GetGUID()); /* return true*/
@@ -625,7 +628,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -676,7 +679,7 @@ class go_matrix_punchograph : public GameObjectScript
public:
go_matrix_punchograph() : GameObjectScript("go_matrix_punchograph") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
switch (go->GetEntry())
{
@@ -729,7 +732,7 @@ class go_scourge_cage : public GameObjectScript
public:
go_scourge_cage() : GameObjectScript("go_scourge_cage") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
if (Creature* pNearestPrisoner = go->FindNearestCreature(NPC_SCOURGE_PRISONER, 5.0f, true))
@@ -757,7 +760,7 @@ class go_arcane_prison : public GameObjectScript
public:
go_arcane_prison() : GameObjectScript("go_arcane_prison") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (player->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE)
{
@@ -773,14 +776,18 @@ public:
## go_blood_filled_orb
######*/
-#define NPC_ZELEMAR 17830
+enum BloodFilledOrb
+{
+ NPC_ZELEMAR = 17830
+
+};
class go_blood_filled_orb : public GameObjectScript
{
public:
go_blood_filled_orb() : GameObjectScript("go_blood_filled_orb") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (go->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
player->SummonCreature(NPC_ZELEMAR, -369.746f, 166.759f, -21.50f, 5.235f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
@@ -811,7 +818,7 @@ class go_jotunheim_cage : public GameObjectScript
public:
go_jotunheim_cage() : GameObjectScript("go_jotunheim_cage") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
Creature* pPrisoner = go->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true);
@@ -861,7 +868,7 @@ class go_table_theka : public GameObjectScript
public:
go_table_theka() : GameObjectScript("go_table_theka") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (player->GetQuestStatus(QUEST_SPIDER_GOLD) == QUEST_STATUS_INCOMPLETE)
player->AreaExploredOrEventHappens(QUEST_SPIDER_GOLD);
@@ -887,7 +894,7 @@ class go_inconspicuous_landmark : public GameObjectScript
public:
go_inconspicuous_landmark() : GameObjectScript("go_inconspicuous_landmark") { }
- bool OnGossipHello(Player* player, GameObject* /*go*/)
+ bool OnGossipHello(Player* player, GameObject* /*go*/) OVERRIDE
{
if (player->HasItemCount(ITEM_CUERGOS_KEY))
return false;
@@ -913,7 +920,7 @@ class go_ethereal_teleport_pad : public GameObjectScript
public:
go_ethereal_teleport_pad() : GameObjectScript("go_ethereal_teleport_pad") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
if (!player->HasItemCount(ITEM_TELEPORTER_POWER_PACK))
return false;
@@ -993,7 +1000,7 @@ class go_soulwell : public GameObjectScript
/// _and_ CMSG_GAMEOBJECT_REPORT_USE, this GossipHello hook is called
/// twice. The script's handling is fine as it won't remove two charges
/// on the well. We have to find how to segregate REPORT_USE and USE.
- bool GossipHello(Player* player)
+ bool GossipHello(Player* player) OVERRIDE
{
Unit* owner = go->GetOwner();
if (_stoneSpell == 0 || _stoneId == 0)
@@ -1023,7 +1030,7 @@ class go_soulwell : public GameObjectScript
uint32 _stoneId;
};
- GameObjectAI* GetAI(GameObject* go) const
+ GameObjectAI* GetAI(GameObject* go) const OVERRIDE
{
return new go_soulwellAI(go);
}
@@ -1048,7 +1055,7 @@ class go_dragonflayer_cage : public GameObjectScript
public:
go_dragonflayer_cage() : GameObjectScript("go_dragonflayer_cage") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) != QUEST_STATUS_INCOMPLETE)
@@ -1096,7 +1103,7 @@ class go_tadpole_cage : public GameObjectScript
public:
go_tadpole_cage() : GameObjectScript("go_tadpole_cage") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_OH_NOES_THE_TADPOLES) == QUEST_STATUS_INCOMPLETE)
@@ -1137,7 +1144,7 @@ class go_amberpine_outhouse : public GameObjectScript
public:
go_amberpine_outhouse() : GameObjectScript("go_amberpine_outhouse") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
QuestStatus status = player->GetQuestStatus(QUEST_DOING_YOUR_DUTY);
if (status == QUEST_STATUS_INCOMPLETE || status == QUEST_STATUS_COMPLETE || status == QUEST_STATUS_REWARDED)
@@ -1151,7 +1158,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, GameObject* go, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF +1)
@@ -1193,7 +1200,7 @@ class go_hive_pod : public GameObjectScript
public:
go_hive_pod() : GameObjectScript("go_hive_pod") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
player->SendLoot(go->GetGUID(), LOOT_CORPSE);
go->SummonCreature(NPC_HIVE_AMBUSHER, go->GetPositionX()+1, go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
@@ -1207,7 +1214,7 @@ class go_massive_seaforium_charge : public GameObjectScript
public:
go_massive_seaforium_charge() : GameObjectScript("go_massive_seaforium_charge") { }
- bool OnGossipHello(Player* /*player*/, GameObject* go)
+ bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
{
go->SetLootState(GO_JUST_DEACTIVATED);
return true;
@@ -1231,7 +1238,7 @@ class go_gjalerbron_cage : public GameObjectScript
public:
go_gjalerbron_cage() : GameObjectScript("go_gjalerbron_cage") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) ||
@@ -1259,7 +1266,7 @@ class go_large_gjalerbron_cage : public GameObjectScript
public:
go_large_gjalerbron_cage() : GameObjectScript("go_large_gjalerbron_cage") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
if ((player->GetTeamId() == TEAM_ALLIANCE && player->GetQuestStatus(QUEST_ALLIANCE_OF_KEYS_AND_CAGES) == QUEST_STATUS_INCOMPLETE) ||
@@ -1294,7 +1301,7 @@ class go_veil_skith_cage : public GameObjectScript
public:
go_veil_skith_cage() : GameObjectScript("go_veil_skith_cage") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton();
if (player->GetQuestStatus(QUEST_MISSING_FRIENDS) == QUEST_STATUS_INCOMPLETE)
@@ -1331,7 +1338,7 @@ class go_frostblade_shrine : public GameObjectScript
public:
go_frostblade_shrine() : GameObjectScript("go_frostblade_shrine") { }
- bool OnGossipHello(Player* player, GameObject* go)
+ bool OnGossipHello(Player* player, GameObject* go) OVERRIDE
{
go->UseDoorOrButton(10);
if (!player->HasAura(SPELL_RECENT_MEDITATION))
@@ -1358,7 +1365,7 @@ class go_midsummer_bonfire : public GameObjectScript
public:
go_midsummer_bonfire() : GameObjectScript("go_midsummer_bonfire") { }
- bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/)
+ bool OnGossipSelect(Player* player, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
{
player->CastSpell(player, STAMP_OUT_BONFIRE_QUEST_COMPLETE, true);
player->CLOSE_GOSSIP_MENU();
diff --git a/src/server/scripts/World/guards.cpp b/src/server/scripts/World/guards.cpp
index 32b362c47c2..f83d35b4039 100644
--- a/src/server/scripts/World/guards.cpp
+++ b/src/server/scripts/World/guards.cpp
@@ -56,13 +56,13 @@ public:
{
guard_genericAI(Creature* creature) : GuardAI(creature) {}
- void Reset()
+ void Reset() OVERRIDE
{
globalCooldown = 0;
buffTimer = 0;
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (me->GetEntry() == NPC_CENARION_HOLD_INFANTRY)
Talk(SAY_GUARD_SIL_AGGRO, who->GetGUID());
@@ -70,7 +70,7 @@ public:
DoCast(who, spell->Id);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Always decrease our global cooldown first
if (globalCooldown > diff)
@@ -219,7 +219,7 @@ public:
}
}
- void ReceiveEmote(Player* player, uint32 textEmote)
+ void ReceiveEmote(Player* player, uint32 textEmote) OVERRIDE
{
switch (me->GetEntry())
{
@@ -242,7 +242,7 @@ public:
uint32 buffTimer;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new guard_genericAI(creature);
}
@@ -265,7 +265,7 @@ public:
{
guard_shattrath_scryerAI(Creature* creature) : GuardAI(creature) {}
- void Reset()
+ void Reset() OVERRIDE
{
banishTimer = 5000;
exileTimer = 8500;
@@ -273,7 +273,7 @@ public:
canTeleport = false;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -315,7 +315,7 @@ public:
bool canTeleport;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new guard_shattrath_scryerAI(creature);
}
@@ -330,7 +330,7 @@ public:
{
guard_shattrath_aldorAI(Creature* creature) : GuardAI(creature) {}
- void Reset()
+ void Reset() OVERRIDE
{
banishTimer = 5000;
exileTimer = 8500;
@@ -338,7 +338,7 @@ public:
canTeleport = false;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -379,7 +379,7 @@ public:
bool canTeleport;
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new guard_shattrath_aldorAI(creature);
}
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index 8eb54d46bdf..061d423201d 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -39,7 +39,7 @@ EndContentData */
# item_only_for_flight
#####*/
-enum eOnlyForFlight
+enum OnlyForFlight
{
SPELL_ARCANE_CHARGES = 45072
};
@@ -49,7 +49,7 @@ class item_only_for_flight : public ItemScript
public:
item_only_for_flight() : ItemScript("item_only_for_flight") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
+ bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/) OVERRIDE
{
uint32 itemId = item->GetEntry();
bool disabled = false;
@@ -90,7 +90,7 @@ class item_nether_wraith_beacon : public ItemScript
public:
item_nether_wraith_beacon() : ItemScript("item_nether_wraith_beacon") { }
- bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/)
+ bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/) OVERRIDE
{
if (player->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE)
{
@@ -113,7 +113,7 @@ class item_gor_dreks_ointment : public ItemScript
public:
item_gor_dreks_ointment() : ItemScript("item_gor_dreks_ointment") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const& targets)
+ bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) OVERRIDE
{
if (targets.GetUnitTarget() && targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT &&
targets.GetUnitTarget()->GetEntry() == 20748 && !targets.GetUnitTarget()->HasAura(32578))
@@ -133,7 +133,7 @@ class item_incendiary_explosives : public ItemScript
public:
item_incendiary_explosives() : ItemScript("item_incendiary_explosives") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const & /*targets*/)
+ bool OnUse(Player* player, Item* item, SpellCastTargets const & /*targets*/) OVERRIDE
{
if (player->FindNearestCreature(26248, 15) || player->FindNearestCreature(26249, 15))
return false;
@@ -154,7 +154,7 @@ class item_mysterious_egg : public ItemScript
public:
item_mysterious_egg() : ItemScript("item_mysterious_egg") { }
- bool OnExpire(Player* player, ItemTemplate const* /*pItemProto*/)
+ bool OnExpire(Player* player, ItemTemplate const* /*pItemProto*/) OVERRIDE
{
ItemPosCountVec dest;
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 39883, 1); // Cracked Egg
@@ -174,7 +174,7 @@ class item_disgusting_jar : public ItemScript
public:
item_disgusting_jar() : ItemScript("item_disgusting_jar") {}
- bool OnExpire(Player* player, ItemTemplate const* /*pItemProto*/)
+ bool OnExpire(Player* player, ItemTemplate const* /*pItemProto*/) OVERRIDE
{
ItemPosCountVec dest;
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 44718, 1); // Ripe Disgusting Jar
@@ -189,7 +189,7 @@ public:
# item_pile_fake_furs
#####*/
-enum ePileFakeFur
+enum PileFakeFur
{
GO_CARIBOU_TRAP_1 = 187982,
GO_CARIBOU_TRAP_2 = 187995,
@@ -223,7 +223,7 @@ class item_pile_fake_furs : public ItemScript
public:
item_pile_fake_furs() : ItemScript("item_pile_fake_furs") { }
- bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const & /*targets*/)
+ bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const & /*targets*/) OVERRIDE
{
GameObject* go = NULL;
for (uint8 i = 0; i < CaribouTrapsNum; ++i)
@@ -256,7 +256,7 @@ public:
# item_petrov_cluster_bombs
#####*/
-enum ePetrovClusterBombs
+enum PetrovClusterBombs
{
SPELL_PETROV_BOMB = 42406,
AREA_ID_SHATTERED_STRAITS = 4064,
@@ -268,7 +268,7 @@ class item_petrov_cluster_bombs : public ItemScript
public:
item_petrov_cluster_bombs() : ItemScript("item_petrov_cluster_bombs") { }
- bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/)
+ bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/) OVERRIDE
{
if (player->GetZoneId() != ZONE_ID_HOWLING)
return false;
@@ -289,7 +289,7 @@ public:
# item_dehta_trap_smasher
# For quest 11876, Help Those That Cannot Help Themselves
######*/
-enum eHelpThemselves
+enum HelpThemselves
{
QUEST_CANNOT_HELP_THEMSELVES = 11876,
NPC_TRAPPED_MAMMOTH_CALF = 25850,
@@ -332,7 +332,7 @@ class item_dehta_trap_smasher : public ItemScript
public:
item_dehta_trap_smasher() : ItemScript("item_dehta_trap_smasher") { }
- bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/)
+ bool OnUse(Player* player, Item* /*item*/, const SpellCastTargets & /*targets*/) OVERRIDE
{
if (player->GetQuestStatus(QUEST_CANNOT_HELP_THEMSELVES) != QUEST_STATUS_INCOMPLETE)
return false;
@@ -368,7 +368,7 @@ class item_trident_of_nazjan : public ItemScript
public:
item_trident_of_nazjan() : ItemScript("item_Trident_of_Nazjan") { }
- bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/)
+ bool OnUse(Player* player, Item* item, const SpellCastTargets & /*targets*/) OVERRIDE
{
if (player->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
{
@@ -384,7 +384,7 @@ public:
}
};
-enum eCapturedFrog
+enum CapturedFrog
{
QUEST_THE_PERFECT_SPIES = 25444,
NPC_VANIRAS_SENTRY_TOTEM = 40187
@@ -395,7 +395,7 @@ class item_captured_frog : public ItemScript
public:
item_captured_frog() : ItemScript("item_captured_frog") { }
- bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
+ bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/) OVERRIDE
{
if (player->GetQuestStatus(QUEST_THE_PERFECT_SPIES) == QUEST_STATUS_INCOMPLETE)
{
diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp
index f9b08d17f9b..3891de93261 100644
--- a/src/server/scripts/World/mob_generic_creature.cpp
+++ b/src/server/scripts/World/mob_generic_creature.cpp
@@ -42,20 +42,20 @@ public:
uint32 BuffTimer; //This variable keeps track of buffs
bool IsSelfRooted;
- void Reset()
+ void Reset() OVERRIDE
{
GlobalCooldown = 0;
BuffTimer = 0; //Rebuff as soon as we can
IsSelfRooted = false;
}
- void EnterCombat(Unit* who)
+ void EnterCombat(Unit* who) OVERRIDE
{
if (!me->IsWithinMeleeRange(who))
IsSelfRooted = true;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
//Always decrease our global cooldown first
if (GlobalCooldown > diff)
@@ -163,7 +163,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new generic_creatureAI(creature);
}
@@ -186,7 +186,7 @@ public:
uint32 timer, interval;
const SpellInfo* spell;
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (timer <= diff)
{
@@ -199,7 +199,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new trigger_periodicAI(creature);
}
@@ -213,14 +213,14 @@ public:
struct trigger_deathAI : public NullCreatureAI
{
trigger_deathAI(Creature* creature) : NullCreatureAI(creature) {}
- void JustDied(Unit* killer)
+ void JustDied(Unit* killer) OVERRIDE
{
if (me->m_spells[0])
me->CastSpell(killer, me->m_spells[0], true);
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new trigger_deathAI(creature);
}
diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp
index 4d181880c99..9c92dd0d27e 100644
--- a/src/server/scripts/World/npc_innkeeper.cpp
+++ b/src/server/scripts/World/npc_innkeeper.cpp
@@ -30,9 +30,11 @@ EndScriptData */
#include "Player.h"
#include "WorldSession.h"
-#define HALLOWEEN_EVENTID 12
-#define SPELL_TRICK_OR_TREATED 24755
-#define SPELL_TREAT 24715
+enum Spells
+{
+ SPELL_TRICK_OR_TREATED = 24755,
+ SPELL_TREAT = 24715
+};
#define LOCALE_TRICK_OR_TREAT_0 "Trick or Treat!"
#define LOCALE_TRICK_OR_TREAT_2 "Des bonbons ou des blagues!"
@@ -47,9 +49,9 @@ class npc_innkeeper : public CreatureScript
public:
npc_innkeeper() : CreatureScript("npc_innkeeper") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
- if (IsEventActive(HALLOWEEN_EVENTID) && !player->HasAura(SPELL_TRICK_OR_TREATED))
+ if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !player->HasAura(SPELL_TRICK_OR_TREATED))
{
const char* localizedEntry;
switch (player->GetSession()->GetSessionDbcLocale())
@@ -59,7 +61,7 @@ public:
case LOCALE_esES: localizedEntry = LOCALE_TRICK_OR_TREAT_6; break;
case LOCALE_enUS: default: localizedEntry = LOCALE_TRICK_OR_TREAT_0;
}
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID);
+ player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
}
if (creature->IsQuestGiver())
@@ -84,10 +86,10 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && IsEventActive(HALLOWEEN_EVENTID) && !player->HasAura(SPELL_TRICK_OR_TREATED))
+ if (action == GOSSIP_ACTION_INFO_DEF + 1 && IsHolidayActive(HOLIDAY_HALLOWS_END) && !player->HasAura(SPELL_TRICK_OR_TREATED))
{
player->CastSpell(player, SPELL_TRICK_OR_TREATED, true);
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 83826bbc4ad..cb1c036e6bf 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -382,7 +382,7 @@ public:
return (player->HasSpell(S_TRANSMUTE) || player->HasSpell(S_ELIXIR) || player->HasSpell(S_POTION));
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -508,7 +508,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();
switch (sender)
@@ -547,7 +547,7 @@ public:
return (player->HasSpell(S_HAMMER) || player->HasSpell(S_AXE) || player->HasSpell(S_SWORD));
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -738,7 +738,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();
switch (sender)
@@ -767,7 +767,7 @@ public:
# engineering trinkets
###*/
-enum eEngineeringTrinkets
+enum EngineeringTrinkets
{
NPC_ZAP = 14742,
NPC_JHORDY = 14743,
@@ -808,7 +808,7 @@ public:
return res;
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
uint32 npcTextId = 0;
std::string gossipItem;
@@ -848,7 +848,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF + 1)
@@ -886,7 +886,7 @@ class npc_prof_leather : public CreatureScript
public:
npc_prof_leather() : CreatureScript("npc_prof_leather") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -974,7 +974,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();
switch (sender)
@@ -1009,7 +1009,7 @@ public:
return (player->HasSpell(S_MOONCLOTH) || player->HasSpell(S_SHADOWEAVE) || player->HasSpell(S_SPELLFIRE));
}
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -1136,7 +1136,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();
switch (sender)
diff --git a/src/server/scripts/World/npc_taxi.cpp b/src/server/scripts/World/npc_taxi.cpp
index 5e1e205dd98..bf742d606f2 100644
--- a/src/server/scripts/World/npc_taxi.cpp
+++ b/src/server/scripts/World/npc_taxi.cpp
@@ -65,7 +65,7 @@ class npc_taxi : public CreatureScript
public:
npc_taxi() : CreatureScript("npc_taxi") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -182,7 +182,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index dca55306113..6f867a47fc3 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -77,7 +77,7 @@ struct SpawnAssociation
SpawnType spawnType;
};
-enum eEnums
+enum AirFoceBots
{
SPELL_GUARDS_MARK = 38067,
AURA_DURATION_TIME_LEFT = 5000
@@ -159,7 +159,7 @@ public:
SpawnAssociation* SpawnAssoc;
uint64 SpawnedGUID;
- void Reset() {}
+ void Reset() OVERRIDE {}
Creature* SummonGuard()
{
@@ -186,7 +186,8 @@ public:
return NULL;
}
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!SpawnAssoc)
return;
@@ -262,7 +263,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_air_force_botsAI(creature);
}
@@ -288,7 +289,7 @@ class npc_lunaclaw_spirit : public CreatureScript
public:
npc_lunaclaw_spirit() : CreatureScript("npc_lunaclaw_spirit") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (player->GetQuestStatus(QUEST_BODY_HEART_A) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(QUEST_BODY_HEART_H) == QUEST_STATUS_INCOMPLETE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GRANT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -297,7 +298,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_INFO_DEF + 1)
@@ -335,16 +336,16 @@ public:
uint32 ResetFlagTimer;
- void Reset()
+ void Reset() OVERRIDE
{
ResetFlagTimer = 120000;
me->setFaction(FACTION_CHICKEN);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
}
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
// Reset flags after a certain time has passed so that the next player has to start the 'event' again
if (me->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
@@ -362,7 +363,7 @@ public:
DoMeleeAttackIfReady();
}
- void ReceiveEmote(Player* player, uint32 emote)
+ void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
{
switch (emote)
{
@@ -386,12 +387,12 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_chicken_cluckAI(creature);
}
- bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest)
+ bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_CLUCK)
CAST_AI(npc_chicken_cluck::npc_chicken_cluckAI, creature->AI())->Reset();
@@ -399,7 +400,7 @@ public:
return true;
}
- bool OnQuestComplete(Player* /*player*/, Creature* creature, Quest const* quest)
+ bool OnQuestComplete(Player* /*player*/, Creature* creature, Quest const* quest) OVERRIDE
{
if (quest->GetQuestId() == QUEST_CLUCK)
CAST_AI(npc_chicken_cluck::npc_chicken_cluckAI, creature->AI())->Reset();
@@ -412,9 +413,12 @@ public:
## npc_dancing_flames
######*/
-#define SPELL_BRAZIER 45423
-#define SPELL_SEDUCTION 47057
-#define SPELL_FIERY_AURA 45427
+enum DancingFlames
+{
+ SPELL_BRAZIER = 45423,
+ SPELL_SEDUCTION = 47057,
+ SPELL_FIERY_AURA = 45427
+};
class npc_dancing_flames : public CreatureScript
{
@@ -428,7 +432,7 @@ public:
bool Active;
uint32 CanIteract;
- void Reset()
+ void Reset() OVERRIDE
{
Active = true;
CanIteract = 3500;
@@ -441,7 +445,7 @@ public:
me->HandleEmoteCommand(EMOTE_ONESHOT_DANCE);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Active)
{
@@ -456,9 +460,9 @@ public:
}
}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/)OVERRIDE {}
- void ReceiveEmote(Player* player, uint32 emote)
+ void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
{
if (me->IsWithinLOS(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()) && me->IsWithinDistInMap(player, 30.0f))
{
@@ -488,7 +492,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_dancing_flamesAI(creature);
}
@@ -582,7 +586,7 @@ public:
std::list<uint64> Patients;
std::vector<Location*> Coordinates;
- void Reset()
+ void Reset() OVERRIDE
{
PlayerGUID = 0;
@@ -683,12 +687,12 @@ public:
}
}
- void UpdateAI(uint32 diff);
+ void UpdateAI(uint32 diff) OVERRIDE;
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
};
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
+ bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
{
if ((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622))
CAST_AI(npc_doctor::npc_doctorAI, creature->AI())->BeginEvent(player);
@@ -696,7 +700,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_doctorAI(creature);
}
@@ -718,7 +722,7 @@ public:
uint64 DoctorGUID;
Location* Coord;
- void Reset()
+ void Reset() OVERRIDE
{
DoctorGUID = 0;
Coord = NULL;
@@ -751,9 +755,9 @@ public:
}
}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/)OVERRIDE {}
- void SpellHit(Unit* caster, SpellInfo const* spell)
+ void SpellHit(Unit* caster, SpellInfo const* spell) OVERRIDE
{
Player* player = caster->ToPlayer();
if (!player || !me->IsAlive() || spell->Id != 20804)
@@ -793,7 +797,7 @@ public:
}
}
- void UpdateAI(uint32 /*diff*/)
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
{
//lower HP on every world tick makes it a useful counter, not officlone though
if (me->IsAlive() && me->GetHealth() > 6)
@@ -813,7 +817,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_injured_patientAI(creature);
}
@@ -920,7 +924,7 @@ public:
uint32 RunAwayTimer;
- void Reset()
+ void Reset() OVERRIDE
{
CasterGUID = 0;
@@ -934,9 +938,9 @@ public:
me->SetHealth(me->CountPctFromMaxHealth(70));
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void SpellHit(Unit* caster, SpellInfo const* spell)
+ void SpellHit(Unit* caster, SpellInfo const* spell) OVERRIDE
{
if (spell->Id == SPELL_LESSER_HEAL_R2 || spell->Id == SPELL_FORTITUDE_R1)
{
@@ -1046,12 +1050,12 @@ public:
}
}
- void WaypointReached(uint32 /*waypointId*/)
+ void WaypointReached(uint32 /*waypointId*/) OVERRIDE
{
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (CanRun && !me->IsInCombat())
{
@@ -1093,7 +1097,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_garments_of_questsAI(creature);
}
@@ -1103,7 +1107,10 @@ public:
## npc_guardian
######*/
-#define SPELL_DEATHTOUCH 5
+enum GuardianSpells
+{
+ SPELL_DEATHTOUCH = 5
+};
class npc_guardian : public CreatureScript
{
@@ -1114,16 +1121,16 @@ public:
{
npc_guardianAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset()
+ void Reset() OVERRIDE
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
- void EnterCombat(Unit* /*who*/)
+ void EnterCombat(Unit* /*who*/) OVERRIDE
{
}
- void UpdateAI(uint32 /*diff*/)
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1136,7 +1143,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_guardianAI(creature);
}
@@ -1151,7 +1158,7 @@ class npc_mount_vendor : public CreatureScript
public:
npc_mount_vendor() : CreatureScript("npc_mount_vendor") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -1226,7 +1233,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
if (action == GOSSIP_ACTION_TRADE)
@@ -1249,7 +1256,7 @@ class npc_rogue_trainer : public CreatureScript
public:
npc_rogue_trainer() : CreatureScript("npc_rogue_trainer") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -1273,7 +1280,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -1321,17 +1328,20 @@ public:
## npc_sayge
######*/
-#define SPELL_DMG 23768 //dmg
-#define SPELL_RES 23769 //res
-#define SPELL_ARM 23767 //arm
-#define SPELL_SPI 23738 //spi
-#define SPELL_INT 23766 //int
-#define SPELL_STM 23737 //stm
-#define SPELL_STR 23735 //str
-#define SPELL_AGI 23736 //agi
-#define SPELL_FORTUNE 23765 //faire fortune
-
-#define GOSSIP_HELLO_SAYGE "Yes"
+enum Sayge
+{
+ SPELL_DMG = 23768, // dmg
+ SPELL_RES = 23769, // res
+ SPELL_ARM = 23767, // arm
+ SPELL_SPI = 23738, // spi
+ SPELL_INT = 23766, // int
+ SPELL_STM = 23737, // stm
+ SPELL_STR = 23735, // str
+ SPELL_AGI = 23736, // agi
+ SPELL_FORTUNE = 23765 // faire fortune
+};
+
+#define GOSSIP_HELLO_SAYGE "Yes"
#define GOSSIP_SENDACTION_SAYGE1 "Slay the Man"
#define GOSSIP_SENDACTION_SAYGE2 "Turn him over to liege"
#define GOSSIP_SENDACTION_SAYGE3 "Confiscate the corn"
@@ -1355,7 +1365,7 @@ class npc_sayge : public CreatureScript
public:
npc_sayge() : CreatureScript("npc_sayge") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -1424,7 +1434,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();
switch (sender)
@@ -1486,8 +1496,8 @@ public:
{
npc_steam_tonkAI(Creature* creature) : ScriptedAI(creature) {}
- void Reset() {}
- void EnterCombat(Unit* /*who*/) {}
+ void Reset() OVERRIDE {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
void OnPossess(bool apply)
{
@@ -1504,13 +1514,16 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_steam_tonkAI(creature);
}
};
-#define SPELL_TONK_MINE_DETONATE 25099
+enum TonkMine
+{
+ SPELL_TONK_MINE_DETONATE = 25099
+};
class npc_tonk_mine : public CreatureScript
{
@@ -1526,16 +1539,17 @@ public:
uint32 ExplosionTimer;
- void Reset()
+ void Reset() OVERRIDE
{
ExplosionTimer = 3000;
}
- 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 UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (ExplosionTimer <= diff)
{
@@ -1547,7 +1561,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_tonk_mineAI(creature);
}
@@ -1565,7 +1579,7 @@ public:
struct npc_brewfest_revelerAI : public ScriptedAI
{
npc_brewfest_revelerAI(Creature* creature) : ScriptedAI(creature) {}
- void ReceiveEmote(Player* player, uint32 emote)
+ void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
{
if (!IsHolidayActive(HOLIDAY_BREWFEST))
return;
@@ -1575,7 +1589,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_brewfest_revelerAI(creature);
}
@@ -1586,14 +1600,14 @@ public:
## npc_snake_trap_serpents
####*/
-#define SPELL_MIND_NUMBING_POISON 25810 //Viper
-#define SPELL_DEADLY_POISON 34655 //Venomous Snake
-#define SPELL_CRIPPLING_POISON 30981 //Viper
-
-#define VENOMOUS_SNAKE_TIMER 1500
-#define VIPER_TIMER 3000
+enum SnakeTrapSerpents
+{
+ SPELL_MIND_NUMBING_POISON = 25810, // Viper
+ SPELL_DEADLY_POISON = 34655, // Venomous Snake
+ SPELL_CRIPPLING_POISON = 30981, // Viper
-#define C_VIPER 19921
+ NPC_VIPER = 19921
+};
class npc_snake_trap : public CreatureScript
{
@@ -1607,15 +1621,15 @@ public:
uint32 SpellTimer;
bool IsViper;
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void Reset()
+ void Reset() OVERRIDE
{
SpellTimer = 0;
CreatureTemplate const* Info = me->GetCreatureTemplate();
- IsViper = Info->Entry == C_VIPER ? true : false;
+ IsViper = Info->Entry == NPC_VIPER ? true : false;
me->SetMaxHealth(uint32(107 * (me->getLevel() - 40) * 0.025f));
//Add delta to make them not all hit the same time
@@ -1631,7 +1645,8 @@ public:
}
//Redefined for random target selection:
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!me->GetVictim() && me->CanCreatureAttack(who))
{
@@ -1651,7 +1666,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1677,13 +1692,13 @@ public:
DoCastVictim(spell);
}
- SpellTimer = VIPER_TIMER;
+ SpellTimer = 3000;
}
else //Venomous Snake
{
if (urand(0, 2) == 0) //33% chance to cast
DoCastVictim(SPELL_DEADLY_POISON);
- SpellTimer = VENOMOUS_SNAKE_TIMER + (rand() % 5) * 100;
+ SpellTimer = 1500 + (rand() % 5) * 100;
}
}
else
@@ -1693,7 +1708,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_snake_trap_serpentsAI(creature);
}
@@ -1719,7 +1734,7 @@ public:
npc_mojoAI(Creature* creature) : ScriptedAI(creature) {Reset();}
uint32 hearts;
uint64 victimGUID;
- void Reset()
+ void Reset() OVERRIDE
{
victimGUID = 0;
hearts = 15000;
@@ -1727,9 +1742,9 @@ public:
me->GetMotionMaster()->MoveFollow(own, 0, 0);
}
- void EnterCombat(Unit* /*who*/){}
+ void EnterCombat(Unit* /*who*/)OVERRIDE {}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (me->HasAura(20372))
{
@@ -1741,7 +1756,7 @@ public:
}
}
- void ReceiveEmote(Player* player, uint32 emote)
+ void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
{
me->HandleEmoteCommand(emote);
Unit* owner = me->GetOwner();
@@ -1794,7 +1809,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_mojoAI(creature);
}
@@ -1809,7 +1824,7 @@ public:
{
npc_mirror_imageAI(Creature* creature) : CasterAI(creature) {}
- void InitializeAI()
+ void InitializeAI() OVERRIDE
{
CasterAI::InitializeAI();
Unit* owner = me->GetOwner();
@@ -1824,7 +1839,7 @@ public:
}
// Do not reload Creature templates on evade mode enter - prevent visual lost
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
if (me->IsInEvadeMode() || !me->IsAlive())
return;
@@ -1840,7 +1855,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_mirror_imageAI(creature);
}
@@ -1857,7 +1872,7 @@ public:
uint32 despawnTimer;
- void InitializeAI()
+ void InitializeAI() OVERRIDE
{
CasterAI::InitializeAI();
uint64 ownerGuid = me->GetOwnerGUID();
@@ -1878,7 +1893,7 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
// Stop Feeding Gargoyle when it dies
if (Unit* owner = me->GetOwner())
@@ -1886,7 +1901,7 @@ public:
}
// Fly away when dismissed
- void SpellHit(Unit* source, SpellInfo const* spell)
+ void SpellHit(Unit* source, SpellInfo const* spell) OVERRIDE
{
if (spell->Id != 50515 || !me->IsAlive())
return;
@@ -1917,7 +1932,7 @@ public:
despawnTimer = 4 * IN_MILLISECONDS;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (despawnTimer > 0)
{
@@ -1931,7 +1946,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_ebon_gargoyleAI(creature);
}
@@ -1949,7 +1964,7 @@ class npc_lightwell : public CreatureScript
DoCast(me, 59907, false);
}
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
if (!me->IsAlive())
return;
@@ -1960,13 +1975,13 @@ class npc_lightwell : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_lightwellAI(creature);
}
};
-enum eTrainingDummy
+enum TrainingDummy
{
NPC_ADVANCED_TARGET_DUMMY = 2674,
NPC_TARGET_DUMMY = 2673
@@ -1989,7 +2004,7 @@ public:
uint32 resetTimer;
uint32 despawnTimer;
- void Reset()
+ void Reset() OVERRIDE
{
me->SetControlled(true, UNIT_STATE_STUNNED);//disable rotate
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);//imune to knock aways like blast wave
@@ -1998,7 +2013,7 @@ public:
despawnTimer = 15000;
}
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
if (!_EnterEvadeMode())
return;
@@ -2006,13 +2021,13 @@ public:
Reset();
}
- void DamageTaken(Unit* /*doneBy*/, uint32& damage)
+ void DamageTaken(Unit* /*doneBy*/, uint32& damage) OVERRIDE
{
resetTimer = 5000;
damage = 0;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -2039,10 +2054,11 @@ public:
despawnTimer -= diff;
}
}
- void MoveInLineOfSight(Unit* /*who*/){return;}
+
+ void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_training_dummyAI(creature);
}
@@ -2063,7 +2079,7 @@ class npc_shadowfiend : public CreatureScript
{
npc_shadowfiendAI(Creature* creature) : PetAI(creature) {}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
if (me->IsSummon())
if (Unit* owner = me->ToTempSummon()->GetSummoner())
@@ -2072,7 +2088,7 @@ class npc_shadowfiend : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_shadowfiendAI(creature);
}
@@ -2081,9 +2097,13 @@ class npc_shadowfiend : public CreatureScript
/*######
# npc_fire_elemental
######*/
-#define SPELL_FIRENOVA 12470
-#define SPELL_FIRESHIELD 13376
-#define SPELL_FIREBLAST 57984
+
+enum FireElemental
+{
+ SPELL_FIRENOVA = 12470,
+ SPELL_FIRESHIELD = 13376,
+ SPELL_FIREBLAST = 57984
+};
class npc_fire_elemental : public CreatureScript
{
@@ -2098,7 +2118,7 @@ public:
uint32 FireShield_Timer;
uint32 FireBlast_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
FireNova_Timer = 5000 + rand() % 15000; // 5-20 sec cd
FireBlast_Timer = 5000 + rand() % 15000; // 5-20 sec cd
@@ -2106,7 +2126,7 @@ public:
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -2142,7 +2162,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fire_elementalAI(creature);
}
@@ -2151,7 +2171,11 @@ public:
/*######
# npc_earth_elemental
######*/
-#define SPELL_ANGEREDEARTH 36213
+
+enum EarthElemental
+{
+ SPELL_ANGEREDEARTH = 36213
+};
class npc_earth_elemental : public CreatureScript
{
@@ -2164,13 +2188,13 @@ public:
uint32 AngeredEarth_Timer;
- void Reset()
+ void Reset() OVERRIDE
{
AngeredEarth_Timer = 0;
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -2187,7 +2211,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_earth_elementalAI(creature);
}
@@ -2227,12 +2251,12 @@ class npc_wormhole : public CreatureScript
{
npc_wormholeAI(Creature* creature) : PassiveAI(creature) {}
- void InitializeAI()
+ void InitializeAI() OVERRIDE
{
_showUnderground = urand(0, 100) == 0; // Guessed value, it is really rare though
}
- uint32 GetData(uint32 type) const
+ uint32 GetData(uint32 type) const OVERRIDE
{
return (type == DATA_SHOW_UNDERGROUND && _showUnderground) ? 1 : 0;
}
@@ -2241,7 +2265,7 @@ class npc_wormhole : public CreatureScript
bool _showUnderground;
};
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsSummon())
{
@@ -2263,7 +2287,7 @@ class npc_wormhole : public CreatureScript
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
@@ -2298,7 +2322,7 @@ class npc_wormhole : public CreatureScript
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_wormholeAI(creature);
}
@@ -2308,7 +2332,7 @@ class npc_wormhole : public CreatureScript
## npc_pet_trainer
######*/
-enum ePetTrainer
+enum PetTrainer
{
TEXT_ISHUNTER = 5838,
TEXT_NOTHUNTER = 5839,
@@ -2325,7 +2349,7 @@ class npc_pet_trainer : public CreatureScript
public:
npc_pet_trainer() : CreatureScript("npc_pet_trainer") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
@@ -2343,7 +2367,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -2372,7 +2396,7 @@ public:
## npc_locksmith
######*/
-enum eLockSmith
+enum LockSmith
{
QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ = 10704,
QUEST_DARK_IRON_LEGACY = 3802,
@@ -2420,7 +2444,7 @@ class npc_locksmith : public CreatureScript
public:
npc_locksmith() : CreatureScript("npc_locksmith") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
// Arcatraz Key
if (player->GetQuestRewardStatus(QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ) && !player->HasItemCount(ITEM_ARCATRAZ_KEY, 1, true))
@@ -2465,7 +2489,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
switch (action)
@@ -2525,7 +2549,7 @@ class npc_experience : public CreatureScript
public:
npc_experience() : CreatureScript("npc_experience") { }
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_XP_OFF, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_XP_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
@@ -2533,7 +2557,7 @@ public:
return true;
}
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action)
+ bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) OVERRIDE
{
player->PlayerTalkClass->ClearMenus();
bool noXPGain = player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN);
@@ -2802,7 +2826,7 @@ public:
return 0;
}
- void Reset()
+ void Reset() OVERRIDE
{
if (GameObject* launcher = FindNearestLauncher())
{
@@ -2847,7 +2871,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fireworkAI(creature);
}
@@ -2872,7 +2896,7 @@ class npc_spring_rabbit : public CreatureScript
public:
npc_spring_rabbit() : CreatureScript("npc_spring_rabbit") { }
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_spring_rabbitAI(creature);
}
@@ -2887,7 +2911,7 @@ public:
uint32 searchTimer;
uint64 rabbitGUID;
- void Reset()
+ void Reset() OVERRIDE
{
inLove = false;
rabbitGUID = 0;
@@ -2898,16 +2922,16 @@ public:
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
}
- void EnterCombat(Unit* /*who*/) { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void DoAction(int32 /*param*/)
+ void DoAction(int32 /*param*/) OVERRIDE
{
inLove = true;
if (Unit* owner = me->GetOwner())
owner->CastSpell(owner, SPELL_SPRING_FLING, true);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (inLove)
{