mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
Generalize the item-only Tooltip::SetItemEvent into Tooltip::SetEvents, backing all four object tooltip scripts through one shared fire path (stack save/restore + recursion guard + Suppressor). One resolver co-hook recognizes all four OnTooltipSet* names (the per-tooltip cell now holds a slot per kind), plus one builder co-hook per kind firing its script after the original build: - Spell -> FUN_0052E610 (SetSpell/SetSpellByID/SetTalent/SetShapeshift; 7 stack args, RET 0x1c) - Unit -> FUN_00529fe0 (SetUnit + mouseover; 1 arg, returns an int the caller tests -> co-hook forwards it) - GameObject -> FUN_0052aa20 (GO hover populator; 1 arg) Each hook's declared stack-arg count matches its callee RET N (verified from disassembly) so the caller's stack isn't corrupted. Auras deliberately do NOT fire OnTooltipSetSpell: SetUnitBuff/Debuff/ PlayerBuff funnel through a separate aura-tooltip builder (FUN_0052f880) that bypasses the spell builder -- matching retail, where unit auras are a distinct tooltip data type. Verified in-game: all three new scripts fire (spell hover, unit mouseover, gameobject mouseover), item still fires, no crash.