upstream: finish the picked commits' build — drop WorldWriter::sent, add set_enemy_plates

This commit is contained in:
chairmanpow
2026-10-06 16:50:30 +01:00
parent 95738c891d
commit 7c1d92a9d4
2 changed files with 12 additions and 3 deletions
@@ -1485,6 +1485,18 @@ pub(super) fn seed_ui_fixture(
}
}
/// Turn the enemy nameplates on or off through the stock `NAMEPLATES_ON` global.
fn set_enemy_plates(script: Option<&benilla_ui::script::UiScript>, on: bool) {
let lua = if on {
"NAMEPLATES_ON = 1; ShowNameplates()"
} else {
"NAMEPLATES_ON = nil; HideNameplates()"
};
if let Some(Err(e)) = script.map(|s| s.run(lua)) {
warn!("nameplates: {e}");
}
}
/// The `GetTime()` the cooldown filmstrip pins the VM's session clock at, seconds. Large, as
/// `CooldownFrame_SetTimer` ignores a start not above 0 (`Cooldown.lua:2`) and the starts here
/// are `now - fraction * span`.
@@ -60,9 +60,6 @@ mod vendor;
pub struct WorldWriter {
pub(super) stream: TcpStream,
pub(super) encrypter: EncrypterHalf,
/// Every packet that reached the socket since the last drain, as `(opcode, body length)`;
/// `None` until [`Self::watch_sends`]. Pushed only after a successful write.
pub(super) sent: Option<Vec<(u16, usize)>>,
/// The character's faction language, set at login from its race, which a chat send naming no
/// language carries. vmangos drops the whole message, dot-commands included, when the
/// character does not know the language.