From 1d051f3e1e35489989ca109f1493154641c23068 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Thu, 4 Apr 2024 04:56:02 +1100 Subject: Fix: Tick event being called twice a tick (#1342) --- .../skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt | 4 +--- .../skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/rift') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt index d64ce53d3..c037d5cfc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt @@ -17,9 +17,7 @@ class ShyCruxWarnings { @SubscribeEvent fun onTick(event: LorenzTickEvent) { if (!RiftAPI.inRift() || !config.shyWarning) return - if (event.isMod(2)) { - checkForShy() - } + checkForShy() } private fun checkForShy() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt index bf14e2277..9167f3b25 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt @@ -59,8 +59,8 @@ class ShowMotesNpcSellPrice { @SubscribeEvent fun onTick(event: LorenzTickEvent) { if (!isInventoryValueEnabled()) return - if (event.isMod(10)) - processItems() + if (!event.isMod(10, 1)) return + processItems() } @SubscribeEvent(priority = EventPriority.LOW) -- cgit