mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- fixed some errors that could pop up with totems and custom bars
This commit is contained in:
@ -501,7 +501,7 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
|
|||||||
return offHandExpiration/1000, offHandExpiration/1000, offHandCharges, GetInventoryItemTexture("player", slotId)
|
return offHandExpiration/1000, offHandExpiration/1000, offHandCharges, GetInventoryItemTexture("player", slotId)
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil, nil, nil, nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local i = 1
|
local i = 1
|
||||||
@ -535,22 +535,24 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
|
|||||||
for i=1,MAX_TOTEMS do
|
for i=1,MAX_TOTEMS do
|
||||||
local haveTotem, totemName, startTime, realDuration, icon = GetTotemInfo(i)
|
local haveTotem, totemName, startTime, realDuration, icon = GetTotemInfo(i)
|
||||||
|
|
||||||
if self.moduleSettings.maxDuration and self.moduleSettings.maxDuration ~= 0 then
|
if haveTotem and totemName then
|
||||||
duration = self.moduleSettings.maxDuration
|
if self.moduleSettings.maxDuration and self.moduleSettings.maxDuration ~= 0 then
|
||||||
else
|
duration = self.moduleSettings.maxDuration
|
||||||
duration = realDuration
|
else
|
||||||
end
|
duration = realDuration
|
||||||
|
end
|
||||||
|
|
||||||
if ((self.moduleSettings.exactMatch and totemName:upper() == buffName:upper())
|
if ((self.moduleSettings.exactMatch and totemName:upper() == buffName:upper())
|
||||||
or (not self.moduleSettings.exactMatch and string.match(totemName:upper(), buffName:upper()))) then
|
or (not self.moduleSettings.exactMatch and string.match(totemName:upper(), buffName:upper()))) then
|
||||||
endTime = startTime + realDuration
|
endTime = startTime + realDuration
|
||||||
remaining = endTime - GetTime()
|
remaining = endTime - GetTime()
|
||||||
return duration, remaining, 1, icon, endTime
|
return duration, remaining, 1, icon, endTime
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil, nil, nil, nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomBar.prototype:UpdateCustomBarEvent(event, unit)
|
function IceCustomBar.prototype:UpdateCustomBarEvent(event, unit)
|
||||||
|
Reference in New Issue
Block a user