mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- 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:
@ -40,6 +40,8 @@ function IceCustomBar.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomBar.prototype:TargetChanged()
|
function IceCustomBar.prototype:TargetChanged()
|
||||||
|
IceCustomBar.super.prototype.TargetChanged(self)
|
||||||
|
|
||||||
self:UpdateCustomBar(self.unit)
|
self:UpdateCustomBar(self.unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -92,6 +94,7 @@ function IceCustomBar.prototype:CreateBar()
|
|||||||
self.barFrame.icon:SetHeight(20)
|
self.barFrame.icon:SetHeight(20)
|
||||||
-- this cuts off the border around the buff icon
|
-- this cuts off the border around the buff icon
|
||||||
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
||||||
|
self.barFrame.icon:SetDrawLayer("OVERLAY")
|
||||||
end
|
end
|
||||||
self:PositionIcons()
|
self:PositionIcons()
|
||||||
end
|
end
|
||||||
@ -398,12 +401,14 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
|
|||||||
= GetWeaponEnchantInfo()
|
= GetWeaponEnchantInfo()
|
||||||
|
|
||||||
if unitName == "main hand weapon" and hasMainHandEnchant then
|
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
|
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
|
end
|
||||||
|
|
||||||
return nil, nil, nil
|
return nil, nil, nil, nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local i = 1
|
local i = 1
|
||||||
|
Reference in New Issue
Block a user