Skip to content

Commit

Permalink
Fixes an assertion error when sc_end is called for SC_BERSERK
Browse files Browse the repository at this point in the history
  • Loading branch information
guilherme-gm committed Oct 1, 2018
1 parent 852c133 commit fb49ae7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/map/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -12335,7 +12335,9 @@ static BUILDIN(sc_end)
}

//This should help status_change_end force disabling the SC in case it has no limit.
sce->val1 = sce->val2 = sce->val3 = sce->val4 = 0;
if (type != SC_BERSERK)
sce->val1 = 0; // SC_BERSERK requires skill_lv that's stored in sce->val1 when being removed [KirieZ]
sce->val2 = sce->val3 = sce->val4 = 0;
status_change_end(bl, (sc_type)type, INVALID_TIMER);
}
else
Expand Down

0 comments on commit fb49ae7

Please sign in to comment.