feat(Core/Scripting): Add Player skill based hook (#21273)
Co-authored-by: IntelligentQuantum <IntelligentQuantum@ProtonMail.Com> Co-authored-by: Ludwig <sudlud@users.noreply.github.com>
This commit is contained in:
parent
c96ff8a6dc
commit
971ebcae31
4 changed files with 37 additions and 4 deletions
|
|
@ -204,6 +204,9 @@ enum PlayerHook
|
|||
PLAYERHOOK_CAN_SEND_ERROR_ALREADY_LOOTED,
|
||||
PLAYERHOOK_ON_AFTER_CREATURE_LOOT,
|
||||
PLAYERHOOK_ON_AFTER_CREATURE_LOOT_MONEY,
|
||||
PLAYERHOOK_ON_CAN_UPDATE_SKILL,
|
||||
PLAYERHOOK_ON_BEFORE_UPDATE_SKILL,
|
||||
PLAYERHOOK_ON_UPDATE_SKILL,
|
||||
PLAYERHOOK_CAN_RESURRECT,
|
||||
PLAYERHOOK_END
|
||||
};
|
||||
|
|
@ -767,6 +770,10 @@ public:
|
|||
*/
|
||||
virtual void OnAfterCreatureLootMoney(Player* /*player*/) { }
|
||||
|
||||
virtual bool CanPlayerUpdateSkill(Player* /*player*/, uint32 /*skillId*/) { return true; }
|
||||
virtual void OnBeforePlayerUpdateSkill(Player* /*player*/, uint32 /*skillId*/, uint32& /*value*/, uint32 /*max*/, uint32 /*step*/) { }
|
||||
virtual void OnPlayerUpdateSkill(Player* /*player*/, uint32 /*skillId*/, uint32 /*value*/, uint32 /*max*/, uint32 /*step*/, uint32 /*newValue*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook is called, to avoid player resurrect
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue