mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
Populate AuraData sourceUnit/sourceGUID and non-player expirationTime by co-hooking SMSG_SPELL_GO (FUN_SPELL_GO) and caching (targetGuid, spellId) -> caster + expiration. The vanilla unit aura array stores only spell IDs; the SpellGo packet is the only place the client sees an aura's caster and a server-authoritative duration. We parse the engine packet ourselves, so this is self-sufficient (no nampower dependency) -- when nampower is loaded we simply co-hook the same site. sourceGUID is a ClassicAPI extension (raw "0x..." string), set whenever a caster is known including when sourceUnit is nil; stable across the session, unlike the volatile nameplate token, and usable as a unit token under SuperWoW. Also consolidate the local-player-GUID read into Unit::Identity::PlayerGuid() (was duplicated inline in four files) and expose Unit::Identity GuidForToken / TokenFromGUID for reuse.