From e8d6457643d78ab840cc23ddf576251337ea824e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 4 Aug 2019 02:50:32 -0300 Subject: This hack should fix double-fishing bug. By attempting to double-fish, your previous fishing will be CANCELED (as if you've moved away). --- npc/functions/fishing.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'npc/functions/fishing.txt') diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index 52f9fcc9a..48f83de3e 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -256,6 +256,16 @@ function script fishing { return -5; } + // This "hack" will prevent you from fishing at two spots (buggy) + // It'll cancel the previous fishing too, per logical rule. + if (@fishing_spot$ != "") { + deltimer "global fishing handler::OnCleanUp"; // cancel auto cleanup + deltimer "global fishing handler::OnBite"; + fishing_cleanup(@fishing_spot$); // clean up manually + @fishing_spot$=""; + dispbottom l("You left your fishing spot!"); + return -4; + } // begin fishing narrator S_LAST_NEXT, -- cgit v1.2.3-60-g2f50