aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-05 14:31:11 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-05 14:31:11 +0100
commitdeadca74501e95551f5e1665ebbfd1d6fa620b19 (patch)
tree589be202c25b64a404959748d12d70e66ca3f79e /src/main/java/at/hannibal2
parent3c524f79f366c18e71a7b0331b6558ca5f6cbcc6 (diff)
downloadskyhanni-deadca74501e95551f5e1665ebbfd1d6fa620b19.tar.gz
skyhanni-deadca74501e95551f5e1665ebbfd1d6fa620b19.tar.bz2
skyhanni-deadca74501e95551f5e1665ebbfd1d6fa620b19.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt3
2 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java
index 0213e7cd1..ee6ce50b1 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java
@@ -39,13 +39,10 @@ public class RewardWarningConfig {
public int bypassKey = Keyboard.KEY_NONE;
- /**
- * Sync up with {at.hannibal2.skyhanni.features.garden.visitor.VisitorReward}
- */
@Expose
@ConfigOption(
name = "Items",
- desc = "Warn for these reward items."
+ desc = "Warn for these reward item visitor drops."
)
@ConfigEditorDraggableList
public List<VisitorReward> drops = new ArrayList<>(Arrays.asList(
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
index 260a9cdb2..a74793fbe 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
@@ -121,8 +121,7 @@ object VisitorAPI {
fun hasReward(): VisitorReward? {
for (internalName in allRewards) {
val reward = VisitorReward.getByInternalName(internalName) ?: continue
- // TODO, change functionality to use enum rather than ordinals
- if (config.rewardWarning.drops.elementAtOrNull(reward.ordinal) != null) {
+ if (reward in config.rewardWarning.drops) {
return reward
}
}