diff --git a/src/game/AI/EventAI/CreatureEventAI.h b/src/game/AI/EventAI/CreatureEventAI.h index a039fbc4d2..07da316dd0 100644 --- a/src/game/AI/EventAI/CreatureEventAI.h +++ b/src/game/AI/EventAI/CreatureEventAI.h @@ -877,7 +877,7 @@ class CreatureEventAI : public CreatureAI void SpellHit(Unit* unit, const SpellEntry* spellInfo) override; void SpellHitTarget(Unit* target, const SpellEntry* spell) override; void DamageTaken(Unit* dealer, uint32& damage, DamageEffectType damagetype, SpellEntry const* spellInfo) override; - void JustPreventedDeath(Unit* attacker); + void JustPreventedDeath(Unit* attacker) override; void HealedBy(Unit* healer, uint32& healedAmount) override; void ReceiveEmote(Player* player, uint32 textEmote) override; void SummonedCreatureJustDied(Creature* summoned) override; diff --git a/src/game/AI/ScriptDevAI/base/CombatAI.h b/src/game/AI/ScriptDevAI/base/CombatAI.h index 0ef4085094..aff8d1cb5c 100644 --- a/src/game/AI/ScriptDevAI/base/CombatAI.h +++ b/src/game/AI/ScriptDevAI/base/CombatAI.h @@ -32,7 +32,7 @@ class CombatAI : public ScriptedAI void HandleDelayedInstantAnimation(SpellEntry const* spellInfo) override; void HandleTargetRestoration(); - bool IsTargetingRestricted(); + bool IsTargetingRestricted() override; void StopTargeting(bool state) { m_stopTargeting = state; } void OnTaunt() override; diff --git a/src/game/AI/ScriptDevAI/base/TimerAI.h b/src/game/AI/ScriptDevAI/base/TimerAI.h index 08f08b4655..6ad964b7ae 100644 --- a/src/game/AI/ScriptDevAI/base/TimerAI.h +++ b/src/game/AI/ScriptDevAI/base/TimerAI.h @@ -138,23 +138,23 @@ class CombatActions : public TimerManager void AddTimerlessCombatAction(uint32 id, bool byDefault); virtual void ResetTimer(uint32 index, uint32 timer) override; - virtual void ResetTimer(uint32 index, std::chrono::milliseconds timer) + virtual void ResetTimer(uint32 index, std::chrono::milliseconds timer) override { ResetTimer(index, timer.count()); } virtual void DisableTimer(uint32 index) override; virtual void ReduceTimer(uint32 index, uint32 timer) override; - virtual void ReduceTimer(uint32 index, std::chrono::milliseconds timer) + virtual void ReduceTimer(uint32 index, std::chrono::milliseconds timer) override { ReduceTimer(index, timer.count()); } virtual void DelayTimer(uint32 index, uint32 timer) override; - virtual void DelayTimer(uint32 index, std::chrono::milliseconds timer) + virtual void DelayTimer(uint32 index, std::chrono::milliseconds timer) override { DelayTimer(index, timer.count()); } virtual void ResetIfNotStarted(uint32 index, uint32 timer) override; - virtual void ResetIfNotStarted(uint32 index, std::chrono::milliseconds timer) + virtual void ResetIfNotStarted(uint32 index, std::chrono::milliseconds timer) override { ResetIfNotStarted(index, timer.count()); } diff --git a/src/game/AI/ScriptDevAI/base/pet_ai.h b/src/game/AI/ScriptDevAI/base/pet_ai.h index b6c70e3556..730874bc14 100644 --- a/src/game/AI/ScriptDevAI/base/pet_ai.h +++ b/src/game/AI/ScriptDevAI/base/pet_ai.h @@ -24,7 +24,7 @@ class ScriptedPetAI : public CreatureAI void CombatStop() override; - virtual void Reset() {} + virtual void Reset() override {} virtual void UpdatePetAI(const uint32 diff); // while in combat diff --git a/src/game/AI/ScriptDevAI/scripts/battlegrounds/battlegrounds.cpp b/src/game/AI/ScriptDevAI/scripts/battlegrounds/battlegrounds.cpp index e2ff75ec9f..4119039002 100644 --- a/src/game/AI/ScriptDevAI/scripts/battlegrounds/battlegrounds.cpp +++ b/src/game/AI/ScriptDevAI/scripts/battlegrounds/battlegrounds.cpp @@ -152,7 +152,7 @@ struct FlagAuraBg : public AuraScript, public SpellScript return SPELL_AURA_PROC_OK; } - void OnApply(Aura* aura, bool apply) const + void OnApply(Aura* aura, bool apply) const override { Unit* unitTarget = aura->GetTarget(); if (!unitTarget || !unitTarget->IsPlayer()) diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/boss_kazzak.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/boss_kazzak.cpp index d092703aaf..465c7ba6b1 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/boss_kazzak.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/boss_kazzak.cpp @@ -155,7 +155,7 @@ struct boss_kazzakAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void ExecuteActions() + void ExecuteActions() override { if (!CanExecuteCombatAction()) return; diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 04945ac3ac..55e160f4b4 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -666,7 +666,7 @@ struct npc_kernobeeAI : public FollowerAI } } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 uiDiff) override { FollowerAI::UpdateFollowerAI(uiDiff); // Do combat handling diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/karazhanScripts.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/karazhanScripts.cpp index daf30c5c0c..2d183de8d8 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/karazhanScripts.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/karazhan/karazhanScripts.cpp @@ -175,7 +175,7 @@ struct npc_barnesAI : public npc_escortAI, private DialogueHelper } } - void UpdateEscortAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); } + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); } }; UnitAI* GetAI_npc_barnesAI(Creature* pCreature) @@ -442,7 +442,7 @@ struct npc_image_of_medivhAI : public ScriptedAI, private DialogueHelper void SetEventStarter(ObjectGuid m_starterGuid) { m_eventStarterGuid = m_starterGuid; } - void UpdateAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); } + void UpdateAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); } }; UnitAI* GetAI_npc_image_of_medivhAI(Creature* pCreature) diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 4f515741bf..0623b53101 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -75,7 +75,7 @@ struct boss_baron_geddonAI : public CombatAI m_instance->SetData(TYPE_GEDDON, NOT_STARTED); } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { switch (action) { diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/naxxramas/boss_thaddius.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/naxxramas/boss_thaddius.cpp index f7f8b39fba..33e1865ecb 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/naxxramas/boss_thaddius.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/naxxramas/boss_thaddius.cpp @@ -518,7 +518,7 @@ struct boss_stalaggAI : public boss_thaddiusAddsAI DoScriptText(SAY_STAL_SLAY, m_creature); } - void UpdateAddAI(const uint32 diff) + void UpdateAddAI(const uint32 diff) override { if (m_powerSurgeTimer < diff) { @@ -572,7 +572,7 @@ struct boss_feugenAI : public boss_thaddiusAddsAI DoScriptText(SAY_FEUG_SLAY, m_creature); } - void UpdateAddAI(const uint32 diff) + void UpdateAddAI(const uint32 diff) override { if (m_magneticPullTimer < diff) { diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/scholomance/scholomance.h b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/scholomance/scholomance.h index 3dd2db4e72..0e4a8317ef 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -139,7 +139,7 @@ class instance_scholomance : public ScriptedInstance void Initialize() override; void OnCreatureEnterCombat(Creature* pCreature) override; - void OnCreatureEvade(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void OnCreatureCreate(Creature* pCreature) override; diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp index 8255a7a42f..c01fb8cc4b 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp @@ -399,7 +399,7 @@ struct npc_squire_roweAI : public npc_escortAI, private DialogueHelper // Check if the event is already running bool IsStormwindQuestActive() const { return m_isEventInProgress; } - void UpdateEscortAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); } + void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); } }; UnitAI* GetAI_npc_squire_rowe(Creature* creature) diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/stratholme.h b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/stratholme.h index 3afd2072ef..681f227037 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -249,7 +249,7 @@ class instance_stratholme : public ScriptedInstance bool CheckConditionCriteriaMeet(Player const* player, uint32 instanceConditionId, WorldObject const* conditionSource, uint32 conditionSourceType) const override; void OnCreatureEnterCombat(Creature* creature) override; - void OnCreatureEvade(Creature* creature); + void OnCreatureEvade(Creature* creature) override; void OnCreatureDeath(Creature* creature) override; void OnCreatureRespawn(Creature* creature) override; diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 90951d740e..3417942778 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -121,7 +121,7 @@ class instance_sunken_temple : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void OnCreatureCreate(Creature* pCreature) override; - void OnCreatureEvade(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp index 109c85597e..a837ea7e04 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp @@ -545,7 +545,7 @@ struct npc_demonic_vaporAI : public CombatAI }); } - void JustRespawned() + void JustRespawned() override { CombatAI::JustRespawned(); m_creature->CastSpell(nullptr, SPELL_DEMONIC_VAPOR_PER, TRIGGERED_OLD_TRIGGERED); diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index 588362bee6..b038d18cb3 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -164,7 +164,7 @@ class instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper void OnCreatureEnterCombat(Creature* creature) override; void OnCreatureDeath(Creature* pCreature) override; void OnCreatureEvade(Creature* pCreature) override; - void OnPlayerDeath(Player* player); + void OnPlayerDeath(Player* player) override; void SetData(uint32 uiType, uint32 uiData) override; uint32 GetData(uint32 uiType) const override; diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateauScripts.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateauScripts.cpp index 2c58517e11..5fb3219d07 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateauScripts.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateauScripts.cpp @@ -86,7 +86,7 @@ struct npc_sunblade_scoutAI : public CombatAI m_creature->SetInCombatWithZone(); // maybe callforhelp instead of linking } - void MovementInform(uint32 uiType, uint32 uiPointId) + void MovementInform(uint32 uiType, uint32 uiPointId) override { if (uiType != POINT_MOTION_TYPE || !uiPointId) return; @@ -101,7 +101,7 @@ struct npc_sunblade_scoutAI : public CombatAI } } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { switch (action) { @@ -201,7 +201,7 @@ struct npc_sunblade_protectorAI : public CombatAI DoScriptText(SAY_PROTECTOR_REACHED_HOME, m_creature); } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { switch (action) { diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 9dd7825135..2c32ff3f42 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -263,7 +263,7 @@ struct mob_ohganAI : public CombatAI } } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { if (action == 0) { diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 316d54f536..0180cee06d 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -97,7 +97,7 @@ struct boss_thekalBaseAI : public CombatAI virtual void OnFakeingDeath() {} virtual bool OnRevive() { return false; } - void JustPreventedDeath(Unit* /*attacker*/) + void JustPreventedDeath(Unit* /*attacker*/) override { m_creature->InterruptNonMeleeSpells(true); m_creature->StopMoving(); @@ -303,7 +303,7 @@ struct boss_thekalAI : public boss_thekalBaseAI zath->AI()->EnterEvadeMode(); } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { if (action == THEKAL_TIGER_ENRAGE) { diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/azshara.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/azshara.cpp index 9efeba3de9..52275985b3 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/azshara.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/azshara.cpp @@ -502,7 +502,7 @@ struct npc_felhound_trackerAI : public ScriptedPetAI m_uiWaitTimer = 20000; } - void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override { // Only react if player is on the quest if (pPlayer->GetQuestStatus(QUEST_AZSHARITE) != QUEST_STATUS_INCOMPLETE) @@ -703,7 +703,7 @@ struct boss_mawsAI : public ScriptedAI DoCastSpellIfCan(nullptr, SPELL_THRASH, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } - void JustDied(Unit* /*pKiller*/) + void JustDied(Unit* /*pKiller*/) override { // Despawn visual lightning GO if (GameObject* lightning = GetClosestGameObjectWithEntry(m_creature, GO_THEATRIC_LIGHTNING, 200.0f)) diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 51d6ca4b86..96112b4f2b 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -130,7 +130,7 @@ class instance_dark_portal : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void OnCreatureEnterCombat(Creature* pCreature) override; - void OnCreatureEvade(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp index 41b931c5c2..be10cac5c0 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/boss_anetheron.cpp @@ -110,7 +110,7 @@ struct boss_anetheronAI : public CombatAI DoScriptText(SAY_ENTER, m_creature); } - void Aggro(Unit* /*who*/) + void Aggro(Unit* /*who*/) override { DoCastSpellIfCan(m_creature, SPELL_VAMPIRIC_AURA, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT); } diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index 4e43776002..18b9b19d9e 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -1129,7 +1129,7 @@ void instance_mount_hyjal::OnCreatureDeath(Creature* creature) if (creature->IsTemporarySummon()) // only for non-static spawns { int32 enemyCount = 0; - if (enemyCount = instance->GetVariableManager().GetVariable(WORLD_STATE_MOUNT_HYJAL_ENEMYCOUNT)) + if ((enemyCount = instance->GetVariableManager().GetVariable(WORLD_STATE_MOUNT_HYJAL_ENEMYCOUNT))) { m_waveSpawns.erase(std::remove(m_waveSpawns.begin(), m_waveSpawns.end(), creature->GetObjectGuid()), m_waveSpawns.end()); instance->GetVariableManager().SetVariable(WORLD_STATE_MOUNT_HYJAL_ENEMYCOUNT, enemyCount - 1); diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjalScripts.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjalScripts.cpp index af3b8ec333..2589b49406 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjalScripts.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/hyjal/hyjalScripts.cpp @@ -141,7 +141,7 @@ struct npc_thrallAI : public hyjalAI GuidVector m_feralSpirits; - void JustSummoned(Creature* creature) + void JustSummoned(Creature* creature) override { if (creature->GetEntry() == NPC_FERAL_SPIRIT) m_feralSpirits.push_back(creature->GetObjectGuid()); diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index 18943f4d3a..2cb301f0f3 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -77,7 +77,7 @@ class instance_old_hillsbrad : public ScriptedInstance void OnObjectCreate(GameObject* pGo) override; void OnCreatureEnterCombat(Creature* pCreature) override; - void OnCreatureEvade(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void SetData(uint32 uiType, uint32 uiData) override; diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/desolace.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/desolace.cpp index cab877c275..e417d78d11 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/desolace.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/desolace.cpp @@ -546,7 +546,7 @@ struct npc_cork_gizeltonAI : public npc_escortAI } - void CreatureGroupMemberDied(Unit* /*killed*/) + void CreatureGroupMemberDied(Unit* /*killed*/) override { StatusFailed = true; } diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/dustwallow_marsh.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/dustwallow_marsh.cpp index 4cc3420f20..2912ceabc1 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/dustwallow_marsh.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/dustwallow_marsh.cpp @@ -883,7 +883,7 @@ struct npc_stinky_ignatzAI : public npc_escortAI } } - void WaypointStart(uint32 uiPointId) + void WaypointStart(uint32 uiPointId) override { if (uiPointId == 31) { diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/feralas.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/feralas.cpp index a1b5cbec31..f6f9563938 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/feralas.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/feralas.cpp @@ -252,7 +252,7 @@ struct npc_shay_leafrunnerAI : public FollowerAI } } - void UpdateFollowerAI(const uint32 uiDiff) + void UpdateFollowerAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) { diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index 2a1b85ff77..45c0ef3faa 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -279,7 +279,7 @@ struct npc_buru_eggAI : public Scripted_NoMovementAI } } - void SpellHit(Unit* /*caster*/, const SpellEntry* spellInfo) + void SpellHit(Unit* /*caster*/, const SpellEntry* spellInfo) override { if (spellInfo->Id == SPELL_BURU_TRANSFORM) { diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/src/game/AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 4f13eedc47..cd3706f8a7 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -112,7 +112,7 @@ class instance_ruins_of_ahnqiraj : public ScriptedInstance void OnPlayerEnter(Player* pPlayer) override; void OnCreatureEnterCombat(Creature* pCreature) override; - void OnCreatureEvade(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void OnCreatureRespawn(Creature* creature) override; diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/stonetalon_mountains.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/stonetalon_mountains.cpp index 7c0dde6b03..b552334928 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/stonetalon_mountains.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/stonetalon_mountains.cpp @@ -160,7 +160,7 @@ struct go_covertopsAI : public GameObjectAI Reset(); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { switch (m_phase) { diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 09a023d338..59880051df 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -111,7 +111,7 @@ struct boss_silithidRoyaltyAI : public CombatAI } // Handle damage to trigger consume when the two bosses that are killed first - void JustPreventedDeath(Unit* /*attacker*/) + void JustPreventedDeath(Unit* /*attacker*/) override { if (!m_instance) return; @@ -149,7 +149,7 @@ struct boss_silithidRoyaltyAI : public CombatAI DoCastSpellIfCan(nullptr, m_deathAbility); } - void MovementInform(uint32 motionType, uint32 pointId) + void MovementInform(uint32 motionType, uint32 pointId) override { if (motionType != POINT_MOTION_TYPE) return; diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index aeb2feee72..d2c55e302b 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -360,7 +360,7 @@ struct InitializeImage : public SpellScript } } - bool OnCheckTarget(const Spell* /*spell*/, Unit* target, SpellEffectIndex /*eff*/) const + bool OnCheckTarget(const Spell* /*spell*/, Unit* target, SpellEffectIndex /*eff*/) const override { if (target->GetSpawnerGuid()) // only original spawn can be hit by this return false; diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index c9166fe4fa..e194c033eb 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -235,12 +235,12 @@ struct boss_veknilashAI : public boss_twin_emperorsAI DoScriptText(SAY_VEKNILASH_DEATH, m_creature); } - bool DoHandleBugAbility() + bool DoHandleBugAbility() override { return DoCastSpellIfCan(nullptr, SPELL_MUTATE_BUG) == CAST_OK; } - bool DoHandleBerserk() + bool DoHandleBerserk() override { return DoCastSpellIfCan(nullptr, SPELL_BERSERK) == CAST_OK; } @@ -358,7 +358,7 @@ struct boss_veklorAI : public boss_twin_emperorsAI return DoCastSpellIfCan(nullptr, SPELL_EXPLODE_BUG) == CAST_OK; } - bool DoHandleBerserk() + bool DoHandleBerserk() override { return DoCastSpellIfCan(nullptr, SPELL_FRENZY) == CAST_OK; } diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/world_kalimdor.cpp b/src/game/AI/ScriptDevAI/scripts/kalimdor/world_kalimdor.cpp index 5c435f7867..6acb5e6461 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/world_kalimdor.cpp +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/world_kalimdor.cpp @@ -355,7 +355,7 @@ struct world_map_kalimdor : public ScriptedMap m_brewfestEvent.Update(diff); } - void SetData(uint32 uiType, uint32 uiData) + void SetData(uint32 uiType, uint32 uiData) override { switch (uiType) { diff --git a/src/game/AI/ScriptDevAI/scripts/kalimdor/zulfarrak/zulfarrak.h b/src/game/AI/ScriptDevAI/scripts/kalimdor/zulfarrak/zulfarrak.h index 7840a1fcf2..f2e1377b41 100644 --- a/src/game/AI/ScriptDevAI/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/src/game/AI/ScriptDevAI/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -53,7 +53,7 @@ class instance_zulfarrak : public ScriptedInstance void Initialize() override; void OnCreatureEnterCombat(Creature* pCreature) override; - void OnCreatureEvade(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature) override; void OnCreatureDeath(Creature* pCreature) override; void OnCreatureCreate(Creature* pCreature) override; diff --git a/src/game/AI/ScriptDevAI/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/src/game/AI/ScriptDevAI/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index 5d919fd8d7..1ebfa49dbd 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -157,7 +157,7 @@ struct boss_talon_king_ikissAI : public CombatAI DoResetThreat(); } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { switch (action) { diff --git a/src/game/AI/ScriptDevAI/scripts/outland/bashir_landing.cpp b/src/game/AI/ScriptDevAI/scripts/outland/bashir_landing.cpp index f9613f9430..42461a3a75 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/bashir_landing.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/bashir_landing.cpp @@ -231,7 +231,7 @@ struct npc_skyguard_rangerAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim()) return; diff --git a/src/game/AI/ScriptDevAI/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/src/game/AI/ScriptDevAI/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 3a287fa9fc..7d7375c536 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -479,7 +479,7 @@ struct boss_essence_of_desireAI : public essence_base_AI ScriptedAI::DamageTaken(dealer, damage, damagetype, spellInfo); } - void OnSpellInterrupt(SpellEntry const* spellInfo) + void OnSpellInterrupt(SpellEntry const* spellInfo) override { if (spellInfo->Id == SPELL_SPIRIT_SHOCK) ResetCombatAction(DESIRE_ACTION_SPIRIT_SHOCK, 5000); diff --git a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index 349d1d9b7b..3e0cfbd640 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -234,7 +234,7 @@ struct boss_ahuneAI : public CombatAI ++m_uiPhaseChangeCount; } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { switch (action) { diff --git a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/slave_pens.h b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/slave_pens.h index d4837c1bca..02f4b84156 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/slave_pens.h +++ b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/slave_pens/slave_pens.h @@ -18,7 +18,7 @@ class instance_slave_pens : public ScriptedInstance { public: instance_slave_pens(Map* map); - void Initialize(); + void Initialize() override; void SetData(uint32 type, uint32 data) override; uint32 GetData(uint32 type) const override; diff --git a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 8236e59615..6036d80d26 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -125,7 +125,7 @@ struct boss_warlord_kalithreshAI : public CombatAI ScriptedAI::MoveInLineOfSight(who); } - void MovementInform(uint32 type, uint32 pointId) + void MovementInform(uint32 type, uint32 pointId) override { if (type != POINT_MOTION_TYPE || !pointId) return; diff --git a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/boss_swamplord_muselek.cpp b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/boss_swamplord_muselek.cpp index 5e74c10e18..ba440a351a 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/boss_swamplord_muselek.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/boss_swamplord_muselek.cpp @@ -195,7 +195,7 @@ struct boss_swamplord_muselekAI : public CombatAI claw->getThreatManager().modifyThreatPercent(target, (0 - urand(30, 99))); // Freezing trap messes with bear aggro } - void Aggro(Unit* /*who*/) + void Aggro(Unit* /*who*/) override { uint8 yell = urand(0, 2); switch (yell) diff --git a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/underbog.h b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/underbog.h index 3297c61b8d..6f4bdd62bf 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/underbog.h +++ b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/underbog/underbog.h @@ -24,7 +24,7 @@ class instance_underbog : public ScriptedInstance { public: instance_underbog(Map* map); - void Initialize(); + void Initialize() override; void SetData(uint32 type, uint32 data) override; uint32 GetData(uint32 type) const override; diff --git a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 6a231eca70..50b1215e9a 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -118,7 +118,7 @@ struct boss_omor_the_unscarredAI : public CombatAI m_playerGuid.Clear(); } - void OnSpellCooldownAdded(SpellEntry const* spellInfo) + void OnSpellCooldownAdded(SpellEntry const* spellInfo) override { if (spellInfo->Id == SPELL_ORBITAL_STRIKE) ResetTimer(OMOR_PULL_BACK, 2500); diff --git a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 92cca19ff3..5916cac8b6 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -124,7 +124,7 @@ struct boss_watchkeeper_gargolmarAI : public CombatAI DoPlaySoundToSet(m_creature, SOUND_DIE); } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { switch (action) { diff --git a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_peninsula.cpp b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_peninsula.cpp index 2221d0b9ca..5d2d7a829a 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_peninsula.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_peninsula.cpp @@ -1167,7 +1167,7 @@ struct npc_magister_aledisAI : public CombatAI } } - void Aggro(Unit* /*who*/) + void Aggro(Unit* /*who*/) override { if (m_creature->GetFaction() == FACTION_ALLEDIS_HOSTILE) SetDeathPrevention(true); @@ -2245,7 +2245,7 @@ struct npc_razorthorn_ravager_pet : public PetAI HandleAnimations(); } - void MovementInform(uint32 movementType, uint32 data) + void MovementInform(uint32 movementType, uint32 data) override { if (movementType == POINT_MOTION_TYPE) if (data == POINT_MOUND) diff --git a/src/game/AI/ScriptDevAI/scripts/outland/netherstorm.cpp b/src/game/AI/ScriptDevAI/scripts/outland/netherstorm.cpp index 28de4392ab..02f9de5f8f 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/netherstorm.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/netherstorm.cpp @@ -2826,7 +2826,7 @@ struct npc_scrap_reaverAI : ScriptedPetAI } } - void UpdateTimers(const uint32 diff) + void UpdateTimers(const uint32 diff) override { if (m_despawnTimer) { @@ -2929,7 +2929,7 @@ struct npc_scrap_reaverAI : ScriptedPetAI struct ScrapReaverSpell : public SpellScript, public AuraScript { - bool OnCheckTarget(const Spell* /*spell*/, Unit* target, SpellEffectIndex /*eff*/) const + bool OnCheckTarget(const Spell* /*spell*/, Unit* target, SpellEffectIndex /*eff*/) const override { // Only one player can control the scrap reaver if (target->HasAura(SPELL_SCRAP_REAVER)) @@ -3129,7 +3129,7 @@ struct npc_scrapped_fel_reaverAI : ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) override { if (m_eventStarted) { @@ -3300,7 +3300,7 @@ struct npc_adyen_the_lightwardenAI : public ScriptedAI m_timers[id] = timer; } - void UpdateTimers(const uint32 diff) + void UpdateTimers(const uint32 diff) override { std::vector removedTimers; @@ -3821,7 +3821,7 @@ struct npc_kaylaan_the_lostAI : public ScriptedAI m_actionReadyStatus[KAYLAAN_ACTION_HEAL] = true; } - void ExecuteActions() + void ExecuteActions() override { if (m_creature->IsNonMeleeSpellCasted(false) || m_combatScriptHappening) return; diff --git a/src/game/AI/ScriptDevAI/scripts/outland/shadowmoon_valley.cpp b/src/game/AI/ScriptDevAI/scripts/outland/shadowmoon_valley.cpp index c3acb1ccab..702865d524 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/shadowmoon_valley.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/shadowmoon_valley.cpp @@ -3990,7 +3990,7 @@ struct mob_bt_battle_fighterAI : public ScriptedAI } } - void ExecuteActions() + void ExecuteActions() override { if (!CanExecuteCombatAction()) return; diff --git a/src/game/AI/ScriptDevAI/scripts/outland/shartuul_transporter.cpp b/src/game/AI/ScriptDevAI/scripts/outland/shartuul_transporter.cpp index 2bf732118f..4cc6d0c636 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/shartuul_transporter.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/shartuul_transporter.cpp @@ -61,7 +61,7 @@ struct npc_doomguard_punisherAI : public CombatAI ScriptedInstance* m_instance; ObjectGuid m_demonGuid; - void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) + void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) override { if (eventType == AI_EVENT_CUSTOM_A) { @@ -139,7 +139,7 @@ struct npc_shivan_assassinAI : public CombatAI ObjectGuid m_demonGuid; - void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) + void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) override { if (eventType == AI_EVENT_CUSTOM_A) { @@ -239,7 +239,7 @@ struct npc_eye_of_shartuulAI : public CombatAI ObjectGuid m_demonGuid; - void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) + void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) override { if (eventType == AI_EVENT_CUSTOM_A) { @@ -335,7 +335,7 @@ struct npc_dreadmawAI : public CombatAI ObjectGuid m_demonGuid; - void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) + void ReceiveAIEvent(AIEventType eventType, Unit* /*sender*/, Unit* invoker, uint32 /*miscValue*/) override { if (eventType == AI_EVENT_CUSTOM_A) { diff --git a/src/game/AI/ScriptDevAI/scripts/outland/shattrath_city.cpp b/src/game/AI/ScriptDevAI/scripts/outland/shattrath_city.cpp index f12d5e3f96..40fbf414b1 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/shattrath_city.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/shattrath_city.cpp @@ -706,7 +706,7 @@ enum struct DemonBroiledSurprise : public SpellScript { - SpellCastResult OnCheckCast(Spell* spell, bool strict) const + SpellCastResult OnCheckCast(Spell* spell, bool strict) const override { if (strict) { diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_alar.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_alar.cpp index b8946b3c2a..6ac5ad80d3 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_alar.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_alar.cpp @@ -462,7 +462,7 @@ struct boss_alarAI : public CombatAI ResetCombatAction(ALAR_CHARGE, urand(25000, 30000)); } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { switch (action) { diff --git a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index c0ed66476d..d5965f390a 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -481,7 +481,7 @@ struct boss_kaelthasAI : public CombatAI uint32 timer = 120000; #ifdef FAST_TIMERS timer = 10000; -#elseif PRENERF_2_0_3 +#elif defined(PRENERF_2_0_3) timer = 90000; // very early pre 2.1 - 90s (90000), later 120s (120000); #endif ResetTimer(KAEL_PHASE_TWO, timer); @@ -627,7 +627,7 @@ struct boss_kaelthasAI : public CombatAI } } - void ExecuteAction(uint32 action) + void ExecuteAction(uint32 action) override { switch (action) { @@ -787,7 +787,7 @@ struct boss_kaelthasAI : public CombatAI m_uiPhaseSubphase = 1; #ifdef FAST_TIMERS timer = 10000; -#elseif PRENERF_2_0_3 +#elif defined(PRENERF_2_0_3) timer = 120000; #else timer = 180000; diff --git a/src/game/AI/ScriptDevAI/scripts/world/boss_highlord_kruul.cpp b/src/game/AI/ScriptDevAI/scripts/world/boss_highlord_kruul.cpp index 6672be0442..97e40c25d1 100644 --- a/src/game/AI/ScriptDevAI/scripts/world/boss_highlord_kruul.cpp +++ b/src/game/AI/ScriptDevAI/scripts/world/boss_highlord_kruul.cpp @@ -202,7 +202,7 @@ struct boss_highlord_kruulAI : public ScriptedAI DoScriptText(SAY_KILL, m_creature, pVictim); } - void ExecuteActions() + void ExecuteActions() override { if (!CanExecuteCombatAction()) return; diff --git a/src/game/AI/ScriptDevAI/scripts/world/bosses_emerald_dragons.cpp b/src/game/AI/ScriptDevAI/scripts/world/bosses_emerald_dragons.cpp index 83e421b9a6..77a455e310 100644 --- a/src/game/AI/ScriptDevAI/scripts/world/bosses_emerald_dragons.cpp +++ b/src/game/AI/ScriptDevAI/scripts/world/bosses_emerald_dragons.cpp @@ -186,7 +186,7 @@ struct boss_emerissAI : public boss_emerald_dragonAI } // Corruption of Earth at 75%, 50% and 25% - bool DoSpecialDragonAbility() + bool DoSpecialDragonAbility() override { if (DoCastSpellIfCan(m_creature, SPELL_CORRUPTION_OF_EARTH) == CAST_OK) { @@ -199,7 +199,7 @@ struct boss_emerissAI : public boss_emerald_dragonAI return false; } - bool UpdateDragonAI(const uint32 uiDiff) + bool UpdateDragonAI(const uint32 uiDiff) override { // Volatile Infection Timer if (m_uiVolatileInfectionTimer < uiDiff) @@ -252,7 +252,7 @@ struct boss_lethonAI : public boss_emerald_dragonAI } // Summon a spirit which moves toward the boss and heals him for each player hit by the spell; used at 75%, 50% and 25% - bool DoSpecialDragonAbility() + bool DoSpecialDragonAbility() override { if (DoCastSpellIfCan(m_creature, SPELL_DRAW_SPIRIT) == CAST_OK) { @@ -398,7 +398,7 @@ struct boss_taerarAI : public boss_emerald_dragonAI } // Summon 3 Shades at 75%, 50% and 25% and Banish Self - bool DoSpecialDragonAbility() + bool DoSpecialDragonAbility() override { if (DoCastSpellIfCan(m_creature, SPELL_SELF_STUN) == CAST_OK) { @@ -440,7 +440,7 @@ struct boss_taerarAI : public boss_emerald_dragonAI m_uiShadesDead = 0; } - bool UpdateDragonAI(const uint32 uiDiff) + bool UpdateDragonAI(const uint32 uiDiff) override { // Timer to unbanish the boss if (m_uiShadesTimeoutTimer) @@ -515,7 +515,7 @@ struct boss_ysondreAI : public boss_emerald_dragonAI } // Summon Druids, one druid per player engaged in combat (actual summon handled in child spell 24795) - bool DoSpecialDragonAbility() + bool DoSpecialDragonAbility() override { if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_DRUIDS, CAST_TRIGGERED) == CAST_OK) { @@ -526,7 +526,7 @@ struct boss_ysondreAI : public boss_emerald_dragonAI return false; } - bool UpdateDragonAI(const uint32 uiDiff) + bool UpdateDragonAI(const uint32 uiDiff) override { // Lightning Wave Timer if (m_uiLightningWaveTimer < uiDiff) diff --git a/src/game/AI/ScriptDevAI/scripts/world/midsummer_festival.cpp b/src/game/AI/ScriptDevAI/scripts/world/midsummer_festival.cpp index 5db4d0353c..1ab3861f77 100644 --- a/src/game/AI/ScriptDevAI/scripts/world/midsummer_festival.cpp +++ b/src/game/AI/ScriptDevAI/scripts/world/midsummer_festival.cpp @@ -50,7 +50,7 @@ struct go_bonfire : GameObjectAI m_go->SendGameObjectCustomAnim(m_go->GetObjectGuid()); } - void ReceiveAIEvent(AIEventType eventType, uint32 /*miscValue*/ = 0) + void ReceiveAIEvent(AIEventType eventType, uint32 /*miscValue*/ = 0) override { if (m_state && eventType == AI_EVENT_CUSTOM_A) ChangeState(false); diff --git a/src/game/AI/ScriptDevAI/scripts/world/npcs_special.cpp b/src/game/AI/ScriptDevAI/scripts/world/npcs_special.cpp index f395249d1a..eabf1fa58d 100644 --- a/src/game/AI/ScriptDevAI/scripts/world/npcs_special.cpp +++ b/src/game/AI/ScriptDevAI/scripts/world/npcs_special.cpp @@ -1832,7 +1832,7 @@ struct npc_nether_rayAI : public CombatAI } } - void OnSpellCooldownAdded(SpellEntry const* spellInfo) // spells should only reset their action timer on success + void OnSpellCooldownAdded(SpellEntry const* spellInfo) override // spells should only reset their action timer on success { switch (spellInfo->Id) { diff --git a/src/game/Anticheat/Anticheat.hpp b/src/game/Anticheat/Anticheat.hpp index 0a16f29185..c12b7ba44e 100644 --- a/src/game/Anticheat/Anticheat.hpp +++ b/src/game/Anticheat/Anticheat.hpp @@ -144,19 +144,19 @@ class NullSessionAnticheat : public SessionAnticheatInterface public: NullSessionAnticheat(WorldSession *session) : _session(session), _inKnockBack(false) {} - virtual void Update(uint32) {} + virtual void Update(uint32) override {} - virtual bool IsSilenced() const { return false; } + virtual bool IsSilenced() const override { return false; } // character enum packet has been built and is ready to send - virtual void SendCharEnum(WorldPacket &&packet) { _session->SendPacket(packet, true); } + virtual void SendCharEnum(WorldPacket &&packet) override { _session->SendPacket(packet, true); } - virtual void NewPlayer() {} - virtual void LeaveWorld() {}; - virtual void Disconnect() {}; + virtual void NewPlayer() override {} + virtual void LeaveWorld() override {}; + virtual void Disconnect() override {}; // addon checksum verification - virtual bool ReadAddonInfo(WorldPacket* Source, WorldPacket& Target) + virtual bool ReadAddonInfo(WorldPacket* Source, WorldPacket& Target) override { ByteBuffer AddOnPacked; uLongf AddonRealSize; @@ -252,46 +252,46 @@ class NullSessionAnticheat : public SessionAnticheatInterface } // chat - virtual void SendPlayerInfo(ChatHandler *) const {} + virtual void SendPlayerInfo(ChatHandler *) const override {} // miscellaneous action - virtual void RecordCheat(uint32 actionMask, const char */*detector*/, const char */*format*/, ...) + virtual void RecordCheat(uint32 actionMask, const char */*detector*/, const char */*format*/, ...) override { if (!!(actionMask & CHEAT_ACTION_KICK)) _session->KickPlayer(); } // movement cheats - virtual bool Movement(MovementInfo &, const WorldPacket &packet) + virtual bool Movement(MovementInfo &, const WorldPacket &packet) override { if (packet.GetOpcode() == MSG_MOVE_FALL_LAND) _inKnockBack = false; return true; } - virtual void TimeSkipped(const ObjectGuid & /*mover*/, uint32 /*ms*/) {} - virtual bool ExtrapolateMovement(MovementInfo const& /*mi*/, uint32 /*diffMs*/, Position & /*pos*/) { return false; } - virtual bool SpeedChangeAck(MovementInfo &, const WorldPacket &, float) { return true; } - virtual bool IsInKnockBack() const { return _inKnockBack; } - virtual void KnockBack(float /*speedxy*/, float /*speedz*/, float /*cos*/, float /*sin*/) { _inKnockBack = true; } - virtual void OnExplore(const AreaTableEntry *) {} - virtual void Teleport(const Position &) {} + virtual void TimeSkipped(const ObjectGuid & /*mover*/, uint32 /*ms*/) override {} + virtual bool ExtrapolateMovement(MovementInfo const& /*mi*/, uint32 /*diffMs*/, Position & /*pos*/) override { return false; } + virtual bool SpeedChangeAck(MovementInfo &, const WorldPacket &, float) override { return true; } + virtual bool IsInKnockBack() const override { return _inKnockBack; } + virtual void KnockBack(float /*speedxy*/, float /*speedz*/, float /*cos*/, float /*sin*/) override { _inKnockBack = true; } + virtual void OnExplore(const AreaTableEntry *) override {} + virtual void Teleport(const Position &) override {} - virtual void OrderSent(uint16, uint32) {} - virtual void OrderAck(uint16, uint32) {} + virtual void OrderSent(uint16, uint32) override {} + virtual void OrderAck(uint16, uint32) override {} // warden - virtual void WardenPacket(WorldPacket &) {} + virtual void WardenPacket(WorldPacket &) override {} // antispam - virtual void AutoReply(const std::string & /*msg*/) {} - virtual void Whisper(const std::string & /*msg*/, const ObjectGuid & /*to*/) {} - virtual void Say(const std::string & /*msg*/) {} - virtual void Yell(const std::string & /*msg*/) {} - virtual void Channel(const std::string & /*msg*/) {} - virtual void Mail(const std::string & /*subject*/, const std::string & /*body*/, const ObjectGuid & /*to*/) {} + virtual void AutoReply(const std::string & /*msg*/) override {} + virtual void Whisper(const std::string & /*msg*/, const ObjectGuid & /*to*/) override {} + virtual void Say(const std::string & /*msg*/) override {} + virtual void Yell(const std::string & /*msg*/) override {} + virtual void Channel(const std::string & /*msg*/) override {} + virtual void Mail(const std::string & /*subject*/, const std::string & /*body*/, const ObjectGuid & /*to*/) override {} virtual void ChannelInvite(const std::string& /*channelName*/, const ObjectGuid& /*to*/) override {} - virtual void PartyInvite(const ObjectGuid& /*to*/) {} + virtual void PartyInvite(const ObjectGuid& /*to*/) override {} }; #ifdef USE_ANTICHEAT diff --git a/src/game/Anticheat/module/libanticheat.hpp b/src/game/Anticheat/module/libanticheat.hpp index 6faa965185..e23ade0c17 100644 --- a/src/game/Anticheat/module/libanticheat.hpp +++ b/src/game/Anticheat/module/libanticheat.hpp @@ -67,51 +67,51 @@ class SessionAnticheat final : public SessionAnticheatInterface public: SessionAnticheat(WorldSession *session, const BigNumber &K); - virtual void Update(uint32 diff); + virtual void Update(uint32 diff) override; - virtual bool IsSilenced() const; + virtual bool IsSilenced() const override; // character enum packet has been built and is ready to send - virtual void SendCharEnum(WorldPacket &&packet); + virtual void SendCharEnum(WorldPacket &&packet) override; - virtual void NewPlayer(); - virtual void LeaveWorld(); - virtual void Disconnect(); + virtual void NewPlayer() override; + virtual void LeaveWorld() override; + virtual void Disconnect() override; // addon checksum verification (and fingerprinting ;)))) - virtual bool ReadAddonInfo(WorldPacket *, WorldPacket &); + virtual bool ReadAddonInfo(WorldPacket *, WorldPacket &) override; - virtual void SendPlayerInfo(ChatHandler *) const; + virtual void SendPlayerInfo(ChatHandler *) const override; // miscellaneous/generic anticheat detection from the core. also from within the module, once an action has been determined - virtual void RecordCheat(uint32 actionMask, const char *detector, const char *format, ...); + virtual void RecordCheat(uint32 actionMask, const char *detector, const char *format, ...) override; // movement cheats // TODO: Mark these as const where possible - virtual bool Movement(MovementInfo &mi, const WorldPacket &packet); - virtual void TimeSkipped(const ObjectGuid &mover, uint32 ms); - virtual bool ExtrapolateMovement(MovementInfo const& mi, uint32 diffMs, Position &pos); - virtual bool SpeedChangeAck(MovementInfo &mi, const WorldPacket &packet, float newSpeed); - virtual bool IsInKnockBack() const; - virtual void KnockBack(float speedxy, float speedz, float cos, float sin); - virtual void OnExplore(const AreaTableEntry *p); - virtual void Teleport(const Position &pos); - - virtual void OrderSent(uint16 opcode, uint32 counter); - virtual void OrderAck(uint16 opcode, uint32 counter); + virtual bool Movement(MovementInfo &mi, const WorldPacket &packet) override; + virtual void TimeSkipped(const ObjectGuid &mover, uint32 ms) override; + virtual bool ExtrapolateMovement(MovementInfo const& mi, uint32 diffMs, Position &pos) override; + virtual bool SpeedChangeAck(MovementInfo &mi, const WorldPacket &packet, float newSpeed) override; + virtual bool IsInKnockBack() const override; + virtual void KnockBack(float speedxy, float speedz, float cos, float sin) override; + virtual void OnExplore(const AreaTableEntry *p) override; + virtual void Teleport(const Position &pos) override; + + virtual void OrderSent(uint16 opcode, uint32 counter) override; + virtual void OrderAck(uint16 opcode, uint32 counter) override; // warden - virtual void WardenPacket(WorldPacket &packet); + virtual void WardenPacket(WorldPacket &packet) override; // antispam - virtual void AutoReply(const std::string &msg); - virtual void Whisper(const std::string &msg, const ObjectGuid &to); - virtual void Say(const std::string &msg); - virtual void Yell(const std::string &msg); - virtual void Channel(const std::string &msg); - virtual void Mail(const std::string &subject, const std::string &body, const ObjectGuid &to); + virtual void AutoReply(const std::string &msg) override; + virtual void Whisper(const std::string &msg, const ObjectGuid &to) override; + virtual void Say(const std::string &msg) override; + virtual void Yell(const std::string &msg) override; + virtual void Channel(const std::string &msg) override; + virtual void Mail(const std::string &subject, const std::string &body, const ObjectGuid &to) override; virtual void ChannelInvite(const std::string& channelName, const ObjectGuid& to) override; - virtual void PartyInvite(const ObjectGuid& to); + virtual void PartyInvite(const ObjectGuid& to) override; /*** END PUBLIC INTERFACE PORTION ***/ diff --git a/src/game/BattleGround/BattleGroundEY.cpp b/src/game/BattleGround/BattleGroundEY.cpp index 06a0225b3a..2094f39352 100644 --- a/src/game/BattleGround/BattleGroundEY.cpp +++ b/src/game/BattleGround/BattleGroundEY.cpp @@ -137,6 +137,7 @@ void BattleGroundEY::SetTowerOwner(EYNodes node, Team team) GetBgMap()->GetVariableManager().SetVariable(WORLD_STATE_EY_DRAENEI_RUINS_NEUTRAL, m_towerOwner[NODE_DRAENEI_RUINS] == TEAM_NONE); break; } + case EY_MAX_NODES: break; } } diff --git a/src/game/Chat/Level2.cpp b/src/game/Chat/Level2.cpp index 5c9061e86d..4dfd98ffe8 100644 --- a/src/game/Chat/Level2.cpp +++ b/src/game/Chat/Level2.cpp @@ -5334,7 +5334,7 @@ bool ChatHandler::LootStatsHelper(char* args, bool full) } // Output to console - sLog.outError(usageStr.c_str()); + sLog.outError("%s", usageStr.c_str()); SetSentErrorMessage(true); }; diff --git a/src/game/DBScripts/ScriptMgr.cpp b/src/game/DBScripts/ScriptMgr.cpp index e95d3c779e..3efdcf4df0 100644 --- a/src/game/DBScripts/ScriptMgr.cpp +++ b/src/game/DBScripts/ScriptMgr.cpp @@ -1113,6 +1113,7 @@ void ScriptMgr::LoadScriptMap(ScriptMapType scriptType, bool reload) CheckRandomRelayTemplates(); break; } + default: break; } if (reload) diff --git a/src/game/Entities/Corpse.h b/src/game/Entities/Corpse.h index 489c36e0fc..f77c2456d2 100644 --- a/src/game/Entities/Corpse.h +++ b/src/game/Entities/Corpse.h @@ -72,7 +72,7 @@ class Corpse : public WorldObject uint8 getGender() const { return GetByteValue(CORPSE_FIELD_BYTES_1, 2); } // faction template id - uint32 GetFaction() const; + uint32 GetFaction() const override; time_t const& GetGhostTime() const { return m_time; } void ResetGhostTime() { m_time = time(nullptr); } diff --git a/src/game/Entities/Creature.h b/src/game/Entities/Creature.h index 2a22075bd3..f40cf26dee 100644 --- a/src/game/Entities/Creature.h +++ b/src/game/Entities/Creature.h @@ -597,8 +597,8 @@ class Creature : public Unit bool IsNoAggroOnSight() const { return (GetCreatureInfo()->ExtraFlags & CREATURE_EXTRA_FLAG_NO_AGGRO_ON_SIGHT) != 0; } bool IsGuard() const { return (GetCreatureInfo()->ExtraFlags & CREATURE_EXTRA_FLAG_GUARD) != 0; } - bool CanWalk() const { return (GetCreatureInfo()->InhabitType & INHABIT_GROUND) != 0; } - bool CanSwim() const { return (GetCreatureInfo()->InhabitType & INHABIT_WATER) != 0; } + bool CanWalk() const override { return (GetCreatureInfo()->InhabitType & INHABIT_GROUND) != 0; } + bool CanSwim() const override { return (GetCreatureInfo()->InhabitType & INHABIT_WATER) != 0; } bool IsSwimming() const { return m_movementInfo.HasMovementFlag(MOVEFLAG_SWIMMING); } bool CanFly() const override { return (GetCreatureInfo()->InhabitType & INHABIT_AIR) || m_movementInfo.HasMovementFlag((MovementFlags)(MOVEFLAG_LEVITATING | MOVEFLAG_HOVER | MOVEFLAG_CAN_FLY)); } bool IsFlying() const override { return m_movementInfo.HasMovementFlag((MovementFlags)(MOVEFLAG_FLYING | MOVEFLAG_HOVER | MOVEFLAG_LEVITATING)); } @@ -804,7 +804,7 @@ class Creature : public Unit bool hasWeapon(WeaponAttackType type) const override; bool hasWeaponForAttack(WeaponAttackType type) const override { return (Unit::hasWeaponForAttack(type) && hasWeapon(type)); } - virtual void SetCanDualWield(bool value); + virtual void SetCanDualWield(bool value) override; void SetInvisible(bool invisible) { m_isInvisible = invisible; } bool IsInvisible() const { return m_isInvisible; } @@ -840,7 +840,7 @@ class Creature : public Unit void SetNoLoot(bool state); bool IsNoReputation() { return m_noReputation; } void SetNoReputation(bool state) { m_noReputation = state; } - bool IsIgnoringFeignDeath() const; + bool IsIgnoringFeignDeath() const override; void SetIgnoreFeignDeath(bool state); void SetNoWoundedSlowdown(bool state); @@ -866,7 +866,7 @@ class Creature : public Unit // Spell Lists CreatureSpellList const& GetSpellList() const { return m_spellList; } - std::vector GetCharmSpells() const; + std::vector GetCharmSpells() const override; enum CooldownResult { COOLDOWN_RESULT_NOT_FOUND = 0, diff --git a/src/game/Entities/CreatureSettings.cpp b/src/game/Entities/CreatureSettings.cpp index b56970908a..1339a410b4 100644 --- a/src/game/Entities/CreatureSettings.cpp +++ b/src/game/Entities/CreatureSettings.cpp @@ -125,6 +125,8 @@ void CreatureSettings::updateFlag(CreatureStaticFlags flag, bool apply) case CreatureStaticFlags::SESSILE: m_owner->AI()->SetAIImmobilizedState(apply); break; + default: + break; } } diff --git a/src/game/Entities/GameObject.h b/src/game/Entities/GameObject.h index bb1134942e..91fde7814c 100644 --- a/src/game/Entities/GameObject.h +++ b/src/game/Entities/GameObject.h @@ -752,7 +752,7 @@ class GameObject : public WorldObject ObjectGuid const& GetOwnerGuid() const override { return GetGuidValue(OBJECT_FIELD_CREATED_BY); } void SetOwnerGuid(ObjectGuid guid) override; - ObjectGuid const GetSpawnerGuid() const { return m_spawnerGuid; } + ObjectGuid const GetSpawnerGuid() const override { return m_spawnerGuid; } void SetSpawnerGuid(ObjectGuid guid) { m_spawnerGuid = guid; } Unit* GetOwner() const; diff --git a/src/game/Entities/Pet.h b/src/game/Entities/Pet.h index 4494c65d46..65e69e808c 100644 --- a/src/game/Entities/Pet.h +++ b/src/game/Entities/Pet.h @@ -185,7 +185,7 @@ class Pet : public Creature void SetDeathState(DeathState s) override; // overwrite virtual Creature::SetDeathState and Unit::SetDeathState void Update(const uint32 diff) override; // overwrite virtual Creature::Update and Unit::Update - uint8 GetPetAutoSpellSize() const { return m_autospells.size(); } + uint8 GetPetAutoSpellSize() const override { return m_autospells.size(); } uint32 GetPetAutoSpellOnPos(uint8 pos) const override { if (pos >= m_autospells.size()) @@ -193,7 +193,7 @@ class Pet : public Creature return m_autospells[pos]; } - bool CanSwim() const + bool CanSwim() const override { if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) return true; @@ -279,7 +279,7 @@ class Pet : public Creature time_t m_resetTalentsTime; // overwrite Creature function for name localization back to WorldObject version without localization - const char* GetNameForLocaleIdx(int32 locale_idx) const { return WorldObject::GetNameForLocaleIdx(locale_idx); } + const char* GetNameForLocaleIdx(int32 locale_idx) const override { return WorldObject::GetNameForLocaleIdx(locale_idx); } DeclinedName const* GetDeclinedNames() const { return m_declinedname; } diff --git a/src/game/Entities/Player.cpp b/src/game/Entities/Player.cpp index 89282840c8..2276095018 100644 --- a/src/game/Entities/Player.cpp +++ b/src/game/Entities/Player.cpp @@ -5533,7 +5533,7 @@ void Player::UpdateCombatSkills(Unit* /*pVictim*/, WeaponAttackType attType, boo return; // The farther player is from the cap, the easier it gets to level up the skill - float chance = ((float(std::max(1, (room / 5))) / (cap / 5)) * 100); + float chance = ((float(std::max(1, (room / 5))) / (cap / 5.f)) * 100); // Weapon skills: increase chance by intellect if (!defence) diff --git a/src/game/Entities/Player.h b/src/game/Entities/Player.h index 2d9b1858c8..41ef1d6620 100644 --- a/src/game/Entities/Player.h +++ b/src/game/Entities/Player.h @@ -2275,7 +2275,7 @@ class Player : public Unit virtual void AddCooldown(SpellEntry const& spellEntry, ItemPrototype const* itemProto = nullptr, bool permanent = false, uint32 forcedDuration = 0, bool ignoreCat = false) override; virtual void RemoveSpellCooldown(SpellEntry const& spellEntry, bool updateClient = true) override; virtual void RemoveSpellCategoryCooldown(uint32 category, bool updateClient = true) override; - virtual void RemoveAllCooldowns(bool sendOnly = false); + virtual void RemoveAllCooldowns(bool sendOnly = false) override; virtual void LockOutSpells(SpellSchoolMask schoolMask, uint32 duration) override; void RemoveSpellLockout(SpellSchoolMask spellSchoolMask, std::set* spellAlreadySent = nullptr); void SendClearCooldown(uint32 spell_id, Unit* target) const; diff --git a/src/game/Entities/TemporarySpawn.h b/src/game/Entities/TemporarySpawn.h index b20239571a..1fc17c3966 100644 --- a/src/game/Entities/TemporarySpawn.h +++ b/src/game/Entities/TemporarySpawn.h @@ -32,7 +32,7 @@ class TemporarySpawn : public Creature void SetSummonProperties(TempSpawnType type, uint32 lifetime); void Summon(TempSpawnType type, uint32 lifetime); void UnSummon(); - void SaveToDB(); + void SaveToDB() override; ObjectGuid const GetSpawnerGuid() const override { return m_spawner ; } void SetLinkedToOwnerAura(uint32 flags) { m_linkedToOwnerAura |= flags; }; diff --git a/src/game/GameEvents/GameEventMgr.cpp b/src/game/GameEvents/GameEventMgr.cpp index 776e43b437..4bfa38a853 100644 --- a/src/game/GameEvents/GameEventMgr.cpp +++ b/src/game/GameEvents/GameEventMgr.cpp @@ -1347,6 +1347,9 @@ void GameEventMgr::ComputeEventStartAndEndTime(GameEventData& data, time_t today data.end = mktime(&todayT); break; } + case GAME_EVENT_SCHEDULE_SERVERSIDE: + case GAME_EVENT_SCHEDULE_DATE: + break; } } diff --git a/src/game/Globals/CombatCondition.cpp b/src/game/Globals/CombatCondition.cpp index eb227d1609..ac5f0a16d9 100644 --- a/src/game/Globals/CombatCondition.cpp +++ b/src/game/Globals/CombatCondition.cpp @@ -181,6 +181,7 @@ bool CombatConditionMgr::Meets(Unit const* self, int32 Id, float range) case ConditionLogic::AND: if (!results[0] || !results[1]) return false; break; case ConditionLogic::OR: if (!results[0] && !results[1]) return false; break; case ConditionLogic::XOR: if (results[0] == results[1]) return false; break; + case ConditionLogic::NONE: break; } break; } @@ -225,6 +226,7 @@ bool CombatConditionMgr::Meets(Unit const* self, int32 Id, float range) case ConditionLogic::AND: if (!results[0] || !results[1]) return false; break; case ConditionLogic::OR: if (!results[0] && !results[1]) return false; break; case ConditionLogic::XOR: if (results[0] == results[1]) return false; break; + default: break; } break; } diff --git a/src/game/Globals/UnitCondition.cpp b/src/game/Globals/UnitCondition.cpp index f21893c5da..8474797ee0 100644 --- a/src/game/Globals/UnitCondition.cpp +++ b/src/game/Globals/UnitCondition.cpp @@ -262,6 +262,7 @@ int32 UnitConditionMgr::getConditionValue(Unit const* source, Unit const* target case UnitCondition::PATH_FAIL_COUNT: return source->GetMotionMaster()->GetCurrent()->IsReachable(); // TODO: Workaround case UnitCondition::UNUSED: break; case UnitCondition::LABEL: break; + default: break; } return false; } diff --git a/src/game/Loot/LootMgr.cpp b/src/game/Loot/LootMgr.cpp index 68e7900de0..d6b40a5843 100644 --- a/src/game/Loot/LootMgr.cpp +++ b/src/game/Loot/LootMgr.cpp @@ -3198,7 +3198,7 @@ void LootMgr::CheckDropStats(ChatHandler& chat, uint32 amountOfCheck, uint32 loo } stream << "SELECT `name`, `entry` FROM reference_loot_template_names WHERE `entry` in (" << refIds << ");"; - auto queryResult = WorldDatabase.PQuery(stream.str().c_str()); + auto queryResult = WorldDatabase.Query(stream.str().c_str()); std::map refNames; if (queryResult) @@ -3282,7 +3282,7 @@ void LootMgr::CheckDropStats(ChatHandler& chat, uint32 amountOfCheck, uint32 loo stream << "|Hitem:" << std::dec << itemId << ":0:0:0:0:0:0:0|h[" << name << "]|h|r "; if (chat.GetSession()) - chat.PSendSysMessage(stream.str().c_str()); + chat.PSendSysMessage("%s", stream.str().c_str()); sLog.outString("%8d - %-45s \tfound %6u/%-6u \tso %8s%% drop", itemId, name.c_str(), count, amountOfCheck, std::to_string(computedStats).c_str()); } else @@ -3295,7 +3295,7 @@ void LootMgr::CheckDropStats(ChatHandler& chat, uint32 amountOfCheck, uint32 loo stream << " - |cffffffff" << std::fixed << std::setprecision(4) << std::setw(8) << std::setfill(' ') << computedStats << "%%|r - ["; stream << std::dec << -itemId << "] - " << *refName; if (chat.GetSession()) - chat.PSendSysMessage(stream.str().c_str()); + chat.PSendSysMessage("%s", stream.str().c_str()); sLog.outString("%8d - %-45s \tfound %6u/%-6u \tso %8s%% drop", itemId, (*refName).c_str(), count, amountOfCheck, std::to_string(computedStats).c_str()); } } @@ -3333,7 +3333,7 @@ void LootMgr::CheckDropStats(ChatHandler& chat, uint32 amountOfCheck, uint32 loo ss << "|Hitem:" << std::dec << itemId << ":0:0:0:0:0:0:0|h[" << name << "]|h|r "; if (chat.GetSession()) - chat.PSendSysMessage(ss.str().c_str()); + chat.PSendSysMessage("%s", ss.str().c_str()); sLog.outString("%6u - %-45s \tfound %6u/%-6u \tso %8s%% drop", itemStat.first, name.c_str(), itemStat.second, amountOfCheck, ss.str().c_str()); } } diff --git a/src/game/Maps/GridMap.cpp b/src/game/Maps/GridMap.cpp index 67f2e5d332..b96502e65f 100644 --- a/src/game/Maps/GridMap.cpp +++ b/src/game/Maps/GridMap.cpp @@ -302,7 +302,7 @@ float GridMap::getHeightFromFloat(float x, float y) const x_int &= (MAP_RESOLUTION - 1); y_int &= (MAP_RESOLUTION - 1); - if (m_holes && isHole(x_int, y_int)) + if (isHole(x_int, y_int)) return INVALID_HEIGHT_VALUE; // Height stored as: h5 - its v8 grid, h1-h4 - its v9 grid diff --git a/src/game/Maps/Map.cpp b/src/game/Maps/Map.cpp index 2ec22b609d..56794dc51d 100644 --- a/src/game/Maps/Map.cpp +++ b/src/game/Maps/Map.cpp @@ -1206,6 +1206,7 @@ float Map::GetXPModRate(RateModType type) const expMod *= sWorld.getConfig(CONFIG_FLOAT_RATE_PET_XP_KILL); break; } + case RateModType::MAX: break; } return expMod; diff --git a/src/game/Maps/SpawnManager.cpp b/src/game/Maps/SpawnManager.cpp index 1cb594ed63..6d059e6f25 100644 --- a/src/game/Maps/SpawnManager.cpp +++ b/src/game/Maps/SpawnManager.cpp @@ -189,6 +189,7 @@ void SpawnManager::RemoveSpawns(std::vector const& creatureDbGuids, std: if (std::find(creatureDbGuids.begin(), creatureDbGuids.end(), spawnInfo.GetDbGuid()) != creatureDbGuids.end()) spawnInfo.SetUsed(); // will be erased on next manager update break; + default: break; } } } @@ -211,6 +212,7 @@ void SpawnManager::AddEventGuid(uint32 dbguid, HighGuid high) { case HIGHGUID_GAMEOBJECT: m_eventGoDbGuids.insert(dbguid); break; case HIGHGUID_UNIT: m_eventCreatureDbGuids.insert(dbguid); break; + default: break; } } @@ -220,6 +222,7 @@ void SpawnManager::RemoveEventGuid(uint32 dbguid, HighGuid high) { case HIGHGUID_GAMEOBJECT: m_eventGoDbGuids.erase(dbguid); break; case HIGHGUID_UNIT: m_eventCreatureDbGuids.erase(dbguid); break; + default: break; } } @@ -229,7 +232,9 @@ bool SpawnManager::IsEventGuid(uint32 dbguid, HighGuid high) const { case HIGHGUID_GAMEOBJECT: return m_eventGoDbGuids.find(dbguid) != m_eventGoDbGuids.end(); case HIGHGUID_UNIT: return m_eventCreatureDbGuids.find(dbguid) != m_eventCreatureDbGuids.end(); + default: break; } + return false; } void SpawnManager::RespawnAll() diff --git a/src/game/MotionGenerators/TargetedMovementGenerator.h b/src/game/MotionGenerators/TargetedMovementGenerator.h index c71632221d..92890b99a9 100644 --- a/src/game/MotionGenerators/TargetedMovementGenerator.h +++ b/src/game/MotionGenerators/TargetedMovementGenerator.h @@ -53,7 +53,7 @@ class TargetedMovementGeneratorMedium ~TargetedMovementGeneratorMedium() { delete i_path; } public: - bool Update(T&, const uint32&); + bool Update(T&, const uint32&) override; virtual bool IsReachable() const override; @@ -255,7 +255,7 @@ class FormationMovementGenerator : public FollowMovementGenerator bool Update(Unit&, const uint32&) override; void Interrupt(Unit& owner) override; - bool GetResetPosition(Unit&, float& x, float& y, float& z, float& o) const; + bool GetResetPosition(Unit&, float& x, float& y, float& z, float& o) const override; protected: void HandleTargetedMovement(Unit& owner, const uint32& time_diff) override; diff --git a/src/game/MotionGenerators/WaypointMovementGenerator.h b/src/game/MotionGenerators/WaypointMovementGenerator.h index 20c2b1034c..bf8dc392fa 100644 --- a/src/game/MotionGenerators/WaypointMovementGenerator.h +++ b/src/game/MotionGenerators/WaypointMovementGenerator.h @@ -83,7 +83,7 @@ class WaypointMovementGenerator bool Update(Creature& creature, const uint32& diff); void InitializeWaypointPath(Creature& u, int32 pathId, WaypointPathOrigin wpSource, uint32 initialDelay, uint32 overwriteEntry = 0); - MovementGeneratorType GetMovementGeneratorType() const { return WAYPOINT_MOTION_TYPE; } + MovementGeneratorType GetMovementGeneratorType() const override { return WAYPOINT_MOTION_TYPE; } bool GetResetPosition(Creature&, float& /*x*/, float& /*y*/, float& /*z*/, float& /*o*/) const; uint32 getLastReachedWaypoint() const { return m_lastReachedWaypoint; } diff --git a/src/game/PlayerBot/AI/PlayerbotDruidAI.h b/src/game/PlayerBot/AI/PlayerbotDruidAI.h index 781b2b3eda..8dde3b91b1 100644 --- a/src/game/PlayerBot/AI/PlayerbotDruidAI.h +++ b/src/game/PlayerBot/AI/PlayerbotDruidAI.h @@ -129,7 +129,7 @@ class PlayerbotDruidAI : PlayerbotClassAI // Resurrects the target CombatManeuverReturns ResurrectPlayer(Player* target) override; // Dispel disease or negative magic effects from an internally selected target - CombatManeuverReturns DispelPlayer(Player* target = nullptr); + CombatManeuverReturns DispelPlayer(Player* target = nullptr) override; static bool BuffHelper(PlayerbotAI* ai, uint32 spellId, Unit* target); // Callback method to reset shapeshift forms blocking buffs and heals diff --git a/src/game/PlayerBot/AI/PlayerbotPaladinAI.h b/src/game/PlayerBot/AI/PlayerbotPaladinAI.h index d1c32a673f..289fbaa789 100644 --- a/src/game/PlayerBot/AI/PlayerbotPaladinAI.h +++ b/src/game/PlayerBot/AI/PlayerbotPaladinAI.h @@ -101,7 +101,7 @@ class PlayerbotPaladinAI : PlayerbotClassAI // Resurrects the target CombatManeuverReturns ResurrectPlayer(Player* target) override; // Dispel disease or negative magic effects from an internally selected target - CombatManeuverReturns DispelPlayer(Player* target = nullptr); + CombatManeuverReturns DispelPlayer(Player* target = nullptr) override; //Changes aura according to spec/orders void CheckAuras(); diff --git a/src/game/PlayerBot/AI/PlayerbotPriestAI.h b/src/game/PlayerBot/AI/PlayerbotPriestAI.h index 9086108a26..fcbf9e54a9 100644 --- a/src/game/PlayerBot/AI/PlayerbotPriestAI.h +++ b/src/game/PlayerBot/AI/PlayerbotPriestAI.h @@ -115,7 +115,7 @@ class PlayerbotPriestAI : PlayerbotClassAI // Resurrects the target CombatManeuverReturns ResurrectPlayer(Player* target) override; // Dispel disease or negative magic effects from an internally selected target - CombatManeuverReturns DispelPlayer(Player* target = nullptr); + CombatManeuverReturns DispelPlayer(Player* target = nullptr) override; static bool BuffHelper(PlayerbotAI* ai, uint32 spellId, Unit* target); diff --git a/src/game/PlayerBot/AI/PlayerbotShamanAI.h b/src/game/PlayerBot/AI/PlayerbotShamanAI.h index baa994d0fe..fd113bfb96 100644 --- a/src/game/PlayerBot/AI/PlayerbotShamanAI.h +++ b/src/game/PlayerBot/AI/PlayerbotShamanAI.h @@ -132,7 +132,7 @@ class PlayerbotShamanAI : PlayerbotClassAI // Resurrects the target CombatManeuverReturns ResurrectPlayer(Player* target) override; // Dispel disease or negative magic effects from an internally selected target - CombatManeuverReturns DispelPlayer(Player* target = nullptr); + CombatManeuverReturns DispelPlayer(Player* target = nullptr) override; void DropTotems(); void CheckShields(); diff --git a/src/game/Spells/Scripts/Scripting/ClassScripts/Druid.cpp b/src/game/Spells/Scripts/Scripting/ClassScripts/Druid.cpp index deaac2a364..ac73b748a7 100644 --- a/src/game/Spells/Scripts/Scripting/ClassScripts/Druid.cpp +++ b/src/game/Spells/Scripts/Scripting/ClassScripts/Druid.cpp @@ -66,7 +66,7 @@ struct ForceOfNatureSummon : public SpellScript, public AuraScript summon->CastSpell(nullptr, 37846, TRIGGERED_NONE); } - void OnHolderInit(SpellAuraHolder* holder, WorldObject* /*caster*/) const + void OnHolderInit(SpellAuraHolder* holder, WorldObject* /*caster*/) const override { holder->SetAuraDuration(2000); } diff --git a/src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp b/src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp index dee2e46a5c..5d955e3729 100644 --- a/src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp +++ b/src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp @@ -23,7 +23,7 @@ // 21082 - Seal of the Crusader struct SealOfTheCrusader : public AuraScript { - void OnApply(Aura* aura, bool apply) const + void OnApply(Aura* aura, bool apply) const override { if (aura->GetEffIndex() == EFFECT_INDEX_1) { diff --git a/src/shared/Database/DatabaseSqlite.cpp b/src/shared/Database/DatabaseSqlite.cpp index 8943876fe3..61324709f5 100644 --- a/src/shared/Database/DatabaseSqlite.cpp +++ b/src/shared/Database/DatabaseSqlite.cpp @@ -30,20 +30,6 @@ #include "Util/Timer.h" #include "DatabaseSqlite.h" -size_t DatabaseSqlite::db_count = 0; - -DatabaseSqlite::DatabaseSqlite() -{ - // before first connection - if (db_count++ == 0); -} - -DatabaseSqlite::~DatabaseSqlite() -{ - StopServer(); - if (--db_count == 0); -} - SqlConnection* DatabaseSqlite::CreateConnection() { return new SQLiteConnection(*this); diff --git a/src/shared/Database/DatabaseSqlite.h b/src/shared/Database/DatabaseSqlite.h index e2c1eb548a..56810b7704 100644 --- a/src/shared/Database/DatabaseSqlite.h +++ b/src/shared/Database/DatabaseSqlite.h @@ -70,7 +70,7 @@ class SQLiteConnection : public SqlConnection QueryNamedResult* QueryNamed(const char* sql) override; bool Execute(const char* sql) override; - unsigned long escape_string(char* to, const char* from, unsigned long length); + unsigned long escape_string(char* to, const char* from, unsigned long length) override; bool BeginTransaction() override; bool CommitTransaction() override; @@ -90,15 +90,8 @@ class DatabaseSqlite : public Database { friend class MaNGOS::OperatorNew; - public: - DatabaseSqlite(); - ~DatabaseSqlite(); - protected: virtual SqlConnection* CreateConnection() override; - - private: - static size_t db_count; }; #endif