From ea1260bd9b54ae4f5f51a7e4058fa5a07e0f3240 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:29:49 +0100 Subject: Reset item ability cooldowns on world switch. --- .../itemabilities/abilitycooldown/ItemAbilityCooldown.kt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt index 3a4324853..fcb3d746f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.ItemClickEvent import at.hannibal2.skyhanni.events.LorenzActionBarEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.events.RenderObject @@ -169,6 +170,14 @@ class ItemAbilityCooldown { } } + @SubscribeEvent + fun onIslandChange(event: LorenzWorldChangeEvent) { + for (ability in ItemAbility.entries) { + ability.lastActivation = 0L + ability.specialColor = null + } + } + @SubscribeEvent fun onActionBar(event: LorenzActionBarEvent) { if (!isEnabled()) return -- cgit