Commit Graph
5 Commits
Author SHA1 Message Date
Brues 90a580d75d Add Game::Lua::PushBool helper, sweep condition ? 1 : 0 patterns
PushBool(L, bool) wraps lua_pushboolean and centralizes the bool→int
conversion the engine ABI requires. All ~50 sites doing
`PushBoolean(L, condition ? 1 : 0)` collapse to `PushBool(L, condition)`.
Non-PushBoolean callers passing bool→int (Fire_*, FireGetItemInfoReceived,
etc.) switched to `static_cast<int>(...)`. NameCache settings file output
relies on the default ostream bool→"0"/"1" formatting.

Literal `PushBoolean(L, 0)` / `PushBoolean(L, 1)` left alone — they're
already explicit int values.
2026-05-16 21:39:46 -05:00
Brues 52fc53a08c UnitIsInMyGuild: drop pcall(UnitName), prefix-gate the token resolver
Prefix-check known tokens inline instead of going through Lua's
UnitName via pcall to figure out "is this a token?". OOR-token name
resolution now goes through FUN_TOKEN_TO_GUID + the engine's player
NameCache directly. Literal-name input still walks the guild roster
by strcmp, unchanged.
2026-05-15 21:26:09 -05:00
Brues 976ef735c3 UnitIsInMyGuild(unitOrName) 2026-05-10 23:52:10 -05:00
Brues 43dd3b02df UnitIsPossessed(unit) 2026-05-10 21:38:44 -05:00
Brues 8b5d14c5cd UnitIsAFK / UnitIsDND 2026-05-09 11:20:45 -05:00