aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-03 15:50:57 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-03 15:50:57 +0200
commit78643fb1abdf765c6d91b70e83adacf9ea245ee1 (patch)
tree69bf8826be82aa682a20a1d6619802a941f3c933
parent04bb7a6965587a1a1b7f65da8f7743092dd8248d (diff)
downloadskyhanni-78643fb1abdf765c6d91b70e83adacf9ea245ee1.tar.gz
skyhanni-78643fb1abdf765c6d91b70e83adacf9ea245ee1.tar.bz2
skyhanni-78643fb1abdf765c6d91b70e83adacf9ea245ee1.zip
Fixed King Talisman
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
index e3ee1eb9a..1d8f62d4f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
@@ -36,7 +36,7 @@ class KingTalismanHelper {
private var farDisplay = ""
private var display = emptyList<String>()
- fun isNearby() = LorenzUtils.skyBlockArea == "Royal Palace" && kingLocation.distanceToPlayer() > 10
+ fun isNearby() = LorenzUtils.skyBlockArea == "Royal Palace" && kingLocation.distanceToPlayer() < 10
@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
@@ -48,7 +48,7 @@ class KingTalismanHelper {
}
update()
- display = if (!isNearby()) allKingsDisplay else Collections.singletonList(farDisplay)
+ display = if (isNearby()) allKingsDisplay else Collections.singletonList(farDisplay)
}
fun isEnabled() = config.kingTalismanHelper && IslandType.DWARVEN_MINES.isInIsland()
@@ -97,7 +97,6 @@ class KingTalismanHelper {
"§7(§bin $time§7)"
}
-
val currentString = if (current) "§6King " else ""
if (missing && current) {
farDisplay_ = "§cNext missing king: §7$king §eNow $missingTimeFormat"
@@ -124,9 +123,9 @@ class KingTalismanHelper {
val oneSbDay = 1000 * 60 * 20
val oneCircleTime = oneSbDay * kingCircles.size
val kingTime = mutableMapOf<String, Long>()
- for ((index, king) in kingCircles.withIndex()) {
+ for ((index, king) in kingCircles.reversed().withIndex()) {
- val startTime = SkyBlockTime(day = index - 1)
+ val startTime = SkyBlockTime(day = index + 1)
var timeNext = startTime.toMillis()
while (timeNext < System.currentTimeMillis()) {
timeNext += oneCircleTime