dpslog: handler table swaps, CombatLogGetCurrentEventInfo, unit flags, boolean fix
Major architectural changes: - Migrate 12 packet handlers from JMP-patching Detours to NetClient opcode handler table pointer swaps. No code bytes modified — only heap pointers. Invisible to Warden memory scans. Hook InitializeGameEngine (0x401570, __thiscall) to install swaps after all handlers are registered. - Implement CombatLogGetCurrentEventInfo() — WotLK-style lazy arg retrieval. Event fires with no args; addons call the function to get all fields from a C-side buffer. No arg count limit (bypasses ExecuteLuaCallback 19-arg cap). Includes unit flags, raid flags, and all suffix fields. - Compute COMBATLOG_OBJECT_* unit flags: affiliation (MINE/PARTY/RAID/OUTSIDER), reaction (FRIENDLY/NEUTRAL/HOSTILE via UnitReaction), control (PLAYER/NPC), type (PLAYER/NPC/PET/GUARDIAN/OBJECT via SUMMONEDBY check), special (TARGET), and raid target markers. - Fix boolean fields (critical/glancing/crushing): changed from %d (Lua number 0, which is TRUTHY) to nil/"1" via boolToLua(). Details addon was counting every hit as critical because it uses truthiness checks. - SPELL_INSTAKILL now fires from SPELLLOGEXECUTE (has caster GUID). Standalone SMSG_SPELLINSTAKILLLOG handler is pass-through only. - SPELL_EXTRA_ATTACKS now uses target GUID from packet (was discarded). - SPELL_CAST_START/SUCCESS now parse spell target from packet. - SPELL_DRAIN subevent added for instant power drain effects. - Rename event from COMBAT_LOG_EVENT to COMBAT_LOG_EVENT_UNFILTERED. - Update DPSMate and WSBT CLEU adapters to use CombatLogGetCurrentEventInfo(). - Remove unnecessary `or 0` guards on numeric fields (always non-nil from C).
This commit is contained in:
@@ -592,6 +592,14 @@ All in the 0x51xxxx addon/UI system. Zeroing/overwriting these corrupts game sta
|
||||
- Known limitations: false positives if damage + unrelated aura removal happen in same batch;
|
||||
no coverage for SPELL_AURA_BROKEN (without spell — melee break) since we pass spellId=0 for melee
|
||||
|
||||
### Future — Custom Extensions (beyond WotLK spec)
|
||||
- [ ] **RESURRECT_ACCEPTED**: Current SPELL_RESURRECT fires on cast/effect (ProcessSpellEffect),
|
||||
not when the target accepts. Detect via outgoing CMSG_RESURRECT_RESPONSE (0x15C) or
|
||||
SMSG_UPDATE_OBJECT alive state change. Related: SMSG_RESURRECT_REQUEST (0x15B),
|
||||
SMSG_RESURRECT_FAILED (0x252).
|
||||
- [ ] **UNIT_POSITION**: Periodic or event-driven unit position data in combat log events.
|
||||
Useful for replay/analysis tools.
|
||||
|
||||
### Completed reference
|
||||
- [x] RANGE_MISSED: Detected via spell ID check (75/5019) in ProcessSpellCombatResult hook.
|
||||
- [x] SPELL_SUMMON / SPELL_RESURRECT / SPELL_ENERGIZE: Hook ProcessSpellEffect (0x62ACE0),
|
||||
|
||||
Reference in New Issue
Block a user