From 02cedeb12c00faf316b0f0bb7d620025e8c833f7 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 23 Jun 2020 09:11:53 -0300 Subject: Prevent division by zero --- npc/functions/util.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'npc/functions/util.txt') 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); } -- cgit v1.2.3-70-g09d2