mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
chore(Core/ScriptMgr): Add Hooks for profession skill gains (#16526)
This commit is contained in:
@@ -1274,6 +1274,29 @@ public:
|
||||
|
||||
virtual void OnGetMaxSkillValue(Player* /*player*/, uint32 /*skill*/, int32& /*result*/, bool /*IsPure*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook called before gathering skill gain is applied to the character.
|
||||
*
|
||||
* @param player Contains information about the Player sender
|
||||
* @param skill_id Contains information about the skill line
|
||||
* @param current Contains the current skill level for skill
|
||||
* @param gray Contains the gray skill level for current application
|
||||
* @param green Contains the green skill level for current application
|
||||
* @param yellow Contains the yellow skill level for current application
|
||||
* @param gain Contains the amount of points that should be added to the Player
|
||||
*/
|
||||
virtual void OnUpdateGatheringSkill(Player* /*player*/, uint32 /*skill_id*/, uint32 /*current*/, uint32 /*gray*/, uint32 /*green*/, uint32 /*yellow*/, uint32& /*gain*/) { }
|
||||
|
||||
/**
|
||||
* @brief This hook is called before crafting skill gain is applied to the character.
|
||||
*
|
||||
* @param player Contains information about the Player sender
|
||||
* @param skill Contains information about the skill line
|
||||
* @param current_level Contains the current skill level for skill
|
||||
* @param gain Contains the amount of points that should be added to the Player
|
||||
*/
|
||||
virtual void OnUpdateCraftingSkill(Player* /*player*/, SkillLineAbilityEntry const* /*skill*/, uint32 /*current_level*/, uint32& /*gain*/) { }
|
||||
|
||||
[[nodiscard]] virtual bool OnUpdateFishingSkill(Player* /*player*/, int32 /*skill*/, int32 /*zone_skill*/, int32 /*chance*/, int32 /*roll*/) { return true; }
|
||||
|
||||
[[nodiscard]] virtual bool CanAreaExploreAndOutdoor(Player* /*player*/) { return true; }
|
||||
@@ -2334,6 +2357,8 @@ public: /* PlayerScript */
|
||||
void OnDeleteFromDB(CharacterDatabaseTransaction trans, uint32 guid);
|
||||
bool CanRepopAtGraveyard(Player* player);
|
||||
void OnGetMaxSkillValue(Player* player, uint32 skill, int32& result, bool IsPure);
|
||||
void OnUpdateGatheringSkill(Player* player, uint32 skillId, uint32 currentLevel, uint32 gray, uint32 green, uint32 yellow, uint32& gain);
|
||||
void OnUpdateCraftingSkill(Player* player, SkillLineAbilityEntry const* skill, uint32 currentLevel, uint32& gain);
|
||||
bool OnUpdateFishingSkill(Player* player, int32 skill, int32 zone_skill, int32 chance, int32 roll);
|
||||
bool CanAreaExploreAndOutdoor(Player* player);
|
||||
void OnVictimRewardBefore(Player* player, Player* victim, uint32& killer_title, uint32& victim_title);
|
||||
|
||||
Reference in New Issue
Block a user