mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- fixed the player cast bar's lag indicator for all combinations of inverse and reverse options
This commit is contained in:
@ -422,6 +422,9 @@ function CastBar.prototype:SpellCastSent(unit, spell, rank, target)
|
|||||||
self.spellCastSent = GetTime()
|
self.spellCastSent = GetTime()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function xor(val1, val2)
|
||||||
|
return val1 and not val2 or val2 and not val1
|
||||||
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
function CastBar.prototype:SpellCastStart(unit, spell, rank)
|
function CastBar.prototype:SpellCastStart(unit, spell, rank)
|
||||||
@ -434,7 +437,7 @@ function CastBar.prototype:SpellCastStart(unit, spell, rank)
|
|||||||
|
|
||||||
self.lagBar:SetFrameStrata("BACKGROUND")
|
self.lagBar:SetFrameStrata("BACKGROUND")
|
||||||
self.lagBar:ClearAllPoints()
|
self.lagBar:ClearAllPoints()
|
||||||
if not self.moduleSettings.reverse then
|
if not xor(self.moduleSettings.reverse, self.moduleSettings.inverse) then
|
||||||
self.lagBar:SetPoint("TOPLEFT", self.frame, "TOPLEFT")
|
self.lagBar:SetPoint("TOPLEFT", self.frame, "TOPLEFT")
|
||||||
else
|
else
|
||||||
self.lagBar:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT")
|
self.lagBar:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT")
|
||||||
@ -450,7 +453,7 @@ function CastBar.prototype:SpellCastStart(unit, spell, rank)
|
|||||||
|
|
||||||
local min_y = 0
|
local min_y = 0
|
||||||
local max_y = pos
|
local max_y = pos
|
||||||
if self.moduleSettings.reverse then
|
if xor(self.moduleSettings.reverse, self.moduleSettings.inverse) then
|
||||||
min_y = 1-pos
|
min_y = 1-pos
|
||||||
max_y = 1
|
max_y = 1
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user