Mercurial > wow > kbf
comparison KBF.lua @ 65:e19d0380b9f3
finished investigation into the 4.3 issues, clean up to address some of the bugs that were fixed
| author | Chris Mellon <arkanes@gmail.com> |
|---|---|
| date | Sat, 03 Dec 2011 07:30:24 -0600 |
| parents | e5c07fdfb70b |
| children | 6f1457157688 |
comparison
equal
deleted
inserted
replaced
| 64:e5c07fdfb70b | 65:e19d0380b9f3 |
|---|---|
| 96 local unit = self.secureHeader:GetAttribute("unit") | 96 local unit = self.secureHeader:GetAttribute("unit") |
| 97 local buffCount = 0 | 97 local buffCount = 0 |
| 98 for idx=1,99 do | 98 for idx=1,99 do |
| 99 local frame = self.secureHeader:GetAttribute("child"..idx) | 99 local frame = self.secureHeader:GetAttribute("child"..idx) |
| 100 if not (frame and frame:IsShown()) then break end | 100 if not (frame and frame:IsShown()) then break end |
| 101 local hasbuff = UnitAura(unit, frame:GetAttribute("index")) | 101 local boundIndex = frame:GetAttribute("index") |
| 102 if not boundIndex then | |
| 103 break | |
| 104 end | |
| 105 local hasbuff = UnitAura(unit, boundIndex) | |
| 106 --self:Print(hasbuff, idx, boundIndex) | |
| 107 if not hasbuff then | |
| 108 if frame.icon then frame.icon:Hide() end | |
| 109 if frame.statusbar then frame.statusbar:Hide() end | |
| 110 if frame.statusbarbg then frame.statusbarbg:Hide() end | |
| 111 if frame.text then frame.text:Hide() end | |
| 112 if frame.timertext then frame.timertext:Hide() end | |
| 113 break | |
| 114 end | |
| 102 buffCount = buffCount + 1 | 115 buffCount = buffCount + 1 |
| 116 | |
| 103 if self.dirty then | 117 if self.dirty then |
| 104 if self:BindBarToBuff(frame, unit) then break end | 118 if self:BindBarToBuff(frame, unit) then break end |
| 105 end | 119 end |
| 120 frame.icon:Show() | |
| 121 frame.statusbar:Show() | |
| 122 frame.statusbarbg:Show() | |
| 123 frame.text:Show() | |
| 124 frame.timertext:Show() | |
| 106 self:UpdateBarExpirationTime(frame) | 125 self:UpdateBarExpirationTime(frame) |
| 107 -- Don't forget to refresh shown tooltips | 126 -- Don't forget to refresh shown tooltips |
| 108 if (GameTooltip:IsOwned(frame)) then | 127 if (GameTooltip:IsOwned(frame)) then |
| 109 self:OnEnter(frame) | 128 self:OnEnter(frame) |
| 110 end | 129 end |
| 489 function kbf:SetCommonSecureHeaderAttributes(frame) | 508 function kbf:SetCommonSecureHeaderAttributes(frame) |
| 490 frame:SetAttribute("filter", "HELPFUL") | 509 frame:SetAttribute("filter", "HELPFUL") |
| 491 frame:SetAttribute("toggleForVehicle", true) -- this doesn't actually work right now, but maybe it eventually will | 510 frame:SetAttribute("toggleForVehicle", true) -- this doesn't actually work right now, but maybe it eventually will |
| 492 frame:SetAttribute("template", "KBFSecureUnitAuraTemplate") | 511 frame:SetAttribute("template", "KBFSecureUnitAuraTemplate") |
| 493 frame:SetAttribute("point", "TOP") | 512 frame:SetAttribute("point", "TOP") |
| 494 frame:SetAttribute("wrapAfter", 100) -- required due to bugs in secure header | |
| 495 frame:SetAttribute("xOffset", 0) | 513 frame:SetAttribute("xOffset", 0) |
| 496 frame:SetAttribute("yOffset", -16) | 514 frame:SetAttribute("yOffset", -16) |
| 497 frame:SetAttribute("minWidth", 216) | 515 frame:SetAttribute("minWidth", 216) |
| 498 frame:SetAttribute("minHeight", 16) | 516 frame:SetAttribute("minHeight", 16) |
| 499 frame:SetAttribute("unit", "player") | 517 frame:SetAttribute("unit", "player") |
| 500 frame:SetAttribute("sortMethod", "NAME") | 518 frame:SetAttribute("sortMethod", "NAME") |
| 501 frame:SetAttribute("sortOrder", "-") | 519 frame:SetAttribute("sortOrder", "-") |
| 502 | 520 frame:SetAttribute("weaponTemplate", "KBFSecureWeaponEnchantTemplate") |
| 503 frame:SetAttribute("weaponTemplate", "KBFSecureUnitAuraTemplate") | 521 -- TODO: 4.3 SAH has a bug that messes up buff binding when a consolidate proxy |
| 504 -- TODO: Enabling temp enchant support breaks layout for regular buffs | 522 -- and/or weapon enchants are present, don't use them. Set up a standalone enchant window to be managed |
| 523 -- independently | |
| 505 frame:SetAttribute("includeWeapons", nil) | 524 frame:SetAttribute("includeWeapons", nil) |
| 506 frame:Show() -- has to be shown, otherwise the child frames don't show | 525 frame:Show() -- has to be shown, otherwise the child frames don't show |
| 507 return frame | 526 return frame |
| 508 end | 527 end |
| 509 | 528 |
| 524 self:HideAnchor() | 543 self:HideAnchor() |
| 525 else | 544 else |
| 526 self:ShowAnchor() | 545 self:ShowAnchor() |
| 527 end | 546 end |
| 528 end | 547 end |
| 548 |
