chore(Core/ScriptMgr): Add Hooks for profession skill gains (#16526)

This commit is contained in:
Žan Skamljič
2023-06-19 21:12:20 +02:00
committed by GitHub
parent ec5eabce25
commit ee3ab6fe2a
3 changed files with 41 additions and 0 deletions

View File

@@ -727,6 +727,7 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue,
uint32 gathering_skill_gain =
sWorld->getIntConfig(CONFIG_SKILL_GAIN_GATHERING);
sScriptMgr->OnUpdateGatheringSkill(this, SkillId, SkillValue, RedLevel + 100, RedLevel + 50, RedLevel + 25, gathering_skill_gain);
// For skinning and Mining chance decrease with level. 1-74 - no decrease,
// 75-149 - 2 times, 225-299 - 8 times
@@ -804,6 +805,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
uint32 craft_skill_gain =
sWorld->getIntConfig(CONFIG_SKILL_GAIN_CRAFTING);
sScriptMgr->OnUpdateCraftingSkill(this, _spell_idx->second, SkillValue, craft_skill_gain);
return UpdateSkillPro(
_spell_idx->second->SkillLine,