summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-08-04 02:50:32 -0300
committerJesusaves <cpntb1@ymail.com>2019-08-04 02:50:32 -0300
commite8d6457643d78ab840cc23ddf576251337ea824e (patch)
tree4fe726f91588db9e2b55ab53504af409f6844415
parentfa12ae62c2cacb59f2041bb363b5433fcc098a3a (diff)
downloadserverdata-e8d6457643d78ab840cc23ddf576251337ea824e.tar.gz
serverdata-e8d6457643d78ab840cc23ddf576251337ea824e.tar.bz2
serverdata-e8d6457643d78ab840cc23ddf576251337ea824e.tar.xz
serverdata-e8d6457643d78ab840cc23ddf576251337ea824e.zip
This hack should fix double-fishing bug. By attempting to double-fish,
your previous fishing will be CANCELED (as if you've moved away).
-rw-r--r--npc/functions/fishing.txt10
1 files changed, 10 insertions, 0 deletions
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,