refactor(Core): apply clang-tidy modernize-use-override (#3817)

This commit is contained in:
Francesco Borzì
2020-12-06 18:04:55 +01:00
committed by GitHub
parent 9facd81e54
commit d4a58700d4
561 changed files with 9574 additions and 9574 deletions

View File

@@ -141,7 +141,7 @@ public:
{
npc_winterfin_playmateAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
void Reset() override
{
timer = 0;
phase = 0;
@@ -149,7 +149,7 @@ public:
orphanGUID = 0;
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (!phase && who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
@@ -162,7 +162,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!phase)
return;
@@ -221,7 +221,7 @@ public:
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_winterfin_playmateAI(creature);
}
@@ -239,7 +239,7 @@ public:
{
npc_snowfall_glade_playmateAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
void Reset() override
{
timer = 0;
phase = 0;
@@ -247,7 +247,7 @@ public:
orphanGUID = 0;
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (!phase && who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
@@ -260,7 +260,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!phase)
return;
@@ -318,7 +318,7 @@ public:
uint64 orphanGUID;
};
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* pCreature) const override
{
return new npc_snowfall_glade_playmateAI(pCreature);
}
@@ -339,7 +339,7 @@ public:
me->SetDisplayId(DISPLAY_INVISIBLE);
}
void Reset()
void Reset() override
{
timer = 1000;
phase = 0;
@@ -347,7 +347,7 @@ public:
orphanGUID = 0;
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (!phase && who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
@@ -360,7 +360,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!phase)
return;
@@ -407,7 +407,7 @@ public:
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_the_biggest_treeAI(creature);
}
@@ -425,7 +425,7 @@ public:
{
npc_high_oracle_soo_rooAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
void Reset() override
{
timer = 0;
phase = 0;
@@ -433,7 +433,7 @@ public:
orphanGUID = 0;
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (!phase && who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
@@ -446,7 +446,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!phase)
return;
@@ -495,7 +495,7 @@ public:
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_high_oracle_soo_rooAI(creature);
}
@@ -513,7 +513,7 @@ public:
{
npc_elder_kekekAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
void Reset() override
{
timer = 0;
phase = 0;
@@ -521,7 +521,7 @@ public:
orphanGUID = 0;
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (!phase && who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
@@ -534,7 +534,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!phase)
return;
@@ -582,7 +582,7 @@ public:
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_elder_kekekAI(creature);
}
@@ -601,7 +601,7 @@ public:
{
npc_the_etymidianAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
void Reset() override
{
timer = 0;
phase = 0;
@@ -609,7 +609,7 @@ public:
orphanGUID = 0;
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (!phase && who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
@@ -622,7 +622,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!phase)
return;
@@ -678,7 +678,7 @@ public:
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_the_etymidianAI(creature);
}
@@ -696,7 +696,7 @@ public:
{
npc_alexstraza_the_lifebinderAI(Creature* creature) : ScriptedAI(creature) {}
void Reset()
void Reset() override
{
timer = 0;
phase = 0;
@@ -704,7 +704,7 @@ public:
orphanGUID = 0;
}
void SetData(uint32 type, uint32 data)
void SetData(uint32 type, uint32 data) override
{
// Existing SmartAI
if (type == 0)
@@ -721,7 +721,7 @@ public:
}
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (!phase && who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
@@ -743,7 +743,7 @@ public:
}
}
void UpdateAI(uint32 diff)
void UpdateAI(uint32 diff) override
{
if (!phase)
return;
@@ -838,7 +838,7 @@ public:
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_alexstraza_the_lifebinderAI(creature);
}
@@ -853,7 +853,7 @@ class at_bring_your_orphan_to : public AreaTriggerScript
public:
at_bring_your_orphan_to() : AreaTriggerScript("at_bring_your_orphan_to") { }
bool OnTrigger(Player* player, AreaTrigger const* trigger)
bool OnTrigger(Player* player, AreaTrigger const* trigger) override
{
if (player->isDead() || !player->HasAura(SPELL_ORPHAN_OUT))
return false;
@@ -915,7 +915,7 @@ public:
me->SetDisplayId(DISPLAY_INVISIBLE);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (who && me->GetDistance2d(who) < 20.0f)
if (Player* player = who->ToPlayer())
@@ -990,7 +990,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_cw_area_triggerAI(creature);
}
@@ -1011,7 +1011,7 @@ public:
me->SetDisplayId(DISPLAY_INVISIBLE);
}
void MoveInLineOfSight(Unit* who)
void MoveInLineOfSight(Unit* who) override
{
if (who && who->GetDistance2d(me) < 10.0f)
if (Player* player = who->ToPlayer())
@@ -1024,7 +1024,7 @@ public:
}
};
CreatureAI* GetAI(Creature* creature) const
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_grizzlemaw_cw_triggerAI(creature);
}