From a9f827d57fae9b37d76f7d8aa3ceb00e4b18dafc Mon Sep 17 00:00:00 2001 From: SeRaid <77941535+SeRaid743@users.noreply.github.com> Date: Sun, 19 May 2024 15:31:37 +1200 Subject: [PATCH] fixed accidentlly resetting to 0 --- .../features/garden/farming/FarmingCollectionDisplay.kt | 6 +++++- .../skyhanni/features/skillprogress/SkillRankDisplay.kt | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingCollectionDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingCollectionDisplay.kt index b151bc1b2496..34c2005cb8e2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingCollectionDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingCollectionDisplay.kt @@ -252,7 +252,11 @@ object FarmingCollectionDisplay { } collectionPlacements[crop] = placements lastFetchedCrop = crop - currentCollections[crop] = data.amount + + if (data.amount != 0L) { + currentCollections[crop] = data.amount + } + if (!hasCollectionBeenFetched && data.amount == 0L) { hasCollectionBeenFetched = true diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillRankDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillRankDisplay.kt index da23b14a1c6f..9499b1e03c0d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillRankDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillRankDisplay.kt @@ -233,7 +233,9 @@ object SkillRankDisplay { } skillPlacements[skill] = placements lastSkillFetched = skill - currentSkills[skill] = data.amount + if (data.amount != 0L) { + currentSkills[skill] = data.amount + } if (!hasSkillsBeenFetched && data.amount == 0L) { hasSkillsBeenFetched = true