From 73f4bf808d65ed998533db3505820cdc65858c8b Mon Sep 17 00:00:00 2001 From: andi79h-claude Date: Wed, 21 Oct 2026 02:23:38 +0200 Subject: [PATCH] The target-of-target rows only write their globals, as 1.12's options do (#2150) 1.12's options declare Show Target of Target as a bare uvar (UIOptionsFrame.lua:65) and the mode is read on save (UIOptionsFrame.lua:365); neither calls TargetofTarget_Update. The frame follows from TargetFrame_OnUpdate and TargetofTarget_OnUpdate on the next frame (TargetFrame.lua:492-501). Our rows called it as their applyFunc, with the row as `this`; the function refreshes `this`'s debuffs (RefreshBuffs(this, 0, "targettarget"), TargetFrame.lua:538), so with a target's target up the switch raised "BuffFrame.lua:281: attempt to index local 'debuffBorder' (a nil value)" (seen on a Linux client). Verified: the_target_of_target_switch_leaves_the_frame_to_its_own_updates (with a target's target up: no error, the frame shows after one tick on and hides after one tick off) fails with the applyFunc put back, with exactly that error, and passes without it; the options and tot_frame tests pass on a deDE install; cargo test -p benilla-app --lib 5145, clippy -D warnings, fmt. Built on macOS only. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 4d6f9ecc8a0d99e6d3ecf7fa4a8da229ebad92c2) --- crates/benilla-app/assets/ui/OptionsFrame.xml | 9 ++- .../src/ui_script/options_tests.rs | 60 ++++++++++++++++--- 2 files changed, 59 insertions(+), 10 deletions(-) diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index 773d03b6..d72df584 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -2412,7 +2412,12 @@ + (UIOptionsFrame.lua:697-701). Neither row applies anything: + 1.12's options only write the uvars (UIOptionsFrame.lua:65), + and the target frames' OnUpdates show or hide the frame on + the next frame (TargetFrame.lua:492-501). Called from a row, + TargetofTarget_Update would refresh the row's debuffs + (RefreshBuffs(this, ...), TargetFrame.lua:538). --> @@ -2421,7 +2426,6 @@ BenillaOptionsGlobalRow_OnLoad(this, "SHOW_TARGET_OF_TARGET", "Show Target of Target", "OPTION_TOOLTIP_SHOW_TARGET_OF_TARGET") - this.applyFunc = "TargetofTarget_Update"