From fb49ae7207620e03d5adcef591b48308d5988b55 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" <guilherme.menaldo@outlook.com> Date: Mon, 1 Oct 2018 18:24:19 -0300 Subject: Fixes an assertion error when sc_end is called for SC_BERSERK --- src/map/script.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/map/script.c b/src/map/script.c index b787d0138..5989a074b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -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 -- cgit v1.2.3-70-g09d2