Mercurial > wow > kbf
comparison KBF.lua @ 19:a6f5a0f2d429
correctly position debuffs when temp enchants are present
| author | Chris Mellon <arkanes@gmai.com> |
|---|---|
| date | Sat, 16 Oct 2010 00:56:40 -0500 |
| parents | 27aa0d9ffe43 |
| children | 54e30adde56b |
comparison
equal
deleted
inserted
replaced
| 18:27aa0d9ffe43 | 19:a6f5a0f2d429 |
|---|---|
| 65 if tempEnchant and tempEnchant:IsShown() then | 65 if tempEnchant and tempEnchant:IsShown() then |
| 66 if self.dirty or true then | 66 if self.dirty or true then |
| 67 self:BindBarToWeaponEnchant(tempEnchant, 16) | 67 self:BindBarToWeaponEnchant(tempEnchant, 16) |
| 68 end | 68 end |
| 69 self:UpdateBarExpirationTime(tempEnchant) | 69 self:UpdateBarExpirationTime(tempEnchant) |
| 70 buffCount = buffCount + 1 | |
| 70 end | 71 end |
| 71 tempEnchant = self.secureFrame:GetAttribute("tempEnchant2") | 72 tempEnchant = self.secureFrame:GetAttribute("tempEnchant2") |
| 72 if tempEnchant and tempEnchant:IsShown() then | 73 if tempEnchant and tempEnchant:IsShown() then |
| 73 if self.dirty or true then | 74 if self.dirty or true then |
| 74 self:BindBarToWeaponEnchant(tempEnchant, 17) | 75 self:BindBarToWeaponEnchant(tempEnchant, 17) |
| 75 end | 76 end |
| 76 self:UpdateBarExpirationTime(tempEnchant) | 77 self:UpdateBarExpirationTime(tempEnchant) |
| 78 buffCount = buffCount + 1 | |
| 77 end | 79 end |
| 78 | 80 |
| 79 -- debuffs | 81 -- debuffs |
| 80 -- Since debuffs aren't cancellable, don't need to use the secure header | 82 -- Since debuffs aren't cancellable, don't need to use the secure header |
| 81 -- for them. This could be rewritten to support useful features like | 83 -- for them. This could be rewritten to support useful features like |
| 97 self.debuffFrames[idx] = frame | 99 self.debuffFrames[idx] = frame |
| 98 end | 100 end |
| 99 self:SetBarAppearance(frame, name, icon, stacks, duration, expirationTime) | 101 self:SetBarAppearance(frame, name, icon, stacks, duration, expirationTime) |
| 100 frame:ClearAllPoints() | 102 frame:ClearAllPoints() |
| 101 -- position it under all the buffs, with a half-bar spacing | 103 -- position it under all the buffs, with a half-bar spacing |
| 102 frame:SetPoint("TOP", self.anchor, "BOTTOM", 0, (buffCount * -16) - 8) | 104 frame:SetPoint("TOP", self.anchor, "BOTTOM", 0, (buffCount * -16)) |
| 103 frame:Show() | 105 frame:Show() |
| 104 frame.filter = "HARMFUL" | 106 frame.filter = "HARMFUL" |
| 105 frame.unit = unit | 107 frame.unit = unit |
| 106 frame.index = idx | 108 frame.index = idx |
| 107 frame:SetScript("OnEnter", function() kbf:OnEnter(frame) end) | 109 frame:SetScript("OnEnter", function() kbf:OnEnter(frame) end) |
