From 28d4336b8f2d45f1aa82f9a1d4e48038e0044c69 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 24 Sep 2022 20:51:11 +0200 Subject: don't show death display for blaze slayer demons --- .../damageindicator/DamageIndicatorManager.kt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt index 949b99998..aa3da328e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt @@ -86,7 +86,8 @@ class DamageIndicatorManager { val player = Minecraft.getMinecraft().thePlayer //TODO config to define between 100ms and 5 sec - for (uuid in data.filter { System.currentTimeMillis() > it.value.timeLastTick + if (it.value.dead) 4_000 else 100 } + for (uuid in data.filter { (System.currentTimeMillis() > it.value.timeLastTick + if (it.value.dead && !noDeathDisplay(it.value.bossType)) 4_000 else 100) || + (it.value.dead && noDeathDisplay(it.value.bossType)) } .map { it.key }) { data.remove(uuid) } @@ -186,6 +187,24 @@ class DamageIndicatorManager { GlStateManager.enableCull() } + private fun noDeathDisplay(bossType: BossType): Boolean { + return when (bossType) { + BossType.SLAYER_BLAZE_TYPHOEUS_1, + BossType.SLAYER_BLAZE_TYPHOEUS_2, + BossType.SLAYER_BLAZE_TYPHOEUS_3, + BossType.SLAYER_BLAZE_TYPHOEUS_4, + BossType.SLAYER_BLAZE_QUAZII_1, + BossType.SLAYER_BLAZE_QUAZII_2, + BossType.SLAYER_BLAZE_QUAZII_3, + BossType.SLAYER_BLAZE_QUAZII_4, + + //TODO f3/m3 4 guardians, f2/m2 4 boss room fighters + -> true + + else -> false + } + } + private fun tickDamage(damageCounter: DamageCounter) { val now = System.currentTimeMillis() if (damageCounter.currentDamage != 0L || damageCounter.currentHealing != 0L) { -- cgit