From 092373eac695c883207bfe04d72f209481d0ade9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 15 Aug 2023 13:27:55 +0200 Subject: Removed Broken Wither Impact detection --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 1 - .../skyhanni/config/features/SlayerConfig.java | 8 --- .../features/slayer/DetectBrokenHyperion.kt | 57 ---------------------- 3 files changed, 66 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/slayer/DetectBrokenHyperion.kt diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 03032cc7c..6007339fd 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -336,7 +336,6 @@ class SkyHanniMod { loadModule(PlayerTabComplete) loadModule(SlayerItemProfitTracker) loadModule(SlayerItemsOnGround()) - loadModule(DetectBrokenHyperion()) loadModule(RestorePieceOfWizardPortalLore()) loadModule(QuickModMenuSwitch) loadModule(ArachneChatMessageHider()) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/SlayerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/SlayerConfig.java index 9b48f0779..7814b954e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/SlayerConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/SlayerConfig.java @@ -423,14 +423,6 @@ public class SlayerConfig { public boolean repeat = false; } - @Expose - @ConfigOption(name = "Broken Wither Impact", - desc = "Warns when right-clicking with a Wither Impact weapon (e.g. Hyperion) no longer gains combat exp. " + - "Kill a mob with melee-hits to fix this hypixel bug. §cOnly works while doing slayers!" - ) - @ConfigEditorBoolean - public boolean brokenHyperion = true; - @Expose @ConfigOption(name = "Miniboss Highlight", desc = "Highlight slayer miniboss in blue color.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/DetectBrokenHyperion.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/DetectBrokenHyperion.kt deleted file mode 100644 index 33fd2ac92..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/DetectBrokenHyperion.kt +++ /dev/null @@ -1,57 +0,0 @@ -package at.hannibal2.skyhanni.features.slayer - -import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.data.SlayerAPI -import at.hannibal2.skyhanni.data.TitleUtils -import at.hannibal2.skyhanni.events.PurseChangeCause -import at.hannibal2.skyhanni.events.PurseChangeEvent -import at.hannibal2.skyhanni.utils.InventoryUtils -import at.hannibal2.skyhanni.utils.LorenzLogger -import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName -import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAbilityScrolls -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent - -class DetectBrokenHyperion { - private val config get() = SkyHanniMod.feature.slayer - private var brokenInRow = 0 - private val logger = LorenzLogger("slayer/detect_broken_hyperion") - - @SubscribeEvent - fun onPurseChange(event: PurseChangeEvent) { - if (!isEnabled()) return - if (event.reason != PurseChangeCause.GAIN_MOB_KILL) return - if (!SlayerAPI.hasActiveSlayerQuest()) return - if (!SlayerAPI.isInSlayerArea) return - if (SlayerAPI.latestWrongAreaWarning + 5_000 > System.currentTimeMillis()) return - - val abilityScrolls = InventoryUtils.getItemInHand()?.getAbilityScrolls() ?: return - if (!abilityScrolls.contains("IMPLOSION_SCROLL".asInternalName())) return - - val diff = System.currentTimeMillis() - SlayerAPI.getLatestProgressChangeTime() - logger.log("diff: $diff") - - if (diff < 2_500) { - if (brokenInRow != 0) { - - brokenInRow = 0 - logger.log(" reset to 0") - } - return - } - - brokenInRow++ - logger.log(" add: $brokenInRow") - - if (brokenInRow > 5) { - logger.log(" send warning!") - TitleUtils.sendTitle("§eBroken Hyperion!", 3_000) - LorenzUtils.chat( - "§e[SkyHanni] Your Hyperion is broken! It no longer collects combat exp. " + - "Kill a mob with melee-hits to fix this hypixel bug" - ) - } - } - - fun isEnabled() = LorenzUtils.inSkyBlock && config.brokenHyperion -} -- cgit