Skip to content

Commit

Permalink
Fix AutoSpell not always setting the new skill
Browse files Browse the repository at this point in the history
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
  • Loading branch information
guilherme-gm committed Apr 27, 2024
1 parent f3d4d84 commit 0639e05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0639e05

Please sign in to comment.