diff options
2 files changed, 26 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt index d31f29396..949963414 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt @@ -158,7 +158,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) { } } - private inline fun <reified T : Quest> getQuest() = quests.filterIsInstance<T>().firstOrNull() + inline fun <reified T : Quest> getQuest() = quests.filterIsInstance<T>().firstOrNull() private fun checkInventoryForFetchItem() { val fetchQuest = getQuest<FetchQuest>() ?: return @@ -214,11 +214,12 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) { if (!SkyHanniMod.feature.misc.crimsonIsleReputationLocation) return for (quest in quests) { - if (quest.state == QuestState.ACCEPTED) { - val location = quest.location ?: continue - event.drawWaypointFilled(location, LorenzColor.WHITE.toColor()) - event.drawDynamicText(location, quest.displayName, 1.5) - } + if (quest is MiniBossQuest) continue + if (quest.state != QuestState.ACCEPTED) continue + val location = quest.location ?: continue + + event.drawWaypointFilled(location, LorenzColor.WHITE.toColor()) + event.drawDynamicText(location, quest.displayName, 1.5) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt index a43c10758..2b4ee6eea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt @@ -6,6 +6,8 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper +import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.MiniBossQuest +import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.QuestState import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzColor @@ -44,14 +46,26 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel val playerLocation = LocationUtils.playerLocation() for (miniBoss in miniBosses) { - if (!miniBoss.doneToday) { - val location = miniBoss.location ?: continue - if (DamageIndicatorManager.getNearestDistanceTo(location) < 40 && playerLocation.distance(location) < 40) continue + if (miniBoss.doneToday && !needMiniBossQuest(miniBoss)) continue + val location = miniBoss.location ?: continue + if (DamageIndicatorManager.getNearestDistanceTo(location) < 40 && playerLocation.distance(location) < 40) continue - event.drawWaypointFilled(location, LorenzColor.WHITE.toColor()) - event.drawDynamicText(location, miniBoss.displayName, 1.5) + event.drawWaypointFilled(location, LorenzColor.WHITE.toColor()) + event.drawDynamicText(location, miniBoss.displayName, 1.5) + } + } + + private fun needMiniBossQuest(miniBoss: CrimsonMiniBoss): Boolean { + val bossQuest = reputationHelper.questHelper.getQuest<MiniBossQuest>() + if (bossQuest != null) { + if (bossQuest.miniBoss == miniBoss) { + if (bossQuest.state == QuestState.ACCEPTED) { + return true + } } } + + return false } private fun finished(miniBoss: CrimsonMiniBoss) { |