mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
fix(Core/Misc): Change const to be after type name (#10591)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -1250,7 +1250,7 @@ public:
|
||||
InventoryResult CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, Item* pItem, bool swap, bool not_loading = true) const;
|
||||
InventoryResult CanUseItem(Item* pItem, bool not_loading = true) const;
|
||||
[[nodiscard]] bool HasItemTotemCategory(uint32 TotemCategory) const;
|
||||
bool IsTotemCategoryCompatiableWith(const ItemTemplate* pProto, uint32 requiredTotemCategoryId) const;
|
||||
bool IsTotemCategoryCompatiableWith(ItemTemplate const* pProto, uint32 requiredTotemCategoryId) const;
|
||||
InventoryResult CanUseItem(ItemTemplate const* pItem) const;
|
||||
[[nodiscard]] InventoryResult CanUseAmmo(uint32 item) const;
|
||||
InventoryResult CanRollForItemInLFG(ItemTemplate const* item, WorldObject const* lootedObject) const;
|
||||
@@ -1277,7 +1277,7 @@ public:
|
||||
void SetAmmo(uint32 item);
|
||||
void RemoveAmmo();
|
||||
[[nodiscard]] float GetAmmoDPS() const { return m_ammoDPS; }
|
||||
bool CheckAmmoCompatibility(const ItemTemplate* ammo_proto) const;
|
||||
bool CheckAmmoCompatibility(ItemTemplate const* ammo_proto) const;
|
||||
void QuickEquipItem(uint16 pos, Item* pItem);
|
||||
void VisualizeItem(uint8 slot, Item* pItem);
|
||||
void SetVisibleItemSlot(uint8 slot, Item* pItem);
|
||||
@@ -2448,7 +2448,7 @@ public:
|
||||
bool CanTeleport() { return m_canTeleport; }
|
||||
void SetCanTeleport(bool value) { m_canTeleport = value; }
|
||||
|
||||
bool isAllowedToLoot(const Creature* creature);
|
||||
bool isAllowedToLoot(Creature const* creature);
|
||||
|
||||
[[nodiscard]] DeclinedName const* GetDeclinedNames() const { return m_declinedname; }
|
||||
[[nodiscard]] uint8 GetRunesState() const { return m_runes->runeState; }
|
||||
@@ -2575,7 +2575,7 @@ public:
|
||||
void ResetFarSightDistance();
|
||||
[[nodiscard]] Optional<float> GetFarSightDistance() const;
|
||||
|
||||
float GetSightRange(const WorldObject* target = nullptr) const override;
|
||||
float GetSightRange(WorldObject const* target = nullptr) const override;
|
||||
|
||||
std::string GetPlayerName();
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ void Player::ResetInstances(ObjectGuid guid, uint8 method, bool isRaid)
|
||||
for (BoundInstancesMap::const_iterator itr = m_boundInstances.begin(); itr != m_boundInstances.end(); ++itr)
|
||||
{
|
||||
InstanceSave* instanceSave = itr->second.save;
|
||||
const MapEntry* entry = sMapStore.LookupEntry(itr->first);
|
||||
MapEntry const* entry = sMapStore.LookupEntry(itr->first);
|
||||
if (!entry || entry->IsRaid() || !instanceSave->CanReset())
|
||||
continue;
|
||||
|
||||
@@ -223,7 +223,7 @@ void Player::ResetInstances(ObjectGuid guid, uint8 method, bool isRaid)
|
||||
for (BoundInstancesMap::const_iterator itr = m_boundInstances.begin(); itr != m_boundInstances.end(); ++itr)
|
||||
{
|
||||
InstanceSave* instanceSave = itr->second.save;
|
||||
const MapEntry* entry = sMapStore.LookupEntry(itr->first);
|
||||
MapEntry const* entry = sMapStore.LookupEntry(itr->first);
|
||||
if (!entry || entry->IsRaid() != isRaid || !instanceSave->CanReset())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -909,7 +909,7 @@ bool Player::HasItemTotemCategory(uint32 TotemCategory) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Player::IsTotemCategoryCompatiableWith(const ItemTemplate* pProto, uint32 requiredTotemCategoryId) const
|
||||
bool Player::IsTotemCategoryCompatiableWith(ItemTemplate const* pProto, uint32 requiredTotemCategoryId) const
|
||||
{
|
||||
if (requiredTotemCategoryId == 0)
|
||||
return true;
|
||||
@@ -2603,7 +2603,7 @@ Item* Player::StoreItem(ItemPosCountVec const& dest, Item* pItem, bool update)
|
||||
return nullptr;
|
||||
|
||||
Item* lastItem = pItem;
|
||||
const ItemTemplate* proto = pItem->GetTemplate();
|
||||
ItemTemplate const* proto = pItem->GetTemplate();
|
||||
|
||||
for (ItemPosCountVec::const_iterator itr = dest.begin(); itr != dest.end();)
|
||||
{
|
||||
@@ -3072,7 +3072,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
|
||||
pItem->ClearSoulboundTradeable(this);
|
||||
RemoveTradeableItem(pItem);
|
||||
|
||||
const ItemTemplate* proto = pItem->GetTemplate();
|
||||
ItemTemplate const* proto = pItem->GetTemplate();
|
||||
for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
|
||||
if (proto->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE && proto->Spells[i].SpellId > 0) // On obtain trigger
|
||||
RemoveAurasDueToSpell(proto->Spells[i].SpellId);
|
||||
@@ -5644,7 +5644,7 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Player::isAllowedToLoot(const Creature* creature)
|
||||
bool Player::isAllowedToLoot(Creature const* creature)
|
||||
{
|
||||
if (!creature->isDead() || !creature->IsDamageEnoughForLootingAndReward())
|
||||
return false;
|
||||
@@ -5816,7 +5816,7 @@ void Player::_LoadGlyphAuras()
|
||||
{
|
||||
if (GlyphSlotEntry const* glyphSlotEntry = sGlyphSlotStore.LookupEntry(GetGlyphSlot(i)))
|
||||
{
|
||||
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(glyphEntry->SpellId);
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyphEntry->SpellId);
|
||||
if (glyphEntry->TypeFlags == glyphSlotEntry->TypeFlags)
|
||||
{
|
||||
if (!spellInfo->Stances)
|
||||
@@ -6740,7 +6740,7 @@ void Player::PrettyPrintRequirementsItemsList(const std::vector<const Progressio
|
||||
LocaleConstant loc_idx = GetSession()->GetSessionDbLocaleIndex();
|
||||
for (const ProgressionRequirement* missingReq : missingItems)
|
||||
{
|
||||
const ItemTemplate* itemTemplate = sObjectMgr->GetItemTemplate(missingReq->id);
|
||||
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(missingReq->id);
|
||||
if (!itemTemplate)
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user