aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-10-09 10:12:26 +0200
committerGitHub <noreply@github.com>2024-10-09 10:12:26 +0200
commit77f2872d9502f08b69e23d826b0ebd39d76d3c7e (patch)
tree14702beb88b32152d0f7f323cdc012af5896337e /src
parent4f724df118aa46f329b36e410785b9b65c018e25 (diff)
downloadskyhanni-77f2872d9502f08b69e23d826b0ebd39d76d3c7e.tar.gz
skyhanni-77f2872d9502f08b69e23d826b0ebd39d76d3c7e.tar.bz2
skyhanni-77f2872d9502f08b69e23d826b0ebd39d76d3c7e.zip
Fix: Ghost Counter area detection (#2696)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
index 40e329f20..14abcfad6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
@@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
+import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.PurseChangeCause
import at.hannibal2.skyhanni.events.PurseChangeEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
@@ -24,6 +25,7 @@ import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil.isUsingCTGho
import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil.preFormat
import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil.prettyTime
import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarApi.getBazaarData
+import at.hannibal2.skyhanni.features.misc.IslandAreas
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ChatUtils.chat
@@ -332,7 +334,6 @@ object GhostCounter {
}
}
- inMist = LorenzUtils.skyBlockArea == "The Mist"
update()
if (event.repeatSeconds(2)) {
@@ -342,6 +343,11 @@ object GhostCounter {
}
@SubscribeEvent
+ fun onTick(event: LorenzTickEvent) {
+ inMist = IslandAreas.currentAreaName == "The Mist"
+ }
+
+ @SubscribeEvent
fun onActionBarUpdate(event: ActionBarUpdateEvent) {
if (!isEnabled()) return
if (!inMist) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt
index 439e434c1..dfa60478a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt
@@ -276,5 +276,5 @@ object IslandAreas {
hasMoved = true
}
- fun isEnabled() = LorenzUtils.inSkyBlock && config.let { it.pathfinder.enabled || it.enterTitle || it.inWorld }
+ fun isEnabled() = LorenzUtils.inSkyBlock
}