From 81f0dcc366c60ed88f1efed0edc58cc5ac3ae0f1 Mon Sep 17 00:00:00 2001 From: iceroth Date: Sat, 19 May 2007 16:27:59 +0000 Subject: [PATCH] Moved lag indicator for channeled spells to the bottom of the bar --- IceHUD.toc | 2 +- modules/CastBar.lua | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/IceHUD.toc b/IceHUD.toc index 5a6b796..7e06da6 100644 --- a/IceHUD.toc +++ b/IceHUD.toc @@ -3,7 +3,7 @@ ## Name: IceHUD ## Title: IceHUD |cff7fff7f -Ace2-|r ## Notes: Another HUD addon -## Version: 0.9 ($Revision$) +## Version: 0.9.1 ($Revision$) ## SavedVariables: IceCoreDB ## OptionalDeps: Ace2, GratuityLib, WaterfallLib, MobHealth ## X-Embeds: Ace2, GratuityLib, WaterfallLib diff --git a/modules/CastBar.lua b/modules/CastBar.lua index 4c65ceb..3d79f1b 100644 --- a/modules/CastBar.lua +++ b/modules/CastBar.lua @@ -191,6 +191,24 @@ function CastBar.prototype:SpellCastStart(unit) end +-- OVERRIDE +function CastBar.prototype:SpellCastChannelStart(unit) + CastBar.super.prototype.SpellCastChannelStart(self, unit) + if (unit ~= self.unit) then return end + + local lag = GetTime() - self.spellCastSent + + local pos = lag / self.actionDuration + local y = self.settings.barHeight - (pos * self.settings.barHeight) + + if (self.moduleSettings.side == IceCore.Side.Left) then + self.lagBar.bar:SetTexCoord(1, 0, pos, 0) + else + self.lagBar.bar:SetTexCoord(0, 1, pos, 0) + end + + self.lagBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 0) +end -------------------------------------------------------------------------------