- fixed a problem with the cast lag indicator for channeled spells that i caused in an attempt to fix the lag indicator not working for reversed bars

This commit is contained in:
Parnic
2010-04-20 17:55:20 +00:00
parent d5a8af8cd5
commit c20ce4235c

View File

@ -389,15 +389,8 @@ function CastBar.prototype:CreateLagBar()
self.lagBar = CreateFrame("Frame", nil, self.frame)
end
self.lagBar:SetFrameStrata("BACKGROUND")
self.lagBar:SetWidth(self.settings.barWidth + (self.moduleSettings.widthModifier or 0))
self.lagBar:SetHeight(self.settings.barHeight)
self.lagBar:ClearAllPoints()
if not self.moduleSettings.reverse then
self.lagBar:SetPoint("TOPLEFT", self.frame, "TOPLEFT")
else
self.lagBar:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT")
end
if not (self.lagBar.bar) then
self.lagBar.bar = self.lagBar:CreateTexture(nil, "BACKGROUND")
@ -439,6 +432,14 @@ function CastBar.prototype:SpellCastStart(unit, spell, rank)
return
end
self.lagBar:SetFrameStrata("BACKGROUND")
self.lagBar:ClearAllPoints()
if not self.moduleSettings.reverse then
self.lagBar:SetPoint("TOPLEFT", self.frame, "TOPLEFT")
else
self.lagBar:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT")
end
local lag = GetTime() - (self.spellCastSent or 0)
local pos = IceHUD:Clamp(lag / self.actionDuration, 0, 1)
@ -479,6 +480,14 @@ function CastBar.prototype:SpellCastChannelStart(unit)
return
end
self.lagBar:SetFrameStrata("MEDIUM")
self.lagBar:ClearAllPoints()
if self.moduleSettings.reverse then
self.lagBar:SetPoint("TOPLEFT", self.frame, "TOPLEFT")
else
self.lagBar:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT")
end
local lag = GetTime() - (self.spellCastSent or 0)
local pos = IceHUD:Clamp(lag / self.actionDuration, 0, 1)