summaryrefslogtreecommitdiff
path: root/npc/functions/resetstatus.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-15 19:25:31 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-15 19:25:31 -0300
commit65b79c08c3e96433bd41f11e9892d3d21b408232 (patch)
treee16253e65f3665ecf29daef0e94edd8f510c23d7 /npc/functions/resetstatus.txt
parente4070620acf14d041dcaeb1b47ce9e3ea700062d (diff)
downloadserverdata-65b79c08c3e96433bd41f11e9892d3d21b408232.tar.gz
serverdata-65b79c08c3e96433bd41f11e9892d3d21b408232.tar.bz2
serverdata-65b79c08c3e96433bd41f11e9892d3d21b408232.tar.xz
serverdata-65b79c08c3e96433bd41f11e9892d3d21b408232.zip
Fix division by zero in stat reset
Diffstat (limited to 'npc/functions/resetstatus.txt')
-rw-r--r--npc/functions/resetstatus.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/npc/functions/resetstatus.txt b/npc/functions/resetstatus.txt
index 0035196b8..c9744d901 100644
--- a/npc/functions/resetstatus.txt
+++ b/npc/functions/resetstatus.txt
@@ -8,7 +8,11 @@
// Return wasSP on success, 0 on failure
// ConfirmReset( {price} )
function script ConfirmStatusReset {
- .@plush_count=(BaseLevel*210-(10*210))/(BaseLevel/10);
+ if (BaseLevel >= 10)
+ .@plush_count=(BaseLevel*210-(10*210))/(BaseLevel/10);
+ else
+ .@plush_count=1;
+
if (getarg(0,-1) >= 0)
.@plush_count=getarg(0,-1);