aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt
index 41ac1a9c7..541d0510c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt
@@ -157,11 +157,9 @@ class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) {
fun loadConfig(storage: Storage.ProfileSpecific.CrimsonIsleStorage) {
if (dailyQuestHelper.greatSpook) return
- for (text in storage.quests.toList()) {
- if (text.contains("The Great Spook")) {
- dailyQuestHelper.greatSpook = true
- return
- }
+ if (storage.quests.toList().any { hasGreatSpookLine(it) }) {
+ dailyQuestHelper.greatSpook = true
+ return
}
for (text in storage.quests.toList()) {
val split = text.split(":")
@@ -182,6 +180,15 @@ class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) {
}
}
+ private fun hasGreatSpookLine(text: String) = when {
+ text.contains("The Great Spook") -> true
+ text.contains(" Days") -> true
+ text.contains("Fear: §r") -> true
+ text.contains("Primal Fears") -> true
+
+ else -> false
+ }
+
private fun addQuest(element: Quest) {
dailyQuestHelper.quests.add(element)
if (dailyQuestHelper.quests.size > 5) {