aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/nether
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-03-12 18:04:56 +0100
committerGitHub <noreply@github.com>2024-03-12 18:04:56 +0100
commitb808a6aea1ba28ffd10712e7586b6f0d6cc1804a (patch)
tree1c4b9f8eacd97718b4042393a39c0ccbccf8dfa9 /src/main/java/at/hannibal2/skyhanni/features/nether
parent9f1ba8207e8ae14da50058eeaaf0eb750b530dfa (diff)
downloadskyhanni-b808a6aea1ba28ffd10712e7586b6f0d6cc1804a.tar.gz
skyhanni-b808a6aea1ba28ffd10712e7586b6f0d6cc1804a.tar.bz2
skyhanni-b808a6aea1ba28ffd10712e7586b6f0d6cc1804a.zip
Internal Change: Code cleanup ContainerChest getAllItems (#1047)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/nether')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt7
1 files changed, 2 insertions, 5 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 8042f6f5c..4bf989c31 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
@@ -31,6 +31,7 @@ import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName
+import at.hannibal2.skyhanni.utils.InventoryUtils.getUpperItems
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -96,11 +97,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) {
val dojoQuest = getQuest<DojoQuest>() ?: return
if (dojoQuest.state != QuestState.ACCEPTED) return
- for (slot in chest.inventorySlots) {
- if (slot == null) continue
- if (slot.slotNumber != slot.slotIndex) continue
- val stack = slot.stack ?: continue
-
+ for ((slot, stack) in chest.getUpperItems()) {
if (stack.name.contains(dojoQuest.dojoName)) {
slot highlight LorenzColor.AQUA
}