From 6bebd1d53a63928e8e1a6d878b184f5b039359e9 Mon Sep 17 00:00:00 2001 From: bushtail Date: Sun, 7 May 2023 03:30:28 +0000 Subject: [PATCH] Teleport fishing spots properly --- Server/src/main/content/global/skill/fishing/FishingNPC.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Server/src/main/content/global/skill/fishing/FishingNPC.kt b/Server/src/main/content/global/skill/fishing/FishingNPC.kt index 6c7d34629..2af0ba8e6 100644 --- a/Server/src/main/content/global/skill/fishing/FishingNPC.kt +++ b/Server/src/main/content/global/skill/fishing/FishingNPC.kt @@ -36,7 +36,9 @@ class FishingNPC : NPCBehavior(*fishingSpots) { } else -> { val randLoc = spot.locations[RandomFunction.random(spot.locations.size)] - if(findLocalNPCs(randLoc, 0).isEmpty()) self.location = randLoc + if(findLocalNPCs(randLoc, 0).isEmpty()) { + teleport(self, randLoc) + } setAttribute(self, "fishing:switchdelay", getWorldTicks() + getRandomDelay()) } }