mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
This has been tested on Classic with a Rogue up to level 5 using various modules and casually checked against a few level 1 classes. I'm sure there's a lot more to do here. I also made sure to test on Live. Where possible I tried to check for API availability rather than specific client versions or program IDs. There are many cases where that's impractical, however, so version/program ID checks were used. This was tested with: * Ace3 @r1225 * AceGUI-3.0-SharedMediaWidgets @r61 * LibDBIcon-1.0 @v8.2.0 * LibDogTag-3.0 @v80200.1 * LibDogTag-Unit-3.0 @v80200.1-2-g93a898d-alpha * LibRangeCheck-2.0 @v4.2.3 (with a couple of local changes) * LibSharedMedia-3.0 @r113-alpha
32 lines
861 B
Lua
32 lines
861 B
Lua
local FocusAbsorb = IceCore_CreateClass(IceTargetAbsorb)
|
|
|
|
-- Constructor --
|
|
function FocusAbsorb.prototype:init()
|
|
FocusAbsorb.super.prototype.init(self, "FocusAbsorb", "focus", "FocusAbsorb")
|
|
end
|
|
|
|
-- 'Public' methods -----------------------------------------------------------
|
|
|
|
-- OVERRIDE
|
|
function FocusAbsorb.prototype:GetDefaultSettings()
|
|
local settings = FocusAbsorb.super.prototype.GetDefaultSettings(self)
|
|
|
|
settings["side"] = IceCore.Side.Right
|
|
settings["offset"] = 6
|
|
|
|
return settings
|
|
end
|
|
|
|
function FocusAbsorb.prototype:MyRegisterCustomEvents()
|
|
self:RegisterEvent("PLAYER_FOCUS_CHANGED", "UpdateAbsorbAmount")
|
|
end
|
|
|
|
function FocusAbsorb.prototype:MyUnregisterCustomEvents()
|
|
self:UnregisterEvent("PLAYER_FOCUS_CHANGED")
|
|
end
|
|
|
|
-- Load us up
|
|
if UnitGetTotalAbsorbs ~= nil then
|
|
IceHUD.FocusAbsorb = FocusAbsorb:new()
|
|
end
|