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/dailykuudra/DailyKuudraBossHelper.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt4
3 files changed, 6 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt
index 3fb4c38fb..d9e6b2499 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt
@@ -17,10 +17,8 @@ class DailyKuudraBossHelper(private val reputationHelper: CrimsonIsleReputationH
fun init() {
val repoData = reputationHelper.repoData
val jsonElement = repoData["KUUDRA"]
- val asJsonArray = jsonElement.asJsonArray
var tier = 1
- for (entry in asJsonArray) {
- val displayName = entry.asString
+ for ((displayName, value) in jsonElement.asJsonObject.entrySet()) {
kuudraTiers.add(KuudraTier(displayName, tier))
tier++
}
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 055823fa7..dee5071c8 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
@@ -80,10 +80,9 @@ class QuestLoader(val dailyQuestHelper: DailyQuestHelper) {
}
for (entry in dailyQuestHelper.reputationHelper.repoData.entrySet()) {
- val category = entry.key
- for (element in entry.value.asJsonArray) {
- val entryName = element.asString
-
+ val categoryName = entry.key
+ val category = entry.value.asJsonObject
+ for ((entryName, value) in category.entrySet()) {
if (name.startsWith("$entryName Rank ")) {
val split = name.split(" Rank ")
val dojoName = split[0]
@@ -92,7 +91,7 @@ class QuestLoader(val dailyQuestHelper: DailyQuestHelper) {
}
if (name == entryName) {
- when (category) {
+ when (categoryName) {
"FISHING" -> return TrophyFishQuest(name, state, needAmount)
"RESCUE" -> return RescueMissionQuest(state)
"FETCH" -> return FetchQuest(name, state, needAmount)
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 051a428df..6933e01c6 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
@@ -16,9 +16,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel
fun init() {
val repoData = reputationHelper.repoData
val jsonElement = repoData["MINIBOSS"]
- val asJsonArray = jsonElement.asJsonArray
- for (entry in asJsonArray) {
- val displayName = entry.asString
+ for ((displayName, value) in jsonElement.asJsonObject.entrySet()) {
val patterns = " *§r§6§l${displayName.uppercase()} DOWN!"
miniBosses.add(CrimsonMiniBoss(displayName, Pattern.compile(patterns)))
}