From e3dfb7daffde3dd7f47e2c6dba79669eb669ad34 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:24:53 +0100 Subject: code cleanup --- .../features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt | 3 ++- 1 file changed, 2 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 974deb26e..a547c14b4 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 @@ -35,6 +35,7 @@ class ItemAbilityCooldown { private var items = mapOf>() private var abilityItems = mapOf>() private val youAlignedOthersPattern = "§eYou aligned §r§a.* §r§eother player(s)?!".toPattern() + private val youBuffedYourselfPattern = "§aYou buffed yourself for §r§c\\+\\d+❁ Strength".toPattern() private val WEIRD_TUBA = "WEIRD_TUBA".asInternalName() private val WEIRDER_TUBA = "WEIRDER_TUBA".asInternalName() private val VOODOO_DOLL_WILTED = "VOODOO_DOLL_WILTED".asInternalName() @@ -326,7 +327,7 @@ 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) { + youBuffedYourselfPattern.matchMatcher(message) { ItemAbility.SWORD_OF_BAD_HEALTH.activate() } } -- cgit