Mercurial > wow > kbf
changeset 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 |
files | KBF.lua KBF.xml |
diffstat | 2 files changed, 44 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 +
--- 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 @@ </Scripts> </Button> + <Button name="KBFSecureWeaponEnchantTemplate" inherits="SecureActionButtonTemplate" virtual="true"> + <Attributes> + <Attribute name="type" value="cancelaura" /> + <Attribute name="toggleForVehicle" value="true" /> + <Attribute name="unit" value="player" /> + </Attributes> + <Size> + <AbsDimension x="216" y="16" /> + </Size> + <Scripts> + <OnEnter> + KBF:OnEnter(self, motion) + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="KBFConsolidatedProxyTemplate" inherits="" virtual="true"> <Attributes> <Attribute name="type" value="cancelaura" />