Commit Graph
25 Commits
Author SHA1 Message Date
MarcelineVQ b12fc820ef Publish source: Unlicense, public README, repo hygiene
The remote was previously a distribution-only point for pre-built DLLs.
This opens the source.

- LICENSE: Unlicense, with a GPL-3.0 carve-out for src/dpslog/WeirdDPSMate
  (a DPSMate fork that keeps its own license)
- README.md replaces the stale internal one with the user-facing docs from
  DLL_README.md, swapping the 'Why No Source Code?' section for build and
  layout notes. DLL_README.md is dropped; one README now serves both.
- RELEASING.md: drop the trim-the-README-per-release dance and the
  remote/WeirdUtils/ distribution clone, both obsolete now
- gitignore agent/editor scratch, build caches, the vendored WSBT addon,
  and the WeirdThreat/uwu-logs checkouts (separate upstream repos)
- Commit outstanding module work: superweirdo, clickthrough portal visuals,
  transform44 decompiles, worldmarkers demo presets, tools/
2026-07-27 21:47:55 -07:00
MarcelineVQ 96687bfaaa clickthrough: block unusable player-summoned portals and rituals
Filter ritual (type 18) and mage portal (type 22) GOs whose creator
is a player not in the local player's party or raid. Completely
unclickable, not just deprioritized.

Also:
- Add wow.isInGroup() shared group membership check (party + raid)
- Add party/raid addresses to shared offsets.zig
- Fix dpslog party member GUID address (was 0xBC7600, correct: 0xBC6F48)
  Verified from client's is_player_in_allowed_list @ 0x4e7f70
2026-03-28 11:42:38 -07:00
MarcelineVQ b0b70a744e dpslog: queued log writer, raid roster fix, shutdown hook, minimap icon fixes
Log file writer queues events and flushes after 3s delay, re-resolving
GUIDs at write time so names from later packets can fill in. Flush
triggers on each new event (for old entries) and on DestroyObjectManager
hook before the object manager is torn down.

- Fix raid roster access: 0xB712A8 is a flat array, not pointer-to-array
- Fix SPELL_GO hit targets: full u64 GUIDs, not packed
- Fix GetLocalizedText calling convention: __fastcall not __cdecl
- Fix isUnknownName filtering at dpslog use sites (not in shared wow.zig)
- Fix dropdown icon tCoords persisting across reload
- Add pfQuest-style quest available icon (gold exclamation mark BLP)
- Hook DestroyObjectManager for log flush instead of World_HandleLogoutCleanup
- Null GUID handling: nil name, 0x80000000 flags in both Lua and file paths
- Document combat log file writer in DLL_README
2026-03-20 15:03:04 -07:00
MarcelineVQ f70bffef45 dpslog: WotLK combat log file writer, null GUID handling, unique chat handlers
- Write WotLK-format CSV to Logs\WeirdCombatLog.txt when /combatlog is
  active (checks COMBAT_LOG_HANDLE at 0xB50544). Resolves names, flags,
  spell names eagerly per event via same CLEU buffer resolution as
  CombatLogGetCurrentEventInfo. Uses Win32 WriteFile with OS caching.

- Null GUIDs output as 0x0000000000000000,nil,0x80000000,0x0 matching
  WotLK format. Empty resolved names output as nil not "".

- DPSLog addon: every subevent has unique chat handler with correct name
  via factory functions.

- DAMAGE_SHIELD scans victim's auras (not attacker's) — shield owner
  is the victim in the packet.
2026-03-19 17:05:24 -07:00
MarcelineVQ 7c64660c81 dpslog: damage shield spell ID, unique chat handlers
- DAMAGE_SHIELD now resolves spell ID by scanning the victim's (shield
  owner's) aura descriptors for SPELL_AURA_DAMAGE_SHIELD (effect 15)
  matching the packet school. Uses new deferred cleuDamageShieldSpell
  buffer entry resolved lazily at CombatLogGetCurrentEventInfo time.

- Fix: scan victim's auras, not attacker's — the shield aura (Thorns,
  Retribution Aura) is on the unit being hit, not the one hitting.

- DPSLog addon: every unique subevent now has its own chat handler
  with correct name. Factory functions replace shared handlers that
  were printing wrong subevent names (e.g. "SPELL_DAMAGE" for all
  damage types).

- Remove CombatLogGetCurrentEventInfo rdtsc profiling (measured ~12k
  cycles/call = ~4us, negligible).
2026-03-19 14:37:08 -07:00
MarcelineVQ 89f9936fa4 dpslog: lazy resolution, aura caster tracking, creature names, crash fixes
- Defer all name resolution, flag computation, and spell lookups to
  CombatLogGetCurrentEventInfo() request time. Fire functions store
  only raw GUIDs (cleuGuid) and spell IDs (cleuSpellId). Resolution
  happens lazily when addons call the function, after packet/update
  processing is complete and the object manager is stable.

- Add aura caster tracking: cast ring buffer (32 entries) records
  (caster, target, spellId) from SPELL_GO hit targets. Aura applied
  hook correlates with recent casts to infer caster. Persistent cache
  (128 entries) maps (unitGUID, slot) -> casterGUID for aura removal.

- Fix creature name resolution: use CGUnit_C::GetNameFromCacheOrUnknown
  (0x609210) via object pointer for non-player GUIDs. Safe during lazy
  resolution since object manager is stable at that point.

- Fix isInRaid crash: validate raid roster entry pointers with
  isValidPtr before dereferencing. Offline raid members have stale
  entry pointers (value 4) that passed the != 0 check but crashed
  on deref. Same pattern worldmarkers already guards against.

- Strip name/school parameters from all 14 fire functions — no longer
  needed since resolution is deferred. Reduces per-event work to just
  storing raw IDs in the CLEU buffer.
2026-03-19 13:55:48 -07:00
MarcelineVQ 60ee3ae1d1 dpslog: fix handler table swaps not surviving relog
InitializeGameEngine re-registers all packet handlers on every login,
overwriting our swaps. The NetClient pointer may be reused so comparing
it doesn't detect re-registration. Fix: unconditionally reset swap_count
and re-install all swaps whenever InitializeGameEngine fires.
2026-03-18 18:43:40 -07:00
MarcelineVQ 34bb70dc8b dpslog: single CombatLogGetCurrentEventInfo call per event
Both DPSMate and WSBT adapters now call CombatLogGetCurrentEventInfo()
exactly once per event, unpacking all args into p1..p12 locals.
Remove redundant relevance check in WSBT profiling wrapper.
2026-03-18 17:47:53 -07:00
MarcelineVQ d84f723539 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).
2026-03-18 16:55:27 -07:00
MarcelineVQ fc762ac200 dpslog: CLEU rename, DPSMate absorb pipeline, WSBT adapter, module version API
- Rename COMBAT_LOG_EVENT -> COMBAT_LOG_EVENT_UNFILTERED across Zig/Lua
- DPSMate CLEU adapter: absorb pipeline (SetUnregisterVariables, Absorb,
  ConfirmAbsorbApplication, UnregisterAbsorb), BuildFail type 2/3,
  "(Periodic)" suffix, removed dead handler
- WSBT (Weird Scrolling Battle Text): CLEU adapter fork of MSBT with
  dispatch table, A/B combat profiling, selective event unregistration
- Module version API: GetWeirdUtilsVersion(name?) Lua function + WeirdUtils
  global table, additive across independent DLLs. Build system passes
  per-module version strings via build_options.
- Hook Glue_LoadScriptFunctions (0x46ABB0) for login screen availability
- Rename lsf_hook -> register_commands_hook (real name: Player_LoadScriptFunctions)
- lua.zig: add setglobal/getglobal via LUA_GLOBALSINDEX (-10001)
2026-03-18 14:20:16 -07:00
MarcelineVQ 86da3bcc03 dpslog: DPSMate CLEU adapter with per-combat A/B profiling
Adds DPSMate_CLEUAdapter.lua -- replaces DPSMate's string-parsing
CHAT_MSG_* system with structured COMBAT_LOG_EVENT data from our DLL.

Adapter maps CLEU subevents directly to DPSMate.DB API calls:
DamageDone, DamageTaken, EnemyDamage, Healing, HealingTaken,
DeathHistory, Kick, Dispels, BuildBuffs, CCBreaker, etc.
Eliminates all strfind pattern matching from the combat log path.

Toggle: /dpscleu (on/off/status)
Benchmark: /dpsbench -- always-on per-combat A/B profiling.
  Resets at combat start, reports at combat end, flips mode for next
  combat. Reports events, total ms, us/event, GC delta, and percentage
  comparison between CLEU and original modes.

Starts in CLEU mode by default.
2026-03-18 01:12:04 -07:00
MarcelineVQ 56f5c0405d dpslog: WotLK CLEU parity — overkill, overheal, spell names, unit names, GetSpellInfo
Full WotLK 3.3.5 COMBAT_LOG_EVENT_UNFILTERED layout parity:

Event structure:
- Base: subevent, sourceGUID, sourceName, destGUID, destName
- Spell prefix: spellId, spellName, spellSchool
- All suffix field orders match WotLK (blocked before absorbed, etc.)

New fields:
- overkill (-1 if alive) on all _DAMAGE events
- overheal on SPELL_HEAL and SPELL_PERIODIC_HEAL
- sourceName/destName via getNameByGUID (name cache 0x55F080)
- spellName via SpellRec+0x1E0+locale*4 (verified from SuperWoW)
- glancing/crushing as separate booleans (was packed flags)
- amountMissed field (0 — downstream hook lacks amount)

New hooks:
- ProcessStandardPowerGainMessage (0x62CA00) for SPELL_ENERGIZE with
  actual amount and powerType from SMSG_SPELLENERGIZELOG (opcode 0x151)
- Periodic energize: divide by power display factor (rage/10, happiness/1000)

Leech/drain reclassification:
- Drain Life routed through SPELL_PERIODIC_LEECH (aura 53 check in spell DB)
- SPELL_HEAL suppressed for leech spells (covered by leech event)
- Power leech (aura 64): gainMultiplier read as f32, >0 = LEECH, ==0 = DRAIN
- _LEECH/_DRAIN suffix: amount, powerType(-2=health), extraAmount

Lua API:
- GetSpellInfo(spellId) -> name, rank, icon, castTime, minRange, maxRange, spellId
  Matches WotLK returns. DBC addresses verified from nampower + Ghidra:
  SpellRange.dbc (0xC0D79C), SpellIcon.dbc (0xC0D7EC),
  SpellCastTimes.dbc (0xC0D878). SpellRec offsets from nampower struct.

Reference docs:
- WOTLK_CLEU_SPEC.md: full suffix spec from Blizzard_CombatLog.lua + Skada
- WARDEN_CONCERNS.md: hook risk analysis and remaining parity gaps
2026-03-18 00:08:42 -07:00
MarcelineVQ 76f0691540 dpslog: fix DAMAGE_SPLIT aura offset (0x178->0x16C for client Spell.dbc), fix SPELL_EXTRA_ATTACKS count, DEFLECT note, EXHAUSTED note 2026-03-17 16:02:39 -07:00
MarcelineVQ aadd467976 dpslog: SPELL_EXTRA_ATTACKS now includes count (EDX was the count all along, not unused) 2026-03-17 15:18:21 -07:00
MarcelineVQ 2ad6ed380e dpslog addon: remove SWING_MISSED DEFLECT (melee can't deflect), add SPELL_MISSED DEFLECT (dead in vanilla server, kept for protocol completeness) 2026-03-17 15:06:06 -07:00
MarcelineVQ 7089ffa399 dpslog addon: variant-expanded tracker checklist (67 entries) — miss types, crit/glancing/crushing, env types, aura BUFF/DEBUFF, power types 2026-03-17 15:01:51 -07:00
MarcelineVQ 8bd82aeea7 dpslog: SPELL_CAST_FAILED for other units via SMSG_SPELL_FAILED_OTHER (0x6E75F0); addon tracks DAMAGE_SPLIT, SPELL_DISPEL_FAILED, UNIT_DESTROYED (37 subevents) 2026-03-17 14:57:22 -07:00
MarcelineVQ 3eff6928b9 dpslog: UNIT_DESTROYED for totems (creature type 11 via name cache), DAMAGE_SPLIT, SPELL_DISPEL_FAILED 2026-03-17 14:39:42 -07:00
MarcelineVQ fec7387148 dpslog: add DAMAGE_SPLIT (Soul Link/BoSac via spell DB aura check) and SPELL_DISPEL_FAILED (hook ProcessMultipleSpellInterrupts 0x628C20) 2026-03-17 14:27:31 -07:00
MarcelineVQ c7a293bec4 Add research notes for SuperWoW events and transformMatrix4x4 analysis 2026-03-12 10:38:11 -07:00
MarcelineVQ e0da2791d9 Fix dpslog dynamic slot search and environmental damage params
Resize hook now expands event array to 801 slots. Dynamic slot search
scans from slot 650 for first empty entry (compatible with SuperWoW).
Fixed ProcessEnvironmentalDamage parameter order — Ghidra mislabeled
damageSource as damage. Lua chat output now fires only on first subevent.
2026-03-12 10:35:44 -07:00
MarcelineVQ 65bc234c08 Add dpslog module: unified COMBAT_LOG_EVENT with 35 subevents
Hook 23 packet handlers / internal functions to fire a single
COMBAT_LOG_EVENT with WotLK-style subevent strings and structured
args (spellId, amount, school, etc.) for addon consumption.

Event registration writes directly into the internal FrameScript
event table at slot 650, with a resize_lua_event_array hook that
expands capacity to 700 when needed (compatible with SuperWoW).

Includes Lua tracker addon (WeirdUtils_DPSLog) with popup checklist
UI, per-subevent chat output, and /dpslog slash command.
2026-03-11 21:45:24 -07:00
MarcelineVQ 7462f424e0 Add dpslog research notes for packet handlers and event registration 2026-03-10 13:27:43 -07:00
MarcelineVQ 0f14213b0b Add logging module with auto-prefix, route all output through Logger
Replace console.zig with logging.zig: per-module Logger with auto
[name] prefix, optional file output, and destination routing. Convert
all modules from manual [name] prefixes and global con.print to Logger
instances. Remove redundant "Module loaded" lines. Replace
OutputDebugStringA in outline/tracker with Logger. Add dpslog module
with structured combat log events (SPELL_DMG, PERIODIC, HEAL, MELEE).
Add clickthrough module and bigcursor D3D9 cursor scaling.
2026-03-10 13:26:45 -07:00
MarcelineVQ 2aaa089c76 Add module control API, bigcursor with fractional scaling, shared mutex
Module control API:
- Three cdecl exports: WeirdUtils_IsModuleActive, WeirdUtils_DisableModule, WeirdUtils_DisableAll
- C header include/weirdutils_api.h for runtime DLL discovery
- All modules gain pub module_name, isActive(), shared mutex via src/mutex.zig
- build.zig refactored to module_list array of ModuleDesc

Bigcursor:
- D3D9 vtable hooks on SetCursorProperties/ShowCursor
- Scale2x/Scale3x pixel-art upscalers in pure Zig (replaces 12K-line hqx C)
- Bilinear resampler for fractional scales (1.0-4.0, default 1.2)
- Win32 cursor via CreateIconIndirect bypasses D3D9 32x32 limit
- FNV-1a hash cache for ~16 cursor bitmaps
- Lua API: SetCursorScale(n) / GetCursorScale()
- CVar cursorScale for Config.wtf persistence (tenths)

Other:
- Add dpslog module stub
- Docs and README updates
2026-03-06 13:27:35 -08:00