summaryrefslogtreecommitdiff
path: root/world/map/npc/magic
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-30 21:13:26 -0400
committermekolat <mekolat@users.noreply.github.com>2016-05-03 20:21:13 -0400
commit8279b36fe83a9029abb29340c8230edc02d4000c (patch)
tree0cbf1fa811761806526a9cea8c8eee035b0478c2 /world/map/npc/magic
parentf8924867ee3e1020cb9fc73df98c22218a52ad2f (diff)
downloadserverdata-8279b36fe83a9029abb29340c8230edc02d4000c.tar.gz
serverdata-8279b36fe83a9029abb29340c8230edc02d4000c.tar.bz2
serverdata-8279b36fe83a9029abb29340c8230edc02d4000c.tar.xz
serverdata-8279b36fe83a9029abb29340c8230edc02d4000c.zip
prevent sending multiple end messages for `betsanc` spell
Diffstat (limited to 'world/map/npc/magic')
-rw-r--r--world/map/npc/magic/level2-protect.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt
index 659efdc1..b68265d1 100644
--- a/world/map/npc/magic/level2-protect.txt
+++ b/world/map/npc/magic/level2-protect.txt
@@ -29,10 +29,12 @@
set @betsanc_time, .@time, @target_id;
sc_start SC_PHYS_SHIELD, .@time, max(15,(@spellpower/20))+5, @target_id;
message @args$, "Shield : You feel more protected.";
- addtimer @betsanc_time, strnpcinfo(0)+"::OnEnd", @target_id;
+ set @betsanc_future, gettimetick(0) + @betsanc_time - 100, @target_id;
+ addtimer @betsanc_time - 100, strnpcinfo(0)+"::OnEnd", @target_id;
end;
OnEnd:
+ if (gettimetick(0) - @betsanc_future < 0) end;
if (sc_check(SC_PHYS_SHIELD) != 1) end;
message strcharinfo(0), "Shield : You feel less protected.";
misceffect FX_MAGIC_SHIELD_ENDS, strcharinfo(0);