From 02a552b9abed12ed6d825e90618f61aa6e023f7a Mon Sep 17 00:00:00 2001 From: Parnic Date: Thu, 28 Oct 2010 00:22:36 +0000 Subject: [PATCH] - fixed the cast bar to actually use the CastChanneling color when channeling. since this was apparently never hooked up, i also changed the default color for CastChanneling to match CastCasting so that long-time users won't notice the difference unless they've explicitly set a channeling color themselves --- IceCastBar.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/IceCastBar.lua b/IceCastBar.lua index 8782140..e92653a 100644 --- a/IceCastBar.lua +++ b/IceCastBar.lua @@ -20,7 +20,7 @@ function IceCastBar.prototype:init(name) IceCastBar.super.prototype.init(self, name) self:SetDefaultColor("CastCasting", 242, 242, 10) - self:SetDefaultColor("CastChanneling", 117, 113, 161) + self:SetDefaultColor("CastChanneling", 242, 242, 10) self:SetDefaultColor("CastSuccess", 242, 242, 70) self:SetDefaultColor("CastFail", 1, 0, 0) self.unit = "player" @@ -275,7 +275,8 @@ function IceCastBar.prototype:MyOnUpdate() scale = scale > 1 and 1 or scale scale = scale < 0 and 0 or scale - self:UpdateBar(scale, "CastCasting") + self:UpdateBar(scale, self:GetCurrentCastingColor()) + local timeString = self.moduleSettings.showCastTime and string.format("%.1fs ", remainingTime) or "" self:SetBottomText1(timeString .. self.actionMessage) @@ -315,6 +316,13 @@ function IceCastBar.prototype:MyOnUpdate() self:StopBar() end +function IceCastBar.prototype:GetCurrentCastingColor() + local updateColor = "CastCasting" + if self.action == IceCastBar.Actions.Channel then + updateColor = "CastChanneling" + end + return updateColor +end function IceCastBar.prototype:FlashBar(color, alpha, text, textColor) self.frame:SetAlpha(alpha)