Make sure we have "mouseover" unit if it's available.
Scott Sibley [10-19-10 - 01:36]
Make sure we have "mouseover" unit if it's available.
diff --git a/Modules/Position/Position.lua b/Modules/Position/Position.lua
index a1a90c0..05b13f8 100644
--- a/Modules/Position/Position.lua
+++ b/Modules/Position/Position.lua
@@ -333,7 +333,14 @@ local updateFrame = CreateFrame("Frame")
local oldX, oldY
local currentAnchor
local xoffset, yoffset
+local oldSpell
local positionTooltip = function()
+
+ -- When hovering over a spell on cooldwon, the UI keeps resetting the spell over and over to keep the tooltip's cooldown timer updated. This repositions the tooltip over and over, and causes bug reports.
+ local spell, id = GameTooltip:GetSpell()
+ if spell and spell == oldSpell then return end
+ oldSpell = spell
+
local x, y = GetCursorPosition()
local effScale = GameTooltip:GetEffectiveScale()
diff --git a/StarTip.lua b/StarTip.lua
index 99037ea..0e23df9 100644
--- a/StarTip.lua
+++ b/StarTip.lua
@@ -646,7 +646,11 @@ function StarTip.OnTooltipSetUnit(...)
return
end
lastTime = GetTime()
-
+
+ if unit ~= "mouseover" and UnitIsUnit(unit, "mouseover") then
+ unit = "mouseover"
+ end
+
--StarTip.fading = false
StarTip.unit = unit
@@ -670,6 +674,7 @@ function StarTip.OnTooltipSetItem(self, ...)
end
function StarTip.OnTooltipSetSpell(...)
+ StarTip:Print(GameTooltip:GetSpell())
if StarTip.tooltipHidden then return end
if not StarTip.justSetSpell then
for k, v in StarTip:IterateModules() do