From 74dadf2c99842f8c79c4f24dff08fbd5c42bde8e Mon Sep 17 00:00:00 2001 From: ceikry Date: Mon, 5 Jul 2021 19:00:30 -0500 Subject: [PATCH] Emergency job hotfix --- Server/src/main/kotlin/rs09/game/content/jobs/JobManager.kt | 3 --- .../rs09/game/content/jobs/WorkForInteractionListener.kt | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Server/src/main/kotlin/rs09/game/content/jobs/JobManager.kt b/Server/src/main/kotlin/rs09/game/content/jobs/JobManager.kt index 713ac01cb..b405d407c 100644 --- a/Server/src/main/kotlin/rs09/game/content/jobs/JobManager.kt +++ b/Server/src/main/kotlin/rs09/game/content/jobs/JobManager.kt @@ -90,8 +90,5 @@ object JobManager { player.removeAttribute("jobs:type") player.incrementAttribute("/save:jobs:dailyAmt",1) System.out.println("Complete amount: ${player.getAttribute("jobs:dailyAmt",0)}") - if(player.getAttribute("jobs:dailyAmt",0) == 3){ - player.setAttribute("/save:jobs:reset_time",System.currentTimeMillis() + TimeUnit.HOURS.toMillis(24)) - } } } \ No newline at end of file diff --git a/Server/src/main/kotlin/rs09/game/content/jobs/WorkForInteractionListener.kt b/Server/src/main/kotlin/rs09/game/content/jobs/WorkForInteractionListener.kt index e11f1aff5..2f7ace650 100644 --- a/Server/src/main/kotlin/rs09/game/content/jobs/WorkForInteractionListener.kt +++ b/Server/src/main/kotlin/rs09/game/content/jobs/WorkForInteractionListener.kt @@ -8,6 +8,7 @@ import core.game.node.entity.player.link.diary.DiaryType import core.game.node.item.Item import org.rs09.consts.Items import rs09.game.interaction.InteractionListener +import java.util.concurrent.TimeUnit /** * Handles the work-for actions for the NPCs @@ -59,6 +60,7 @@ class WorkForInteractionListener : InteractionListener() { if(player.getAttribute("jobs:reset_time",Long.MAX_VALUE) < System.currentTimeMillis()){ player.setAttribute("/save:jobs:dailyAmt",0) + player.setAttribute("/save:jobs:reset_time",System.currentTimeMillis() + TimeUnit.HOURS.toMillis(24)) } if(player.getAttribute("jobs:id",-1) != -1){