Mercurial > wow > kbf
comparison KBF.lua @ 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 |
comparison
equal
deleted
inserted
replaced
| 14:1cee96433b0f | 15:0c5e210221c9 |
|---|---|
| 47 if self:BindBarToBuff(frame, unit) then break end | 47 if self:BindBarToBuff(frame, unit) then break end |
| 48 end | 48 end |
| 49 self:UpdateBarExpirationTime(frame) | 49 self:UpdateBarExpirationTime(frame) |
| 50 -- Don't forget to refresh shown tooltips | 50 -- Don't forget to refresh shown tooltips |
| 51 if ( GameTooltip:IsOwned(frame) ) then | 51 if ( GameTooltip:IsOwned(frame) ) then |
| 52 GameTooltip:SetUnitAura(unit, idx, filter); | 52 self:OnEnter(frame) |
| 53 end | 53 end |
| 54 end | 54 end |
| 55 -- temporary enchants | 55 -- temporary enchants |
| 56 -- TODO: The blizz secure aura header binds both temp enchants | 56 -- TODO: The blizz secure aura header binds both temp enchants |
| 57 -- to the main hand. No support for cancelling weapon enchants | 57 -- to the main hand. No support for cancelling weapon enchants |
| 92 -- not dirty, so no frame means we're done | 92 -- not dirty, so no frame means we're done |
| 93 if not frame then break end | 93 if not frame then break end |
| 94 end | 94 end |
| 95 self:UpdateBarExpirationTime(frame) | 95 self:UpdateBarExpirationTime(frame) |
| 96 if ( GameTooltip:IsOwned(frame) ) then | 96 if ( GameTooltip:IsOwned(frame) ) then |
| 97 GameTooltip:SetUnitAura(unit, idx, "HARMFUL"); | 97 self:OnEnter(frame) |
| 98 end | 98 end |
| 99 end | 99 end |
| 100 self.dirty = nil | 100 self.dirty = nil |
| 101 end | 101 end |
| 102 | 102 |
| 170 function KBF:OnEnter(button, motion) | 170 function KBF:OnEnter(button, motion) |
| 171 -- this is for the secure buttons, so use the attributes | 171 -- this is for the secure buttons, so use the attributes |
| 172 -- I'd like a better place to position this but it's funky for right now, handle it later | 172 -- I'd like a better place to position this but it's funky for right now, handle it later |
| 173 local unit = button.unit or button:GetAttribute("unit") | 173 local unit = button.unit or button:GetAttribute("unit") |
| 174 local filter = button.filter or button:GetAttribute("filter") | 174 local filter = button.filter or button:GetAttribute("filter") |
| 175 local index = button:GetAttribute("index") or button.index | |
| 175 GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT"); | 176 GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT"); |
| 176 GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2); | 177 GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2); |
| 177 GameTooltip:SetUnitAura(unit, button:GetID(), filter); | 178 GameTooltip:SetUnitAura(unit, index, filter); |
| 178 end | 179 end |
| 179 | 180 |
| 180 -- creates a icon + statusbar bar | 181 -- creates a icon + statusbar bar |
| 181 function kbf:ConstructBar(frame, r, g, b) | 182 function kbf:ConstructBar(frame, r, g, b) |
| 182 local texture = "Interface\\TargetingFrame\\UI-StatusBar" | 183 local texture = "Interface\\TargetingFrame\\UI-StatusBar" |
