mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
feat(Core/Player): add OnCalculateTalentsPoints hook (#19749)
* playerTalentsHook * oeps :# * :# * does this work? * make reference --------- Co-authored-by: Amy Fang <amy@cavemail.ddns.net>
This commit is contained in:
@@ -54,6 +54,11 @@ void ScriptMgr::OnPlayerJustDied(Player* player)
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_JUST_DIED, script->OnPlayerJustDied(player));
|
||||
}
|
||||
|
||||
void ScriptMgr::OnCalculateTalentsPoints(Player const* player, uint32& talentPointsForLevel)
|
||||
{
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_CALCULATE_TALENTS_POINTS, script->OnCalculateTalentsPoints(player, talentPointsForLevel));
|
||||
}
|
||||
|
||||
void ScriptMgr::OnPlayerReleasedGhost(Player* player)
|
||||
{
|
||||
CALL_ENABLED_HOOKS(PlayerScript, PLAYERHOOK_ON_PLAYER_RELEASED_GHOST, script->OnPlayerReleasedGhost(player));
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
enum PlayerHook
|
||||
{
|
||||
PLAYERHOOK_ON_PLAYER_JUST_DIED,
|
||||
PLAYERHOOK_ON_CALCULATE_TALENTS_POINTS,
|
||||
PLAYERHOOK_ON_PLAYER_RELEASED_GHOST,
|
||||
PLAYERHOOK_ON_SEND_INITIAL_PACKETS_BEFORE_ADD_TO_MAP,
|
||||
PLAYERHOOK_ON_BATTLEGROUND_DESERTION,
|
||||
@@ -213,6 +214,9 @@ public:
|
||||
// Called when a player dies
|
||||
virtual void OnPlayerJustDied(Player* /*player*/) { }
|
||||
|
||||
// Called player talent points are calculated
|
||||
virtual void OnCalculateTalentsPoints(Player const* /*player*/, uint32& /*talentPointsForLevel*/) { }
|
||||
|
||||
// Called when clicking the release button
|
||||
virtual void OnPlayerReleasedGhost(Player* /*player*/) { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user