- made sure to set the custom bar's buff icon to draw on top of the bar

- fixed the custom bar to call up to the super's version of TargetChanged so that the internal "i has a target" property is kept updated
- made custom bar weapon buffs display an appropriate icon
This commit is contained in:
Parnic
2010-04-01 19:28:11 +00:00
parent 48f1ccfe95
commit c9743fa003

View File

@ -40,6 +40,8 @@ function IceCustomBar.prototype:Enable(core)
end
function IceCustomBar.prototype:TargetChanged()
IceCustomBar.super.prototype.TargetChanged(self)
self:UpdateCustomBar(self.unit)
end
@ -92,6 +94,7 @@ function IceCustomBar.prototype:CreateBar()
self.barFrame.icon:SetHeight(20)
-- this cuts off the border around the buff icon
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
self.barFrame.icon:SetDrawLayer("OVERLAY")
end
self:PositionIcons()
end
@ -398,12 +401,14 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
= GetWeaponEnchantInfo()
if unitName == "main hand weapon" and hasMainHandEnchant then
return mainHandExpiration/1000, mainHandExpiration/1000, mainHandCharges
local slotId, mainHandTexture = GetInventorySlotInfo("MainHandSlot")
return mainHandExpiration/1000, mainHandExpiration/1000, mainHandCharges, GetInventoryItemTexture("player", slotId)
elseif unitName == "off hand weapon" and hasOffHandEnchant then
return offHandExpiration/1000, offHandExpiration/1000, offHandCharges
local slotId, offHandTexture = GetInventorySlotInfo("SecondaryHandSlot")
return offHandExpiration/1000, offHandExpiration/1000, offHandCharges, GetInventoryItemTexture("player", slotId)
end
return nil, nil, nil
return nil, nil, nil, nil
end
local i = 1