# HG changeset patch # User Chris Mellon # Date 1322919024 21600 # Node ID e19d0380b9f37892ac75925d9676f08271b5a4b5 # Parent e5c07fdfb70bd0b001ee480ee6c94dcbce859c31 finished investigation into the 4.3 issues, clean up to address some of the bugs that were fixed diff -r e5c07fdfb70b -r e19d0380b9f3 KBF.lua --- a/KBF.lua Fri Dec 02 06:15:35 2011 -0600 +++ b/KBF.lua Sat Dec 03 07:30:24 2011 -0600 @@ -98,11 +98,30 @@ for idx=1,99 do local frame = self.secureHeader:GetAttribute("child"..idx) if not (frame and frame:IsShown()) then break end - local hasbuff = UnitAura(unit, frame:GetAttribute("index")) + local boundIndex = frame:GetAttribute("index") + if not boundIndex then + break + end + local hasbuff = UnitAura(unit, boundIndex) + --self:Print(hasbuff, idx, boundIndex) + if not hasbuff then + if frame.icon then frame.icon:Hide() end + if frame.statusbar then frame.statusbar:Hide() end + if frame.statusbarbg then frame.statusbarbg:Hide() end + if frame.text then frame.text:Hide() end + if frame.timertext then frame.timertext:Hide() end + break + end buffCount = buffCount + 1 + if self.dirty then if self:BindBarToBuff(frame, unit) then break end end + frame.icon:Show() + frame.statusbar:Show() + frame.statusbarbg:Show() + frame.text:Show() + frame.timertext:Show() self:UpdateBarExpirationTime(frame) -- Don't forget to refresh shown tooltips if (GameTooltip:IsOwned(frame)) then @@ -491,7 +510,6 @@ frame:SetAttribute("toggleForVehicle", true) -- this doesn't actually work right now, but maybe it eventually will frame:SetAttribute("template", "KBFSecureUnitAuraTemplate") frame:SetAttribute("point", "TOP") - frame:SetAttribute("wrapAfter", 100) -- required due to bugs in secure header frame:SetAttribute("xOffset", 0) frame:SetAttribute("yOffset", -16) frame:SetAttribute("minWidth", 216) @@ -499,9 +517,10 @@ frame:SetAttribute("unit", "player") frame:SetAttribute("sortMethod", "NAME") frame:SetAttribute("sortOrder", "-") - - frame:SetAttribute("weaponTemplate", "KBFSecureUnitAuraTemplate") - -- TODO: Enabling temp enchant support breaks layout for regular buffs + frame:SetAttribute("weaponTemplate", "KBFSecureWeaponEnchantTemplate") + -- TODO: 4.3 SAH has a bug that messes up buff binding when a consolidate proxy + -- and/or weapon enchants are present, don't use them. Set up a standalone enchant window to be managed + -- independently frame:SetAttribute("includeWeapons", nil) frame:Show() -- has to be shown, otherwise the child frames don't show return frame @@ -526,3 +545,4 @@ self:ShowAnchor() end end + diff -r e5c07fdfb70b -r e19d0380b9f3 KBF.xml --- a/KBF.xml Fri Dec 02 06:15:35 2011 -0600 +++ b/KBF.xml Sat Dec 03 07:30:24 2011 -0600 @@ -20,6 +20,25 @@ + +