Skip to content

Commit

Permalink
fixed ghost counter showing in wrong locations
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Oct 8, 2024
1 parent 92b1110 commit 055264b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -332,7 +334,6 @@ object GhostCounter {
}
}

inMist = LorenzUtils.skyBlockArea == "The Mist"
update()

if (event.repeatSeconds(2)) {
Expand All @@ -341,6 +342,11 @@ object GhostCounter {
}
}

@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
inMist = IslandAreas.currentAreaName == "The Mist"
}

@SubscribeEvent
fun onActionBarUpdate(event: ActionBarUpdateEvent) {
if (!isEnabled()) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 055264b

Please sign in to comment.