mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-10 03:59:05 +01:00
Core/Players: Improvements for talent reset logic. (#29580)
* Clean up Player::ResetTalents() from unnecessary logic, such as withdrawing money. Move it to more suitable places. * Implemented SMSG_TALENTS_INVOLUNTARILY_RESET and use it instead of old trinity_string. * Do not reset the accumulated talent reset cost if CONFIG_NO_RESET_TALENT_COST is enabled.
This commit is contained in:
@@ -1843,9 +1843,9 @@ void ScriptMgr::OnPlayerFreeTalentPointsChanged(Player* player, uint32 points)
|
||||
FOREACH_SCRIPT(PlayerScript)->OnFreeTalentPointsChanged(player, points);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerTalentsReset(Player* player, bool noCost)
|
||||
void ScriptMgr::OnPlayerTalentsReset(Player* player, bool involuntarily)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnTalentsReset(player, noCost);
|
||||
FOREACH_SCRIPT(PlayerScript)->OnTalentsReset(player, involuntarily);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerMoneyChanged(Player* player, int32& amount)
|
||||
@@ -2591,7 +2591,7 @@ void PlayerScript::OnFreeTalentPointsChanged(Player* /*player*/, uint32 /*points
|
||||
{
|
||||
}
|
||||
|
||||
void PlayerScript::OnTalentsReset(Player* /*player*/, bool /*noCost*/)
|
||||
void PlayerScript::OnTalentsReset(Player* /*player*/, bool /*involuntarily*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user