diff options
author | Guilherme G. Menaldo <guilherme.menaldo@outlook.com> | 2018-10-01 18:24:19 -0300 |
---|---|---|
committer | Guilherme G. Menaldo <guilherme.menaldo@outlook.com> | 2018-10-01 18:24:19 -0300 |
commit | fb49ae7207620e03d5adcef591b48308d5988b55 (patch) | |
tree | cc7590389fbea87b803e70347f961beabce315b5 /src/map/script.c | |
parent | 852c13305f67948531bd0277eb1922dbd02b1f26 (diff) | |
download | hercules-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
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 4 |
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 |