mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- 2.0 compatible - Removed bunch of unused libs (recommended to delete your /libs folder before updating) - Added a restriction to open configuration settings only out of combat - TargetInfo module optimized (no longer eats your memory and babies when changing options) - Shows up to 40 buffs/debuffs, ability to filter buffs (never/in combat/always) - No longer uses SpellStatus lib (new events do everything worth doing) - New module TargetCast, basically does what Blizzard target frame cast bar does - Removed module TimerBar (it was next to useless) - Brackets around bar texts now toggleable - Some misc. bug fixes (eg. colors now change properly when a duel starts)
71 lines
1.6 KiB
Lua
71 lines
1.6 KiB
Lua
local AceOO = AceLibrary("AceOO-2.0")
|
|
|
|
local CastBar = AceOO.Class(IceCastBar)
|
|
|
|
-- Constructor --
|
|
function CastBar.prototype:init()
|
|
CastBar.super.prototype.init(self, "CastBar")
|
|
|
|
self.unit = "player"
|
|
end
|
|
|
|
|
|
-- 'Public' methods -----------------------------------------------------------
|
|
|
|
-- OVERRIDE
|
|
function CastBar.prototype:GetDefaultSettings()
|
|
local settings = CastBar.super.prototype.GetDefaultSettings(self)
|
|
settings["side"] = IceCore.Side.Left
|
|
settings["offset"] = 0
|
|
settings["flashInstants"] = "Caster"
|
|
settings["flashFailures"] = "Caster"
|
|
return settings
|
|
end
|
|
|
|
|
|
-- OVERRIDE
|
|
function CastBar.prototype:GetOptions()
|
|
local opts = CastBar.super.prototype.GetOptions(self)
|
|
|
|
opts["flashInstants"] =
|
|
{
|
|
type = 'text',
|
|
name = "Flash Instant Spells",
|
|
desc = "Defines when cast bar should flash on instant spells",
|
|
get = function()
|
|
return self.moduleSettings.flashInstants
|
|
end,
|
|
set = function(value)
|
|
self.moduleSettings.flashInstants = value
|
|
end,
|
|
validate = { "Always", "Caster", "Never" },
|
|
disabled = function()
|
|
return not self.moduleSettings.enabled
|
|
end,
|
|
order = 40
|
|
}
|
|
|
|
opts["flashFailures"] =
|
|
{
|
|
type = "text",
|
|
name = "Flash on Spell Failures",
|
|
desc = "Defines when cast bar should flash on failed spells",
|
|
get = function()
|
|
return self.moduleSettings.flashFailures
|
|
end,
|
|
set = function(value)
|
|
self.moduleSettings.flashFailures = value
|
|
end,
|
|
validate = { "Always", "Caster", "Never" },
|
|
order = 41
|
|
}
|
|
|
|
return opts
|
|
end
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
|
-- Load us up
|
|
CastBar:new()
|