From e578369625f800200e5a4606fb162f41ebf0311a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:19:18 +0100 Subject: Fixed item ability cooldown not activating for Sword of Bad Health. --- .../features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 4bf1d38ff..974deb26e 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 @@ -185,11 +185,13 @@ class ItemAbilityCooldown { ItemAbility.RAGNAROCK_AXE.activate(LorenzColor.WHITE, 3_000) } } + message.contains("§lCASTING") -> { if (ItemAbility.RAGNAROCK_AXE.specialColor != LorenzColor.DARK_PURPLE) { ItemAbility.RAGNAROCK_AXE.activate(LorenzColor.DARK_PURPLE, 10_000) } } + message.contains("§c§lCANCELLED") -> { ItemAbility.RAGNAROCK_AXE.activate(null, 17_000) } @@ -273,7 +275,7 @@ class ItemAbilityCooldown { val guiOpen = Minecraft.getMinecraft().currentScreen != null val uuid = stack.getIdentifier() ?: return val list = items.filter { (it.key.getIdentifier()) == uuid } - .firstNotNullOfOrNull { it.value } ?: return + .firstNotNullOfOrNull { it.value } ?: return for (itemText in list) { if (guiOpen && !itemText.onCooldown) continue @@ -324,6 +326,9 @@ class ItemAbilityCooldown { if (message == "§cRagnarock was cancelled due to being hit!") { ItemAbility.RAGNAROCK_AXE.activate(null, 17_000) } + "§aYou buffed yourself for §r§c\\+\\d+❁ Strength".toPattern().matchMatcher(message) { + ItemAbility.SWORD_OF_BAD_HEALTH.activate() + } } private fun hasAbility(stack: ItemStack): MutableList { -- cgit