superwow: Clickthrough is live — the last function on the DLL's manifest
It had been stored and read by nothing, which is "a knob with two positions and one picture". Now the world pick looks through a dead unit that holds no loot for us, which is what SuperAPI's own description asks for: "click through corpses to loot corpses underneath them" — the pile after an AoE pull, where the one body you want is behind four empty ones. The test is `CanLootUnit`'s own, negated (`clickthrough_skips`), so "lootless" means one thing to that verb, to this pick and to the loot sparkle; and because `UNIT_DYNFLAG_LOOTABLE` is per-viewer on the server, a corpse somebody else may loot is lootless TO US, which is exactly the pile the feature is for. A living unit is never skipped whatever its flags — that would make mobs unclickable — and a unit whose descriptor has not streamed is not known to be empty. The flag is mirrored out of the VM once a frame rather than read in the pick, which is a `SystemParam` with no reach into the script; a one-frame lag on a preference set once is immaterial. The resource is `Option` in the pick, like `factions` beside it: a harness that drives this pick builds the world it needs and nothing more, and absent means off, which is also the default. The stale aggregate row this closes is rewritten rather than deleted, because what it got wrong is the lesson: it called six functions "blocked — each needs new app-side state", and three of those blockers were answered by data the tree already had. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
@@ -169,10 +169,11 @@ pub(in crate::script) fn install(lua: &Lua) -> mlua::Result<()> {
|
||||
})?,
|
||||
)?;
|
||||
|
||||
// Clickthrough([0|1]): click-through on lootless corpses. Stored and reported faithfully so an
|
||||
// options panel round-trips, but NOTHING READS IT YET — the world-click corpse path is not
|
||||
// wired to it (`Model::clickthrough_corpses`, `docs/ADDON_COMPAT.md`). Answering honestly
|
||||
// beats raising: an addon that sets it keeps working, and the gap is one place, written down.
|
||||
// Clickthrough([0|1]): click-through on lootless corpses — the pile after an AoE pull, where
|
||||
// the one body you want is behind four empty ones. **Live**: the world pick skips a dead unit
|
||||
// with no loot for us while this is set (`benilla-app`'s `target::ClickthroughCorpses`, read
|
||||
// once a frame beside the other VM drains). The test it applies is `CanLootUnit`'s own, so
|
||||
// "lootless" means the same thing to both verbs and to the loot sparkle.
|
||||
g.set(
|
||||
"Clickthrough",
|
||||
lua.create_function(|lua, on: Option<i64>| {
|
||||
@@ -660,6 +661,12 @@ impl crate::script::UiScript {
|
||||
self.model_mut().mouseover_override = None;
|
||||
}
|
||||
|
||||
/// `Clickthrough()`'s flag, for the world pick (`benilla-app`'s `target::ClickthroughCorpses`).
|
||||
#[must_use]
|
||||
pub fn clickthrough_corpses(&self) -> bool {
|
||||
self.model_mut().clickthrough_corpses
|
||||
}
|
||||
|
||||
/// `CombatLogAdd` lines since the last drain, each with its `addToRawLog` flag: the combat
|
||||
/// log takes every line, SuperWoW's raw log the flagged ones.
|
||||
pub fn take_combat_log_adds(&mut self) -> Vec<(String, bool)> {
|
||||
|
||||
Reference in New Issue
Block a user