diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-02 22:31:36 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-02 22:31:36 +0100 |
commit | 9e1016af6b119fb3064687b783c9e81af2d72f88 (patch) | |
tree | 7b83894e99051b3bc74011255487baa3269bcfb6 /src/main/java/at/hannibal2 | |
parent | ca584d799612def5cc926e9ff077309fcbe3ef0e (diff) | |
download | skyhanni-9e1016af6b119fb3064687b783c9e81af2d72f88.tar.gz skyhanni-9e1016af6b119fb3064687b783c9e81af2d72f88.tar.bz2 skyhanni-9e1016af6b119fb3064687b783c9e81af2d72f88.zip |
Hopefully fixed getMultiplier for the last time
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index 344cbd715..1a7175282 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -98,7 +98,7 @@ object NEUItems { Utils.disableCustomDungColours = false } - fun getMultiplier(rawId: String, tryCount: Int = 0, parent: String? = null): Pair<String, Int> { + fun getMultiplier(rawId: String, tryCount: Int = 0): Pair<String, Int> { if (multiplierCache.contains(rawId)) { return multiplierCache[rawId]!! } @@ -121,13 +121,13 @@ object NEUItems { if (map.size != 1) continue val current = map.iterator().next().toPair() val id = current.first - return if (id != parent) { - val child = getMultiplier(id, tryCount + 1, rawId) + return if (current.second > 1) { + val child = getMultiplier(id, tryCount + 1) val result = Pair(child.first, child.second * current.second) multiplierCache[rawId] = result result } else { - Pair(parent, 1) + Pair(rawId, 1) } } |