summaryrefslogtreecommitdiff
path: root/npc/config
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-11 01:16:56 -0300
committerJesusaves <cpntb1@ymail.com>2020-07-11 01:16:56 -0300
commiteac20fd1f784099f5f680b122a4a773cb6467851 (patch)
treeb85a507657fc4dc2a8ee2035e360977dc384e20a /npc/config
parentc16025bfdc3e6add2edc02baa2dc8258ea16f34e (diff)
downloadserverdata-eac20fd1f784099f5f680b122a4a773cb6467851.tar.gz
serverdata-eac20fd1f784099f5f680b122a4a773cb6467851.tar.bz2
serverdata-eac20fd1f784099f5f680b122a4a773cb6467851.tar.xz
serverdata-eac20fd1f784099f5f680b122a4a773cb6467851.zip
This hotfix might fix a potential glitch while using First Aid >.<
Should not solve anything, but should address an edge case scenario
Diffstat (limited to 'npc/config')
-rw-r--r--npc/config/magic.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index c0c639e26..87f804df2 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -20,6 +20,10 @@ function script AdjustSpellpower {
.@type=getarg(2, HARM_MAGI);
.@src=getcharid(3);
+ // Prevents a possible glitch, unoptimal fix
+ if (.@target < 1)
+ .@target=getcharid(3);
+
.@dmg=calcdmg(.@src, .@target, .@type);
// Abizit Influence (80%~130% at best, worst shot at perfect ctrl is 105%)
.@dmg = .@dmg * (80 + abizit() * rand2(5,10)) / 100;