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. (cherry picked from commit ca1560f043df275d9241055adbf61a393666a533)
This commit is contained in:
@@ -2017,9 +2017,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, int64& amount)
|
||||
@@ -2914,7 +2914,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