summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilherme G. Menaldo <guilherme.menaldo@outlook.com>2018-10-01 18:24:19 -0300
committerGuilherme G. Menaldo <guilherme.menaldo@outlook.com>2018-10-01 18:24:19 -0300
commitfb49ae7207620e03d5adcef591b48308d5988b55 (patch)
treecc7590389fbea87b803e70347f961beabce315b5
parent852c13305f67948531bd0277eb1922dbd02b1f26 (diff)
downloadhercules-fb49ae7207620e03d5adcef591b48308d5988b55.tar.gz
hercules-fb49ae7207620e03d5adcef591b48308d5988b55.tar.bz2
hercules-fb49ae7207620e03d5adcef591b48308d5988b55.tar.xz
hercules-fb49ae7207620e03d5adcef591b48308d5988b55.zip
Fixes an assertion error when sc_end is called for SC_BERSERK
-rw-r--r--src/map/script.c4
1 files changed, 3 insertions, 1 deletions
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