Commit Graph
11 Commits
Author SHA1 Message Date
Brues ef8ea710d4 feat(frame): guard GetPoint against dangling anchor targets
An anchor node (region+0x28 + point*4, vtable 0x0081C44C) stores its
relativeTo as a raw pointer at +0x0C with no weak reference. When the
target frame is freed the pointer is never cleared, so Script_GetPoint
still reads the target's refcount at [relativeTo-0x24+4] and faults --
ERROR #132, ACCESS_VIOLATION at 0x007A2452.

Re-register GetPoint on the Region method registry (front-of-bucket
wins, no MinHook -- the Texture::SetDesaturated mechanism). The
replacement SEH-probes each anchor's target header and hands dead ones
to the engine's own FUN_00767E70, which frees the node and NULLs the
slot by pointer comparison without ever dereferencing the dead target,
then delegates to the stock GetPoint.

Delete rather than NULL the relativeTo. 3.3.5 restructured CFramePoint
as a 16-byte POD with a flags word and invalidates in place (bit 0x800,
gated on by every reader), but the 1.12 node has no flags word, so its
only representation for a dead anchor is the empty slot -- exactly what
FUN_00767E70 produces. A live 0x44C node with relativeTo == 0 is a
state the engine never creates, and the layout readers would fault on
[0 + 0x3C].

Add _classicapi_ArmGetPointCrash to arm the condition deterministically
(decommitted page / low address / null relativeTo). No pure-Lua path
can produce it -- CreateFrame frames are never freed on this client.

Scope: covers the GetPoint reader only. The layout readers GetWidth and
GetHeight (0x007A2FB8) deref the same field unguarded, and nothing here
addresses whatever leaves the pointer dangling in the first place.
2026-09-14 21:37:43 -05:00
Brues 993c82cca7 refactor: route unit-token resolution through Game::ResolveUnitToken
Sweep the ~35 modules that each hand-rolled a `ResolveUnitToken_t` typedef
plus `reinterpret_cast<…>(Offsets::FUN_RESOLVE_UNIT_TOKEN)` onto the shared
`Game::ResolveUnitToken` helper. Behavior-identical — it is the same engine
function — and net -87 lines. The typedef now lives in exactly one place
(Game.cpp).

unit/Position.h is a header, so it gains an `#include "Game.h"`; every other
touched file already pulled Game.h in. No offsets, logic, or unrelated
typedefs were changed.
2026-08-30 16:57:04 -05:00
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 1c5879e74b Delete TooltipProbe.cpp 2026-05-17 20:50:10 -05:00
Brues 4723a835fe hooksecurefunc: pcall the callback and tighten stack shuffle
A buggy hook was breaking the wrapped path because the callback ran
through lua_call; switching to lua_pcall mirrors 3.3.5's FUN_00817050
and matches the actual safety property of hooksecurefunc — the
original's results always reach the caller. Stack shuffle now sinks
results below the args once instead of duplicating args twice, so the
wrapper uses ~nargs+nresults slots and drops the O(nargs^2) Remove
loop.
2026-05-17 20:47:51 -05:00
Brues 04f476e1c4 Switch debug log fopen calls to fopen_s
Silences C4996 deprecation warnings under MSVC without disabling
the warning class globally.
2026-05-16 17:39:36 -05:00
Brues 96af9c20fc C_SpellBook.GetSpellLevelLearned and C_SpellBook.GetCurrentLevelSpells([level]) 2026-05-15 01:26:11 -05:00
Brues 32166dfe7d corrected _LOOKING. now uses the same latch logic as _TURNING 2026-05-14 13:10:05 -05:00
Brues 8200d97d5d IsAssistingRitual 2026-05-11 02:31:47 -05:00
Brues 15c51ee6d8 OffhandHasWeapon 2026-05-09 21:48:48 -05:00
Brues 0d9ab8b442 IsMounted, IsStealthed, IsFalling, IsSwimming 2026-05-09 20:44:35 -05:00