aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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
}