aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-05 13:20:44 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-05 13:20:44 +0100
commitbb8c07cdaa0264120e0f934d99370a7321842ee6 (patch)
tree1c5dbd58a70fe20cd0a87bcbc88c4356c6aa723e /src/main
parent8dd26f8883de2cc5997d891f7067360ff7ac5db8 (diff)
downloadskyhanni-bb8c07cdaa0264120e0f934d99370a7321842ee6.tar.gz
skyhanni-bb8c07cdaa0264120e0f934d99370a7321842ee6.tar.bz2
skyhanni-bb8c07cdaa0264120e0f934d99370a7321842ee6.zip
fixed more error messages with The Great Spook data getting stored in the Reputation Helper quest config by accident.
Diffstat (limited to 'src/main')
-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) {