From 6579f1263271b0c431b00ae779b5b102569178d8 Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 29 Dec 2023 08:19:29 -0300 Subject: [PATCH] refactor skill advancement event logic (#4615) --- .../player/update_client_on_advance_skill.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/scripts/creaturescripts/player/update_client_on_advance_skill.lua b/data/scripts/creaturescripts/player/update_client_on_advance_skill.lua index 8fdaa332da..9ff940af6b 100644 --- a/data/scripts/creaturescripts/player/update_client_on_advance_skill.lua +++ b/data/scripts/creaturescripts/player/update_client_on_advance_skill.lua @@ -1,11 +1,13 @@ local updateClientOnAdvanceSkill = CreatureEvent("Update Client On Advance Skill") function updateClientOnAdvanceSkill.onAdvance(player, skill, oldLevel, newLevel) - if skill == SKILL_LEVEL and newLevel > oldLevel then + if skill == SKILL_LEVEL then return true end - player:takeScreenshot(SCREENSHOT_TYPE_SKILLUP) + if newLevel > oldLevel then + player:takeScreenshot(SCREENSHOT_TYPE_SKILLUP) + end return true end