mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- attempt to fix ticket #81
This commit is contained in:
@ -1336,8 +1336,8 @@ function IceBarElement.prototype:PositionMarker(idx, pos)
|
||||
local adjustedBarHeight = self.settings.barHeight - (self.moduleSettings.markers[idx].height)
|
||||
local heightScale = (self.moduleSettings.markers[idx].height / self.settings.barHeight) / 2
|
||||
|
||||
local min_y = 1-coordPos-heightScale
|
||||
local max_y = 1-coordPos+heightScale
|
||||
local min_y = IceHUD:Clamp(1-coordPos-heightScale, 0, 1)
|
||||
local max_y = IceHUD:Clamp(1-coordPos+heightScale, 0, 1)
|
||||
|
||||
if self.moduleSettings.side == IceCore.Side.Left then
|
||||
self.Markers[idx].bar:SetTexCoord(1, 0, min_y, max_y)
|
||||
|
@ -151,6 +151,11 @@ function EclipseBar.prototype:UpdateEclipsePower()
|
||||
local power = UnitPower("player", SPELL_POWER_ECLIPSE)
|
||||
local maxPower = UnitPowerMax("player", SPELL_POWER_ECLIPSE)
|
||||
|
||||
-- bad api, bad.
|
||||
if maxPower <= 0 or power > maxPower then
|
||||
return
|
||||
end
|
||||
|
||||
self:SetBottomText1(abs((power/maxPower) * 100))
|
||||
|
||||
local pos = (power/maxPower) / 2
|
||||
|
Reference in New Issue
Block a user