mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 15:01:38 -04:00
Add missing override keyword in scripts
(cherry picked from commit b948a4275e)
Conflicts:
src/server/scripts/Kalimdor/Firelands/boss_alysrazor.cpp
src/server/scripts/Kalimdor/zone_tanaris.cpp
src/server/scripts/Maelstrom/Stonecore/boss_slabhide.cpp
src/server/scripts/OutdoorPvP/OutdoorPvPZM.h
src/server/scripts/Spells/spell_mage.cpp
src/server/scripts/Spells/spell_paladin.cpp
This commit is contained in:
@@ -268,7 +268,7 @@ public:
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void Load(char const* chrIn)
|
||||
void Load(char const* chrIn) override
|
||||
{
|
||||
if (!chrIn)
|
||||
{
|
||||
|
||||
@@ -1657,7 +1657,7 @@ public:
|
||||
{
|
||||
npc_the_lich_king_tirion_dawnAI(Creature* creature) : ScriptedAI(creature) { Reset(); }
|
||||
void Reset() override { }
|
||||
void AttackStart(Unit* /*who*/) { } // very sample, just don't make them aggreesive override
|
||||
void AttackStart(Unit* /*who*/) override { } // very sample, just don't make them aggreesive
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
void JustDied(Unit* /*killer*/) override { }
|
||||
};
|
||||
|
||||
@@ -236,7 +236,7 @@ public:
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
void Update(uint32 uiDiff)
|
||||
void Update(uint32 uiDiff) override
|
||||
{
|
||||
if (GetData(TYPE_FENRUS) != DONE)
|
||||
return;
|
||||
|
||||
@@ -114,7 +114,7 @@ class npc_professor_phizzlethorpe : public CreatureScript
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE)
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_RESQUE_OOX_09)
|
||||
{
|
||||
|
||||
+1
-1
@@ -421,7 +421,7 @@ public:
|
||||
gossipStep = 0;
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if (who && !who->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC))
|
||||
npc_escortAI::AttackStart(who);
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Update(uint32 /*diff*/)
|
||||
void Update(uint32 /*diff*/) override
|
||||
{
|
||||
if (WardKeeperDeath == WARD_KEEPERS_NR)
|
||||
if (GameObject* go = instance->GetGameObject(DoorWardGUID))
|
||||
|
||||
@@ -57,7 +57,7 @@ class instance_ruins_of_ahnqiraj : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 bossId, EncounterState state)
|
||||
bool SetBossState(uint32 bossId, EncounterState state) override
|
||||
{
|
||||
if (!InstanceScript::SetBossState(bossId, state))
|
||||
return false;
|
||||
|
||||
@@ -99,7 +99,7 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
uint32 EnrageTimer;
|
||||
|
||||
virtual bool IAmVeklor() = 0;
|
||||
virtual void Reset() = 0;
|
||||
virtual void Reset() override = 0;
|
||||
virtual void CastSpellOnBug(Creature* target) = 0;
|
||||
|
||||
void TwinReset()
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
|
||||
struct boss_veknilashAI : public boss_twinemperorsAI
|
||||
{
|
||||
bool IAmVeklor() {return false;}
|
||||
bool IAmVeklor() override {return false;}
|
||||
boss_veknilashAI(Creature* creature) : boss_twinemperorsAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
|
||||
}
|
||||
|
||||
void CastSpellOnBug(Creature* target)
|
||||
void CastSpellOnBug(Creature* target) override
|
||||
{
|
||||
target->setFaction(14);
|
||||
target->AI()->AttackStart(me->getThreatManager().getHostilTarget());
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
|
||||
struct boss_veklorAI : public boss_twinemperorsAI
|
||||
{
|
||||
bool IAmVeklor() {return true;}
|
||||
bool IAmVeklor() override {return true;}
|
||||
boss_veklorAI(Creature* creature) : boss_twinemperorsAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
@@ -516,7 +516,7 @@ public:
|
||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true);
|
||||
}
|
||||
|
||||
void CastSpellOnBug(Creature* target)
|
||||
void CastSpellOnBug(Creature* target) override
|
||||
{
|
||||
target->setFaction(14);
|
||||
target->AddAura(SPELL_EXPLODEBUG, target);
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
virtual void Update(uint32 diff)
|
||||
virtual void Update(uint32 diff) override
|
||||
{
|
||||
switch (PyramidPhase)
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_TOREK_ASSULT)
|
||||
{
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL)
|
||||
{
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_VORSHA)
|
||||
{
|
||||
|
||||
@@ -351,7 +351,7 @@ public:
|
||||
Talk(SAY_AGGRO, who);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_A_CRY_FOR_SAY_HELP)
|
||||
{
|
||||
|
||||
@@ -451,7 +451,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDidDialogueStep(int32 entry)
|
||||
void JustDidDialogueStep(int32 entry) override
|
||||
{
|
||||
switch (entry)
|
||||
{
|
||||
@@ -550,7 +550,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Creature* GetSpeakerByEntry(int32 entry)
|
||||
Creature* GetSpeakerByEntry(int32 entry) override
|
||||
{
|
||||
switch (entry)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ class boss_prince_taldaram : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CONJURE_FLAME_SPHERES, 5000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
BossAI::JustSummoned(summon);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class instance_ruby_sanctum : public InstanceMapScript
|
||||
BaltharusSharedHealth = 0;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* /*player*/)
|
||||
void OnPlayerEnter(Player* /*player*/) override
|
||||
{
|
||||
if (!GetGuidData(DATA_HALION_CONTROLLER) && GetBossState(DATA_HALION) != DONE && GetBossState(DATA_GENERAL_ZARITHRIAN) == DONE)
|
||||
{
|
||||
|
||||
@@ -1873,7 +1873,7 @@ class spell_igb_rocket_pack_useable : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_igb_rocket_pack_useable_AuraScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
return GetOwner()->GetInstanceScript() != nullptr;
|
||||
}
|
||||
@@ -2001,7 +2001,7 @@ class spell_igb_cannon_blast : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_igb_cannon_blast_SpellScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
@@ -2343,7 +2343,7 @@ class spell_igb_gunship_fall_teleport : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_igb_gunship_fall_teleport_SpellScript);
|
||||
|
||||
bool Load()
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetInstanceScript() != nullptr;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
}
|
||||
|
||||
// Weekly quest spawn prevention
|
||||
uint32 GetCreatureEntry(uint32 /*guidLow*/, CreatureData const* data)
|
||||
uint32 GetCreatureEntry(uint32 /*guidLow*/, CreatureData const* data) override
|
||||
{
|
||||
uint32 entry = data->id;
|
||||
switch (entry)
|
||||
|
||||
@@ -564,7 +564,7 @@ class instance_naxxramas : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target = NULL*/, uint32 /*miscvalue1 = 0*/)
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target = NULL*/, uint32 /*miscvalue1 = 0*/) override
|
||||
{
|
||||
switch (criteria_id)
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
frenzy = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
Initialize();
|
||||
|
||||
@@ -458,7 +458,7 @@ class spell_general_vezax_mark_of_the_faceless : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_general_vezax_mark_of_the_faceless_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_THE_FACELESS_DAMAGE))
|
||||
return false;
|
||||
|
||||
@@ -448,7 +448,7 @@ class instance_ulduar : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject)
|
||||
void OnGameObjectCreate(GameObject* gameObject) override
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
|
||||
@@ -141,7 +141,7 @@ class boss_ingvar_the_plunderer : public CreatureScript
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId)
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
if (actionId == ACTION_START_PHASE_2)
|
||||
StartZombiePhase();
|
||||
|
||||
@@ -802,7 +802,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId)
|
||||
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId) override
|
||||
{
|
||||
switch (uiEventId)
|
||||
{
|
||||
|
||||
@@ -184,9 +184,9 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
||||
public:
|
||||
OPvPCapturePointZM_GraveYard(OutdoorPvP* pvp);
|
||||
|
||||
bool Update(uint32 diff);
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void ChangeState() { }
|
||||
void ChangeState() override { }
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
|
||||
@@ -196,11 +196,11 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
||||
|
||||
void SetBeaconState(uint32 controlling_team); // not good atm
|
||||
|
||||
bool HandleGossipOption(Player* player, ObjectGuid guid, uint32 gossipid);
|
||||
bool HandleGossipOption(Player* player, ObjectGuid guid, uint32 gossipid) override;
|
||||
|
||||
bool HandleDropFlag(Player* player, uint32 spellId);
|
||||
bool HandleDropFlag(Player* player, uint32 spellId) override;
|
||||
|
||||
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso);
|
||||
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso) override;
|
||||
|
||||
uint32 GetGraveYardState() const;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class boss_ambassador_hellmaw : public CreatureScript
|
||||
{
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId)
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
if (actionId == ACTION_AMBASSADOR_HELLMAW_INTRO)
|
||||
DoIntro();
|
||||
|
||||
@@ -92,7 +92,7 @@ class instance_shadow_labyrinth : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void OnUnitDeath(Unit* unit)
|
||||
void OnUnitDeath(Unit* unit) override
|
||||
{
|
||||
Creature* creature = unit->ToCreature();
|
||||
if (!creature)
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
instance->SetBossState(DATA_MAULGAR, DONE);
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId)
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
if (actionId == ACTION_ADD_DEATH)
|
||||
Talk(SAY_OGRE_DEATH);
|
||||
|
||||
+1
-1
@@ -416,7 +416,7 @@ class npc_omrogg_heads : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void SetData(uint32 data, uint32 value)
|
||||
void SetData(uint32 data, uint32 value) override
|
||||
{
|
||||
if (data == SETDATA_DATA && value == SETDATA_YELL)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ class instance_mechanar : public InstanceMapScript
|
||||
LoadDoorData(doorData);
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject)
|
||||
void OnGameObjectCreate(GameObject* gameObject) override
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
summoned->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest)
|
||||
void sQuestAccept(Player* player, Quest const* quest) override
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user