Skip to content

Commit

Permalink
fix(legacy): KillAura AutoBlock "ForceBlockWhenStill" not blocking wh…
Browse files Browse the repository at this point in the history
…en disabled. (#4973)
  • Loading branch information
mems01 authored Dec 19, 2024
1 parent 1401cb3 commit f406af2
Showing 1 changed file with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,17 +316,24 @@ object KillAura : Module("KillAura", Category.COMBAT, Keyboard.KEY_R, hideModule

// Circle options
private val circleRainbow by boolean("CircleRainbow", false, subjective = true) { mark == "Circle" }
private val colors = ColorSettingsInteger(this, "Circle", alphaApply = { mark == "Circle" })
{ mark == "Circle" && !circleRainbow }.with(132, 102, 255, 100)
private val colors = ColorSettingsInteger(
this,
"Circle",
alphaApply = { mark == "Circle" }) { mark == "Circle" && !circleRainbow }.with(132, 102, 255, 100)
private val fillInnerCircle by boolean("FillInnerCircle", false, subjective = true) { mark == "Circle" }
private val withHeight by boolean("WithHeight", true, subjective = true) { mark == "Circle" }
private val animateHeight by boolean("AnimateHeight", false, subjective = true) { withHeight }
private val heightRange by floatRange("HeightRange", 0.0f..0.4f, -2f..2f, subjective = true) { withHeight }
private val extraWidth by float("ExtraWidth", 0F, 0F..2F, subjective = true) { mark == "Circle" }
private val animateCircleY by boolean("AnimateCircleY", true, subjective = true) { fillInnerCircle || withHeight }
private val circleYRange by floatRange("CircleYRange", 0F..0.5F, 0F..2F, subjective = true) { animateCircleY }
private val duration by float("Duration", 1.5F, 0.5F..3F, suffix = "Seconds", subjective = true)
{ animateCircleY || animateHeight }
private val duration by float(
"Duration",
1.5F,
0.5F..3F,
suffix = "Seconds",
subjective = true
) { animateCircleY || animateHeight }

// Box option
private val boxOutline by boolean("Outline", true, subjective = true) { mark == "Box" }
Expand Down Expand Up @@ -769,7 +776,7 @@ object KillAura : Module("KillAura", Category.COMBAT, Keyboard.KEY_R, hideModule

if (switchMode && !isLookingOnEntities(entity, maxSwitchFOV.toDouble())) continue

var currentValue = when (priority.lowercase()) {
val currentValue = when (priority.lowercase()) {
"distance" -> distance
"direction" -> entityFov.toDouble()
"health" -> entity.health.toDouble()
Expand Down Expand Up @@ -1218,7 +1225,7 @@ object KillAura : Module("KillAura", Category.COMBAT, Keyboard.KEY_R, hideModule
* Check if run should be cancelled
*/
private val cancelRun
inline get() = mc.thePlayer.isSpectator || !isAlive(mc.thePlayer) || (noConsumeAttack == "NoRotation" && isConsumingItem())
inline get() = mc.thePlayer.isSpectator || !isAlive(mc.thePlayer) || noConsumeAttack == "NoRotation" && isConsumingItem()

/**
* Check if [entity] is alive
Expand All @@ -1234,9 +1241,9 @@ object KillAura : Module("KillAura", Category.COMBAT, Keyboard.KEY_R, hideModule

if (target != null && player.heldItem?.item is ItemSword) {
if (smartAutoBlock) {
if (!player.isMoving && forceBlock) return true
if (player.isMoving && forceBlock) return false

if (checkWeapon && (target!!.heldItem?.item !is ItemSword && target!!.heldItem?.item !is ItemAxe)) return false
if (checkWeapon && target?.heldItem?.item !is ItemSword && target?.heldItem?.item !is ItemAxe) return false

if (player.hurtTime > maxOwnHurtTime) return false

Expand Down

0 comments on commit f406af2

Please sign in to comment.