From 9cef79c57ec26dfdaedccbf7b7c1cefd0b1a67bf Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Thu, 3 Sep 2026 18:03:13 +0200 Subject: [PATCH] Require reload-safe ClassicAPI tooltip events --- api.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api.lua b/api.lua index 98c742a..aed85f4 100644 --- a/api.lua +++ b/api.lua @@ -112,9 +112,10 @@ API.unitguid = type(_G.UnitGUID) == "function" API.unittoken = type(_G.UnitTokenFromGUID) == "function" API.tooltipunit = _G.GameTooltip and type(_G.GameTooltip.GetUnitGUID) == "function" --- OnTooltipSetUnit shipped in ClassicAPI v1.8.2. Tooltip Details uses this --- native builder event directly instead of Vanilla OnShow/mouseover polling. -API.tooltipsetunit = API.classicapi_version >= 10802 +-- OnTooltipSetUnit shipped in ClassicAPI v1.8.2, but its per-tooltip +-- handler cells became reload-safe in v1.12.2. Require the fixed generation +-- instead of falling back to Vanilla OnShow/mouseover polling. +API.tooltipsetunit = API.classicapi_version >= 11202 and API.tooltipunit and API.unittoken API.unitrange = type(_G.UnitInRange) == "function"