From 0639e051888d903e10aa95c90846f1ebcb95c2f4 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Tue, 13 Feb 2024 23:36:34 -0300 Subject: [PATCH] Fix AutoSpell not always setting the new skill SC_AUTOSPELL val1 should be the AutoSpell skill level, not the selected skill learned level. This was broken during the refactor and is now fixed. Giving it the selected skill level would prevent restarting the buff mid way if the previous buff had a higher level for the target skill. e.g. a Lv10 Fire Bolt would not be replaced by a Lv5 Earth Spikes --- src/map/skill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/skill.c b/src/map/skill.c index 2f2e05ef5f4..996c7bd344b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -18033,7 +18033,7 @@ static int skill_autospell_spell_selected(struct map_session_data *sd, uint16 sk if (max_lv > skill_lv) max_lv = skill_lv; - sc_start4(&sd->bl, &sd->bl, SC_AUTOSPELL, 100, skill_lv, skill_id, max_lv, 0, + sc_start4(&sd->bl, &sd->bl, SC_AUTOSPELL, 100, autospell_lv, skill_id, max_lv, 0, skill->get_time(SA_AUTOSPELL, skill_lv), SA_AUTOSPELL); return 0; }