fix(Core/Misc): Change const to be after type name (#10591)

This commit is contained in:
Kitzunu
2022-02-14 20:05:45 +01:00
committed by GitHub
parent 9b83abca39
commit 455899dc75
168 changed files with 438 additions and 438 deletions

View File

@@ -141,7 +141,7 @@ public:
Talk(SAY_SLAY);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_DISPERSE)
Split();

View File

@@ -246,7 +246,7 @@ public:
events.ScheduleEvent(EVENT_MOVE_TO_ANVIL, 0, 0, 2);
}
void SpellHitTarget(Unit* /*who*/, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* /*who*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TEMPER)
{

View File

@@ -283,7 +283,7 @@ public:
bool _fedOnTears;
bool _heraldOfTheTitans;
bool IsValidHeraldItem(const ItemTemplate* item)
bool IsValidHeraldItem(ItemTemplate const* item)
{
if (!item) // should not happen, but checked in GetAverageItemLevel()
return true;

View File

@@ -322,7 +322,7 @@ public:
me->CastSpell(me, SPELL_ELECTRICAL_CHARGE, true);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SUPERCHARGE)
UpdatePhase();
@@ -491,7 +491,7 @@ public:
Talk(SAY_MOLGEIM_SLAY);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SUPERCHARGE)
UpdatePhase();
@@ -711,13 +711,13 @@ public:
Talk(SAY_BRUNDIR_SLAY);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SUPERCHARGE)
UpdatePhase();
}
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_CHAIN_LIGHTNING || spellInfo->Id == uint32(RAID_MODE(61916, 63482))) // Lightning Whirl triggered
_stunnedAchievement = false;

View File

@@ -240,7 +240,7 @@ public:
}
void SummonedCreatureDespawn(Creature* cr) override { summons.Despawn(cr); }
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override;
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override;
void JustDied(Unit*) override;
void KilledUnit(Unit* who) override;
void SpellHitTarget(Unit* target, SpellInfo const* spell) override;
@@ -608,7 +608,7 @@ void boss_flame_leviathan::boss_flame_leviathanAI::ScheduleEvents()
events.RescheduleEvent(EVENT_PURSUE, 0);
}
void boss_flame_leviathan::boss_flame_leviathanAI::SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo)
void boss_flame_leviathan::boss_flame_leviathanAI::SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo)
{
if (spellInfo->Id == SPELL_SYSTEMS_SHUTDOWN)
{
@@ -1183,7 +1183,7 @@ public:
damage = 0;
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->SchoolMask & SPELL_SCHOOL_MASK_FIRE && !me->HasAura(SPELL_BLAZE))
me->CastSpell(me, SPELL_BLAZE, true);

View File

@@ -560,7 +560,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (spell->Id == SPELL_NATURE_BOMB_FLIGHT)
me->SummonCreature(NPC_NATURE_BOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());

View File

@@ -200,7 +200,7 @@ public:
return 0;
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_VEZAX_SHADOW_CRASH_DMG)
bAchievShadowdodger = false;

View File

@@ -314,7 +314,7 @@ public:
me->RemoveAura(SPELL_ICICLE_BOSS_AURA);
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
switch( spell->Id )
{
@@ -552,7 +552,7 @@ public:
summons.Despawn(s);
}
bool CanAIAttack(const Unit* t) const override
bool CanAIAttack(Unit const* t) const override
{
if (t->GetTypeId() == TYPEID_PLAYER)
return !t->HasAura(SPELL_FLASH_FREEZE_TRAPPED_PLAYER);
@@ -730,7 +730,7 @@ public:
}
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
switch( spell->Id )
{
@@ -777,7 +777,7 @@ public:
events.ScheduleEvent(EVENT_PRIEST_SMITE, 2100);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if(spell->Id == SPELL_FLASH_FREEZE_TRAPPED_NPC)
{
@@ -829,7 +829,7 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterEvadeMode() override {}
bool CanAIAttack(const Unit* t) const override { return t->GetEntry() == NPC_HODIR; }
bool CanAIAttack(Unit const* t) const override { return t->GetEntry() == NPC_HODIR; }
void JustDied(Unit* /*killer*/) override
{
@@ -873,7 +873,7 @@ public:
events.ScheduleEvent(EVENT_DRUID_STARLIGHT, 10000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if(spell->Id == SPELL_FLASH_FREEZE_TRAPPED_NPC)
{
@@ -926,7 +926,7 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterEvadeMode() override {}
bool CanAIAttack(const Unit* t) const override { return t->GetEntry() == NPC_HODIR; }
bool CanAIAttack(Unit const* t) const override { return t->GetEntry() == NPC_HODIR; }
void JustDied(Unit* /*killer*/) override
{
@@ -970,7 +970,7 @@ public:
events.ScheduleEvent(EVENT_SHAMAN_STORM_CLOUD, 10000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if(spell->Id == SPELL_FLASH_FREEZE_TRAPPED_NPC)
{
@@ -979,7 +979,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell->Id == SPELL_SHAMAN_STORM_CLOUD)
if (Aura* a = target->GetAura(SPELL_SHAMAN_STORM_CLOUD, me->GetGUID()))
@@ -1026,7 +1026,7 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterEvadeMode() override {}
bool CanAIAttack(const Unit* t) const override { return t->GetEntry() == NPC_HODIR; }
bool CanAIAttack(Unit const* t) const override { return t->GetEntry() == NPC_HODIR; }
void JustDied(Unit* /*killer*/) override
{
@@ -1071,7 +1071,7 @@ public:
events.ScheduleEvent(EVENT_MAGE_MELT_ICE, 1000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if(spell->Id == SPELL_FLASH_FREEZE_TRAPPED_NPC)
{
@@ -1141,7 +1141,7 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override {}
void EnterEvadeMode() override {}
bool CanAIAttack(const Unit* t) const override { return t->GetEntry() == NPC_HODIR; }
bool CanAIAttack(Unit const* t) const override { return t->GetEntry() == NPC_HODIR; }
void JustDied(Unit* /*killer*/) override
{

View File

@@ -121,7 +121,7 @@ public:
me->CastSpell(me, 38757, true);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_ACTIVATE_CONSTRUCT)
{
@@ -325,7 +325,7 @@ public:
Unit::Kill(*itr, *itr);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (caster && spell->Id == SPELL_GRAB_CONTROL_2)
{

View File

@@ -1255,7 +1255,7 @@ public:
return 0;
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if( spell->Id == SPELL_SELF_REPAIR )
{
@@ -1597,7 +1597,7 @@ public:
p->ToCreature()->DespawnOrUnsummon(8000);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if( spell->Id == SPELL_SELF_REPAIR )
{
@@ -1926,7 +1926,7 @@ public:
summons.Despawn(s);
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if( spell->Id == SPELL_SELF_REPAIR )
{
@@ -1962,9 +1962,9 @@ public:
void AttackStart(Unit* /*who*/) override {}
void MoveInLineOfSight(Unit* /*who*/) override {}
bool CanAIAttack(const Unit* /*target*/) const override { return false; }
bool CanAIAttack(Unit const* /*target*/) const override { return false; }
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (target && spell && target->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_MINE_EXPLOSION)
if (InstanceScript* pInstance = me->GetInstanceScript())
@@ -2404,7 +2404,7 @@ public:
{
npc_ulduar_flames_spreadAI(Creature* pCreature) : NullCreatureAI(pCreature) {}
void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
switch( spell->Id )
{
@@ -2503,7 +2503,7 @@ public:
{
npc_ulduar_rocket_strike_triggerAI(Creature* pCreature) : NullCreatureAI(pCreature) {}
void SpellHitTarget(Unit* target, const SpellInfo* spell) override
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
{
if (!target || !spell)
return;

View File

@@ -213,7 +213,7 @@ public:
pInstance->SetData(TYPE_RAZORSCALE, DONE);
}
void SpellHit(Unit* caster, const SpellInfo* spell) override
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (!caster || !pInstance)
return;
@@ -973,7 +973,7 @@ public:
timer2 = 6000;
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target && target->GetEntry() != NPC_RAZORSCALE;
}
@@ -1022,7 +1022,7 @@ public:
timer2 = 2000;
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target && target->GetEntry() != NPC_RAZORSCALE;
}
@@ -1078,7 +1078,7 @@ public:
timer2 = 6000;
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target && target->GetEntry() != NPC_RAZORSCALE;
}

View File

@@ -622,7 +622,7 @@ public:
}
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_LIGHTNING_ORB_CHARGER)
{
@@ -633,7 +633,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_LIGHTNING_CHARGE_DAMAGE && target->GetTypeId() == TYPEID_PLAYER)
_hitByLightning = true;
@@ -1093,7 +1093,7 @@ public:
me->SetDisableGravity(true);
}
void SpellHit(Unit*, const SpellInfo* spellInfo) override
void SpellHit(Unit*, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_CHARGE_ORB)
me->CastSpell(me, SPELL_LIGHTNING_PILLAR_P1, true);
@@ -1432,7 +1432,7 @@ public:
_checkTarget = true;
}
void SpellHit(Unit*, const SpellInfo* spellInfo) override
void SpellHit(Unit*, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_RUNIC_SMASH_LEFT || spellInfo->Id == SPELL_RUNIC_SMASH_RIGHT)
{
@@ -1645,7 +1645,7 @@ public:
}
}
bool CanAIAttack(const Unit* target) const override
bool CanAIAttack(Unit const* target) const override
{
return target->GetPositionX() < 2180 && target->GetPositionZ() < 425;
}

View File

@@ -498,7 +498,7 @@ public:
me->CastSpell(pile, SPELL_ENERGY_ORB, true);
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
// spawn not-so-random robots
if (spellInfo->Id == SPELL_ENERGY_ORB_TRIGGER && target->GetEntry() == NPC_PILE_TRIGGER)

View File

@@ -611,7 +611,7 @@ public:
}
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SANITY)
if (Aura* aur = target->GetAura(SPELL_SANITY))
@@ -1163,7 +1163,7 @@ public:
return 0;
}
void SpellHit(Unit* /*caster*/, const SpellInfo* spellInfo) override
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_IN_THE_MAWS_OF_THE_OLD_GOD)
me->AddLootMode(32);
@@ -1827,7 +1827,7 @@ public:
damage = me->GetHealth() - 1;
}
void SpellHit(Unit* caster, const SpellInfo* spellInfo) override
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_SHADOW_BEACON)
caster->GetAI()->DoAction(ACTION_YOGG_SARON_SHADOW_BEACON);
@@ -2247,7 +2247,7 @@ public:
me->CastSpell(me, SPELL_INSANE_PERIODIC, true);
}
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_INSANE1)
{