diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-13 19:02:05 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-13 19:02:05 +0100 |
commit | ac7b96126d41f18325220e217e89e74460ba07f6 (patch) | |
tree | 181fc74de2c8958551e057a22d016898cccd78dd /src/main/java | |
parent | 72015368502f5e1bb35b6cc4e70fbf62981b92a0 (diff) | |
download | skyhanni-ac7b96126d41f18325220e217e89e74460ba07f6.tar.gz skyhanni-ac7b96126d41f18325220e217e89e74460ba07f6.tar.bz2 skyhanni-ac7b96126d41f18325220e217e89e74460ba07f6.zip |
Fixed highlighting some mobs in dungeon wrongly as area mini bosses.
Diffstat (limited to 'src/main/java')
3 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt index c827a9f53..7a2243fbc 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt @@ -28,6 +28,7 @@ object SlayerAPI { var questStartTime = 0L var isInCorrectArea = false + var isInAnyArea = false var latestSlayerCategory = "" private var latestProgressChangeTime = 0L var latestWrongAreaWarning = 0L @@ -122,9 +123,12 @@ object SlayerAPI { if (event.isMod(5)) { isInCorrectArea = if (LorenzUtils.isStrandedProfile) { + isInAnyArea = true true } else { - getSlayerTypeForCurrentArea() == getActiveSlayer() + val slayerTypeForCurrentArea = getSlayerTypeForCurrentArea() + isInAnyArea = slayerTypeForCurrentArea != null + slayerTypeForCurrentArea == getActiveSlayer() } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt index e63119a11..97d891020 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.combat.mobs import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.SlayerAPI import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent @@ -47,8 +48,8 @@ class AreaMiniBossFeatures { if (config.areaBossHighlight) { val color = bossType.color.toColor().withAlpha(bossType.colorOpacity) RenderLivingEntityHelper.setEntityColor(entity, color) - { config.areaBossHighlight } - RenderLivingEntityHelper.setNoHurtTime(entity) { config.areaBossHighlight } + { config.areaBossHighlight && SlayerAPI.isInAnyArea } + RenderLivingEntityHelper.setNoHurtTime(entity) { config.areaBossHighlight && SlayerAPI.isInAnyArea } } // TODO add sound @@ -118,4 +119,4 @@ class AreaMiniBossFeatures { ), ; } -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index a5f0392b9..763b4602e 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -322,6 +322,7 @@ class SkyHanniDebugsAndTests { builder.append("Doing slayer!\n") builder.append(" activeSlayer: ${SlayerAPI.getActiveSlayer()}\n") builder.append(" isInCorrectArea: ${SlayerAPI.isInCorrectArea}\n") + builder.append(" isInAnyArea: ${SlayerAPI.isInAnyArea}\n") } } |