diff options
author | Mykhailo Redko <ovitnez@gmail.com> | 2024-02-13 16:55:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 15:55:37 +0100 |
commit | ca1560f043df275d9241055adbf61a393666a533 (patch) | |
tree | 594263c2cce9d067bc9e550e785c355740ecf465 /src/server/game/Scripting/ScriptMgr.h | |
parent | 1b878209354723138d2f5d969ee53255e6db94d4 (diff) |
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.
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.h')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index d43b8e1c8b8..e329fbaeeb3 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -641,7 +641,7 @@ class TC_GAME_API PlayerScript : public ScriptObject virtual void OnFreeTalentPointsChanged(Player* player, uint32 points); // Called when a player's talent points are reset (right before the reset is done) - virtual void OnTalentsReset(Player* player, bool noCost); + virtual void OnTalentsReset(Player* player, bool involuntarily); // Called when a player's money is modified (before the modification is done) virtual void OnMoneyChanged(Player* player, int32& amount); @@ -1009,7 +1009,7 @@ class TC_GAME_API ScriptMgr void OnPlayerKilledByCreature(Creature* killer, Player* killed); void OnPlayerLevelChanged(Player* player, uint8 oldLevel); void OnPlayerFreeTalentPointsChanged(Player* player, uint32 newPoints); - void OnPlayerTalentsReset(Player* player, bool noCost); + void OnPlayerTalentsReset(Player* player, bool involuntarily); void OnPlayerMoneyChanged(Player* player, int32& amount); void OnPlayerMoneyLimit(Player* player, int32 amount); void OnGivePlayerXP(Player* player, uint32& amount, Unit* victim); |