mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
refactor(Core): apply clang-tidy modernize-use-override (#3817)
This commit is contained in:
@@ -37,7 +37,7 @@ public:
|
||||
{
|
||||
npc_pet_gen_mojoAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
_victimGUID = 0;
|
||||
|
||||
@@ -45,10 +45,10 @@ public:
|
||||
me->GetMotionMaster()->MoveFollow(owner, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) { }
|
||||
void UpdateAI(uint32 /*diff*/) { }
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
|
||||
void ReceiveEmote(Player* player, uint32 emote)
|
||||
void ReceiveEmote(Player* player, uint32 emote) override
|
||||
{
|
||||
me->HandleEmoteCommand(emote);
|
||||
Unit* owner = me->GetOwner();
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
uint64 _victimGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_pet_gen_mojoAI(creature);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
Player* GetOwner() const { return ObjectAccessor::GetPlayer(*me, ownerGUID); }
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_STEAL_ESSENCE_VISUAL && target == me)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
switch (events.ExecuteEvent())
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_pet_gen_soul_trader_beaconAI (creature);
|
||||
}
|
||||
@@ -455,7 +455,7 @@ public:
|
||||
uint32 bombSpellId;
|
||||
uint32 checkTimer;
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
checkTimer += diff;
|
||||
if (checkTimer >= 1000)
|
||||
@@ -481,7 +481,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
{
|
||||
return new npc_pet_gen_target_following_bombAI (pCreature);
|
||||
}
|
||||
@@ -501,12 +501,12 @@ public:
|
||||
|
||||
uint32 checkTimer;
|
||||
|
||||
void Reset()
|
||||
void Reset() override
|
||||
{
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
@@ -515,7 +515,7 @@ public:
|
||||
DoStartNoMovement(who);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/)
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
if (!me->GetVictim())
|
||||
return;
|
||||
@@ -528,7 +528,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_pet_gen_gnomish_flame_turretAI (creature);
|
||||
}
|
||||
@@ -551,7 +551,7 @@ public:
|
||||
|
||||
uint32 targetCheck;
|
||||
|
||||
void InitializeAI()
|
||||
void InitializeAI() override
|
||||
{
|
||||
if (Player* owner = me->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
if (Unit* target = owner->GetSelectedUnit())
|
||||
@@ -559,7 +559,7 @@ public:
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
void OwnerAttacked(Unit* target)
|
||||
void OwnerAttacked(Unit* target) override
|
||||
{
|
||||
if (!target || (me->GetVictim() && me->GetVictim()->IsAlive() && !me->GetVictim()->HasBreakableByDamageCrowdControlAura()))
|
||||
return;
|
||||
@@ -567,7 +567,7 @@ public:
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
@@ -588,7 +588,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
{
|
||||
return new npc_pet_gen_valkyr_guardianAI (pCreature);
|
||||
}
|
||||
@@ -614,13 +614,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() override
|
||||
{
|
||||
OnHit += SpellHitFn(spell_pet_gen_valkyr_guardian_smite_SpellScript::RecalculateDamage);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pet_gen_valkyr_guardian_smite_SpellScript();
|
||||
}
|
||||
@@ -645,7 +645,7 @@ public:
|
||||
uint64 _ownerGUID;
|
||||
bool _hasParty;
|
||||
|
||||
void InitializeAI()
|
||||
void InitializeAI() override
|
||||
{
|
||||
NullCreatureAI::InitializeAI();
|
||||
|
||||
@@ -674,7 +674,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_talkTimer += diff;
|
||||
if (_talkTimer >= 5000)
|
||||
@@ -698,7 +698,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
{
|
||||
return new npc_pet_gen_imp_in_a_bottleAI (pCreature);
|
||||
}
|
||||
@@ -723,7 +723,7 @@ public:
|
||||
uint32 checkTimer;
|
||||
uint32 checkTimer2;
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
checkTimer2 += diff;
|
||||
if (checkTimer2 > 2000)
|
||||
@@ -749,7 +749,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
{
|
||||
return new npc_pet_gen_wind_rider_cubAI (pCreature);
|
||||
}
|
||||
@@ -781,7 +781,7 @@ public:
|
||||
uint32 checkTimer;
|
||||
bool jumping;
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if (type == EFFECT_MOTION_TYPE && id == 1)
|
||||
{
|
||||
@@ -790,7 +790,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (jumping)
|
||||
return;
|
||||
@@ -824,7 +824,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
{
|
||||
return new npc_pet_gen_plump_turkeyAI (pCreature);
|
||||
}
|
||||
@@ -843,19 +843,19 @@ public:
|
||||
|
||||
uint32 checkTimer;
|
||||
|
||||
void Reset() { checkTimer = 3000; }
|
||||
void Reset() override { checkTimer = 3000; }
|
||||
|
||||
void EnterEvadeMode()
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if (type == EFFECT_MOTION_TYPE && id == 1)
|
||||
checkTimer = 1;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (checkTimer)
|
||||
{
|
||||
@@ -876,7 +876,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
{
|
||||
return new npc_pet_gen_toxic_wastelingAI (pCreature);
|
||||
}
|
||||
@@ -896,7 +896,7 @@ public:
|
||||
uint32 checkTimer;
|
||||
uint64 targetGUID;
|
||||
|
||||
void IsSummonedBy(Unit* summoner)
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
{
|
||||
if (!summoner)
|
||||
return;
|
||||
@@ -907,7 +907,7 @@ public:
|
||||
me->CastSpell(me, 48649 /*SPELL_PET_TOY_FETCH_BALL_COME_HERE*/, true);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo)
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == 48649 /*SPELL_PET_TOY_FETCH_BALL_COME_HERE*/)
|
||||
{
|
||||
@@ -916,7 +916,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
checkTimer += diff;
|
||||
if (checkTimer >= 1000)
|
||||
@@ -933,7 +933,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
{
|
||||
return new npc_pet_gen_fetch_ballAI (pCreature);
|
||||
}
|
||||
@@ -954,7 +954,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
{
|
||||
return new npc_pet_gen_mothAI (pCreature);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user