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
This commit is contained in:
+16
@@ -224,6 +224,22 @@ pub fn getLocalPlayer() u32 {
|
||||
return getObjectByGUID(guid);
|
||||
}
|
||||
|
||||
/// Resolve a GUID to a unit/NPC name via the name cache.
|
||||
/// Returns the name string or "" if not cached.
|
||||
pub fn getNameByGUID(guid: u64) [*:0]const u8 {
|
||||
if (guid == 0) return "";
|
||||
const lo: u32 = @truncate(guid);
|
||||
const hi: u32 = @truncate(guid >> 32);
|
||||
var name_buf: [2]u32 = .{ 0, 0 };
|
||||
const result = hook.call(fn (u32, u32, u32, u32, u32, u32, u32) callconv(hook.cc.thiscall) u32, o.FN_NAME_CACHE_LOOKUP, .{
|
||||
o.NAME_CACHE_OBJ, lo, hi, @intFromPtr(&name_buf), 0, 0, 0,
|
||||
});
|
||||
if (result != 0) {
|
||||
return @ptrFromInt(result);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/// Get the current target's GUID.
|
||||
pub fn getTargetGUID() u64 {
|
||||
return unitGUID("target");
|
||||
|
||||
Reference in New Issue
Block a user