aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2013-07-06 20:21:45 +0100
committerNay <dnpd.dd@gmail.com>2013-07-06 20:21:45 +0100
commit3561ab98bae1dc111530223aaf25f58bb3267677 (patch)
tree93cd9c541564b8469f617871dd51407609f3dee7 /src/server/scripts/World
parent0c911af24c263c4e931c7264242c9755074d270d (diff)
Misc: Use override and final C++11 keywords in a few places (mostly scripts)
OVERRIDE and FINAL are TC macros (expand to nothing if compiler does not support C++11)
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.cpp20
-rw-r--r--src/server/scripts/World/boss_emerald_dragons.cpp78
-rw-r--r--src/server/scripts/World/go_scripts.cpp88
-rw-r--r--src/server/scripts/World/guards.cpp22
-rw-r--r--src/server/scripts/World/item_scripts.cpp22
-rw-r--r--src/server/scripts/World/mob_generic_creature.cpp16
-rw-r--r--src/server/scripts/World/npc_innkeeper.cpp4
-rw-r--r--src/server/scripts/World/npc_professions.cpp20
-rw-r--r--src/server/scripts/World/npc_taxi.cpp4
-rw-r--r--src/server/scripts/World/npcs_special.cpp216
11 files changed, 262 insertions, 258 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 388a4fbfcf2..1b43ee30cd1 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -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)
@@ -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())
{
@@ -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);
@@ -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)
{
@@ -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 ||
@@ -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 57846aba9ff..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);
@@ -406,7 +406,7 @@ 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);
@@ -434,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;
@@ -477,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);
@@ -506,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;
@@ -526,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;
@@ -556,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*/
@@ -569,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)
@@ -615,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*/
@@ -628,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)
@@ -679,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())
{
@@ -732,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))
@@ -760,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)
{
@@ -787,7 +787,7 @@ 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);
@@ -818,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);
@@ -868,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);
@@ -894,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;
@@ -920,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;
@@ -1000,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)
@@ -1030,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);
}
@@ -1055,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)
@@ -1103,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)
@@ -1144,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)
@@ -1158,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)
@@ -1200,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);
@@ -1214,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;
@@ -1238,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) ||
@@ -1266,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) ||
@@ -1301,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)
@@ -1338,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))
@@ -1365,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 b4bc9720e74..7b6cb90f6c9 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -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
@@ -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)
@@ -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;
@@ -334,7 +334,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;
@@ -370,7 +370,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)
{
@@ -397,7 +397,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 358bf997508..9c92dd0d27e 100644
--- a/src/server/scripts/World/npc_innkeeper.cpp
+++ b/src/server/scripts/World/npc_innkeeper.cpp
@@ -49,7 +49,7 @@ 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 (IsHolidayActive(HOLIDAY_HALLOWS_END) && !player->HasAura(SPELL_TRICK_OR_TREATED))
{
@@ -86,7 +86,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 && IsHolidayActive(HOLIDAY_HALLOWS_END) && !player->HasAura(SPELL_TRICK_OR_TREATED))
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index 4180005ff3d..fb36dbefa1f 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)
@@ -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 bf3f0fe3a8c..77bfb2956e8 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -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();
@@ -431,7 +432,7 @@ public:
bool Active;
uint32 CanIteract;
- void Reset()
+ void Reset() OVERRIDE
{
Active = true;
CanIteract = 3500;
@@ -447,7 +448,7 @@ public:
me->SendMessageToSet(&data, true);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!Active)
{
@@ -462,9 +463,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))
{
@@ -497,7 +498,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_dancing_flamesAI(creature);
}
@@ -591,7 +592,7 @@ public:
std::list<uint64> Patients;
std::vector<Location*> Coordinates;
- void Reset()
+ void Reset() OVERRIDE
{
PlayerGUID = 0;
@@ -692,12 +693,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);
@@ -705,7 +706,7 @@ public:
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_doctorAI(creature);
}
@@ -727,7 +728,7 @@ public:
uint64 DoctorGUID;
Location* Coord;
- void Reset()
+ void Reset() OVERRIDE
{
DoctorGUID = 0;
Coord = NULL;
@@ -760,9 +761,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)
@@ -802,7 +803,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)
@@ -822,7 +823,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_injured_patientAI(creature);
}
@@ -929,7 +930,7 @@ public:
uint32 RunAwayTimer;
- void Reset()
+ void Reset() OVERRIDE
{
CasterGUID = 0;
@@ -943,9 +944,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)
{
@@ -1055,12 +1056,12 @@ public:
}
}
- void WaypointReached(uint32 /*waypointId*/)
+ void WaypointReached(uint32 /*waypointId*/) OVERRIDE
{
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (CanRun && !me->IsInCombat())
{
@@ -1102,7 +1103,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_garments_of_questsAI(creature);
}
@@ -1126,16 +1127,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;
@@ -1148,7 +1149,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_guardianAI(creature);
}
@@ -1163,7 +1164,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());
@@ -1238,7 +1239,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)
@@ -1261,7 +1262,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());
@@ -1285,7 +1286,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)
@@ -1370,7 +1371,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());
@@ -1439,7 +1440,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)
@@ -1501,8 +1502,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)
{
@@ -1519,7 +1520,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_steam_tonkAI(creature);
}
@@ -1544,16 +1545,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)
{
@@ -1565,7 +1567,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_tonk_mineAI(creature);
}
@@ -1583,7 +1585,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;
@@ -1593,7 +1595,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_brewfest_revelerAI(creature);
}
@@ -1625,9 +1627,9 @@ public:
uint32 SpellTimer;
bool IsViper;
- void EnterCombat(Unit* /*who*/) {}
+ void EnterCombat(Unit* /*who*/) OVERRIDE {}
- void Reset()
+ void Reset() OVERRIDE
{
SpellTimer = 0;
@@ -1649,7 +1651,8 @@ public:
}
//Redefined for random target selection:
- void MoveInLineOfSight(Unit* who)
+ void MoveInLineOfSight(Unit* who) OVERRIDE
+
{
if (!me->GetVictim() && me->CanCreatureAttack(who))
{
@@ -1669,7 +1672,7 @@ public:
}
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -1711,7 +1714,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_snake_trap_serpentsAI(creature);
}
@@ -1737,7 +1740,7 @@ public:
npc_mojoAI(Creature* creature) : ScriptedAI(creature) {Reset();}
uint32 hearts;
uint64 victimGUID;
- void Reset()
+ void Reset() OVERRIDE
{
victimGUID = 0;
hearts = 15000;
@@ -1745,9 +1748,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))
{
@@ -1759,7 +1762,7 @@ public:
}
}
- void ReceiveEmote(Player* player, uint32 emote)
+ void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
{
me->HandleEmoteCommand(emote);
Unit* owner = me->GetOwner();
@@ -1812,7 +1815,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_mojoAI(creature);
}
@@ -1827,7 +1830,7 @@ public:
{
npc_mirror_imageAI(Creature* creature) : CasterAI(creature) {}
- void InitializeAI()
+ void InitializeAI() OVERRIDE
{
CasterAI::InitializeAI();
Unit* owner = me->GetOwner();
@@ -1842,7 +1845,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;
@@ -1858,7 +1861,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_mirror_imageAI(creature);
}
@@ -1875,7 +1878,7 @@ public:
uint32 despawnTimer;
- void InitializeAI()
+ void InitializeAI() OVERRIDE
{
CasterAI::InitializeAI();
uint64 ownerGuid = me->GetOwnerGUID();
@@ -1896,7 +1899,7 @@ public:
}
}
- void JustDied(Unit* /*killer*/)
+ void JustDied(Unit* /*killer*/) OVERRIDE
{
// Stop Feeding Gargoyle when it dies
if (Unit* owner = me->GetOwner())
@@ -1904,7 +1907,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;
@@ -1935,7 +1938,7 @@ public:
despawnTimer = 4 * IN_MILLISECONDS;
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (despawnTimer > 0)
{
@@ -1949,7 +1952,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_ebon_gargoyleAI(creature);
}
@@ -1967,7 +1970,7 @@ class npc_lightwell : public CreatureScript
DoCast(me, 59907, false);
}
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
if (!me->IsAlive())
return;
@@ -1978,7 +1981,7 @@ class npc_lightwell : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_lightwellAI(creature);
}
@@ -2007,7 +2010,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
@@ -2016,7 +2019,7 @@ public:
despawnTimer = 15000;
}
- void EnterEvadeMode()
+ void EnterEvadeMode() OVERRIDE
{
if (!_EnterEvadeMode())
return;
@@ -2024,13 +2027,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;
@@ -2057,10 +2060,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);
}
@@ -2081,7 +2085,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())
@@ -2090,7 +2094,7 @@ class npc_shadowfiend : public CreatureScript
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_shadowfiendAI(creature);
}
@@ -2120,7 +2124,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
@@ -2128,7 +2132,7 @@ public:
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
}
- void UpdateAI(uint32 diff)
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
@@ -2164,7 +2168,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fire_elementalAI(creature);
}
@@ -2190,13 +2194,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;
@@ -2213,7 +2217,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_earth_elementalAI(creature);
}
@@ -2253,12 +2257,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;
}
@@ -2267,7 +2271,7 @@ class npc_wormhole : public CreatureScript
bool _showUnderground;
};
- bool OnGossipHello(Player* player, Creature* creature)
+ bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
{
if (creature->IsSummon())
{
@@ -2289,7 +2293,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();
@@ -2324,7 +2328,7 @@ class npc_wormhole : public CreatureScript
return true;
}
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_wormholeAI(creature);
}
@@ -2351,7 +2355,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());
@@ -2369,7 +2373,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)
@@ -2446,7 +2450,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))
@@ -2491,7 +2495,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)
@@ -2551,7 +2555,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);
@@ -2559,7 +2563,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);
@@ -2828,7 +2832,7 @@ public:
return 0;
}
- void Reset()
+ void Reset() OVERRIDE
{
if (GameObject* launcher = FindNearestLauncher())
{
@@ -2873,7 +2877,7 @@ public:
}
};
- CreatureAI* GetAI(Creature* creature) const
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_fireworkAI(creature);
}
@@ -2898,7 +2902,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);
}
@@ -2913,7 +2917,7 @@ public:
uint32 searchTimer;
uint64 rabbitGUID;
- void Reset()
+ void Reset() OVERRIDE
{
inLove = false;
rabbitGUID = 0;
@@ -2924,16 +2928,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)
{