diff options
| author | ccrs <ccrs@users.noreply.github.com> | 2019-07-01 21:36:32 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-12-13 00:42:20 +0100 |
| commit | 4e6c59dca78ce563c327ea3106d0ff6786b1e127 (patch) | |
| tree | 11baa861d6e0eda35d4d73feba91a79c1bae788d /src/server/game/Entities/Player | |
| parent | b8d675eba761a5616c7d69a78851ea61af61f4f6 (diff) | |
Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
uint8 GetLevelForTarget(WorldObject const* /*target*/)
void SetLevel(uint8 lvl)
uint8 GetRace()
uint32 GetRaceMask()
uint8 GetClass()
uint32 GetClassMask()
uint8 GetGender()
(cherry picked from commit 5c09ff51f7015b775def8d5cc1f678eaef37200f)
Diffstat (limited to 'src/server/game/Entities/Player')
| -rw-r--r-- | src/server/game/Entities/Player/CollectionMgr.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/KillRewarder.cpp | 10 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 300 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.h | 2 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/RestMgr.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/SocialMgr.cpp | 4 |
6 files changed, 161 insertions, 161 deletions
diff --git a/src/server/game/Entities/Player/CollectionMgr.cpp b/src/server/game/Entities/Player/CollectionMgr.cpp index cd5a7a147d8..7d9660cc4fc 100644 --- a/src/server/game/Entities/Player/CollectionMgr.cpp +++ b/src/server/game/Entities/Player/CollectionMgr.cpp @@ -754,7 +754,7 @@ bool CollectionMgr::CanAddAppearance(ItemModifiedAppearanceEntry const* itemModi return false; } if (itemTemplate->GetInventoryType() != INVTYPE_CLOAK) - if (!(PlayerClassByArmorSubclass[itemTemplate->GetSubClass()] & _owner->GetPlayer()->getClassMask())) + if (!(PlayerClassByArmorSubclass[itemTemplate->GetSubClass()] & _owner->GetPlayer()->GetClassMask())) return false; break; } diff --git a/src/server/game/Entities/Player/KillRewarder.cpp b/src/server/game/Entities/Player/KillRewarder.cpp index 4cf0befcaa0..959eec55961 100644 --- a/src/server/game/Entities/Player/KillRewarder.cpp +++ b/src/server/game/Entities/Player/KillRewarder.cpp @@ -96,7 +96,7 @@ inline void KillRewarder::_InitGroupData() if (Player* member = itr->GetSource()) if (_killer == member || (member->IsAtGroupRewardDistance(_victim) && member->IsAlive())) { - const uint8 lvl = member->getLevel(); + const uint8 lvl = member->GetLevel(); // 2.1. _count - number of alive group members within reward distance; ++_count; // 2.2. _sumLevel - sum of levels of alive group members within reward distance; @@ -107,12 +107,12 @@ inline void KillRewarder::_InitGroupData() // 2.4. _maxNotGrayMember - maximum level of alive group member within reward distance, // for whom victim is not gray; uint32 grayLevel = Trinity::XP::GetGrayLevel(lvl); - if (_victim->GetLevelForTarget(member) > grayLevel && (!_maxNotGrayMember || _maxNotGrayMember->getLevel() < lvl)) + if (_victim->GetLevelForTarget(member) > grayLevel && (!_maxNotGrayMember || _maxNotGrayMember->GetLevel() < lvl)) _maxNotGrayMember = member; } // 2.5. _isFullXP - flag identifying that for all group members victim is not gray, // so 100% XP will be rewarded (50% otherwise). - _isFullXP = _maxNotGrayMember && (_maxLevel == _maxNotGrayMember->getLevel()); + _isFullXP = _maxNotGrayMember && (_maxLevel == _maxNotGrayMember->GetLevel()); } else _count = 1; @@ -145,7 +145,7 @@ inline void KillRewarder::_RewardXP(Player* player, float rate) // * set to 0 if player's level is more than maximum level of not gray member; // * cut XP in half if _isFullXP is false. if (_maxNotGrayMember && player->IsAlive() && - _maxNotGrayMember->getLevel() >= player->getLevel()) + _maxNotGrayMember->GetLevel() >= player->GetLevel()) xp = _isFullXP ? uint32(xp * rate) : // Reward FULL XP if all group members are not gray. uint32(xp * rate / 2) + 1; // Reward only HALF of XP if some of group members are gray. @@ -200,7 +200,7 @@ void KillRewarder::_RewardPlayer(Player* player, bool isDungeon) if (!_isPvP || _isBattleGround) { float const rate = _group ? - _groupRate * float(player->getLevel()) / _sumLevel : // Group rate depends on summary level. + _groupRate * float(player->GetLevel()) / _sumLevel : // Group rate depends on summary level. 1.0f; // Personal rate is 100%. if (_xp) // 4.2. Give XP. diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a0ad2eca89a..5f71d79df29 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -579,7 +579,7 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac } // all item positions resolved - if (ChrSpecializationEntry const* defaultSpec = sDB2Manager.GetDefaultChrSpecializationForClass(getClass())) + if (ChrSpecializationEntry const* defaultSpec = sDB2Manager.GetDefaultChrSpecializationForClass(GetClass())) { SetActiveTalentGroup(defaultSpec->OrderIndex); SetPrimarySpecialization(defaultSpec->ID); @@ -623,7 +623,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) // item can't be added TC_LOG_ERROR("entities.player.items", "Player::StoreNewItemInBestSlots: Player '%s' (%s) can't equip or store initial item (ItemID: %u, Race: %u, Class: %u, InventoryResult: %u)", - GetName().c_str(), GetGUID().ToString().c_str(), titem_id, getRace(), getClass(), msg); + GetName().c_str(), GetGUID().ToString().c_str(), titem_id, GetRace(), GetClass(), msg); return false; } @@ -774,7 +774,7 @@ void Player::HandleDrowning(uint32 time_diff) m_MirrorTimer[BREATH_TIMER] += 1 * IN_MILLISECONDS; // Calculate and deal damage /// @todo Check this formula - uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel() - 1); + uint32 damage = GetMaxHealth() / 5 + urand(0, GetLevel() - 1); EnvironmentalDamage(DAMAGE_DROWNING, damage); } else if (!(m_MirrorTimerFlagsLast & UNDERWATER_INWATER)) // Update time in client if need @@ -810,7 +810,7 @@ void Player::HandleDrowning(uint32 time_diff) m_MirrorTimer[FATIGUE_TIMER] += 1 * IN_MILLISECONDS; if (IsAlive()) // Calculate and deal damage { - uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel() - 1); + uint32 damage = GetMaxHealth() / 5 + urand(0, GetLevel() - 1); EnvironmentalDamage(DAMAGE_EXHAUSTED, damage); } else if (HasPlayerFlag(PLAYER_FLAGS_GHOST)) // Teleport ghost to graveyard @@ -1427,7 +1427,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati } else { - if (getClass() == CLASS_DEATH_KNIGHT && GetMapId() == 609 && !IsGameMaster() && !HasSpell(50977)) + if (GetClass() == CLASS_DEATH_KNIGHT && GetMapId() == 609 && !IsGameMaster() && !HasSpell(50977)) return false; // far teleport to another map @@ -1695,7 +1695,7 @@ void Player::RegenerateAll() Regenerate(power); // Runes act as cooldowns, and they don't need to send any data - if (getClass() == CLASS_DEATH_KNIGHT) + if (GetClass() == CLASS_DEATH_KNIGHT) { uint32 regeneratedRunes = 0; uint32 regenIndex = 0; @@ -1923,8 +1923,8 @@ void Player::RegenerateHealth() if (!IsInCombat()) { - if (getLevel() < 15) - addValue = (0.20f * ((float)GetMaxHealth()) / getLevel() * HealthIncreaseRate); + if (GetLevel() < 15) + addValue = (0.20f * ((float)GetMaxHealth()) / GetLevel() * HealthIncreaseRate); else addValue = 0.015f * ((float)GetMaxHealth()) * HealthIncreaseRate; @@ -2157,7 +2157,7 @@ void Player::SetGameMaster(bool on) PhasingHandler::SetAlwaysVisible(this, HasAuraType(SPELL_AURA_PHASE_ALWAYS_VISIBLE), false); m_ExtraFlags &= ~ PLAYER_EXTRA_GM_ON; - setFactionForRace(getRace()); + setFactionForRace(GetRace()); RemovePlayerFlag(PLAYER_FLAGS_GM); RemoveUnitFlag2(UNIT_FLAG2_ALLOW_CHEAT_SPELLS); @@ -2265,7 +2265,7 @@ void Player::SetXP(uint32 xp) int32 playerLevelDelta = 0; // If XP < 50%, player should see scaling creature with -1 level except for level max - if (getLevel() < MAX_LEVEL && xp < uint32(*m_activePlayerData->NextLevelXP / 2)) + if (GetLevel() < MAX_LEVEL && xp < uint32(*m_activePlayerData->NextLevelXP / 2)) playerLevelDelta = -1; SetUpdateFieldValue(m_values.ModifyValue(&Player::m_activePlayerData).ModifyValue(&UF::ActivePlayerData::ScalingPlayerLevelDelta), playerLevelDelta); @@ -2285,7 +2285,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate) if (victim && victim->GetTypeId() == TYPEID_UNIT && !victim->ToCreature()->hasLootRecipient()) return; - uint8 level = getLevel(); + uint8 level = GetLevel(); sScriptMgr->OnGivePlayerXP(this, xp, victim); @@ -2322,7 +2322,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate) if (level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) GiveLevel(level + 1); - level = getLevel(); + level = GetLevel(); nextLvlXP = m_activePlayerData->NextLevelXP; } @@ -2333,7 +2333,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate) // Current player experience not update (must be update by caller) void Player::GiveLevel(uint8 level) { - uint8 oldLevel = getLevel(); + uint8 oldLevel = GetLevel(); if (level == oldLevel) return; @@ -2341,10 +2341,10 @@ void Player::GiveLevel(uint8 level) guild->UpdateMemberData(this, GUILD_MEMBER_DATA_LEVEL, level); PlayerLevelInfo info; - sObjectMgr->GetPlayerLevelInfo(getRace(), getClass(), level, &info); + sObjectMgr->GetPlayerLevelInfo(GetRace(), GetClass(), level, &info); uint32 basemana = 0; - sObjectMgr->GetPlayerClassLevelInfo(getClass(), level, basemana); + sObjectMgr->GetPlayerClassLevelInfo(GetClass(), level, basemana); WorldPackets::Misc::LevelUpInfo packet; packet.Level = level; @@ -2363,8 +2363,8 @@ void Player::GiveLevel(uint8 level) for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) packet.StatDelta[i] = int32(info.stats[i]) - GetCreateStat(Stats(i)); - packet.NumNewTalents = DB2Manager::GetNumTalentsAtLevel(level, Classes(getClass())) - DB2Manager::GetNumTalentsAtLevel(oldLevel, Classes(getClass())); - packet.NumNewPvpTalentSlots = sDB2Manager.GetPvpTalentNumSlotsAtLevel(level, Classes(getClass())) - sDB2Manager.GetPvpTalentNumSlotsAtLevel(oldLevel, Classes(getClass())); + packet.NumNewTalents = DB2Manager::GetNumTalentsAtLevel(level, Classes(GetClass())) - DB2Manager::GetNumTalentsAtLevel(oldLevel, Classes(GetClass())); + packet.NumNewPvpTalentSlots = sDB2Manager.GetPvpTalentNumSlotsAtLevel(level, Classes(GetClass())) - sDB2Manager.GetPvpTalentNumSlotsAtLevel(oldLevel, Classes(GetClass())); SendDirectMessage(packet.Write()); @@ -2410,7 +2410,7 @@ void Player::GiveLevel(uint8 level) if (Pet* pet = GetPet()) pet->SynchronizeLevelWithOwner(); - if (MailLevelReward const* mailReward = sObjectMgr->GetMailLevelReward(level, getRace())) + if (MailLevelReward const* mailReward = sObjectMgr->GetMailLevelReward(level, GetRace())) { /// @todo Poor design of mail system CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction(); @@ -2428,12 +2428,12 @@ void Player::GiveLevel(uint8 level) void Player::InitTalentForLevel() { - uint8 level = getLevel(); + uint8 level = GetLevel(); // talents base at level diff (talents = level - 9 but some can be used already) if (level < MIN_SPECIALIZATION_LEVEL) ResetTalentSpecialization(); - int32 talentTiers = DB2Manager::GetNumTalentsAtLevel(level, Classes(getClass())); + int32 talentTiers = DB2Manager::GetNumTalentsAtLevel(level, Classes(GetClass())); if (level < 15) { // Remove all talent points @@ -2444,7 +2444,7 @@ void Player::InitTalentForLevel() if (!GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_MORE_TALENTS_THAN_ALLOWED)) for (int32 t = talentTiers; t < MAX_TALENT_TIERS; ++t) for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) - for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(getClass(), t, c)) + for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(GetClass(), t, c)) RemoveTalent(talent); } @@ -2460,13 +2460,13 @@ void Player::InitStatsForLevel(bool reapplyMods) _RemoveAllStatBonuses(); uint32 basemana = 0; - sObjectMgr->GetPlayerClassLevelInfo(getClass(), getLevel(), basemana); + sObjectMgr->GetPlayerClassLevelInfo(GetClass(), GetLevel(), basemana); PlayerLevelInfo info; - sObjectMgr->GetPlayerLevelInfo(getRace(), getClass(), getLevel(), &info); + sObjectMgr->GetPlayerLevelInfo(GetRace(), GetClass(), GetLevel(), &info); SetUpdateFieldValue(m_values.ModifyValue(&Player::m_activePlayerData).ModifyValue(&UF::ActivePlayerData::MaxLevel), sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)); - SetUpdateFieldValue(m_values.ModifyValue(&Player::m_activePlayerData).ModifyValue(&UF::ActivePlayerData::NextLevelXP), sObjectMgr->GetXPForLevel(getLevel())); + SetUpdateFieldValue(m_values.ModifyValue(&Player::m_activePlayerData).ModifyValue(&UF::ActivePlayerData::NextLevelXP), sObjectMgr->GetXPForLevel(GetLevel())); if (m_activePlayerData->XP >= m_activePlayerData->NextLevelXP) SetUpdateFieldValue(m_values.ModifyValue(&Player::m_activePlayerData).ModifyValue(&UF::ActivePlayerData::XP), m_activePlayerData->NextLevelXP - 1); @@ -3073,7 +3073,7 @@ bool Player::AddSpell(uint32 spellId, bool active, bool learning, bool dependent // Runeforging special case if ((_spell_idx->second->AcquireMethod == SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN && !HasSkill(_spell_idx->second->SkillLine)) || ((_spell_idx->second->SkillLine == SKILL_RUNEFORGING) && _spell_idx->second->TrivialSkillLineRankHigh == 0)) - if (SkillRaceClassInfoEntry const* rcInfo = sDB2Manager.GetSkillRaceClassInfo(_spell_idx->second->SkillLine, getRace(), getClass())) + if (SkillRaceClassInfoEntry const* rcInfo = sDB2Manager.GetSkillRaceClassInfo(_spell_idx->second->SkillLine, GetRace(), GetClass())) LearnDefaultSkill(rcInfo); } } @@ -3473,7 +3473,7 @@ bool Player::ResetTalents(bool noCost) // unlearn only talents for character class // some spell learned by one class as normal spells or know at creation but another class learn it as talent, // to prevent unexpected lost normal learned spell skip another class talents - if (talentInfo->ClassID != getClass()) + if (talentInfo->ClassID != GetClass()) continue; // skip non-existent talent ranks @@ -4406,15 +4406,15 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness) //Characters level 20 and up suffer from ten minutes of sickness. int32 startLevel = sWorld->getIntConfig(CONFIG_DEATH_SICKNESS_LEVEL); - if (int32(getLevel()) >= startLevel) + if (int32(GetLevel()) >= startLevel) { // set resurrection sickness CastSpell(this, 15007, true); // not full duration - if (int32(getLevel()) < startLevel+9) + if (int32(GetLevel()) < startLevel+9) { - int32 delta = (int32(getLevel()) - startLevel + 1)*MINUTE; + int32 delta = (int32(GetLevel()) - startLevel + 1)*MINUTE; if (Aura* aur = GetAura(15007, GetGUID())) { @@ -4491,13 +4491,13 @@ Corpse* Player::CreateCorpse() if (*m_unitData->PvpFlags & UNIT_BYTE2_FLAG_FFA_PVP) flags |= CORPSE_FLAG_FFA_PVP; - corpse->SetRace(getRace()); + corpse->SetRace(GetRace()); corpse->SetSex(GetNativeSex()); - corpse->SetClass(getClass()); + corpse->SetClass(GetClass()); corpse->SetCustomizations(Trinity::Containers::MakeIteratorPair(m_playerData->Customizations.begin(), m_playerData->Customizations.end())); corpse->SetFlags(flags); corpse->SetDisplayId(GetNativeDisplayId()); - corpse->SetFactionTemplate(sChrRacesStore.AssertEntry(getRace())->FactionID); + corpse->SetFactionTemplate(sChrRacesStore.AssertEntry(GetRace())->FactionID); for (uint8 i = 0; i < EQUIPMENT_SLOT_END; i++) { @@ -5020,7 +5020,7 @@ void Player::UpdateDamageDoneMods(WeaponAttackType attackType, int32 skipEnchant amount += enchantmentEntry->EffectScalingPoints[i]; break; case ITEM_ENCHANTMENT_TYPE_TOTEM: - if (getClass() == CLASS_SHAMAN) + if (GetClass() == CLASS_SHAMAN) amount += enchantmentEntry->EffectScalingPoints[i] * item->GetTemplate()->GetDelay() / 1000.0f; break; default: @@ -5200,7 +5200,7 @@ inline float GetGameTableColumnForCombatRating(GtCombatRatingsEntry const* row, float Player::GetRatingMultiplier(CombatRating cr) const { - GtCombatRatingsEntry const* Rating = sCombatRatingsGameTable.GetRow(getLevel()); + GtCombatRatingsEntry const* Rating = sCombatRatingsGameTable.GetRow(GetLevel()); if (!Rating) return 1.0f; @@ -5384,7 +5384,7 @@ void Player::UpdateRating(CombatRating cr) ApplyAttackTimePercentMod(OFF_ATTACK, oldVal, false); ApplyAttackTimePercentMod(BASE_ATTACK, newVal, true); ApplyAttackTimePercentMod(OFF_ATTACK, newVal, true); - if (getClass() == CLASS_DEATH_KNIGHT) + if (GetClass() == CLASS_DEATH_KNIGHT) UpdateAllRunesRegen(); break; case CR_HASTE_RANGED: @@ -5668,7 +5668,7 @@ void Player::UpdateSkillsForLevel() continue; uint32 pskill = itr->first; - SkillRaceClassInfoEntry const* rcEntry = sDB2Manager.GetSkillRaceClassInfo(pskill, getRace(), getClass()); + SkillRaceClassInfoEntry const* rcEntry = sDB2Manager.GetSkillRaceClassInfo(pskill, GetRace(), GetClass()); if (!rcEntry) continue; @@ -5692,7 +5692,7 @@ void Player::InitializeSkillFields() uint32 i = 0; for (SkillLineEntry const* skillLine : sSkillLineStore) { - if (sDB2Manager.GetSkillRaceClassInfo(skillLine->ID, getRace(), getClass())) + if (sDB2Manager.GetSkillRaceClassInfo(skillLine->ID, GetRace(), GetClass())) { SetSkillLineId(i, skillLine->ID); SetSkillStartingRank(i, 1); @@ -5819,7 +5819,7 @@ void Player::SetSkill(uint16 id, uint16 step, uint16 newVal, uint16 maxVal) { if (skillEntry->ParentTierIndex > 0) { - if (SkillRaceClassInfoEntry const* rcEntry = sDB2Manager.GetSkillRaceClassInfo(skillEntry->ParentSkillLineID, getRace(), getClass())) + if (SkillRaceClassInfoEntry const* rcEntry = sDB2Manager.GetSkillRaceClassInfo(skillEntry->ParentSkillLineID, GetRace(), GetClass())) { if (SkillTiersEntry const* tier = sObjectMgr->GetSkillTier(rcEntry->SkillTierID)) { @@ -6240,18 +6240,18 @@ void Player::CheckAreaExploreAndOutdoor() if (Optional<ContentTuningLevels> areaLevels = sDB2Manager.GetContentTuningData(areaEntry->ContentTuningID, m_playerData->CtrOptions->ContentTuningConditionMask)) { - if (getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { SendExplorationExperience(areaId, 0); } else { - int16 areaLevel = std::min(std::max(int16(getLevel()), areaLevels->MinLevel), areaLevels->MaxLevel); - int32 diff = int32(getLevel()) - areaLevel; + int16 areaLevel = std::min(std::max(int16(GetLevel()), areaLevels->MinLevel), areaLevels->MaxLevel); + int32 diff = int32(GetLevel()) - areaLevel; uint32 XP; if (diff < -5) { - XP = uint32(sObjectMgr->GetBaseXP(getLevel() + 5) * sWorld->getRate(RATE_XP_EXPLORE)); + XP = uint32(sObjectMgr->GetBaseXP(GetLevel() + 5) * sWorld->getRate(RATE_XP_EXPLORE)); } else if (diff > 5) { @@ -6361,7 +6361,7 @@ int32 Player::CalculateReputationGain(ReputationSource source, uint32 creatureOr break; } - if (rate != 1.0f && creatureOrQuestLevel < Trinity::XP::GetGrayLevel(getLevel())) + if (rate != 1.0f && creatureOrQuestLevel < Trinity::XP::GetGrayLevel(GetLevel())) percent *= rate; if (percent <= 0.0f) @@ -6586,7 +6586,7 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto if (GetTeam() == plrVictim->GetTeam() && !sWorld->IsFFAPvPRealm()) return false; - uint8 k_level = getLevel(); + uint8 k_level = GetLevel(); uint8 k_grey = Trinity::XP::GetGrayLevel(k_level); uint8 v_level = victim->GetLevelForTarget(this); @@ -6622,8 +6622,8 @@ bool Player::RewardHonor(Unit* victim, uint32 groupsize, int32 honor, bool pvpto // and those in a lifetime ApplyModUpdateFieldValue(m_values.ModifyValue(&Player::m_activePlayerData).ModifyValue(&UF::ActivePlayerData::LifetimeHonorableKills), 1, true); UpdateCriteria(CriteriaType::HonorableKills); - UpdateCriteria(CriteriaType::DeliverKillingBlowToClass, victim->getClass()); - UpdateCriteria(CriteriaType::DeliverKillingBlowToRace, victim->getRace()); + UpdateCriteria(CriteriaType::DeliverKillingBlowToClass, victim->GetClass()); + UpdateCriteria(CriteriaType::DeliverKillingBlowToRace, victim->GetRace()); UpdateCriteria(CriteriaType::PVPKillInArea, GetAreaId()); UpdateCriteria(CriteriaType::EarnHonorableKill, 1, 0, 0, victim); } @@ -6744,7 +6744,7 @@ void Player::AddHonorXP(uint32 xp) uint32 newHonorXP = currentHonorXP + xp; uint32 honorLevel = GetHonorLevel(); - if (xp < 1 || getLevel() < PLAYER_LEVEL_MIN_HONOR || IsMaxHonorLevel()) + if (xp < 1 || GetLevel() < PLAYER_LEVEL_MIN_HONOR || IsMaxHonorLevel()) return; while (newHonorXP >= nextHonorLevelXP) @@ -7480,7 +7480,7 @@ void Player::DuelComplete(DuelCompleteType type) opponent->UpdateCriteria(CriteriaType::WinDuel, 1); // Credit for quest Death's Challenge - if (getClass() == CLASS_DEATH_KNIGHT && opponent->GetQuestStatus(12733) == QUEST_STATUS_INCOMPLETE) + if (GetClass() == CLASS_DEATH_KNIGHT && opponent->GetQuestStatus(12733) == QUEST_STATUS_INCOMPLETE) opponent->CastSpell(opponent, 52994, true); // Honor points after duel (the winner) - ImpConfig @@ -8021,7 +8021,7 @@ void Player::ApplyItemEquipSpell(Item* item, bool apply, bool formChange /*= fal continue; if (spellproto->HasAura(SPELL_AURA_MOD_XP_PCT) - && !GetSession()->GetCollectionMgr()->CanApplyHeirloomXpBonus(item->GetEntry(), getLevel()) + && !GetSession()->GetCollectionMgr()->CanApplyHeirloomXpBonus(item->GetEntry(), GetLevel()) && sDB2Manager.GetHeirloomByItemId(item->GetEntry())) continue; @@ -8729,7 +8729,7 @@ void Player::RemovedInsignia(Player* looterPlr) // We store the level of our player in the gold field // We retrieve this information at Player::SendLoot() - bones->loot.gold = getLevel(); + bones->loot.gold = GetLevel(); bones->lootRecipient = looterPlr; looterPlr->SendLoot(bones->GetGUID(), LOOT_INSIGNIA); } @@ -8997,8 +8997,8 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type, bool aeLooting/* = fa loot->FillLoot(lootid, LootTemplates_Pickpocketing, this, true); // Generate extra money for pick pocket loot - const uint32 a = urand(0, creature->getLevel() / 2); - const uint32 b = urand(0, getLevel() / 2); + const uint32 a = urand(0, creature->GetLevel() / 2); + const uint32 b = urand(0, GetLevel() / 2); loot->gold = uint32(10 * (a + b) * sWorld->getRate(RATE_DROP_MONEY)); permission = OWNER_PERMISSION; } @@ -11504,7 +11504,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool if (pItem->GetQuality() == ITEM_QUALITY_HEIRLOOM) requiredLevels = sDB2Manager.GetContentTuningData(pItem->GetScalingContentTuningId(), 0, true); - if (requiredLevels && requiredLevels->MaxLevel < DEFAULT_MAX_LEVEL && requiredLevels->MaxLevel < getLevel() && !sDB2Manager.GetHeirloomByItemId(pProto->GetId())) + if (requiredLevels && requiredLevels->MaxLevel < DEFAULT_MAX_LEVEL && requiredLevels->MaxLevel < GetLevel() && !sDB2Manager.GetHeirloomByItemId(pProto->GetId())) return EQUIP_ERR_NOT_EQUIPPABLE; uint8 eslot = FindEquipSlot(pItem, slot, swap); @@ -11911,7 +11911,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const if (pItem->IsBindedNotWith(this)) return EQUIP_ERR_NOT_OWNER; - if (getLevel() < pItem->GetRequiredLevel()) + if (GetLevel() < pItem->GetRequiredLevel()) return EQUIP_ERR_CANT_EQUIP_LEVEL_I; InventoryResult res = CanUseItem(pProto, true); @@ -11929,7 +11929,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const // In fact it's a visual bug, everything works properly... I need sniffs of operations with // binded to account items from off server. - switch (getClass()) + switch (GetClass()) { case CLASS_HUNTER: case CLASS_SHAMAN: @@ -11967,7 +11967,7 @@ InventoryResult Player::CanUseItem(ItemTemplate const* proto, bool skipRequiredL if ((proto->GetFlags2() & ITEM_FLAG2_FACTION_ALLIANCE) && GetTeam() != ALLIANCE) return EQUIP_ERR_CANT_EQUIP_EVER; - if ((proto->GetAllowableClass() & getClassMask()) == 0 || !proto->GetAllowableRace().HasRace(getRace())) + if ((proto->GetAllowableClass() & GetClassMask()) == 0 || !proto->GetAllowableRace().HasRace(GetRace())) return EQUIP_ERR_CANT_EQUIP_EVER; if (proto->GetRequiredSkill() != 0) @@ -11981,7 +11981,7 @@ InventoryResult Player::CanUseItem(ItemTemplate const* proto, bool skipRequiredL if (proto->GetRequiredSpell() != 0 && !HasSpell(proto->GetRequiredSpell())) return EQUIP_ERR_PROFICIENCY_NEEDED; - if (!skipRequiredLevelCheck && getLevel() < proto->GetBaseRequiredLevel()) + if (!skipRequiredLevelCheck && GetLevel() < proto->GetBaseRequiredLevel()) return EQUIP_ERR_CANT_EQUIP_LEVEL_I; // If World Event is not active, prevent using event dependant items @@ -12018,7 +12018,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje return EQUIP_ERR_ITEM_NOT_FOUND; // Used by group, function GroupLoot, to know if a prototype can be used by a player - if ((proto->GetAllowableClass() & getClassMask()) == 0 || !proto->GetAllowableRace().HasRace(getRace())) + if ((proto->GetAllowableClass() & GetClassMask()) == 0 || !proto->GetAllowableRace().HasRace(GetRace())) return EQUIP_ERR_CANT_EQUIP_EVER; if (proto->GetRequiredSpell() != 0 && !HasSpell(proto->GetRequiredSpell())) @@ -12032,7 +12032,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje return EQUIP_ERR_CANT_EQUIP_SKILL; } - uint8 _class = getClass(); + uint8 _class = GetClass(); if (proto->GetClass() == ITEM_CLASS_WEAPON && GetSkillValue(proto->GetSkill()) == 0) return EQUIP_ERR_PROFICIENCY_NEEDED; @@ -12041,7 +12041,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje { if (_class == CLASS_WARRIOR || _class == CLASS_PALADIN || _class == CLASS_DEATH_KNIGHT) { - if (getLevel() < 40) + if (GetLevel() < 40) { if (proto->GetSubClass() != ITEM_SUBCLASS_ARMOR_MAIL) return EQUIP_ERR_CLIENT_LOCKED_OUT; @@ -12051,7 +12051,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje } else if (_class == CLASS_HUNTER || _class == CLASS_SHAMAN) { - if (getLevel() < 40) + if (GetLevel() < 40) { if (proto->GetSubClass() != ITEM_SUBCLASS_ARMOR_LEATHER) return EQUIP_ERR_CLIENT_LOCKED_OUT; @@ -12093,7 +12093,7 @@ Item* Player::StoreNewItem(ItemPosCountVec const& pos, uint32 itemId, bool updat item = StoreItem(pos, item, update); - item->SetFixedLevel(getLevel()); + item->SetFixedLevel(GetLevel()); item->SetItemRandomBonusList(randomBonusListId); if (allowedLooters.size() > 1 && item->GetTemplate()->GetMaxStackSize() == 1 && item->IsSoulBound()) @@ -12307,7 +12307,7 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update) if (pProto && IsInCombat() && (pProto->GetClass() == ITEM_CLASS_WEAPON || pProto->GetInventoryType() == INVTYPE_RELIC) && m_weaponChangeTimer == 0) { - uint32 cooldownSpell = getClass() == CLASS_ROGUE ? 6123 : 6119; + uint32 cooldownSpell = GetClass() == CLASS_ROGUE ? 6123 : 6119; SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cooldownSpell, DIFFICULTY_NONE); if (!spellProto) @@ -14100,7 +14100,7 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool if (!ignore_condition && pEnchant->ConditionID && !EnchantmentFitsRequirements(pEnchant->ConditionID, -1)) return; - if (pEnchant->MinLevel > getLevel()) + if (pEnchant->MinLevel > GetLevel()) return; if (pEnchant->RequiredSkillID > 0 && pEnchant->RequiredSkillRank > GetSkillValue(pEnchant->RequiredSkillID)) @@ -14165,12 +14165,12 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool scalingClass = pEnchant->ScalingClassRestricted; uint8 minLevel = pEnchant->Flags & 0x20 ? 1 : 60; - uint8 scalingLevel = getLevel(); + uint8 scalingLevel = GetLevel(); uint8 maxLevel = uint8(pEnchant->MaxLevel ? pEnchant->MaxLevel : sSpellScalingGameTable.GetTableRowCount() - 1); - if (minLevel > getLevel()) + if (minLevel > GetLevel()) scalingLevel = minLevel; - else if (maxLevel < getLevel()) + else if (maxLevel < GetLevel()) scalingLevel = maxLevel; if (GtSpellScalingEntry const* spellScaling = sSpellScalingGameTable.GetRow(scalingLevel)) @@ -14188,12 +14188,12 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool scalingClass = pEnchant->ScalingClassRestricted; uint8 minLevel = pEnchant->Flags & 0x20 ? 1 : 60; - uint8 scalingLevel = getLevel(); + uint8 scalingLevel = GetLevel(); uint8 maxLevel = uint8(pEnchant->MaxLevel ? pEnchant->MaxLevel : sSpellScalingGameTable.GetTableRowCount() - 1); - if (minLevel > getLevel()) + if (minLevel > GetLevel()) scalingLevel = minLevel; - else if (maxLevel < getLevel()) + else if (maxLevel < GetLevel()) scalingLevel = maxLevel; if (GtSpellScalingEntry const* spellScaling = sSpellScalingGameTable.GetRow(scalingLevel)) @@ -14597,7 +14597,7 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool canTalk = false; break; case GOSSIP_OPTION_STABLEPET: - if (getClass() != CLASS_HUNTER) + if (GetClass() != CLASS_HUNTER) canTalk = false; break; case GOSSIP_OPTION_QUESTGIVER: @@ -14646,12 +14646,12 @@ void Player::PrepareGossipMenu(WorldObject* source, uint32 menuId /*= 0*/, bool LocaleConstant locale = GetSession()->GetSessionDbLocaleIndex(); if (optionBroadcastText) - strOptionText = DB2Manager::GetBroadcastTextValue(optionBroadcastText, locale, getGender()); + strOptionText = DB2Manager::GetBroadcastTextValue(optionBroadcastText, locale, GetGender()); else strOptionText = itr->second.OptionText; if (boxBroadcastText) - strBoxText = DB2Manager::GetBroadcastTextValue(boxBroadcastText, locale, getGender()); + strBoxText = DB2Manager::GetBroadcastTextValue(boxBroadcastText, locale, GetGender()); else strBoxText = itr->second.BoxText; @@ -14879,7 +14879,7 @@ int32 Player::GetQuestMinLevel(Quest const* quest) const { if (Optional<ContentTuningLevels> questLevels = sDB2Manager.GetContentTuningData(quest->GetContentTuningId(), m_playerData->CtrOptions->ContentTuningConditionMask)) { - ChrRacesEntry const* race = sChrRacesStore.AssertEntry(getRace()); + ChrRacesEntry const* race = sChrRacesStore.AssertEntry(GetRace()); FactionTemplateEntry const* raceFaction = sFactionTemplateStore.AssertEntry(race->FactionID); int32 questFactionGroup = sContentTuningStore.AssertEntry(quest->GetContentTuningId())->GetScalingFactionGroup(); if (questFactionGroup && raceFaction->FactionGroup != questFactionGroup) @@ -14900,7 +14900,7 @@ int32 Player::GetQuestLevel(Quest const* quest) const { int32 minLevel = GetQuestMinLevel(quest); int32 maxLevel = questLevels->MaxLevel; - int32 level = getLevel(); + int32 level = GetLevel(); if (level >= minLevel) return std::min(level, maxLevel); @@ -15068,7 +15068,7 @@ bool Player::CanSeeStartQuest(Quest const* quest) const SatisfyQuestDay(quest, false) && SatisfyQuestWeek(quest, false) && SatisfyQuestMonth(quest, false) && SatisfyQuestSeasonal(quest, false) && SatisfyQuestExpansion(quest, false)) { - return int32(getLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF)) >= GetQuestMinLevel(quest); + return int32(GetLevel() + sWorld->getIntConfig(CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF)) >= GetQuestMinLevel(quest); } return false; @@ -15556,7 +15556,7 @@ bool Player::CanSelectQuestPackageItem(QuestPackageItemEntry const* questPackage case QUEST_PACKAGE_FILTER_LOOT_SPECIALIZATION: return rewardProto->IsUsableByLootSpecialization(this, true); case QUEST_PACKAGE_FILTER_CLASS: - return !rewardProto->ItemSpecClassMask || (rewardProto->ItemSpecClassMask & getClassMask()) != 0; + return !rewardProto->ItemSpecClassMask || (rewardProto->ItemSpecClassMask & GetClassMask()) != 0; case QUEST_PACKAGE_FILTER_EVERYONE: return true; default: @@ -15717,7 +15717,7 @@ void Player::RewardQuest(Quest const* quest, LootItemType rewardType, uint32 rew uint32 XP = GetQuestXPReward(quest); int32 moneyRew = 0; - if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) GiveXP(XP, nullptr); else moneyRew = int32(quest->GetRewMoneyMaxLevel() * sWorld->getRate(RATE_DROP_MONEY)); @@ -15733,7 +15733,7 @@ void Player::RewardQuest(Quest const* quest, LootItemType rewardType, uint32 rew } // honor reward - if (uint32 honor = quest->CalculateHonorGain(getLevel())) + if (uint32 honor = quest->CalculateHonorGain(GetLevel())) RewardHonor(nullptr, 0, honor); // title reward @@ -15941,7 +15941,7 @@ bool Player::SatisfyQuestLevel(Quest const* qInfo, bool msg) const bool Player::SatisfyQuestMinLevel(Quest const* qInfo, bool msg) const { - if (getLevel() < GetQuestMinLevel(qInfo)) + if (GetLevel() < GetQuestMinLevel(qInfo)) { if (msg) { @@ -15956,7 +15956,7 @@ bool Player::SatisfyQuestMinLevel(Quest const* qInfo, bool msg) const bool Player::SatisfyQuestMaxLevel(Quest const* qInfo, bool msg) const { - if (qInfo->GetMaxLevel() > 0 && getLevel() > qInfo->GetMaxLevel()) + if (qInfo->GetMaxLevel() > 0 && GetLevel() > qInfo->GetMaxLevel()) { if (msg) { @@ -16126,7 +16126,7 @@ bool Player::SatisfyQuestClass(Quest const* qInfo, bool msg) const if (reqClass == 0) return true; - if ((reqClass & getClassMask()) == 0) + if ((reqClass & GetClassMask()) == 0) { if (msg) { @@ -16143,7 +16143,7 @@ bool Player::SatisfyQuestClass(Quest const* qInfo, bool msg) const bool Player::SatisfyQuestRace(Quest const* qInfo, bool msg) const { - if (!qInfo->GetAllowableRaces().HasRace(getRace())) + if (!qInfo->GetAllowableRaces().HasRace(GetRace())) { if (msg) { @@ -16612,7 +16612,7 @@ QuestGiverStatus Player::GetQuestDialogStatus(Object* questgiver) if (quest->IsAutoComplete() && CanTakeQuest(quest, false) && quest->IsRepeatable() && !quest->IsDailyOrWeekly()) { - if (getLevel() <= (GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF))) + if (GetLevel() <= (GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF))) result |= QuestGiverStatus::RepeatableTurnin; else result |= QuestGiverStatus::TrivialRepeatableTurnin; @@ -16635,7 +16635,7 @@ QuestGiverStatus Player::GetQuestDialogStatus(Object* questgiver) { if (SatisfyQuestLevel(quest, false)) { - if (getLevel() <= (GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF))) + if (GetLevel() <= (GetQuestLevel(quest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF))) { if (quest->GetQuestTag() == QuestTagType::CovenantCalling) result |= QuestGiverStatus::CovenantCallingQuest; @@ -17357,7 +17357,7 @@ void Player::SendQuestReward(Quest const* quest, Creature const* questGiver, uin uint32 moneyReward; - if (getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { moneyReward = GetQuestMoneyReward(quest); } @@ -17971,10 +17971,10 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder* holder) SetGender(fields.gender); // check if race/class combination is valid - PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(GetRace(), GetClass()); if (!info) { - TC_LOG_ERROR("entities.player", "Player::LoadFromDB: Player (%s) has wrong race/class (%u/%u), can't load.", guid.ToString().c_str(), getRace(), getClass()); + TC_LOG_ERROR("entities.player", "Player::LoadFromDB: Player (%s) has wrong race/class (%u/%u), can't load.", guid.ToString().c_str(), GetRace(), GetClass()); return false; } @@ -18029,7 +18029,7 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder* holder) m_atLoginFlags = fields.at_login; - if (!GetSession()->ValidateAppearance(Races(getRace()), Classes(getClass()), fields.gender, MakeChrCustomizationChoiceRange(customizations))) + if (!GetSession()->ValidateAppearance(Races(GetRace()), Classes(GetClass()), fields.gender, MakeChrCustomizationChoiceRange(customizations))) { TC_LOG_ERROR("entities.player", "Player::LoadFromDB: Player (%s) has wrong Appearance values (Hair/Skin/Color), can't load.", guid.ToString().c_str()); return false; @@ -18057,7 +18057,7 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder* holder) //Need to call it to initialize m_team (m_team can be calculated from race) //Other way is to saves m_team into characters table. - setFactionForRace(getRace()); + setFactionForRace(GetRace()); // load home bind and check in same time class/race pair, it used later for restore broken positions if (!_LoadHomeBind(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_HOME_BIND))) @@ -18421,12 +18421,12 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder* holder) SetPrimarySpecialization(fields.primarySpecialization); SetActiveTalentGroup(fields.activeTalentGroup); ChrSpecializationEntry const* primarySpec = sChrSpecializationStore.LookupEntry(GetPrimarySpecialization()); - if (!primarySpec || primarySpec->ClassID != getClass() || GetActiveTalentGroup() >= MAX_SPECIALIZATIONS) + if (!primarySpec || primarySpec->ClassID != GetClass() || GetActiveTalentGroup() >= MAX_SPECIALIZATIONS) ResetTalentSpecialization(); uint32 lootSpecId = fields.lootSpecId; if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(lootSpecId)) - if (chrSpec->ClassID == getClass()) + if (chrSpec->ClassID == GetClass()) SetLootSpecId(lootSpecId); UpdateDisplayPower(); @@ -18464,7 +18464,7 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder* holder) InitTalentForLevel(); LearnDefaultSkills(); LearnCustomSpells(); - if (getLevel() < PLAYER_LEVEL_MIN_HONOR) + if (GetLevel() < PLAYER_LEVEL_MIN_HONOR) ResetPvpTalents(); // must be before inventory (some items required reputation check) @@ -19627,7 +19627,7 @@ void Player::_LoadQuestStatusRewarded(PreparedQueryResult result) if (std::vector<QuestPackageItemEntry const*> const* questPackageItems = sDB2Manager.GetQuestPackageItems(quest->GetQuestPackageID())) for (QuestPackageItemEntry const* questPackageItem : *questPackageItems) if (ItemTemplate const* rewardProto = sObjectMgr->GetItemTemplate(questPackageItem->ItemID)) - if (rewardProto->ItemSpecClassMask & getClassMask()) + if (rewardProto->ItemSpecClassMask & GetClassMask()) GetSession()->GetCollectionMgr()->AddItemAppearance(questPackageItem->ItemID); if (quest->CanIncreaseRewardedQuestCounters()) @@ -20162,9 +20162,9 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report { if (!sWorld->getBoolConfig(CONFIG_INSTANCE_IGNORE_LEVEL)) { - if (ar->levelMin && getLevel() < ar->levelMin) + if (ar->levelMin && GetLevel() < ar->levelMin) LevelMin = ar->levelMin; - if (ar->levelMax && getLevel() > ar->levelMax) + if (ar->levelMax && GetLevel() > ar->levelMax) LevelMax = ar->levelMax; } @@ -20296,11 +20296,11 @@ void Player::AddInstanceEnterTime(uint32 instanceId, time_t enterTime) bool Player::_LoadHomeBind(PreparedQueryResult result) { - PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(GetRace(), GetClass()); if (!info) { TC_LOG_ERROR("entities.player", "Player::_LoadHomeBind: Player '%s' (%s) has incorrect race/class (%u/%u) pair. Can't load.", - GetGUID().ToString().c_str(), GetName().c_str(), uint32(getRace()), uint32(getClass())); + GetGUID().ToString().c_str(), GetName().c_str(), uint32(GetRace()), uint32(GetClass())); return false; } @@ -20365,7 +20365,7 @@ bool Player::_LoadHomeBind(PreparedQueryResult result) if (!ok) { WorldSafeLocsEntry const* loc = sObjectMgr->GetDefaultGraveyard(GetTeam()); - if (!loc && getRace() == RACE_PANDAREN_NEUTRAL) + if (!loc && GetRace() == RACE_PANDAREN_NEUTRAL) loc = sObjectMgr->GetWorldSafeLoc(3295); // The Wandering Isle, Starting Area GY ASSERT(loc, "Missing fallback graveyard location for faction %u", uint32(GetTeamId())); @@ -20435,10 +20435,10 @@ void Player::SaveToDB(LoginDatabaseTransaction loginTransaction, CharacterDataba stmt->setUInt64(index++, GetGUID().GetCounter()); stmt->setUInt32(index++, GetSession()->GetAccountId()); stmt->setString(index++, GetName()); - stmt->setUInt8(index++, getRace()); - stmt->setUInt8(index++, getClass()); + stmt->setUInt8(index++, GetRace()); + stmt->setUInt8(index++, GetClass()); stmt->setUInt8(index++, GetNativeSex()); // save gender from PLAYER_BYTES_3, UNIT_BYTES_0 changes with every transform effect - stmt->setUInt8(index++, getLevel()); + stmt->setUInt8(index++, GetLevel()); stmt->setUInt32(index++, m_activePlayerData->XP); stmt->setUInt64(index++, GetMoney()); stmt->setUInt8(index++, GetInventorySlotCount()); @@ -20563,10 +20563,10 @@ void Player::SaveToDB(LoginDatabaseTransaction loginTransaction, CharacterDataba // Update query stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHARACTER); stmt->setString(index++, GetName()); - stmt->setUInt8(index++, getRace()); - stmt->setUInt8(index++, getClass()); + stmt->setUInt8(index++, GetRace()); + stmt->setUInt8(index++, GetClass()); stmt->setUInt8(index++, GetNativeSex()); // save gender from PLAYER_BYTES_3, UNIT_BYTES_0 changes with every transform effect - stmt->setUInt8(index++, getLevel()); + stmt->setUInt8(index++, GetLevel()); stmt->setUInt32(index++, m_activePlayerData->XP); stmt->setUInt64(index++, GetMoney()); stmt->setUInt8(index++, GetInventorySlotCount()); @@ -21555,7 +21555,7 @@ void Player::_SaveStoredAuraTeleportLocations(CharacterDatabaseTransaction& tran void Player::_SaveStats(CharacterDatabaseTransaction& trans) const { // check if stat saving is enabled and if char level is high enough - if (!sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE) || getLevel() < sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE)) + if (!sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE) || GetLevel() < sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE)) return; CharacterDatabasePreparedStatement* stmt; @@ -22159,7 +22159,7 @@ void Player::Whisper(uint32 textId, Player* target, bool /*isBossWhisper = false LocaleConstant locale = target->GetSession()->GetSessionDbLocaleIndex(); WorldPackets::Chat::Chat packet; - packet.Initialize(CHAT_MSG_WHISPER, LANG_UNIVERSAL, this, target, DB2Manager::GetBroadcastTextValue(bct, locale, getGender())); + packet.Initialize(CHAT_MSG_WHISPER, LANG_UNIVERSAL, this, target, DB2Manager::GetBroadcastTextValue(bct, locale, GetGender())); target->SendDirectMessage(packet.Write()); } @@ -22880,7 +22880,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc if (node->Flags & TAXI_NODE_FLAG_USE_FAVORITE_MOUNT && preferredMountDisplay) mount_display_id = preferredMountDisplay; else - mount_display_id = sObjectMgr->GetTaxiMountDisplayId(sourcenode, GetTeam(), npc == nullptr || (sourcenode == 315 && getClass() == CLASS_DEATH_KNIGHT)); + mount_display_id = sObjectMgr->GetTaxiMountDisplayId(sourcenode, GetTeam(), npc == nullptr || (sourcenode == 315 && GetClass() == CLASS_DEATH_KNIGHT)); // in spell case allow 0 model if ((mount_display_id == 0 && spellid == 0) || sourcepath == 0) @@ -23042,7 +23042,7 @@ void Player::InitDataForForm(bool reapplyMods) void Player::InitDisplayIds() { - ChrModelEntry const* model = sDB2Manager.GetChrModel(getRace(), GetNativeSex()); + ChrModelEntry const* model = sDB2Manager.GetChrModel(GetRace(), GetNativeSex()); if (!model) { TC_LOG_ERROR("entities.player", "Player::InitDisplayIds: Player '%s' (%s) has incorrect race/gender pair. Can't init display ids.", GetName().c_str(), GetGUID().ToString().c_str()); @@ -23298,7 +23298,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin return false; } - if (!(pProto->GetAllowableClass() & getClassMask()) && pProto->GetBonding() == BIND_ON_ACQUIRE && !IsGameMaster()) + if (!(pProto->GetAllowableClass() & GetClassMask()) && pProto->GetBonding() == BIND_ON_ACQUIRE && !IsGameMaster()) { SendBuyError(BUY_ERR_CANT_FIND_ITEM, nullptr, item, 0); return false; @@ -24651,7 +24651,7 @@ void Player::ResetSpells(bool myClassOnly) if (myClassOnly) { - ChrClassesEntry const* clsEntry = sChrClassesStore.LookupEntry(getClass()); + ChrClassesEntry const* clsEntry = sChrClassesStore.LookupEntry(GetClass()); if (!clsEntry) return; family = clsEntry->SpellClassSet; @@ -24694,13 +24694,13 @@ void Player::LearnCustomSpells() return; // learn default race/class spells - PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(GetRace(), GetClass()); ASSERT(info); for (PlayerCreateInfoSpells::const_iterator itr = info->customSpells.begin(); itr != info->customSpells.end(); ++itr) { uint32 tspell = *itr; TC_LOG_DEBUG("entities.player.loading", "Player::LearnCustomSpells: Player '%s' (%s, Class: %u Race: %u): Adding initial spell (SpellID: %u)", - GetName().c_str(), GetGUID().ToString().c_str(), uint32(getClass()), uint32(getRace()), tspell); + GetName().c_str(), GetGUID().ToString().c_str(), uint32(GetClass()), uint32(GetRace()), tspell); if (!IsInWorld()) // will send in INITIAL_SPELLS in list anyway at map add AddSpell(tspell, true, true, true, false); else // but send in normal spell in game learn case @@ -24711,7 +24711,7 @@ void Player::LearnCustomSpells() void Player::LearnDefaultSkills() { // learn default race/class skills - PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + PlayerInfo const* info = sObjectMgr->GetPlayerInfo(GetRace(), GetClass()); ASSERT(info); for (PlayerCreateInfoSkills::const_iterator itr = info->skills.begin(); itr != info->skills.end(); ++itr) { @@ -24719,7 +24719,7 @@ void Player::LearnDefaultSkills() if (HasSkill(rcInfo->SkillID)) continue; - if (rcInfo->MinLevel > getLevel()) + if (rcInfo->MinLevel > GetLevel()) continue; LearnDefaultSkill(rcInfo); @@ -24740,8 +24740,8 @@ void Player::LearnDefaultSkill(SkillRaceClassInfoEntry const* rcInfo) uint16 maxValue = GetMaxSkillValueForLevel(); if (rcInfo->Flags & SKILL_FLAG_ALWAYS_MAX_VALUE) skillValue = maxValue; - else if (getClass() == CLASS_DEATH_KNIGHT) - skillValue = std::min(std::max<uint16>({ 1, uint16((getLevel() - 1) * 5) }), maxValue); + else if (GetClass() == CLASS_DEATH_KNIGHT) + skillValue = std::min(std::max<uint16>({ 1, uint16((GetLevel() - 1) * 5) }), maxValue); SetSkill(skillId, 0, skillValue, maxValue); break; @@ -24756,8 +24756,8 @@ void Player::LearnDefaultSkill(SkillRaceClassInfoEntry const* rcInfo) uint16 skillValue = 1; if (rcInfo->Flags & SKILL_FLAG_ALWAYS_MAX_VALUE) skillValue = maxValue; - else if (getClass() == CLASS_DEATH_KNIGHT) - skillValue = std::min(std::max(uint16(1), uint16((getLevel() - 1) * 5)), maxValue); + else if (GetClass() == CLASS_DEATH_KNIGHT) + skillValue = std::min(std::max(uint16(1), uint16((GetLevel() - 1) * 5)), maxValue); SetSkill(skillId, 1, skillValue, maxValue); break; @@ -24842,8 +24842,8 @@ void Player::LearnQuestRewardedSpells() void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue) { - uint8 race = getRace(); - uint32 classMask = getClassMask(); + uint8 race = GetRace(); + uint32 classMask = GetClassMask(); std::vector<SkillLineAbilityEntry const*> const* skillLineAbilities = sDB2Manager.GetSkillLineAbilitiesBySkill(skillId); if (!skillLineAbilities) return; @@ -24881,7 +24881,7 @@ void Player::LearnSkillRewardedSpells(uint32 skillId, uint32 skillValue) continue; // check level, skip class spells if not high enough - if (getLevel() < spellInfo->SpellLevel) + if (GetLevel() < spellInfo->SpellLevel) continue; // need unlearn spell @@ -25174,7 +25174,7 @@ bool Player::GetBGAccessByLevel(BattlegroundTypeId bgTypeId) const return false; // limit check leel to dbc compatible level range - uint32 level = getLevel(); + uint32 level = GetLevel(); if (level > DEFAULT_MAX_LEVEL) level = DEFAULT_MAX_LEVEL; @@ -25208,8 +25208,8 @@ Player* Player::GetTrader() const bool Player::IsSpellFitByClassAndRace(uint32 spell_id) const { - uint8 race = getRace(); - uint32 classmask = getClassMask(); + uint8 race = GetRace(); + uint32 classmask = GetClassMask(); SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spell_id); if (bounds.first == bounds.second) @@ -25226,7 +25226,7 @@ bool Player::IsSpellFitByClassAndRace(uint32 spell_id) const continue; // skip wrong class and race skill saved in SkillRaceClassInfo.dbc - if (!sDB2Manager.GetSkillRaceClassInfo(_spell_idx->second->SkillLine, getRace(), getClass())) + if (!sDB2Manager.GetSkillRaceClassInfo(_spell_idx->second->SkillLine, GetRace(), GetClass())) continue; return true; @@ -25594,7 +25594,7 @@ void Player::InitializeSelfResurrectionSpells() bool Player::isHonorOrXPTarget(Unit const* victim) const { uint8 v_level = victim->GetLevelForTarget(this); - uint8 k_grey = Trinity::XP::GetGrayLevel(getLevel()); + uint8 k_grey = Trinity::XP::GetGrayLevel(GetLevel()); // Victim level less gray level if (v_level < k_grey && !sWorld->getIntConfig(CONFIG_MIN_CREATURE_SCALED_XP_RATIO)) @@ -25611,7 +25611,7 @@ bool Player::isHonorOrXPTarget(Unit const* victim) const bool Player::GetsRecruitAFriendBonus(bool forXP) { bool recruitAFriend = false; - if (getLevel() <= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL) || !forXP) + if (GetLevel() <= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL) || !forXP) { if (Group* group = GetGroup()) { @@ -25627,12 +25627,12 @@ bool Player::GetsRecruitAFriendBonus(bool forXP) if (forXP) { // level must be allowed to get RaF bonus - if (player->getLevel() > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) + if (player->GetLevel() > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL)) continue; // level difference must be small enough to get RaF bonus, UNLESS we are lower level - if (player->getLevel() < getLevel()) - if (uint8(getLevel() - player->getLevel()) > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE)) + if (player->GetLevel() < GetLevel()) + if (uint8(GetLevel() - player->GetLevel()) > sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE)) continue; } @@ -26234,7 +26234,7 @@ int64 Player::GetBarberShopCost(Trinity::IteratorPair<UF::ChrCustomizationChoice if (HasAuraType(SPELL_AURA_REMOVE_BARBER_SHOP_COST)) return 0; - GtBarberShopCostBaseEntry const* bsc = sBarberShopCostBaseGameTable.GetRow(getLevel()); + GtBarberShopCostBaseEntry const* bsc = sBarberShopCostBaseGameTable.GetRow(GetLevel()); if (!bsc) // shouldn't happen return 0; @@ -26378,7 +26378,7 @@ void Player::ResyncRunes() const void Player::InitRunes() { - if (getClass() != CLASS_DEATH_KNIGHT) + if (GetClass() != CLASS_DEATH_KNIGHT) return; uint32 runeIndex = GetPowerIndex(POWER_RUNES); @@ -26549,11 +26549,11 @@ void Player::_LoadSkills(PreparedQueryResult result) uint16 value = fields[1].GetUInt16(); uint16 max = fields[2].GetUInt16(); - SkillRaceClassInfoEntry const* rcEntry = sDB2Manager.GetSkillRaceClassInfo(skill, getRace(), getClass()); + SkillRaceClassInfoEntry const* rcEntry = sDB2Manager.GetSkillRaceClassInfo(skill, GetRace(), GetClass()); if (!rcEntry) { TC_LOG_ERROR("entities.player", "Player::_LoadSkills: Player '%s' (%s, Race: %u, Class: %u) has forbidden skill %u for his race/class combination", - GetName().c_str(), GetGUID().ToString().c_str(), uint32(getRace()), uint32(getClass()), skill); + GetName().c_str(), GetGUID().ToString().c_str(), uint32(GetRace()), uint32(GetClass()), skill); mSkillStatus.insert(SkillStatusMap::value_type(skill, SkillStatusData(0, SKILL_DELETED))); continue; @@ -26838,7 +26838,7 @@ TalentLearnResult Player::LearnTalent(uint32 talentId, int32* spellOnCooldown) return TALENT_FAILED_UNKNOWN; // prevent learn talent for different class (cheating) - if (talentInfo->ClassID != getClass()) + if (talentInfo->ClassID != GetClass()) return TALENT_FAILED_UNKNOWN; // check if we have enough talent points @@ -26854,7 +26854,7 @@ TalentLearnResult Player::LearnTalent(uint32 talentId, int32* spellOnCooldown) // but only 2 out of 3 have SpecID != 0 // We need to make sure that if player is in one of these defined specs he will not learn the other choice TalentEntry const* bestSlotMatch = nullptr; - for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(getClass(), talentInfo->TierID, talentInfo->ColumnIndex)) + for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(GetClass(), talentInfo->TierID, talentInfo->ColumnIndex)) { if (!talent->SpecID) bestSlotMatch = talent; @@ -26871,7 +26871,7 @@ TalentLearnResult Player::LearnTalent(uint32 talentId, int32* spellOnCooldown) // Check if player doesn't have any talent in current tier for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) { - for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(getClass(), talentInfo->TierID, c)) + for (TalentEntry const* talent : sDB2Manager.GetTalentsByPosition(GetClass(), talentInfo->TierID, c)) { if (!HasTalent(talent->ID, GetActiveTalentGroup())) continue; @@ -26914,7 +26914,7 @@ TalentLearnResult Player::LearnTalent(uint32 talentId, int32* spellOnCooldown) void Player::ResetTalentSpecialization() { // Reset only talents that have different spells for each spec - uint32 class_ = getClass(); + uint32 class_ = GetClass(); for (uint32 t = 0; t < MAX_TALENT_TIERS; ++t) for (uint32 c = 0; c < MAX_TALENT_COLUMNS; ++c) if (sDB2Manager.GetTalentsByPosition(class_, t, c).size() > 1) @@ -26923,7 +26923,7 @@ void Player::ResetTalentSpecialization() RemoveSpecializationSpells(); - ChrSpecializationEntry const* defaultSpec = ASSERT_NOTNULL(sDB2Manager.GetDefaultChrSpecializationForClass(getClass())); + ChrSpecializationEntry const* defaultSpec = ASSERT_NOTNULL(sDB2Manager.GetDefaultChrSpecializationForClass(GetClass())); SetPrimarySpecialization(defaultSpec->ID); SetActiveTalentGroup(defaultSpec->OrderIndex); @@ -26951,10 +26951,10 @@ TalentLearnResult Player::LearnPvpTalent(uint32 talentID, uint8 slot, int32* spe if (talentInfo->SpecID != int32(GetPrimarySpecialization())) return TALENT_FAILED_UNKNOWN; - if (talentInfo->LevelRequired > getLevel()) + if (talentInfo->LevelRequired > GetLevel()) return TALENT_FAILED_UNKNOWN; - if (sDB2Manager.GetRequiredLevelForPvpTalentSlot(slot, Classes(getClass())) > getLevel()) + if (sDB2Manager.GetRequiredLevelForPvpTalentSlot(slot, Classes(GetClass())) > GetLevel()) return TALENT_FAILED_UNKNOWN; if (PvpTalentCategoryEntry const* talentCategory = sPvpTalentCategoryStore.LookupEntry(talentInfo->PvpTalentCategoryID)) @@ -27200,7 +27200,7 @@ void Player::SendTalentsInfoData() for (uint8 i = 0; i < MAX_SPECIALIZATIONS; ++i) { - ChrSpecializationEntry const* spec = sDB2Manager.GetChrSpecializationByIndex(getClass(), i); + ChrSpecializationEntry const* spec = sDB2Manager.GetChrSpecializationByIndex(GetClass(), i); if (!spec) continue; @@ -27494,7 +27494,7 @@ void Player::_LoadGlyphs(PreparedQueryResult result) Field* fields = result->Fetch(); uint8 spec = fields[0].GetUInt8(); - if (spec >= MAX_SPECIALIZATIONS || !sDB2Manager.GetChrSpecializationByIndex(getClass(), spec)) + if (spec >= MAX_SPECIALIZATIONS || !sDB2Manager.GetChrSpecializationByIndex(GetClass(), spec)) continue; uint16 glyphId = fields[1].GetUInt16(); @@ -27650,7 +27650,7 @@ void Player::ActivateTalentGroup(ChrSpecializationEntry const* spec) // unlearn only talents for character class // some spell learned by one class as normal spells or know at creation but another class learn it as talent, // to prevent unexpected lost normal learned spell skip another class talents - if (talentInfo->ClassID != getClass()) + if (talentInfo->ClassID != GetClass()) continue; if (talentInfo->SpellID == 0) @@ -27708,7 +27708,7 @@ void Player::ActivateTalentGroup(ChrSpecializationEntry const* spec) continue; // learn only talents for character class - if (talentInfo->ClassID != getClass()) + if (talentInfo->ClassID != GetClass()) continue; if (!talentInfo->SpellID) @@ -28500,7 +28500,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy pet->SetNpcFlags(UNIT_NPC_FLAG_NONE); pet->SetNpcFlags2(UNIT_NPC_FLAG_2_NONE); - pet->InitStatsForLevel(getLevel()); + pet->InitStatsForLevel(GetLevel()); SetMinion(pet, true); @@ -28741,7 +28741,7 @@ void Player::LearnSpecializationSpells() { SpecializationSpellsEntry const* specSpell = (*specSpells)[j]; SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(specSpell->SpellID, DIFFICULTY_NONE); - if (!spellInfo || spellInfo->SpellLevel > getLevel()) + if (!spellInfo || spellInfo->SpellLevel > GetLevel()) continue; LearnSpell(specSpell->SpellID, false); @@ -28755,7 +28755,7 @@ void Player::RemoveSpecializationSpells() { for (uint32 i = 0; i < MAX_SPECIALIZATIONS; ++i) { - if (ChrSpecializationEntry const* specialization = sDB2Manager.GetChrSpecializationByIndex(getClass(), i)) + if (ChrSpecializationEntry const* specialization = sDB2Manager.GetChrSpecializationByIndex(GetClass(), i)) { if (std::vector<SpecializationSpellsEntry const*> const* specSpells = sDB2Manager.GetSpecializationSpells(specialization->ID)) { @@ -28783,7 +28783,7 @@ void Player::RemoveSocial() uint32 Player::GetDefaultSpecId() const { - return ASSERT_NOTNULL(sDB2Manager.GetDefaultChrSpecializationForClass(getClass()))->ID; + return ASSERT_NOTNULL(sDB2Manager.GetDefaultChrSpecializationForClass(GetClass()))->ID; } void Player::SendSpellCategoryCooldowns() const diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index f20fe6c3704..2f2925dffe9 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1149,7 +1149,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> void RemoveSocial(); PlayerTaxi m_taxi; - void InitTaxiNodesForLevel() { m_taxi.InitTaxiNodesForLevel(getRace(), getClass(), getLevel()); } + void InitTaxiNodesForLevel() { m_taxi.InitTaxiNodesForLevel(GetRace(), GetClass(), GetLevel()); } bool ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc = nullptr, uint32 spellid = 0, uint32 preferredMountDisplay = 0); bool ActivateTaxiPathTo(uint32 taxi_path_id, uint32 spellid = 0); void FinishTaxiFlight(); diff --git a/src/server/game/Entities/Player/RestMgr.cpp b/src/server/game/Entities/Player/RestMgr.cpp index 8d7efea8be9..3c23a9310c0 100644 --- a/src/server/game/Entities/Player/RestMgr.cpp +++ b/src/server/game/Entities/Player/RestMgr.cpp @@ -38,7 +38,7 @@ void RestMgr::SetRestBonus(RestTypes restType, float restBonus) { case REST_TYPE_XP: // Reset restBonus (XP only) for max level players - if (_player->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (_player->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) restBonus = 0; next_level_xp = _player->m_activePlayerData->NextLevelXP; @@ -87,7 +87,7 @@ void RestMgr::SetRestBonus(RestTypes restType, float restBonus) void RestMgr::AddRestBonus(RestTypes restType, float restBonus) { // Don't add extra rest bonus to max level players. Note: Might need different condition in next expansion for honor XP (PLAYER_LEVEL_MIN_HONOR perhaps). - if (_player->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (_player->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) restBonus = 0; float totalRestBonus = GetRestBonus(restType) + restBonus; diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp index dbdefe080a7..ecf60f20302 100644 --- a/src/server/game/Entities/Player/SocialMgr.cpp +++ b/src/server/game/Entities/Player/SocialMgr.cpp @@ -241,8 +241,8 @@ void SocialMgr::GetFriendInfo(Player* player, ObjectGuid const& friendGUID, Frie } friendInfo.Area = target->GetZoneId(); - friendInfo.Level = target->getLevel(); - friendInfo.Class = target->getClass(); + friendInfo.Level = target->GetLevel(); + friendInfo.Class = target->GetClass(); } } |
