aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-08-18 22:29:01 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-08-18 22:29:01 +0200
commite6f59771e8a65ad0e8901141ec0b930f0e5cee87 (patch)
tree03a35e009922a17e42576c4d6bfd0c0115c6ace6 /src/main/java/at
parent0b76561bce1a1a936c6f2413065f0e9060a7c5ef (diff)
downloadskyhanni-e6f59771e8a65ad0e8901141ec0b930f0e5cee87.tar.gz
skyhanni-e6f59771e8a65ad0e8901141ec0b930f0e5cee87.tar.bz2
skyhanni-e6f59771e8a65ad0e8901141ec0b930f0e5cee87.zip
fix wrong slayer bug again
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
index be7e16482..162675486 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerQuestWarning.kt
@@ -130,11 +130,12 @@ object SlayerQuestWarning {
// workaround for Bladesoul in Crimson Isle
if (LorenzUtils.skyBlockArea == "Stronghold" && entity.name == "Skeleton") return false
- val activeSlayer = SlayerAPI.activeSlayer
+ val isSlayer = slayerType.clazz.isInstance(entity)
+ if (!isSlayer) return false
- if (activeSlayer != null) {
- if (slayerType != activeSlayer) {
- val activeSlayerName = activeSlayer.displayName
+ SlayerAPI.activeSlayer?.let {
+ if (slayerType != it) {
+ val activeSlayerName = it.displayName
val slayerName = slayerType.displayName
SlayerAPI.latestWrongAreaWarning = SimpleTimeMark.now()
warn(
@@ -144,8 +145,7 @@ object SlayerQuestWarning {
}
}
- val isSlayer = slayerType.clazz.isInstance(entity)
- return (getSlayerData().lastSlayerType == slayerType) && isSlayer
+ return getSlayerData().lastSlayerType == slayerType
}
@SubscribeEvent