summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-10-07 19:03:40 +0200
committerGitHub <noreply@github.com>2018-10-07 19:03:40 +0200
commitcbcc972537cb45efc965afc6a9ed628a9775864e (patch)
tree0f023d474ca822940e0e484e965dc750f1623978
parentd6c3435b6d6ca032692ceaab5944acd9e8724977 (diff)
parentfb49ae7207620e03d5adcef591b48308d5988b55 (diff)
downloadhercules-cbcc972537cb45efc965afc6a9ed628a9775864e.tar.gz
hercules-cbcc972537cb45efc965afc6a9ed628a9775864e.tar.bz2
hercules-cbcc972537cb45efc965afc6a9ed628a9775864e.tar.xz
hercules-cbcc972537cb45efc965afc6a9ed628a9775864e.zip
Merge pull request #2239 from guilherme-gm/201810-assertion_berserk
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 421def5f9..5eed58977 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12268,7 +12268,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