Commit Graph
6 Commits
Author SHA1 Message Date
Brues d9102bae3b Relicense source headers from LGPL to GPL v3
The repo was internally inconsistent: the LICENSE file is GPL v3 but every
src/ header carried the LGPL v3 notice and the README said "LGPL v3 or
later". LGPL was also the wrong fit — this is an injected mod plus a
bundled addon, not a library other code links against, so LGPL's linking
exception buys nothing.

It's also required: src/voicechat/Tts.cpp is ported from awesome_wotlk's
VoiceChat.cpp, which is GPL v3, and a derivative of GPL code cannot be
relicensed under more permissive terms. Dependencies stay compatible —
MinHook (BSD-2) and the nampower-mirrored packet shapes (BSD) are
GPL-compatible, and SAPI is covered by the system-library exception.

Swept "GNU Lesser General Public License" -> "GNU General Public License"
across all 257 src/ headers and changed the README license line to match
the GPL v3 LICENSE file. Comment-only; no build impact.
2026-06-29 16:38:16 -05:00
Brues 83f92566b2 Fix FUN_004F8DB0 hook signature: 4 stack args, not 3
Crash repro: moving items in bags faulted at EIP=0x00000777 after a
handful of descriptor updates. Root cause was a calling-convention
mismatch on the keyring hook added in b05ff06.

The Ghidra signature quoted in that commit said three stack args
(__thiscall unsigned(this, guidLo, guidHi, *current)), but the actual
function in the Octo binary at 0x004F8DB0 ends with `RET 0x10` —
four stack args, 16 bytes of callee cleanup. Our hook declared three,
emitted `RET 0xC`, and under-cleaned the caller's stack by 4 bytes per
call. After enough descriptor updates the cumulative drift caused a
later RET to pop a non-return-address value and jump there.

Verified by reading the actual binary at that VA: prologue references
[EBP+8/C/10] and the function epilogue is `RET 0x10` at 0x004F8E9B.
2026-05-18 10:01:05 -05:00
Brues b05ff06814 BAG_UPDATE_DELAYED: close keyring gap with FUN_004F8DB0 hook
Pattern-search of .text confirmed exactly three FUN_FIRE_EVENT(0x148,
"%d", ...) call sites in 1.12.1. Two were already covered; the third
lives inside FUN_004F8DB0 — the bag descriptor change callback. Its
keyring branch (slot range 0x51..0x70) fires BAG_UPDATE directly
without going through FUN_004F9370, which was the documented coverage
gap (CLAUDE.md / TODO #67).

Ghidra decompile gave us the calling convention:
  __thiscall unsigned(void *bagDesc, uint, void *, uint *)

Wired as __fastcall with a dummy EDX param — same trampoline trick
used for Frame::RegisterEvent in DllMain. The non-keyring branch of
FUN_004F8DB0 still calls into FUN_004F9370 which is also hooked, but
double-fire is harmless: g_pending is idempotent until the per-frame
drain clears it.
2026-05-17 00:12:32 -05:00
Brues 60147989bb Collapse Event::Custom::Fire_* into one variadic template
The six per-arity helpers (Fire_None / Fire_D / Fire_DD / Fire_DDD /
Fire_SD / Fire_S) all wrapped the same FUN_FIRE_EVENT engine call
with the same eventID<0 early-out — only the format string and arg
list differed. Collapsing into a single template Fire(eventID, fmt,
args...) keeps the printf-style format at the call site and frees us
from adding a new per-arity overload for each new event shape.
2026-05-16 22:05:07 -05:00
Brues 1914eb7ddd PLAYER_STARTED_MOVING / PLAYER_STOPPED_MOVING 2026-05-13 18:43:32 -05:00
Brues 285e6e490d BAG_UPDATE_DELAYED 2026-05-11 18:27:55 -05:00