Compare commits
8 commits
v3.3.0-coa
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2aad7af12d | |||
| 4d2ef28ad0 | |||
| 319bd05930 | |||
| 2d9e9329db | |||
| d241fd1b5e | |||
| ad2a536efe | |||
| 50f6e30f71 | |||
| efbc200ba7 |
9 changed files with 129 additions and 23 deletions
|
|
@ -37,10 +37,14 @@ jobs:
|
||||||
RID=$(curl -sf -X POST -H "Authorization: token $GITEA_TOKEN" \
|
RID=$(curl -sf -X POST -H "Authorization: token $GITEA_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"$API/repos/$REPO/releases" \
|
"$API/repos/$REPO/releases" \
|
||||||
-d "$(jq -nc --arg t "$TAG" '{tag_name:$t,name:$t,draft:false,prerelease:false}')" \
|
-d "$(jq -nc --arg t "$TAG" '{tag_name:$t,name:$t,draft:false,prerelease:false,hide_archive_links:true}')" \
|
||||||
| jq -r '.id')
|
| jq -r '.id')
|
||||||
fi
|
fi
|
||||||
echo "release id: $RID"
|
echo "release id: $RID"
|
||||||
|
# Gitea honors hide_archive_links only on edit, not create — PATCH it
|
||||||
|
# so the auto-generated Source Code (zip/tar.gz) links stay hidden.
|
||||||
|
curl -sf -X PATCH -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" \
|
||||||
|
"$API/repos/$REPO/releases/$RID" -d '{"hide_archive_links":true}' >/dev/null || true
|
||||||
# Upload every dist/*.zip. Per-asset failures don't fail the job —
|
# Upload every dist/*.zip. Per-asset failures don't fail the job —
|
||||||
# we want partial releases to still publish rather than block the
|
# we want partial releases to still publish rather than block the
|
||||||
# whole pipeline on one big file.
|
# whole pipeline on one big file.
|
||||||
|
|
|
||||||
|
|
@ -2029,14 +2029,14 @@ local function loadUnitOptions()
|
||||||
},
|
},
|
||||||
sep2 = {order = 1.75, type = "description", name = "", hidden = function(info)
|
sep2 = {order = 1.75, type = "description", name = "", hidden = function(info)
|
||||||
local moduleKey = info[#(info) - 1]
|
local moduleKey = info[#(info) - 1]
|
||||||
return ( moduleKey ~= "healthBar" and moduleKey ~= "powerBar" and moduleKey ~= "druidBar" ) or not ShadowUF.db.profile.advanced
|
return ( moduleKey ~= "healthBar" and moduleKey ~= "powerBar" and moduleKey ~= "druidBar" and moduleKey ~= "necromancerBar" ) or not ShadowUF.db.profile.advanced
|
||||||
end},
|
end},
|
||||||
invert = {
|
invert = {
|
||||||
order = 2,
|
order = 2,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Invert colors"],
|
name = L["Invert colors"],
|
||||||
desc = L["Flips coloring so the bar color is shown as the background color and the background as the bar"],
|
desc = L["Flips coloring so the bar color is shown as the background color and the background as the bar"],
|
||||||
hidden = function(info) return ( info[#(info) - 1] ~= "healthBar" and info[#(info) - 1] ~= "powerBar" and info[#(info) - 1] ~= "druidBar" ) or not ShadowUF.db.profile.advanced end,
|
hidden = function(info) return ( info[#(info) - 1] ~= "healthBar" and info[#(info) - 1] ~= "powerBar" and info[#(info) - 1] ~= "druidBar" and info[#(info) - 1] ~= "necromancerBar" ) or not ShadowUF.db.profile.advanced end,
|
||||||
arg = "$parent.invert",
|
arg = "$parent.invert",
|
||||||
},
|
},
|
||||||
order = {
|
order = {
|
||||||
|
|
@ -2997,6 +2997,14 @@ local function loadUnitOptions()
|
||||||
hidden = hideRestrictedOption,
|
hidden = hideRestrictedOption,
|
||||||
arg = "druidBar.enabled",
|
arg = "druidBar.enabled",
|
||||||
},
|
},
|
||||||
|
necromancerBar = {
|
||||||
|
order = 1.5,
|
||||||
|
type = "toggle",
|
||||||
|
name = string.format(L["Enable %s"], L["Necromancer mana bar"]),
|
||||||
|
desc = L["Adds a second power bar to the player frame showing your mana and runic power at the same time."],
|
||||||
|
hidden = hideRestrictedOption,
|
||||||
|
arg = "necromancerBar.enabled",
|
||||||
|
},
|
||||||
xpBar = {
|
xpBar = {
|
||||||
order = 2,
|
order = 2,
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
|
|
@ -3760,14 +3768,17 @@ local function loadFilterOptions()
|
||||||
add = {
|
add = {
|
||||||
order = 0,
|
order = 0,
|
||||||
type = "input",
|
type = "input",
|
||||||
name = L["Aura name"],
|
name = L["Aura name or spell ID"],
|
||||||
|
desc = L["Enter an exact aura name, or a numeric spell ID for precise matching (CoA's client exposes aura spell IDs)."],
|
||||||
--dialogControl = "Aura_EditBox",
|
--dialogControl = "Aura_EditBox",
|
||||||
hidden = false,
|
hidden = false,
|
||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
local filterType = info[#(info) - 3]
|
local filterType = info[#(info) - 3]
|
||||||
local filter = filterMap[info[#(info) - 2]]
|
local filter = filterMap[info[#(info) - 2]]
|
||||||
|
|
||||||
ShadowUF.db.profile.filters[filterType][filter][value] = true
|
-- A purely-numeric entry is stored as a number so it matches the
|
||||||
|
-- spellId returned by UnitAura; anything else stays a name string.
|
||||||
|
ShadowUF.db.profile.filters[filterType][filter][tonumber(value) or value] = true
|
||||||
|
|
||||||
reloadUnitAuras()
|
reloadUnitAuras()
|
||||||
rebuildFilters()
|
rebuildFilters()
|
||||||
|
|
@ -3844,9 +3855,17 @@ local function loadFilterOptions()
|
||||||
type = "description",
|
type = "description",
|
||||||
-- Odd I know, AceConfigDialog-3.0 expands descriptions to full width if width is nil
|
-- Odd I know, AceConfigDialog-3.0 expands descriptions to full width if width is nil
|
||||||
-- on the other hand we can't set width to "normal" so tricking it
|
-- on the other hand we can't set width to "normal" so tricking it
|
||||||
width = "",
|
width = "",
|
||||||
fontSize = "medium",
|
fontSize = "medium",
|
||||||
name = function(info) return spellMap[info[#(info)]] end,
|
name = function(info)
|
||||||
|
local entry = spellMap[info[#(info)]]
|
||||||
|
-- Numeric entries are spell IDs; show "Name (ID)" when the client can resolve it.
|
||||||
|
if( type(entry) == "number" ) then
|
||||||
|
local spellName = GetSpellInfo(entry)
|
||||||
|
return spellName and string.format("%s (%d)", spellName, entry) or tostring(entry)
|
||||||
|
end
|
||||||
|
return entry
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
local spellRow = {
|
local spellRow = {
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ local function Constructor()
|
||||||
button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
|
button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
|
||||||
button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
|
button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
|
||||||
button:SetScript("OnMouseWheel", Keybinding_OnMouseWheel)
|
button:SetScript("OnMouseWheel", Keybinding_OnMouseWheel)
|
||||||
button:SetScript("OnGamePadButtonDown", Keybinding_OnKeyDown)
|
pcall(button.SetScript, button, "OnGamePadButtonDown", Keybinding_OnKeyDown)
|
||||||
button:SetPoint("BOTTOMLEFT")
|
button:SetPoint("BOTTOMLEFT")
|
||||||
button:SetPoint("BOTTOMRIGHT")
|
button:SetPoint("BOTTOMRIGHT")
|
||||||
button:SetHeight(24)
|
button:SetHeight(24)
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,11 @@ function ShadowUF:LoadUnitDefaults()
|
||||||
self.defaults.profile.units.player.runeBar = {enabled = false}
|
self.defaults.profile.units.player.runeBar = {enabled = false}
|
||||||
self.defaults.profile.units.player.totemBar = {enabled = false}
|
self.defaults.profile.units.player.totemBar = {enabled = false}
|
||||||
self.defaults.profile.units.player.druidBar = {enabled = false}
|
self.defaults.profile.units.player.druidBar = {enabled = false}
|
||||||
|
-- Carry the layout (height/order/background) in the defaults, not only in the
|
||||||
|
-- defaultlayout merge: that merge only runs on profile reset, so a bar added to
|
||||||
|
-- an existing profile would otherwise have a nil height and crash
|
||||||
|
-- Layout:PositionWidgets ("attempt to compare number with nil" in layout.lua).
|
||||||
|
self.defaults.profile.units.player.necromancerBar = {enabled = false, height = 0.40, order = 26, background = true}
|
||||||
self.defaults.profile.units.player.xpBar = {enabled = false}
|
self.defaults.profile.units.player.xpBar = {enabled = false}
|
||||||
self.defaults.profile.units.player.fader = {enabled = false, combatAlpha = 1.0, inactiveAlpha = 0.60}
|
self.defaults.profile.units.player.fader = {enabled = false, combatAlpha = 1.0, inactiveAlpha = 0.60}
|
||||||
self.defaults.profile.units.player.indicators.lfdRole = {enabled = true, size = 0, x = 0, y = 0}
|
self.defaults.profile.units.player.indicators.lfdRole = {enabled = true, size = 0, x = 0, y = 0}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
## Title: Shadowed Unit Frames
|
## Title: Shadowed Unit Frames
|
||||||
## Notes: An apple a day keeps the raptor away, or so they say
|
## Notes: An apple a day keeps the raptor away, or so they say
|
||||||
## Author: Shadowed
|
## Author: Shadowed
|
||||||
## Version: v3.3.0
|
## Version: v3.3.0-coa.7
|
||||||
## SavedVariables: ShadowedUFDB
|
## SavedVariables: ShadowedUFDB
|
||||||
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibHealComm-4.0, AceGUI-3.0-SharedMediaWidgets
|
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibHealComm-4.0, AceGUI-3.0-SharedMediaWidgets
|
||||||
## X-Curse-Packaged-Version: v3.2.12
|
## X-Curse-Packaged-Version: v3.2.12
|
||||||
|
|
@ -51,5 +51,6 @@ modules\incheal.lua
|
||||||
modules\range.lua
|
modules\range.lua
|
||||||
modules\empty.lua
|
modules\empty.lua
|
||||||
modules\druid.lua
|
modules\druid.lua
|
||||||
|
modules\necromancer.lua
|
||||||
|
|
||||||
CoAClassColors.lua
|
CoAClassColors.lua
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,8 @@ L["Ascending"] = "Ascending"
|
||||||
L["Aura border style"] = "Aura border style"
|
L["Aura border style"] = "Aura border style"
|
||||||
L["Aura filters"] = "Aura filters"
|
L["Aura filters"] = "Aura filters"
|
||||||
L["Aura name"] = "Aura name"
|
L["Aura name"] = "Aura name"
|
||||||
|
L["Aura name or spell ID"] = "Aura name or spell ID"
|
||||||
|
L["Enter an exact aura name, or a numeric spell ID for precise matching (CoA's client exposes aura spell IDs)."] = "Enter an exact aura name, or a numeric spell ID for precise matching (CoA's client exposes aura spell IDs)."
|
||||||
L["Auras"] = "Auras"
|
L["Auras"] = "Auras"
|
||||||
L["Aura types to filter"] = "Aura types to filter"
|
L["Aura types to filter"] = "Aura types to filter"
|
||||||
L["B"] = "B"
|
L["B"] = "B"
|
||||||
|
|
@ -190,6 +192,8 @@ L["Down"] = "Down"
|
||||||
L["Druid form"] = "Druid form"
|
L["Druid form"] = "Druid form"
|
||||||
L["Druid form (Short)"] = "Druid form (Short)"
|
L["Druid form (Short)"] = "Druid form (Short)"
|
||||||
L["Druid mana bar"] = "Druid mana bar"
|
L["Druid mana bar"] = "Druid mana bar"
|
||||||
|
L["Necromancer mana bar"] = "Necromancer mana bar"
|
||||||
|
L["Adds a second power bar to the player frame showing your mana and runic power at the same time."] = "Adds a second power bar to the player frame showing your mana and runic power at the same time."
|
||||||
L["Due to the nature of fake units, cast bars for %s are not super efficient and can take at most 0.10 seconds to notice a change in cast."] = "Due to the nature of fake units, cast bars for %s are not super efficient and can take at most 0.10 seconds to notice a change in cast."
|
L["Due to the nature of fake units, cast bars for %s are not super efficient and can take at most 0.10 seconds to notice a change in cast."] = "Due to the nature of fake units, cast bars for %s are not super efficient and can take at most 0.10 seconds to notice a change in cast."
|
||||||
L["Dungeon role"] = "Dungeon role"
|
L["Dungeon role"] = "Dungeon role"
|
||||||
L["Edge size"] = "Edge size"
|
L["Edge size"] = "Edge size"
|
||||||
|
|
|
||||||
|
|
@ -21,23 +21,23 @@ local COA_CLASS_DISPELS = {
|
||||||
["WITCHHUNTER"] = { Curse = true },
|
["WITCHHUNTER"] = { Curse = true },
|
||||||
["SUNCLERIC"] = { Magic = true, Disease = true, Poison = true }, -- Sanctify
|
["SUNCLERIC"] = { Magic = true, Disease = true, Poison = true }, -- Sanctify
|
||||||
["WILDWALKER"] = { Disease = true, Poison = true }, -- Primalist (Soothing Touch — DBC says Magic, gameplay is Poison/Disease)
|
["WILDWALKER"] = { Disease = true, Poison = true }, -- Primalist (Soothing Touch — DBC says Magic, gameplay is Poison/Disease)
|
||||||
["WITCHDOCTOR"] = { Disease = true, Poison = true }, -- Cleansing Idol (AoE)
|
["WITCHDOCTOR"] = { Curse = true, Disease = true, Poison = true }, -- Hexbreak (806240, single-target Curse) + Cleansing Idol (504840, AoE Disease/Poison)
|
||||||
["TINKER"] = { Disease = true, Poison = true }, -- Nanobot Cleanser
|
["TINKER"] = { Disease = true, Poison = true }, -- Nanobot Cleanser
|
||||||
}
|
}
|
||||||
local function getCoaDispels()
|
local function getCoaDispels()
|
||||||
if playerCoaDispels ~= nil then return playerCoaDispels end
|
if playerCoaDispels ~= nil then return playerCoaDispels end
|
||||||
local cp = _G.C_Player
|
-- Trust the COA_CLASS_DISPELS table directly: it only contains custom-class
|
||||||
if not cp or not cp.IsCustomClass then
|
-- tokens, so any token-match implies the player IS a dispelling custom
|
||||||
-- C_Player not yet initialised (called before PLAYER_LOGIN); don't
|
-- class. Avoids C_Player.IsCustomClass timing/availability issues (the
|
||||||
-- cache — retry on the next scan so we pick it up once in-world.
|
-- API isn't reliable for every class on every login — Witchdoctor in
|
||||||
|
-- particular was getting cached as false on raid frames).
|
||||||
|
local _, token = UnitClass("player")
|
||||||
|
if not token or token == "" then
|
||||||
|
-- UnitClass not ready yet (very early init); don't cache — retry on
|
||||||
|
-- the next scan so we pick it up once in-world.
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
if cp:IsCustomClass() then
|
playerCoaDispels = COA_CLASS_DISPELS[token] or false
|
||||||
local _, token = UnitClass("player")
|
|
||||||
playerCoaDispels = token and COA_CLASS_DISPELS[token] or false
|
|
||||||
else
|
|
||||||
playerCoaDispels = false
|
|
||||||
end
|
|
||||||
return playerCoaDispels
|
return playerCoaDispels
|
||||||
end
|
end
|
||||||
-- Expose for other modules (highlight.lua) so the dispel set stays single-source.
|
-- Expose for other modules (highlight.lua) so the dispel set stays single-source.
|
||||||
|
|
@ -531,10 +531,12 @@ local function scan(parent, frame, type, config, filter)
|
||||||
local index = 0
|
local index = 0
|
||||||
while( true ) do
|
while( true ) do
|
||||||
index = index + 1
|
index = index + 1
|
||||||
local name, rank, texture, count, auraType, duration, endTime, caster, isStealable = UnitAura(frame.parent.unit, index, filter)
|
-- CoA's 3.3.5 client returns spellId as the 11th value (stock 3.3.5a stops at 10),
|
||||||
|
-- which lets the whitelist/blacklist match by ID as well as by name.
|
||||||
|
local name, rank, texture, count, auraType, duration, endTime, caster, isStealable, _, spellId = UnitAura(frame.parent.unit, index, filter)
|
||||||
if( not name ) then break end
|
if( not name ) then break end
|
||||||
|
|
||||||
if( ( not coaFilter or (auraType and coaFilter[auraType]) ) and ( not config.player or playerUnits[caster] ) and ( not parent.whitelist[type] and not parent.blacklist[type] or parent.whitelist[type] and parent.whitelist[name] or parent.blacklist[type] and not parent.blacklist[name] ) ) then
|
if( ( not coaFilter or (auraType and coaFilter[auraType]) ) and ( not config.player or playerUnits[caster] ) and ( not parent.whitelist[type] and not parent.blacklist[type] or parent.whitelist[type] and ( parent.whitelist[name] or parent.whitelist[spellId] ) or parent.blacklist[type] and not ( parent.blacklist[name] or parent.blacklist[spellId] ) ) ) then
|
||||||
-- Create any buttons we need
|
-- Create any buttons we need
|
||||||
frame.totalAuras = frame.totalAuras + 1
|
frame.totalAuras = frame.totalAuras + 1
|
||||||
if( #(frame.buttons) < frame.totalAuras ) then
|
if( #(frame.buttons) < frame.totalAuras ) then
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,7 @@ function ShadowUF:LoadDefaultLayout(useMerge)
|
||||||
healthBar = {background = true, colorType = "class", reactionType = "npc", height = 1.20, order = 10},
|
healthBar = {background = true, colorType = "class", reactionType = "npc", height = 1.20, order = 10},
|
||||||
powerBar = {background = true, height = 1.0, order = 20},
|
powerBar = {background = true, height = 1.0, order = 20},
|
||||||
druidBar = {background = true, height = 0.40, order = 25},
|
druidBar = {background = true, height = 0.40, order = 25},
|
||||||
|
necromancerBar = {background = true, height = 0.40, order = 26},
|
||||||
xpBar = {background = true, height = 0.25, order = 55},
|
xpBar = {background = true, height = 0.25, order = 55},
|
||||||
castBar = {background = true, height = 0.60, order = 40, icon = "HIDE", name = {enabled = true, size = 0, anchorTo = "$parent", rank = true, anchorPoint = "CLI", x = 1, y = 0}, time = {enabled = true, size = 0, anchorTo = "$parent", anchorPoint = "CRI", x = -1, y = 0}},
|
castBar = {background = true, height = 0.60, order = 40, icon = "HIDE", name = {enabled = true, size = 0, anchorTo = "$parent", rank = true, anchorPoint = "CLI", x = 1, y = 0}, time = {enabled = true, size = 0, anchorTo = "$parent", anchorPoint = "CRI", x = -1, y = 0}},
|
||||||
runeBar = {background = false, height = 0.40, order = 70},
|
runeBar = {background = false, height = 0.40, order = 70},
|
||||||
|
|
|
||||||
70
ShadowedUnitFrames/modules/necromancer.lua
Normal file
70
ShadowedUnitFrames/modules/necromancer.lua
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
local Necromancer = {}
|
||||||
|
ShadowUF:RegisterModule(Necromancer, "necromancerBar", ShadowUF.L["Necromancer mana bar"], true, "NECROMANCER")
|
||||||
|
|
||||||
|
-- Power type enums (3.3.5): 0 = mana, 6 = runic power.
|
||||||
|
local MANA, RUNIC_POWER = 0, 6
|
||||||
|
|
||||||
|
-- The Necromancer juggles mana and runic power. The main power bar shows
|
||||||
|
-- whichever is the active power type; this secondary bar shows the other one
|
||||||
|
-- so both are visible at once (same idea as the Druid mana bar in forms).
|
||||||
|
local function secondaryPower(unit)
|
||||||
|
local active = UnitPowerType(unit)
|
||||||
|
if( active == RUNIC_POWER ) then return MANA end
|
||||||
|
if( active == MANA ) then return RUNIC_POWER end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function Necromancer:OnEnable(frame)
|
||||||
|
frame.necromancerBar = frame.necromancerBar or ShadowUF.Units:CreateBar(frame)
|
||||||
|
|
||||||
|
frame:RegisterUnitEvent("UNIT_MAXMANA", self, "Update")
|
||||||
|
frame:RegisterUnitEvent("UNIT_MANA", self, "Update")
|
||||||
|
frame:RegisterUnitEvent("UNIT_RUNIC_POWER", self, "Update")
|
||||||
|
frame:RegisterUnitEvent("UNIT_MAXRUNIC_POWER", self, "Update")
|
||||||
|
frame:RegisterUnitEvent("UNIT_DISPLAYPOWER", self, "PowerChanged")
|
||||||
|
|
||||||
|
frame:RegisterUpdateFunc(self, "PowerChanged")
|
||||||
|
frame:RegisterUpdateFunc(self, "Update")
|
||||||
|
end
|
||||||
|
|
||||||
|
function Necromancer:OnDisable(frame)
|
||||||
|
frame:UnregisterAll(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Necromancer:UpdateColor(frame, power)
|
||||||
|
local color = ShadowUF.db.profile.powerColors[power == RUNIC_POWER and "RUNIC_POWER" or "MANA"]
|
||||||
|
|
||||||
|
if( not ShadowUF.db.profile.units[frame.unitType].necromancerBar.invert ) then
|
||||||
|
frame.necromancerBar:SetStatusBarColor(color.r, color.g, color.b, ShadowUF.db.profile.bars.alpha)
|
||||||
|
if( not frame.necromancerBar.background.overrideColor ) then
|
||||||
|
frame.necromancerBar.background:SetVertexColor(color.r, color.g, color.b, ShadowUF.db.profile.bars.backgroundAlpha)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
frame.necromancerBar.background:SetVertexColor(color.r, color.g, color.b, ShadowUF.db.profile.bars.alpha)
|
||||||
|
|
||||||
|
color = frame.necromancerBar.background.overrideColor or color
|
||||||
|
frame.necromancerBar:SetStatusBarColor(color.r, color.g, color.b, ShadowUF.db.profile.bars.backgroundAlpha)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Necromancer:OnLayoutApplied(frame)
|
||||||
|
if( frame.visibility.necromancerBar ) then
|
||||||
|
self:UpdateColor(frame, secondaryPower(frame.unit) or MANA)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Show the bar whenever there is a second power type to display, and recolor it
|
||||||
|
-- to match whichever resource that currently is.
|
||||||
|
function Necromancer:PowerChanged(frame)
|
||||||
|
local power = secondaryPower(frame.unit)
|
||||||
|
ShadowUF.Layout:SetBarVisibility(frame, "necromancerBar", power ~= nil)
|
||||||
|
if( power ) then
|
||||||
|
self:UpdateColor(frame, power)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Necromancer:Update(frame)
|
||||||
|
local power = secondaryPower(frame.unit) or MANA
|
||||||
|
frame.necromancerBar:SetMinMaxValues(0, UnitPowerMax(frame.unit, power))
|
||||||
|
frame.necromancerBar:SetValue(UnitIsDeadOrGhost(frame.unit) and 0 or not UnitIsConnected(frame.unit) and 0 or UnitPower(frame.unit, power))
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue