diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt index 8b3460c25..520f1283c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt @@ -74,7 +74,7 @@ object TrevorFeatures { try { if (config.trapperSolver && onFarmingIsland()) { updateTrapper() - TrevorTracker.saveAndUpdate() + TrevorTracker.update() TrevorTracker.calculatePeltsPerHour() if (questActive) TrevorSolver.findMob() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt index c596b2eab..175d21903 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt @@ -80,14 +80,14 @@ object TrevorTracker { val pelts = matcher.group("pelts").toInt() storage.peltsGained += pelts storage.selfKillingAnimals += 1 - saveAndUpdate() + update() } matcher = killMobPattern.matcher(event.message) if (matcher.matches()) { val pelts = matcher.group("pelts").toInt() storage.peltsGained += pelts storage.killedAnimals += 1 - saveAndUpdate() + update() } } @@ -98,10 +98,10 @@ object TrevorTracker { val foundRarity = TrapperMobRarity.entries.firstOrNull { it.formattedName == rarity } ?: return val old = storage.animalRarities[foundRarity] ?: 0 storage.animalRarities = storage.animalRarities.editCopy { this[foundRarity] = old + 1 } - saveAndUpdate() + update() } - fun saveAndUpdate() { + fun update() { val storage = ProfileStorageData.profileSpecific?.trapperData ?: return display = formatDisplay(drawTrapperDisplay(storage)) } |