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

@@ -3063,7 +3063,7 @@ bool Player::_addSpell(uint32 spellId, uint8 addSpecMask, bool temporary, bool l
return false;
//ABORT();
}
else if (const SpellInfo* learnSpell = sSpellMgr->GetSpellInfo(spellInfo->Effects[i].TriggerSpell))
else if (SpellInfo const* learnSpell = sSpellMgr->GetSpellInfo(spellInfo->Effects[i].TriggerSpell))
_addSpell(learnSpell->Id, SPEC_MASK_ALL, true);
}
@@ -3679,7 +3679,7 @@ bool Player::resetTalents(bool noResetCost)
// xinef: check if talent learns spell to spell book
TalentEntry const* talentInfo = sTalentStore.LookupEntry(itr->second->talentID);
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
bool removed = false;
if (talentInfo->addToSpellBook)
@@ -7504,7 +7504,7 @@ void Player::_ApplyAmmoBonuses()
UpdateDamagePhysical(RANGED_ATTACK);
}
bool Player::CheckAmmoCompatibility(const ItemTemplate* ammo_proto) const
bool Player::CheckAmmoCompatibility(ItemTemplate const* ammo_proto) const
{
if (!ammo_proto)
return false;
@@ -9569,7 +9569,7 @@ class SpellModPred
{
public:
SpellModPred() {}
bool operator() (const SpellModifier* a, const SpellModifier* b) const
bool operator() (SpellModifier const* a, SpellModifier const* b) const
{
if (a->type != b->type)
return a->type == SPELLMOD_FLAT;
@@ -9580,7 +9580,7 @@ class MageSpellModPred
{
public:
MageSpellModPred() {}
bool operator() (const SpellModifier* a, const SpellModifier* b) const
bool operator() (SpellModifier const* a, SpellModifier const* b) const
{
if (a->type != b->type)
return a->type == SPELLMOD_FLAT;
@@ -9722,7 +9722,7 @@ void Player::RemoveSpellMods(Spell* spell)
if (spell->m_appliedMods.empty())
return;
const SpellInfo* const spellInfo = spell->m_spellInfo;
SpellInfo const* const spellInfo = spell->m_spellInfo;
for (uint8 i = 0; i < MAX_SPELLMOD; ++i)
{
@@ -9747,7 +9747,7 @@ void Player::RemoveSpellMods(Spell* spell)
// MAGE T8P4 BONUS
if( spellInfo->SpellFamilyName == SPELLFAMILY_MAGE )
{
const SpellInfo* sp = mod->ownerAura->GetSpellInfo();
SpellInfo const* sp = mod->ownerAura->GetSpellInfo();
// Missile Barrage, Hot Streak, Brain Freeze (trigger spell - Fireball!)
if( sp->SpellIconID == 3261 || sp->SpellIconID == 2999 || sp->SpellIconID == 2938 )
if( AuraEffect* aurEff = GetAuraEffectDummy(64869) )
@@ -11127,7 +11127,7 @@ bool Player::IsAlwaysDetectableFor(WorldObject const* seer) const
return false;
}
if (const Player* seerPlayer = seer->ToPlayer())
if (Player const* seerPlayer = seer->ToPlayer())
{
if (IsGroupVisibleFor(seerPlayer))
{
@@ -12362,7 +12362,7 @@ bool Player::IsAtRecruitAFriendDistance(WorldObject const* pOther) const
{
if (!pOther)
return false;
const WorldObject* player = GetCorpse();
WorldObject const* player = GetCorpse();
if (!player || IsAlive())
player = this;
@@ -13556,7 +13556,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
if (spellId == 0)
return;
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId);
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!spellInfo)
return;
@@ -15815,7 +15815,7 @@ Optional<float> Player::GetFarSightDistance() const
return _farSightDistance;
}
float Player::GetSightRange(const WorldObject* target) const
float Player::GetSightRange(WorldObject const* target) const
{
float sightRange = WorldObject::GetSightRange(target);
if (_farSightDistance)