- removed the last remnants of Ace2 (AceOO-2.0 and AceLibrary) thanks to a huge amount of help from ckknight for metatables

This commit is contained in:
Parnic
2010-09-17 05:41:04 +00:00
parent fd6d570e0b
commit 250adfc2db
56 changed files with 203 additions and 294 deletions

View File

@ -1,12 +1,10 @@
local AceOO = AceLibrary("AceOO-2.0")
local FocusMana = AceOO.Class(IceUnitBar)
local FocusMana = IceCore_CreateClass(IceUnitBar)
-- Constructor --
function FocusMana.prototype:init()
FocusMana.super.prototype.init(self, "FocusMana", "focus")
self:SetDefaultColor("FocusMana", 52, 64, 221)
self:SetDefaultColor("FocusRage", 235, 44, 26)
self:SetDefaultColor("FocusEnergy", 228, 242, 31)
@ -65,17 +63,17 @@ function FocusMana.prototype:Update(unit)
if (unit and (unit ~= self.unit)) then
return
end
if ((not UnitExists(unit)) or (self.maxMana == 0)) then
self:Show(false)
return
else
else
self:Show(true)
end
local manaType = UnitPowerType(self.unit)
local color = "FocusMana"
if (self.moduleSettings.scaleManaColor) then
color = "ScaledManaColor"
@ -87,11 +85,11 @@ function FocusMana.prototype:Update(unit)
elseif (manaType == SPELL_POWER_ENERGY) then
color = "FocusEnergy"
end
if (self.tapped) then
color = "Tapped"
end
self:UpdateBar(self.manaPercentage, color)
if not IceHUD.IceCore:ShouldUseDogTags() then