summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-07-25 03:47:38 -0300
committerJesusaves <cpntb1@ymail.com>2021-07-25 03:47:38 -0300
commit5ce425f7a0e5b6dd6c5d95e83c97ca04e5801e68 (patch)
tree4e17067f2bd53b440b927fd2fa884942bfc099b6
parentb0968f8d50348fc41f5b2e24ff198816d3da780c (diff)
downloadserverdata-5ce425f7a0e5b6dd6c5d95e83c97ca04e5801e68.tar.gz
serverdata-5ce425f7a0e5b6dd6c5d95e83c97ca04e5801e68.tar.bz2
serverdata-5ce425f7a0e5b6dd6c5d95e83c97ca04e5801e68.tar.xz
serverdata-5ce425f7a0e5b6dd6c5d95e83c97ca04e5801e68.zip
Healing exp cannot go negative but it could overflow...
...The "fairest" would be forcing absolute value.
-rw-r--r--npc/functions/clear_vars.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt
index 1405f89f..be895576 100644
--- a/npc/functions/clear_vars.txt
+++ b/npc/functions/clear_vars.txt
@@ -37,7 +37,7 @@ function script ClearVariables {
QL_CINDY = 0;
}
if (MAGIC_EXPERIENCE) {
- setq2(MagicQuest_Healing, MAGIC_EXPERIENCE >> 24);
+ setq2(MagicQuest_Healing, abs(MAGIC_EXPERIENCE >> 24));
MAGIC_EXP = abs(MAGIC_EXPERIENCE & 65535);
MAGIC_EXPERIENCE = 0;
/* Convert the old magic system to new magic system */