summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-23 09:11:53 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-23 09:11:53 -0300
commit02cedeb12c00faf316b0f0bb7d620025e8c833f7 (patch)
tree32f6de6dd85b189e19b1a0d5ea5f9f33b836f67e /npc
parent133064a15dbb70302bb37538cf472b47613c4dd1 (diff)
downloadserverdata-02cedeb12c00faf316b0f0bb7d620025e8c833f7.tar.gz
serverdata-02cedeb12c00faf316b0f0bb7d620025e8c833f7.tar.bz2
serverdata-02cedeb12c00faf316b0f0bb7d620025e8c833f7.tar.xz
serverdata-02cedeb12c00faf316b0f0bb7d620025e8c833f7.zip
Prevent division by zero
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/util.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index d766bee62..9ac8d1fc5 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -840,6 +840,7 @@ function script transcheck {
// A value of '5' means perfect control, and a value of '0' means overwhelm.
// abizit()
function script abizit {
+ if (!MAGIC_LVL) return 0;
.@base=((MAGIC_LVL*2)**3);
return min(MAGIC_EXP/.@base, 5);
}