mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- fixed debuffs on info modules not drawing the proper colored border for the type of debuff
- fixed buffs not displaying the stealable border for mages if they were stealable
This commit is contained in:
@ -1163,8 +1163,6 @@ do
|
|||||||
|
|
||||||
frame:SetWidth(size)
|
frame:SetWidth(size)
|
||||||
frame:SetHeight(size)
|
frame:SetHeight(size)
|
||||||
icon:SetWidth(size-2)
|
|
||||||
icon:SetHeight(size-2)
|
|
||||||
|
|
||||||
-- Texture creation --
|
-- Texture creation --
|
||||||
if not frame.texture then
|
if not frame.texture then
|
||||||
@ -1173,6 +1171,22 @@ do
|
|||||||
icon.texture:SetTexture(nil)
|
icon.texture:SetTexture(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if type == "buff" then
|
||||||
|
if frame.isStealable and self.playerClass == "MAGE" then
|
||||||
|
frame.texture:SetVertexColor(1, 1, 1)
|
||||||
|
frame.texture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Stealable")
|
||||||
|
icon:SetWidth(size-8)
|
||||||
|
icon:SetHeight(size-8)
|
||||||
|
else
|
||||||
|
frame.texture:SetTexture(0, 0, 0, 0.5)
|
||||||
|
icon:SetWidth(size-2)
|
||||||
|
icon:SetHeight(size-2)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
icon:SetWidth(size-2)
|
||||||
|
icon:SetHeight(size-2)
|
||||||
|
end
|
||||||
|
|
||||||
-- Text creation --
|
-- Text creation --
|
||||||
local stack = self:FontFactory(self.moduleSettings.stackFontSize, icon, icon.stack, "OUTLINE")
|
local stack = self:FontFactory(self.moduleSettings.stackFontSize, icon, icon.stack, "OUTLINE")
|
||||||
stack:ClearAllPoints()
|
stack:ClearAllPoints()
|
||||||
@ -1230,7 +1244,7 @@ function IceTargetInfo.prototype:UpdateBuffType(aura)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if icon then
|
if icon then
|
||||||
self:SetupAura(aura, i, icon, duration, expirationTime, isFromMe, count, isStealable)
|
self:SetupAura(aura, i, icon, duration, expirationTime, isFromMe, count, isStealable, debuffType)
|
||||||
else
|
else
|
||||||
self.frame[auraFrame].iconFrames[i]:Hide()
|
self.frame[auraFrame].iconFrames[i]:Hide()
|
||||||
end
|
end
|
||||||
@ -1252,21 +1266,12 @@ function IceTargetInfo.prototype:SetupAura(aura, i, icon, duration, expirationTi
|
|||||||
local frameIcon = frame.icon
|
local frameIcon = frame.icon
|
||||||
|
|
||||||
if aura == "buff" then
|
if aura == "buff" then
|
||||||
if isStealable and self.playerClass == "MAGE" then
|
frame.isStealable = isStealable
|
||||||
frameTexture:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Stealable")
|
|
||||||
frameIcon:SetWidth(size-8)
|
|
||||||
frameIcon:SetHeight(size-8)
|
|
||||||
else
|
|
||||||
local alpha = icon and 0.5 or 0
|
|
||||||
frameTexture:SetTexture(0, 0, 0, alpha)
|
|
||||||
frameIcon:SetWidth(size-2)
|
|
||||||
frameIcon:SetHeight(size-2)
|
|
||||||
end
|
|
||||||
elseif aura == "debuff" and (not hostile or not filter or (filter and duration)) then
|
elseif aura == "debuff" and (not hostile or not filter or (filter and duration)) then
|
||||||
local alpha = icon and 1 or 0
|
local alpha = icon and 1 or 0
|
||||||
frameTexture:SetTexture(1, 1, 1, alpha)
|
frameTexture:SetTexture(1, 1, 1, alpha)
|
||||||
|
|
||||||
local color = debuffType and DebuffTypeColor[debuffType] or DebuffTypeColor["none"]
|
local color = auraType and DebuffTypeColor[auraType] or DebuffTypeColor["none"]
|
||||||
frameTexture:SetVertexColor(color.r, color.g, color.b)
|
frameTexture:SetVertexColor(color.r, color.g, color.b)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1280,7 +1285,7 @@ function IceTargetInfo.prototype:SetupAura(aura, i, icon, duration, expirationTi
|
|||||||
frame.cd:Hide()
|
frame.cd:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
frame.type = auraType or aura
|
frame.type = ((auraType == "mh" or auraType == "oh") and auraType) or aura
|
||||||
frame.fromPlayer = isFromMe
|
frame.fromPlayer = isFromMe
|
||||||
|
|
||||||
frameIcon.texture:SetTexture(icon)
|
frameIcon.texture:SetTexture(icon)
|
||||||
|
Reference in New Issue
Block a user