mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
make supermacro compatibility work with new slashcommands
This commit is contained in:
@@ -24,6 +24,10 @@ function Extension.RegisterMouseoverForFrame(frame, unit)
|
||||
|
||||
frame:SetScript("OnLeave", function()
|
||||
CleveRoids.ClearMouseoverFrom("blizz")
|
||||
-- Also clear "native" source to prevent sticky highlights.
|
||||
-- When SetMouseoverUnit("") is called, UPDATE_MOUSEOVER_UNIT fires but
|
||||
-- selfTriggered causes it to skip, leaving "native" stale.
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
if onleave then
|
||||
onleave()
|
||||
end
|
||||
|
||||
@@ -45,6 +45,7 @@ end
|
||||
|
||||
function Extension.OnLeave()
|
||||
CleveRoids.ClearMouseoverFrom("ctra")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
function Extension.OnLoad()
|
||||
|
||||
@@ -20,6 +20,7 @@ function Extension.SetHook(widget)
|
||||
widget:SetScript("OnLeave", function()
|
||||
hookedOnLeave()
|
||||
CleveRoids.ClearMouseoverFrom("ctuf")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ end
|
||||
|
||||
function Extension.OnLeaveFrame()
|
||||
CleveRoids.ClearMouseoverFrom("duf")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
function Extension.OnEnterElement()
|
||||
@@ -22,6 +23,7 @@ end
|
||||
|
||||
function Extension.OnLeaveElement()
|
||||
CleveRoids.ClearMouseoverFrom("duf")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
function Extension.OnLoad()
|
||||
|
||||
@@ -33,6 +33,7 @@ function Extension.HookFrame(frame)
|
||||
|
||||
frame:SetScript("OnLeave", function()
|
||||
CleveRoids.ClearMouseoverFrom("df3")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
if origOnLeave then origOnLeave() end
|
||||
end)
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ function Extension.RegisterMouseoverForFrame(frame)
|
||||
|
||||
frame:SetScript("OnLeave", function()
|
||||
CleveRoids.ClearMouseoverFrom("focus")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
if onleave then
|
||||
onleave()
|
||||
end
|
||||
|
||||
@@ -15,6 +15,9 @@ end
|
||||
|
||||
function Extension.OnClose()
|
||||
CleveRoids.ClearMouseoverFrom("tooltip")
|
||||
-- Also clear native source when tooltip closes to prevent sticky highlights
|
||||
-- The native source may have been set from hovering units in the 3D world
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
-- Native UPDATE_MOUSEOVER_UNIT handler (priority 2)
|
||||
@@ -46,6 +49,11 @@ function Extension.OnNonUnitTooltip()
|
||||
-- Clear the tooltip source (lowest priority fallback)
|
||||
CleveRoids.ClearMouseoverFrom("tooltip")
|
||||
|
||||
-- Also clear the "native" source since we're explicitly clearing mouseover.
|
||||
-- Without this, a stale "native" source (from hovering units in 3D world)
|
||||
-- would persist and cause sticky highlights/tooltips.
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
|
||||
-- Also explicitly clear the game's mouseover to ensure UnitIsPlayer returns false.
|
||||
-- This is defensive - the main fix is in Utility.lua:apply() using "" instead of nil.
|
||||
if CleveRoids.hasSuperwow and _G.SetMouseoverUnit then
|
||||
@@ -73,6 +81,25 @@ function Extension.OnLoad()
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetTradeSkillItem", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetTrainerService", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetHyperlink", "OnNonUnitTooltip")
|
||||
|
||||
-- Additional tooltip methods that can cause sticky mouseover state
|
||||
-- Pet action bar, stance bar, buffs/debuffs, and other UI elements
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetPetAction", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetShapeshift", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetUnitBuff", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetUnitDebuff", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetPlayerBuff", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetUnitAura", "OnNonUnitTooltip")
|
||||
|
||||
-- Auction, mail, guild bank, and other UI tooltips
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetAuctionItem", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetAuctionSellItem", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetGuildBankItem", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetInboxItem", "OnNonUnitTooltip")
|
||||
Extension.HookMethod(_G["GameTooltip"], "SetSendMailItem", "OnNonUnitTooltip")
|
||||
|
||||
-- Note: SetOwner and SetText are NOT hooked because they're used for ALL tooltips
|
||||
-- including unit tooltips. Hooking them would incorrectly clear mouseover for units.
|
||||
end
|
||||
|
||||
_G["CleveRoids"] = CleveRoids
|
||||
|
||||
@@ -16,6 +16,7 @@ end
|
||||
|
||||
function Extension.OnLeave()
|
||||
CleveRoids.ClearMouseoverFrom("grid")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
function Extension.OnLoad()
|
||||
|
||||
@@ -16,6 +16,7 @@ end
|
||||
|
||||
function Extension.OnLeave()
|
||||
CleveRoids.ClearMouseoverFrom("ngrid")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
function CleveRoids:NotGrid_CreateFrames()
|
||||
|
||||
@@ -16,6 +16,7 @@ end
|
||||
|
||||
function Extension.OnLeave()
|
||||
CleveRoids.ClearMouseoverFrom("praid")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
function Extension.OnLoad()
|
||||
|
||||
@@ -25,6 +25,7 @@ end
|
||||
|
||||
function Extension.OnLeave()
|
||||
CleveRoids.ClearMouseoverFrom("xperl")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
function Extension.DelayedInit()
|
||||
|
||||
@@ -12,6 +12,7 @@ end
|
||||
|
||||
function Extension.OnLeave()
|
||||
CleveRoids.ClearMouseoverFrom("aguf")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
-- Because AddOns are loaded in alphabetical order, this callback will never see the aUF loaded message, had to do a workaround...
|
||||
|
||||
@@ -88,6 +88,10 @@ local function PfClear(frame)
|
||||
if frame and frame.__cr_src then
|
||||
CleveRoids.ClearMouseoverFrom(frame.__cr_src)
|
||||
frame.__cr_src = nil
|
||||
-- Also clear "native" source to prevent sticky highlights.
|
||||
-- When SetMouseoverUnit("") is called, UPDATE_MOUSEOVER_UNIT fires but
|
||||
-- selfTriggered causes it to skip, leaving "native" stale.
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ end
|
||||
|
||||
function Extension.OnLeave()
|
||||
CleveRoids.ClearMouseoverFrom("sraid")
|
||||
CleveRoids.ClearMouseoverFrom("native")
|
||||
end
|
||||
|
||||
function Extension.OnLoad()
|
||||
|
||||
Reference in New Issue
Block a user