mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/Player: removed InitTalentForLevel as it no longer serves any purpose which isn't already covered by other functions
This commit is contained in:
@@ -490,12 +490,12 @@ bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::Charac
|
||||
|
||||
// Create the default talent group for all new characters
|
||||
_talentGroups.emplace_back();
|
||||
UpdateAvailableTalentPoints();
|
||||
|
||||
// base stats and related field values
|
||||
InitStatsForLevel();
|
||||
InitTaxiNodesForLevel();
|
||||
InitGlyphsForLevel();
|
||||
InitTalentForLevel();
|
||||
InitializeSkillFields();
|
||||
InitPrimaryProfessions(); // to max set before any spell added
|
||||
|
||||
@@ -2131,7 +2131,8 @@ void Player::GiveLevel(uint8 level)
|
||||
SetCreateMana(basemana);
|
||||
|
||||
InitGlyphsForLevel();
|
||||
InitTalentForLevel();
|
||||
UpdateAvailableTalentPoints();
|
||||
SendTalentsInfoData();
|
||||
InitTaxiNodesForLevel();
|
||||
|
||||
UpdateAllStats();
|
||||
@@ -2172,14 +2173,6 @@ bool Player::IsMaxLevel() const
|
||||
return GetLevel() >= m_activePlayerData->MaxLevel;
|
||||
}
|
||||
|
||||
void Player::InitTalentForLevel()
|
||||
{
|
||||
UpdateAvailableTalentPoints();
|
||||
|
||||
if (!GetSession()->PlayerLoading())
|
||||
SendTalentsInfoData(); // update at client
|
||||
}
|
||||
|
||||
void Player::InitStatsForLevel(bool reapplyMods)
|
||||
{
|
||||
if (reapplyMods) //reapply stats values only on .reset stats (level) command
|
||||
@@ -17399,7 +17392,7 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder const& hol
|
||||
|
||||
// after spell and quest load
|
||||
InitGlyphsForLevel();
|
||||
InitTalentForLevel();
|
||||
UpdateAvailableTalentPoints();
|
||||
LearnDefaultSkills();
|
||||
LearnCustomSpells();
|
||||
|
||||
|
||||
@@ -1865,7 +1865,6 @@ class TC_GAME_API Player final : public Unit, public GridObject<Player>
|
||||
|
||||
bool ResetTalents(bool noCost = false);
|
||||
uint32 GetNextResetTalentsCost() const;
|
||||
void InitTalentForLevel();
|
||||
void SendTalentsInfoData();
|
||||
|
||||
void InitGlyphsForLevel();
|
||||
|
||||
@@ -752,7 +752,6 @@ public:
|
||||
if (Player* target = player->GetConnectedPlayer())
|
||||
{
|
||||
target->GiveLevel(static_cast<uint8>(newlevel));
|
||||
target->InitTalentForLevel();
|
||||
target->SetXP(0);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
@@ -799,7 +798,6 @@ public:
|
||||
if (Player* target = player->GetConnectedPlayer())
|
||||
{
|
||||
target->GiveLevel(static_cast<uint8>(newlevel));
|
||||
target->InitTalentForLevel();
|
||||
target->SetXP(0);
|
||||
|
||||
if (handler->needReportToTarget(target))
|
||||
|
||||
@@ -102,7 +102,8 @@ public:
|
||||
if (level != oldlevel)
|
||||
{
|
||||
target->SetLevel(static_cast<uint8>(level));
|
||||
target->InitTalentForLevel();
|
||||
target->UpdateAvailableTalentPoints();
|
||||
target->SendTalentsInfoData();
|
||||
target->SetXP(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,8 @@ public:
|
||||
target->InitRunes();
|
||||
target->InitStatsForLevel(true);
|
||||
target->InitTaxiNodesForLevel();
|
||||
target->InitTalentForLevel();
|
||||
target->UpdateAvailableTalentPoints();
|
||||
target->SendTalentsInfoData();
|
||||
target->SetXP(0);
|
||||
|
||||
target->_ApplyAllLevelScaleItemMods(true);
|
||||
@@ -197,7 +198,8 @@ public:
|
||||
target->InitRunes();
|
||||
target->InitStatsForLevel(true);
|
||||
target->InitTaxiNodesForLevel();
|
||||
target->InitTalentForLevel();
|
||||
target->UpdateAvailableTalentPoints();
|
||||
target->SendTalentsInfoData();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user