mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- made TargetHealth and TargetMana extensible so that new unit bars can be made from them easily
- added TargetTargetHealth and TargetTargetMana (idea and some code borrowed from Dark Imakuni at http://www.wowinterface.com/downloads/info10699-IceHUD-TargetofTarget.html )
This commit is contained in:
@ -49,3 +49,5 @@ modules\FocusMana.lua
|
|||||||
modules\FocusCast.lua
|
modules\FocusCast.lua
|
||||||
modules\LacerateCount.lua
|
modules\LacerateCount.lua
|
||||||
modules\Runes.lua
|
modules\Runes.lua
|
||||||
|
modules\TargetOfTargetHealth.lua
|
||||||
|
modules\TargetOfTargetMana.lua
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
local MobHealth = nil
|
local MobHealth = nil
|
||||||
local TargetHealth = AceOO.Class(IceUnitBar)
|
IceTargetHealth = AceOO.Class(IceUnitBar)
|
||||||
|
|
||||||
TargetHealth.prototype.color = nil
|
|
||||||
|
|
||||||
|
IceTargetHealth.prototype.color = nil
|
||||||
|
IceTargetHealth.prototype.determineColor = true
|
||||||
|
IceTargetHealth.prototype.registerEvents = true
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function TargetHealth.prototype:init()
|
function IceTargetHealth.prototype:init(moduleName, unit)
|
||||||
TargetHealth.super.prototype.init(self, "TargetHealth", "target")
|
if not moduleName or not unit then
|
||||||
|
IceTargetHealth.super.prototype.init(self, "TargetHealth", "target")
|
||||||
|
else
|
||||||
|
IceTargetHealth.super.prototype.init(self, moduleName, unit)
|
||||||
|
end
|
||||||
|
|
||||||
self:SetDefaultColor("TargetHealthHostile", 231, 31, 36)
|
self:SetDefaultColor("TargetHealthHostile", 231, 31, 36)
|
||||||
self:SetDefaultColor("TargetHealthFriendly", 46, 223, 37)
|
self:SetDefaultColor("TargetHealthFriendly", 46, 223, 37)
|
||||||
@ -18,8 +23,8 @@ function TargetHealth.prototype:init()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:GetDefaultSettings()
|
function IceTargetHealth.prototype:GetDefaultSettings()
|
||||||
local settings = TargetHealth.super.prototype.GetDefaultSettings(self)
|
local settings = IceTargetHealth.super.prototype.GetDefaultSettings(self)
|
||||||
|
|
||||||
settings["side"] = IceCore.Side.Left
|
settings["side"] = IceCore.Side.Left
|
||||||
settings["offset"] = 2
|
settings["offset"] = 2
|
||||||
@ -40,8 +45,8 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
function TargetHealth.prototype:GetOptions()
|
function IceTargetHealth.prototype:GetOptions()
|
||||||
local opts = TargetHealth.super.prototype.GetOptions(self)
|
local opts = IceTargetHealth.super.prototype.GetOptions(self)
|
||||||
|
|
||||||
opts["mobhealth"] = {
|
opts["mobhealth"] = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
@ -228,14 +233,16 @@ function TargetHealth.prototype:GetOptions()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:Enable(core)
|
function IceTargetHealth.prototype:Enable(core)
|
||||||
TargetHealth.super.prototype.Enable(self, core)
|
IceTargetHealth.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
|
if self.registerEvents then
|
||||||
self:RegisterEvent("UNIT_HEALTH", "Update")
|
self:RegisterEvent("UNIT_HEALTH", "Update")
|
||||||
self:RegisterEvent("UNIT_MAXHEALTH", "Update")
|
self:RegisterEvent("UNIT_MAXHEALTH", "Update")
|
||||||
self:RegisterEvent("UNIT_FLAGS", "Update")
|
self:RegisterEvent("UNIT_FLAGS", "Update")
|
||||||
self:RegisterEvent("UNIT_FACTION", "Update")
|
self:RegisterEvent("UNIT_FACTION", "Update")
|
||||||
self:RegisterEvent("RAID_TARGET_UPDATE", "UpdateRaidTargetIcon")
|
self:RegisterEvent("RAID_TARGET_UPDATE", "UpdateRaidTargetIcon")
|
||||||
|
end
|
||||||
|
|
||||||
if (self.moduleSettings.hideBlizz) then
|
if (self.moduleSettings.hideBlizz) then
|
||||||
self:HideBlizz()
|
self:HideBlizz()
|
||||||
@ -247,14 +254,15 @@ function TargetHealth.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:Disable(core)
|
function IceTargetHealth.prototype:Disable(core)
|
||||||
TargetHealth.super.prototype.Disable(self, core)
|
IceTargetHealth.super.prototype.Disable(self, core)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:Update(unit)
|
function IceTargetHealth.prototype:Update(unit)
|
||||||
TargetHealth.super.prototype.Update(self)
|
IceTargetHealth.super.prototype.Update(self)
|
||||||
|
|
||||||
if (unit and (unit ~= self.unit)) then
|
if (unit and (unit ~= self.unit)) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -268,6 +276,7 @@ function TargetHealth.prototype:Update(unit)
|
|||||||
|
|
||||||
self:UpdateRaidTargetIcon()
|
self:UpdateRaidTargetIcon()
|
||||||
|
|
||||||
|
if self.determineColor then
|
||||||
self.color = "TargetHealthFriendly" -- friendly > 4
|
self.color = "TargetHealthFriendly" -- friendly > 4
|
||||||
|
|
||||||
local reaction = UnitReaction("target", "player")
|
local reaction = UnitReaction("target", "player")
|
||||||
@ -288,6 +297,7 @@ function TargetHealth.prototype:Update(unit)
|
|||||||
if (self.tapped) then
|
if (self.tapped) then
|
||||||
self.color = "Tapped"
|
self.color = "Tapped"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self:UpdateBar(self.health/self.maxHealth, self.color)
|
self:UpdateBar(self.health/self.maxHealth, self.color)
|
||||||
|
|
||||||
@ -316,14 +326,10 @@ function TargetHealth.prototype:Update(unit)
|
|||||||
self:SetBottomText2()
|
self:SetBottomText2()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.frame.raidIcon then
|
|
||||||
self.frame.raidIcon:SetAlpha(self.moduleSettings.lockIconAlpha and 1 or self.alpha)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:CreateRaidIconFrame()
|
function IceTargetHealth.prototype:CreateRaidIconFrame()
|
||||||
if (not self.frame.raidIcon) then
|
if (not self.frame.raidIcon) then
|
||||||
self.frame.raidIcon = CreateFrame("Frame", nil, self.frame)
|
self.frame.raidIcon = CreateFrame("Frame", nil, self.frame)
|
||||||
end
|
end
|
||||||
@ -342,13 +348,13 @@ function TargetHealth.prototype:CreateRaidIconFrame()
|
|||||||
self.frame.raidIcon:Hide()
|
self.frame.raidIcon:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetHealth.prototype:SetRaidIconPlacement()
|
function IceTargetHealth.prototype:SetRaidIconPlacement()
|
||||||
self.frame.raidIcon:ClearAllPoints()
|
self.frame.raidIcon:ClearAllPoints()
|
||||||
self.frame.raidIcon:SetPoint("BOTTOM", self.frame, "TOPLEFT", self.moduleSettings.raidIconXOffset, self.moduleSettings.raidIconYOffset)
|
self.frame.raidIcon:SetPoint("BOTTOM", self.frame, "TOPLEFT", self.moduleSettings.raidIconXOffset, self.moduleSettings.raidIconYOffset)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:UpdateRaidTargetIcon()
|
function IceTargetHealth.prototype:UpdateRaidTargetIcon()
|
||||||
if self.moduleSettings.raidIconOnTop then
|
if self.moduleSettings.raidIconOnTop then
|
||||||
self.frame.raidIcon:SetFrameStrata("MEDIUM")
|
self.frame.raidIcon:SetFrameStrata("MEDIUM")
|
||||||
else
|
else
|
||||||
@ -368,10 +374,14 @@ function TargetHealth.prototype:UpdateRaidTargetIcon()
|
|||||||
else
|
else
|
||||||
self.frame.raidIcon:Hide()
|
self.frame.raidIcon:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.frame.raidIcon then
|
||||||
|
self.frame.raidIcon:SetAlpha(self.moduleSettings.lockIconAlpha and 1 or self.alpha)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:Round(health)
|
function IceTargetHealth.prototype:Round(health)
|
||||||
if (health > 1000000) then
|
if (health > 1000000) then
|
||||||
return self:MathRound(health/1000000, 1) .. "M"
|
return self:MathRound(health/1000000, 1) .. "M"
|
||||||
end
|
end
|
||||||
@ -382,7 +392,7 @@ function TargetHealth.prototype:Round(health)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:MathRound(num, idp)
|
function IceTargetHealth.prototype:MathRound(num, idp)
|
||||||
local mult = 10^(idp or 0)
|
local mult = 10^(idp or 0)
|
||||||
return math.floor(num * mult + 0.5) / mult
|
return math.floor(num * mult + 0.5) / mult
|
||||||
end
|
end
|
||||||
@ -391,7 +401,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:ShowBlizz()
|
function IceTargetHealth.prototype:ShowBlizz()
|
||||||
TargetFrame:Show()
|
TargetFrame:Show()
|
||||||
TargetFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
|
TargetFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
|
||||||
TargetFrame:RegisterEvent("UNIT_HEALTH")
|
TargetFrame:RegisterEvent("UNIT_HEALTH")
|
||||||
@ -409,7 +419,7 @@ function TargetHealth.prototype:ShowBlizz()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetHealth.prototype:HideBlizz()
|
function IceTargetHealth.prototype:HideBlizz()
|
||||||
TargetFrame:Hide()
|
TargetFrame:Hide()
|
||||||
TargetFrame:UnregisterAllEvents()
|
TargetFrame:UnregisterAllEvents()
|
||||||
|
|
||||||
@ -420,4 +430,4 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-- Load us up
|
-- Load us up
|
||||||
IceHUD.TargetHealth = TargetHealth:new()
|
IceHUD.TargetHealth = IceTargetHealth:new()
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
local TargetMana = AceOO.Class(IceUnitBar)
|
IceTargetMana = AceOO.Class(IceUnitBar)
|
||||||
|
IceTargetMana.prototype.registerEvents = true
|
||||||
|
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function TargetMana.prototype:init()
|
function IceTargetMana.prototype:init(moduleName, unit)
|
||||||
TargetMana.super.prototype.init(self, "TargetMana", "target")
|
if not moduleName or not unit then
|
||||||
|
IceTargetMana.super.prototype.init(self, "TargetMana", "target")
|
||||||
|
else
|
||||||
|
IceTargetMana.super.prototype.init(self, moduleName, unit)
|
||||||
|
end
|
||||||
|
|
||||||
self:SetDefaultColor("TargetMana", 52, 64, 221)
|
self:SetDefaultColor("TargetMana", 52, 64, 221)
|
||||||
self:SetDefaultColor("TargetRage", 235, 44, 26)
|
self:SetDefaultColor("TargetRage", 235, 44, 26)
|
||||||
@ -14,8 +19,8 @@ function TargetMana.prototype:init()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetMana.prototype:GetDefaultSettings()
|
function IceTargetMana.prototype:GetDefaultSettings()
|
||||||
local settings = TargetMana.super.prototype.GetDefaultSettings(self)
|
local settings = IceTargetMana.super.prototype.GetDefaultSettings(self)
|
||||||
|
|
||||||
settings["side"] = IceCore.Side.Right
|
settings["side"] = IceCore.Side.Right
|
||||||
settings["offset"] = 2
|
settings["offset"] = 2
|
||||||
@ -26,9 +31,10 @@ function TargetMana.prototype:GetDefaultSettings()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetMana.prototype:Enable(core)
|
function IceTargetMana.prototype:Enable(core)
|
||||||
TargetMana.super.prototype.Enable(self, core)
|
IceTargetMana.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
|
if self.registerEvents then
|
||||||
self:RegisterEvent("UNIT_MAXMANA", "Update")
|
self:RegisterEvent("UNIT_MAXMANA", "Update")
|
||||||
self:RegisterEvent("UNIT_MAXRAGE", "Update")
|
self:RegisterEvent("UNIT_MAXRAGE", "Update")
|
||||||
self:RegisterEvent("UNIT_MAXENERGY", "Update")
|
self:RegisterEvent("UNIT_MAXENERGY", "Update")
|
||||||
@ -54,14 +60,15 @@ function TargetMana.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_ENERGY", "Update")
|
self:RegisterEvent("UNIT_ENERGY", "Update")
|
||||||
self:RegisterEvent("UNIT_FOCUS", "Update")
|
self:RegisterEvent("UNIT_FOCUS", "Update")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self:Update("target")
|
self:Update(self.unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function TargetMana.prototype:Update(unit)
|
function IceTargetMana.prototype:Update(unit)
|
||||||
TargetMana.super.prototype.Update(self)
|
IceTargetMana.super.prototype.Update(self)
|
||||||
if (unit and (unit ~= self.unit)) then
|
if (unit and (unit ~= self.unit)) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -102,8 +109,8 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
function TargetMana.prototype:GetOptions()
|
function IceTargetMana.prototype:GetOptions()
|
||||||
local opts = TargetMana.super.prototype.GetOptions(self)
|
local opts = IceTargetMana.super.prototype.GetOptions(self)
|
||||||
|
|
||||||
opts["scaleManaColor"] = {
|
opts["scaleManaColor"] = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
@ -127,4 +134,4 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-- Load us up
|
-- Load us up
|
||||||
IceHUD.TargetMana = TargetMana:new()
|
IceHUD.TargetMana = IceTargetMana:new()
|
||||||
|
125
modules/TargetOfTargetHealth.lua
Normal file
125
modules/TargetOfTargetHealth.lua
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
|
local TargetTargetHealth = AceOO.Class(IceTargetHealth)
|
||||||
|
|
||||||
|
|
||||||
|
-- Constructor --
|
||||||
|
function TargetTargetHealth.prototype:init()
|
||||||
|
TargetTargetHealth.super.prototype.init(self, "TargetTargetHealth", "targettarget")
|
||||||
|
|
||||||
|
self:SetDefaultColor("TargetTargetHealthHostile", 231, 31, 36)
|
||||||
|
self:SetDefaultColor("TargetTargetHealthFriendly", 46, 223, 37)
|
||||||
|
self:SetDefaultColor("TargetTargetHealthNeutral", 210, 219, 87)
|
||||||
|
self:SetDefaultColor("SelfColor", 255, 255, 255)
|
||||||
|
end
|
||||||
|
|
||||||
|
function TargetTargetHealth.prototype:GetDefaultSettings()
|
||||||
|
local settings = TargetTargetHealth.super.prototype.GetDefaultSettings(self)
|
||||||
|
|
||||||
|
settings["side"] = IceCore.Side.Right
|
||||||
|
settings["offset"] = 12
|
||||||
|
settings["mobHealth"] = (MobHealth3 ~= nil)
|
||||||
|
settings["classColor"] = false
|
||||||
|
settings["selfColor"] = { r = 0, g = 0, b = 1 }
|
||||||
|
settings["useSelfColor"] = true
|
||||||
|
settings["upperText"] = "[PercentHP:Round]"
|
||||||
|
settings["lowerText"] = "[(HP:Round \"/\" MaxHP:Round):HPColor:Bracket]"
|
||||||
|
settings["barVerticalOffset"] = 35
|
||||||
|
settings["scale"] = 0.7
|
||||||
|
settings["enabled"] = false
|
||||||
|
settings["hideBlizz"] = false
|
||||||
|
|
||||||
|
return settings
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- OVERRIDE
|
||||||
|
function TargetTargetHealth.prototype:GetOptions()
|
||||||
|
local opts = TargetTargetHealth.super.prototype.GetOptions(self)
|
||||||
|
|
||||||
|
opts["hideBlizz"] = nil
|
||||||
|
|
||||||
|
opts["useSelfColor"] = {
|
||||||
|
type = "toggle",
|
||||||
|
name = "Use Self Color",
|
||||||
|
desc = "Whether or not to use the self color.",
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.useSelfColor
|
||||||
|
end,
|
||||||
|
set = function(value)
|
||||||
|
self.moduleSettings.useSelfColor = value
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
|
order = 44,
|
||||||
|
}
|
||||||
|
|
||||||
|
opts["selfColor"] = {
|
||||||
|
type = "color",
|
||||||
|
name = "Self Color",
|
||||||
|
desc = "Set the color of the TargetTarget bar if you are your target's target.",
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.selfColor.r, self.moduleSettings.selfColor.g, self.moduleSettings.selfColor.b
|
||||||
|
end,
|
||||||
|
set = function(r, g, b)
|
||||||
|
self.moduleSettings.selfColor = { r = r, g = g, b = b }
|
||||||
|
IceHUD.IceCore:SetColor("SelfColor", r, g, b)
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled or not self.moduleSettings.useSelfColor
|
||||||
|
end,
|
||||||
|
hasAlpha = false,
|
||||||
|
order = 45,
|
||||||
|
}
|
||||||
|
|
||||||
|
return opts
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function TargetTargetHealth.prototype:Enable(core)
|
||||||
|
self.registerEvents = false
|
||||||
|
TargetTargetHealth.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
|
self:ScheduleRepeatingEvent(self.elementName, self.Update, 0.1, self, "targettarget")
|
||||||
|
end
|
||||||
|
|
||||||
|
function TargetTargetHealth.prototype:Disable(core)
|
||||||
|
TargetTargetHealth.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
self:CancelScheduledEvent(self.elementName)
|
||||||
|
end
|
||||||
|
|
||||||
|
function TargetTargetHealth.prototype:Update(unit)
|
||||||
|
self.color = "TargetTargetHealthFriendly" -- friendly > 4
|
||||||
|
|
||||||
|
local reaction = UnitReaction("targettarget", "player")
|
||||||
|
|
||||||
|
if (reaction and (reaction == 4)) then
|
||||||
|
self.color = "TargetTargetHealthNeutral"
|
||||||
|
elseif (reaction and (reaction < 4)) then
|
||||||
|
self.color = "TargetTargetHealthHostile"
|
||||||
|
end
|
||||||
|
|
||||||
|
if (self.moduleSettings.classColor) then
|
||||||
|
self.color = self.unitClass
|
||||||
|
end
|
||||||
|
|
||||||
|
if (self.moduleSettings.scaleHealthColor) then
|
||||||
|
self.color = "ScaledHealthColor"
|
||||||
|
end
|
||||||
|
|
||||||
|
if (self.tapped) then
|
||||||
|
self.color = "Tapped"
|
||||||
|
end
|
||||||
|
|
||||||
|
if UnitIsUnit("player", "targettarget") and self.moduleSettings.useSelfColor then
|
||||||
|
self.color = "SelfColor"
|
||||||
|
end
|
||||||
|
|
||||||
|
self.determineColor = false
|
||||||
|
TargetTargetHealth.super.prototype.Update(self, unit)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Load us up
|
||||||
|
IceHUD.TargetTargetHealth = TargetTargetHealth:new()
|
43
modules/TargetOfTargetMana.lua
Normal file
43
modules/TargetOfTargetMana.lua
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
|
||||||
|
local TargetTargetMana = AceOO.Class(IceTargetMana)
|
||||||
|
|
||||||
|
-- Constructor --
|
||||||
|
function TargetTargetMana.prototype:init()
|
||||||
|
TargetTargetMana.super.prototype.init(self, "TargetTargetMana", "targettarget")
|
||||||
|
|
||||||
|
self:SetDefaultColor("TargetTargetMana", 52, 64, 221)
|
||||||
|
self:SetDefaultColor("TargetTargetRage", 235, 44, 26)
|
||||||
|
self:SetDefaultColor("TargetTargetEnergy", 228, 242, 31)
|
||||||
|
self:SetDefaultColor("TargetTargetFocus", 242, 149, 98)
|
||||||
|
end
|
||||||
|
|
||||||
|
function TargetTargetMana.prototype:GetDefaultSettings()
|
||||||
|
local settings = TargetTargetMana.super.prototype.GetDefaultSettings(self)
|
||||||
|
|
||||||
|
settings["side"] = IceCore.Side.Right
|
||||||
|
settings["offset"] = 11
|
||||||
|
settings["upperText"] = "[PercentMP:Round]"
|
||||||
|
settings["lowerText"] = "[FractionalMP:PowerColor]"
|
||||||
|
settings["barVerticalOffset"] = 35
|
||||||
|
settings["scale"] = 0.7
|
||||||
|
settings["enabled"] = false
|
||||||
|
|
||||||
|
return settings
|
||||||
|
end
|
||||||
|
|
||||||
|
function TargetTargetMana.prototype:Enable(core)
|
||||||
|
self.registerEvents = false
|
||||||
|
TargetTargetMana.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
|
self:ScheduleRepeatingEvent(self.elementName, self.Update, 0.1, self, "targettarget")
|
||||||
|
end
|
||||||
|
|
||||||
|
function TargetTargetMana.prototype:Disable(core)
|
||||||
|
TargetTargetMana.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
|
self:CancelScheduledEvent(self.elementName)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Load us up
|
||||||
|
IceHUD.TargetTargetMana = TargetTargetMana:new()
|
Reference in New Issue
Block a user