aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-03 21:19:18 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-03 21:19:18 +0100
commite578369625f800200e5a4606fb162f41ebf0311a (patch)
tree9b7812a1137e8ad4b740a13dee8a07983e6f7395 /src/main/java/at/hannibal2/skyhanni/features
parentcd244fd5969be832de68eb47ec7c3fda963c998e (diff)
downloadskyhanni-e578369625f800200e5a4606fb162f41ebf0311a.tar.gz
skyhanni-e578369625f800200e5a4606fb162f41ebf0311a.tar.bz2
skyhanni-e578369625f800200e5a4606fb162f41ebf0311a.zip
Fixed item ability cooldown not activating for Sword of Bad Health.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt7
1 files changed, 6 insertions, 1 deletions
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<ItemAbility> {