From bff84139891b9789a13ecee59ace2ab3def3141d Mon Sep 17 00:00:00 2001 From: mekolat Date: Sat, 30 Apr 2016 21:17:38 -0400 Subject: prevent sending multiple end messages for `plugh` spell --- world/map/npc/magic/level2-flying-backpack.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/level2-flying-backpack.txt b/world/map/npc/magic/level2-flying-backpack.txt index 87c7d644..36e936fd 100644 --- a/world/map/npc/magic/level2-flying-backpack.txt +++ b/world/map/npc/magic/level2-flying-backpack.txt @@ -22,10 +22,12 @@ set @plugh_time, (@spellpower*500)+5000, @target_id; sc_start SC_FLYING_BACKPACK, @plugh_time, 0, @target_id; message @args$, "Backpack : Your backpack is lifted by a mystical force; you no longer feel it pressing on your back."; - addtimer @plugh_time, strnpcinfo(0)+"::OnEnd", @target_id; + set @plugh_future, gettimetick(0) + @plugh_time - 100, @target_id; + addtimer @plugh_time - 100, strnpcinfo(0)+"::OnEnd", @target_id; end; OnEnd: + if (gettimetick(0) - @plugh_future < 0) end; if (sc_check(SC_FLYING_BACKPACK) != 1) end; message strcharinfo(0), "Backpack : Your backpack is no longer levitating."; misceffect FX_MAGIC_GENERIC, strcharinfo(0); -- cgit v1.2.3-60-g2f50