diff --git a/modules/CustomBar.lua b/modules/CustomBar.lua index de21c79..a4a5f03 100644 --- a/modules/CustomBar.lua +++ b/modules/CustomBar.lua @@ -536,7 +536,7 @@ function IceCustomBar.prototype:GetOptions() end function IceCustomBar.prototype:GetBarColor() - return self.moduleSettings.barColor.r, self.moduleSettings.barColor.g, self.moduleSettings.barColor.b, 1 + return self.moduleSettings.barColor.r, self.moduleSettings.barColor.g, self.moduleSettings.barColor.b, self.alpha end -- 'Protected' methods -------------------------------------------------------- @@ -547,11 +547,19 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName) = GetWeaponEnchantInfo() if unitName == "main hand weapon" and hasMainHandEnchant then + local duration = + (self.auraDuration == nil or (mainHandExpiration/1000) > self.auraDuration) and (mainHandExpiration/1000) + or self.auraDuration + local slotId, mainHandTexture = GetInventorySlotInfo("MainHandSlot") - return mainHandExpiration/1000, mainHandExpiration/1000, mainHandCharges, GetInventoryItemTexture("player", slotId) + return duration, mainHandExpiration/1000, mainHandCharges, GetInventoryItemTexture("player", slotId) elseif unitName == "off hand weapon" and hasOffHandEnchant then + local duration = + (self.auraDuration == nil or (offHandExpiration/1000) > self.auraDuration) and (offHandExpiration/1000) + or self.auraDuration + local slotId, offHandTexture = GetInventorySlotInfo("SecondaryHandSlot") - return offHandExpiration/1000, offHandExpiration/1000, offHandCharges, GetInventoryItemTexture("player", slotId) + return duration, offHandExpiration/1000, offHandCharges, GetInventoryItemTexture("player", slotId) end return nil diff --git a/modules/CustomCDBar.lua b/modules/CustomCDBar.lua index 841bc65..a9359a6 100644 --- a/modules/CustomCDBar.lua +++ b/modules/CustomCDBar.lua @@ -397,7 +397,7 @@ function IceCustomCDBar.prototype:GetOptions() name = L["Upper Text Color"], get = function() self:FixupTextColors() - return self.moduleSettings.upperTextColor.r, self.moduleSettings.upperTextColor.g, self.moduleSettings.upperTextColor.b, 1 + return self.moduleSettings.upperTextColor.r, self.moduleSettings.upperTextColor.g, self.moduleSettings.upperTextColor.b, self.alpha end, set = function(info, r,g,b) self.moduleSettings.upperTextColor.r = r