Add missing override keyword in scripts

This commit is contained in:
Daniel M. Weeks
2015-04-01 11:12:35 -04:00
parent 3613f6971e
commit b948a4275e
38 changed files with 65 additions and 65 deletions

View File

@@ -268,7 +268,7 @@ public:
return ObjectGuid::Empty;
}
void Load(char const* chrIn)
void Load(char const* chrIn) override
{
if (!chrIn)
{

View File

@@ -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 { }
};

View File

@@ -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;

View File

@@ -230,7 +230,7 @@ class instance_zulaman : public InstanceMapScript
}
}
void Update(uint32 diff)
void Update(uint32 diff) override
{
if (events.Empty())
return;

View File

@@ -108,7 +108,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)
{

View File

@@ -74,7 +74,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)
{
@@ -85,7 +85,7 @@ public:
}
}
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) override
{
switch (waypointId)
{

View File

@@ -66,7 +66,7 @@ public:
{
npc_deathstalker_erlandAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) override
{
Player* player = GetPlayerForEscort();
if (!player)
@@ -109,13 +109,13 @@ public:
void Reset() override { }
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) override
{
Talk(SAY_AGGRO, who);
}
};
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override
{
if (quest->GetQuestId() == QUEST_ESCORTING)
{

View File

@@ -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);

View File

@@ -177,7 +177,7 @@ class npc_harbinger_of_flame : public CreatureScript
{
}
void EnterCombat(Unit* /*target*/)
void EnterCombat(Unit* /*target*/) override
{
if (Creature* bird = ObjectAccessor::GetCreature(*me, me->GetChannelObjectGuid()))
DoZoneInCombat(bird, 200.0f);
@@ -277,7 +277,7 @@ class npc_blazing_monstrosity : public CreatureScript
AlysrazorTrashEvaded(me);
}
void EnterCombat(Unit* /*target*/)
void EnterCombat(Unit* /*target*/) override
{
DoZoneInCombat();
me->RemoveAurasDueToSpell(SPELL_SLEEP_ULTRA_HIGH_PRIORITY);

View File

@@ -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))

View File

@@ -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;

View File

@@ -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);

View File

@@ -220,7 +220,7 @@ public:
};
}
virtual void Update(uint32 diff)
virtual void Update(uint32 diff) override
{
switch (PyramidPhase)
{

View File

@@ -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)
{

View File

@@ -350,7 +350,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)
{

View File

@@ -69,13 +69,13 @@ public:
Initialize();
}
void MovementInform(uint32 /*type*/, uint32 id)
void MovementInform(uint32 /*type*/, uint32 id) override
{
if (id == 1)
work = true;
}
void SpellHit(Unit* caster, const SpellInfo* spell)
void SpellHit(Unit* caster, const SpellInfo* spell) override
{
if (spell->Id != SPELL_AWAKEN_PEON)
return;

View File

@@ -111,7 +111,7 @@ public:
}
}
void EnterCombat(Unit* who)
void EnterCombat(Unit* who) override
{
Talk(AGGRO_YELL_AQUE, who);
}
@@ -197,7 +197,7 @@ public:
{
npc_custodian_of_timeAI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) override
{
if (Player* player = GetPlayerForEscort())
{
@@ -264,7 +264,7 @@ public:
}
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
return;
@@ -362,7 +362,7 @@ class npc_OOX17 : public CreatureScript
public:
npc_OOX17() : CreatureScript("npc_OOX17") { }
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) override
{
if (quest->GetQuestId() == Q_OOX17)
{
@@ -387,7 +387,7 @@ public:
{
npc_OOX17AI(Creature* creature) : npc_escortAI(creature) { }
void WaypointReached(uint32 waypointId)
void WaypointReached(uint32 waypointId) override
{
if (Player* player = GetPlayerForEscort())
{
@@ -457,7 +457,7 @@ class npc_tooga : public CreatureScript
public:
npc_tooga() : CreatureScript("npc_tooga") { }
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) override
{
if (quest->GetQuestId() == QUEST_TOOGA)
{
@@ -500,7 +500,7 @@ public:
Initialize();
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
FollowerAI::MoveInLineOfSight(who);
@@ -518,7 +518,7 @@ public:
}
}
void MovementInform(uint32 MotionType, uint32 PointId)
void MovementInform(uint32 MotionType, uint32 PointId) override
{
FollowerAI::MovementInform(MotionType, PointId);
@@ -529,7 +529,7 @@ public:
SetFollowComplete();
}
void UpdateFollowerAI(uint32 Diff)
void UpdateFollowerAI(uint32 Diff) override
{
if (!UpdateVictim())
{

View File

@@ -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)
{

View File

@@ -118,7 +118,7 @@ class boss_slabhide : public CreatureScript
instance->SetData(DATA_SLABHIDE_INTRO, NOT_STARTED);
}
void Reset()
void Reset() override
{
if (instance->GetData(DATA_SLABHIDE_INTRO) == NOT_STARTED)
return;

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -1874,7 +1874,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;
}
@@ -2002,7 +2002,7 @@ class spell_igb_cannon_blast : public SpellScriptLoader
{
PrepareSpellScript(spell_igb_cannon_blast_SpellScript);
bool Load()
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_UNIT;
}
@@ -2344,7 +2344,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;
}

View File

@@ -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)

View File

@@ -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)
{

View File

@@ -78,7 +78,7 @@ public:
frenzy = false;
}
void Reset()
void Reset() override
{
BossAI::Reset();
Initialize();

View File

@@ -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;

View File

@@ -448,7 +448,7 @@ class instance_ulduar : public InstanceMapScript
}
}
void OnGameObjectCreate(GameObject* gameObject)
void OnGameObjectCreate(GameObject* gameObject) override
{
switch (gameObject->GetEntry())
{

View File

@@ -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();

View File

@@ -802,7 +802,7 @@ public:
}
}
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId)
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId) override
{
switch (uiEventId)
{

View File

@@ -184,11 +184,11 @@ 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(WorldPackets::WorldState::InitWorldStates& packet);
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
void UpdateTowerState();
@@ -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;

View File

@@ -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();

View File

@@ -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)

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -42,7 +42,7 @@ class instance_mechanar : public InstanceMapScript
LoadDoorData(doorData);
}
void OnGameObjectCreate(GameObject* gameObject)
void OnGameObjectCreate(GameObject* gameObject) override
{
switch (gameObject->GetEntry())
{

View File

@@ -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)
{

View File

@@ -790,7 +790,7 @@ class spell_mage_living_bomb : public SpellScriptLoader
{
PrepareAuraScript(spell_mage_living_bomb_AuraScript);
bool Validate(SpellInfo const* spellInfo)
bool Validate(SpellInfo const* spellInfo) override
{
if (!sSpellMgr->GetSpellInfo(uint32(spellInfo->GetEffect(EFFECT_1)->CalcValue())))
return false;

View File

@@ -1112,7 +1112,7 @@ class spell_pal_templar_s_verdict : public SpellScriptLoader
{
PrepareSpellScript(spell_pal_templar_s_verdict_SpellScript);
bool Validate (SpellInfo const* /*spellEntry*/)
bool Validate (SpellInfo const* /*spellEntry*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_DIVINE_PURPOSE_PROC))
return false;