changeset 15:0c5e210221c9

correct tooltips being associated with wrong buff
author Chris Mellon <arkanes@gmai.com>
date Wed, 13 Oct 2010 11:46:08 -0500
parents 1cee96433b0f
children 87131aeedc3f
files KBF.lua
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/KBF.lua	Wed Oct 13 11:35:40 2010 -0500
+++ b/KBF.lua	Wed Oct 13 11:46:08 2010 -0500
@@ -49,7 +49,7 @@
         self:UpdateBarExpirationTime(frame)
         -- Don't forget to refresh shown tooltips
         if ( GameTooltip:IsOwned(frame) ) then
-            GameTooltip:SetUnitAura(unit, idx, filter);
+            self:OnEnter(frame)
         end
     end
     -- temporary enchants
@@ -94,7 +94,7 @@
         end
         self:UpdateBarExpirationTime(frame)
         if ( GameTooltip:IsOwned(frame) ) then
-            GameTooltip:SetUnitAura(unit, idx, "HARMFUL");
+            self:OnEnter(frame)
         end
     end
     self.dirty = nil
@@ -172,9 +172,10 @@
     -- I'd like a better place to position this but it's funky for right now, handle it later
     local unit = button.unit or button:GetAttribute("unit")
     local filter = button.filter or button:GetAttribute("filter")
+    local index = button:GetAttribute("index") or button.index
     GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT");
     GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2);
-    GameTooltip:SetUnitAura(unit, button:GetID(), filter);	
+    GameTooltip:SetUnitAura(unit, index, filter);
 end
 
 -- creates a icon + statusbar bar