diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-08-04 02:50:32 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-08-04 02:50:32 -0300 |
commit | e8d6457643d78ab840cc23ddf576251337ea824e (patch) | |
tree | 4fe726f91588db9e2b55ab53504af409f6844415 | |
parent | fa12ae62c2cacb59f2041bb363b5433fcc098a3a (diff) | |
download | serverdata-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.txt | 10 |
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, |