From 54f297c3c27ae66b788b358ef05b3839b544cc52 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 15 Jun 2023 12:06:56 +0200 Subject: Moved city project reminder saving location from profile specific to player specific storage in the config --- src/main/java/at/hannibal2/skyhanni/config/Storage.java | 6 +++--- .../at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 27e9c0cf9..68726aa34 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -29,6 +29,9 @@ public class Storage { @Expose public Integer gardenCommunityUpgrade = -1; + + @Expose + public long nextCityProjectParticipationTime = 0L; } public static class ProfileSpecific { @@ -194,9 +197,6 @@ public class Storage { public long lastComposterEmptyWarningTime = 0; } - @Expose - public long nextCityProjectParticipationTime = 0L; - @Expose public Map slayerProfitData = new HashMap<>(); diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt index 4e8976a28..dee222aa2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CityProjectFeatures.kt @@ -52,15 +52,15 @@ class CityProjectFeatures { private fun checkDailyReminder() { if (!config.dailyReminder) return - val profileSpecific = ProfileStorageData.profileSpecific ?: return + val playerSpecific = ProfileStorageData.playerSpecific ?: return if (LorenzUtils.inDungeons) return if (LorenzUtils.inKuudraFight) return if (FarmingContestAPI.inContest) return if (LorenzUtils.skyBlockArea == "Community Center") return - if (profileSpecific.nextCityProjectParticipationTime == 0L) return - if (System.currentTimeMillis() <= profileSpecific.nextCityProjectParticipationTime) return + if (playerSpecific.nextCityProjectParticipationTime == 0L) return + if (System.currentTimeMillis() <= playerSpecific.nextCityProjectParticipationTime) return if (lastReminderSend + 30_000 > System.currentTimeMillis()) return lastReminderSend = System.currentTimeMillis() @@ -114,7 +114,7 @@ class CityProjectFeatures { if (itemName != "§eContribute this component!") continue nextTime = System.currentTimeMillis() } - ProfileStorageData.profileSpecific?.nextCityProjectParticipationTime = nextTime + ProfileStorageData.playerSpecific?.nextCityProjectParticipationTime = nextTime } } -- cgit