mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-24 08:36:04 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cc8b8b476b | |||
| bd2b6c3105 | |||
| 5bede33f00 | |||
| a286843b18 | |||
| 39840c10fd | |||
| ab98bb7ab5 | |||
| 73f4999004 | |||
| b7c3fe5333 |
@@ -1,10 +1,13 @@
|
|||||||
# pfUI - ClassicAPI Edition
|
# pfUI - ClassicAPI Edition
|
||||||
|
|
||||||
|
[](https://octowow.st/)
|
||||||
[](https://github.com/brues-code/ClassicAPI)
|
[](https://github.com/brues-code/ClassicAPI)
|
||||||
[](https://github.com/brues-code/nampower)
|
[](https://github.com/brues-code/nampower)
|
||||||
[](https://github.com/balakethelock/SuperWoW)
|
[](https://github.com/balakethelock/SuperWoW)
|
||||||
[](https://github.com/brues-code/UnitXP_SP3)
|
[](https://github.com/brues-code/UnitXP_SP3)
|
||||||
|
|
||||||
|
**A pfUI fork specifically optimized for ClassicAPI on [Octo WoW](https://octowow.st/)**
|
||||||
|
|
||||||
This version includes significant performance improvements and DLL-enhanced features.
|
This version includes significant performance improvements and DLL-enhanced features.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@@ -15,7 +18,7 @@ This version includes significant performance improvements and DLL-enhanced feat
|
|||||||
|
|
||||||
## DLL Enhancements
|
## DLL Enhancements
|
||||||
|
|
||||||
Since pfUI 6.0.0 includes integrations with client-side DLLs for enhanced functionality:
|
Since pfUI 6.0.0 includes integrations with client-side DLLs for enhanced functionality. These DLLs are permitted on Octo WoW:
|
||||||
|
|
||||||
### [ClassicAPI](https://github.com/brues-code/ClassicAPI)
|
### [ClassicAPI](https://github.com/brues-code/ClassicAPI)
|
||||||
|
|
||||||
|
|||||||
-26
@@ -1333,32 +1333,6 @@ function pfUI.api.CreateBackdropShadow(f)
|
|||||||
f.backdrop_shadow:SetBackdropBorderColor(0, 0, 0, tonumber(pfUI_config.appearance.border.shadow_intensity))
|
f.backdrop_shadow:SetBackdropBorderColor(0, 0, 0, tonumber(pfUI_config.appearance.border.shadow_intensity))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- [ Set Castbar Shield ]
|
|
||||||
-- Colors a castbar for a cast that none of the player's own interrupts or
|
|
||||||
-- silences can stop. The bar and the icon's border both take the shield color,
|
|
||||||
-- so the state still reads on a bar configured without an icon. Not shielded
|
|
||||||
-- restores the normal cast/channel color and the configured border.
|
|
||||||
-- 'bar' [frame] the castbar statusbar
|
|
||||||
-- 'icon' [frame] the icon frame, or nil for a bar without one
|
|
||||||
-- 'shielded' [bool] whether the cast is uninterruptible
|
|
||||||
-- 'isChannel' [bool] selects the unshielded color
|
|
||||||
function pfUI.api.SetCastbarShield(bar, icon, shielded, isChannel)
|
|
||||||
if shielded then
|
|
||||||
bar:SetStatusBarColor(pfUI.api.GetStringColor(C.appearance.castbar.shieldcolor))
|
|
||||||
else
|
|
||||||
bar:SetStatusBarColor(pfUI.api.GetStringColor(C.appearance.castbar[isChannel and "channelcolor" or "castbarcolor"]))
|
|
||||||
end
|
|
||||||
|
|
||||||
local iconborder = icon and icon.backdrop
|
|
||||||
if not iconborder then return end
|
|
||||||
|
|
||||||
if shielded then
|
|
||||||
iconborder:SetBackdropBorderColor(pfUI.api.GetStringColor(C.appearance.castbar.shieldcolor))
|
|
||||||
else
|
|
||||||
iconborder:SetBackdropBorderColor(pfUI.api.GetStringColor(C.appearance.border.color))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- [ Bar Layout Options ] --
|
-- [ Bar Layout Options ] --
|
||||||
-- 'barsize' size of bar in number of buttons
|
-- 'barsize' size of bar in number of buttons
|
||||||
-- returns: array of options as strings for pfUI.gui.bar
|
-- returns: array of options as strings for pfUI.gui.bar
|
||||||
|
|||||||
@@ -156,8 +156,6 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("appearance", "castbar", "castbarcolor", ".7,.7,.9,.8")
|
pfUI:UpdateConfig("appearance", "castbar", "castbarcolor", ".7,.7,.9,.8")
|
||||||
pfUI:UpdateConfig("appearance", "castbar", "channelcolor", ".9,.9,.7,.8")
|
pfUI:UpdateConfig("appearance", "castbar", "channelcolor", ".9,.9,.7,.8")
|
||||||
pfUI:UpdateConfig("appearance", "castbar", "failcolor", "1,.2,.2,.8")
|
pfUI:UpdateConfig("appearance", "castbar", "failcolor", "1,.2,.2,.8")
|
||||||
pfUI:UpdateConfig("appearance", "castbar", "shieldcolor", ".8,.45,.45,.8")
|
|
||||||
pfUI:UpdateConfig("appearance", "castbar", "fsrcolor", ".9,.6,.2,.8")
|
|
||||||
pfUI:UpdateConfig("appearance", "castbar", "texture", "Interface\\AddOns\\pfUI\\img\\bar")
|
pfUI:UpdateConfig("appearance", "castbar", "texture", "Interface\\AddOns\\pfUI\\img\\bar")
|
||||||
pfUI:UpdateConfig("appearance", "infight", "screen", "0")
|
pfUI:UpdateConfig("appearance", "infight", "screen", "0")
|
||||||
pfUI:UpdateConfig("appearance", "infight", "aggro", "0")
|
pfUI:UpdateConfig("appearance", "infight", "aggro", "0")
|
||||||
@@ -326,9 +324,6 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("unitframes", "player", "showRest", "0")
|
pfUI:UpdateConfig("unitframes", "player", "showRest", "0")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "energy", "1")
|
pfUI:UpdateConfig("unitframes", "player", "energy", "1")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "manatick", "0")
|
pfUI:UpdateConfig("unitframes", "player", "manatick", "0")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "showfsr", "1")
|
|
||||||
pfUI:UpdateConfig("unitframes", "player", "fsrheight", "4")
|
|
||||||
pfUI:UpdateConfig("unitframes", "player", "fsrstyle", "0")
|
|
||||||
pfUI:UpdateConfig("unitframes", "player", "display_haste", "0")
|
pfUI:UpdateConfig("unitframes", "player", "display_haste", "0")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "display_haste_color", "1,1,1,1")
|
pfUI:UpdateConfig("unitframes", "player", "display_haste_color", "1,1,1,1")
|
||||||
pfUI:UpdateConfig("unitframes", "player", "display_spellpower", "1")
|
pfUI:UpdateConfig("unitframes", "player", "display_spellpower", "1")
|
||||||
|
|||||||
+5
-8
@@ -86,7 +86,7 @@ pfUI:RegisterModule("castbar", function ()
|
|||||||
|
|
||||||
-- Stamp the bar with cast data and render text/icon/lag once. OnUpdate
|
-- Stamp the bar with cast data and render text/icon/lag once. OnUpdate
|
||||||
-- then animates the fill from this state without touching C_Spell.
|
-- then animates the fill from this state without touching C_Spell.
|
||||||
local function StampBar(cb, name, tex, startMs, endMs, spellID, isChannel, delayMs, isTradeskill, rank, noInterrupt)
|
local function StampBar(cb, name, tex, startMs, endMs, spellID, isChannel, delayMs, isTradeskill, rank)
|
||||||
cb.startTime = startMs
|
cb.startTime = startMs
|
||||||
cb.endTime = endMs
|
cb.endTime = endMs
|
||||||
cb.isChannel = isChannel
|
cb.isChannel = isChannel
|
||||||
@@ -97,10 +97,7 @@ pfUI:RegisterModule("castbar", function ()
|
|||||||
cb:SetAlpha(1)
|
cb:SetAlpha(1)
|
||||||
cb.fadeout = nil
|
cb.fadeout = nil
|
||||||
|
|
||||||
-- Shield an uninterruptible cast. Not on the player's own bar: the flag is
|
cb.bar:SetStatusBarColor(GetStringColor(C.appearance.castbar[isChannel and "channelcolor" or "castbarcolor"]))
|
||||||
-- measured against the reader's own interrupts and silences, so on your own
|
|
||||||
-- cast it answers a question nobody asked.
|
|
||||||
SetCastbarShield(cb.bar, cb.icon, noInterrupt and cb.unitstr ~= "player", isChannel)
|
|
||||||
|
|
||||||
-- Rank: prefer the value the UNIT_SPELLCAST_* event delivered (arg5, passed
|
-- Rank: prefer the value the UNIT_SPELLCAST_* event delivered (arg5, passed
|
||||||
-- through by RefreshBar). Only the retarget re-poll has no event in hand, so
|
-- through by RefreshBar). Only the retarget re-poll has no event in hand, so
|
||||||
@@ -155,10 +152,10 @@ pfUI:RegisterModule("castbar", function ()
|
|||||||
ClearBar(cb)
|
ClearBar(cb)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local name, _, tex, startMs, endMs, isTradeskill, _, noInterrupt, spellID, _, delayMs = C_Spell.UnitCastingInfo(query)
|
local name, _, tex, startMs, endMs, isTradeskill, _, _, spellID, _, delayMs = C_Spell.UnitCastingInfo(query)
|
||||||
local isChan
|
local isChan
|
||||||
if not name then
|
if not name then
|
||||||
name, _, tex, startMs, endMs, _, noInterrupt, spellID = C_Spell.UnitChannelInfo(query)
|
name, _, tex, startMs, endMs, _, _, spellID = C_Spell.UnitChannelInfo(query)
|
||||||
isChan = true
|
isChan = true
|
||||||
end
|
end
|
||||||
-- Synthetic fallback for abilities the engine treats as instant-cast but
|
-- Synthetic fallback for abilities the engine treats as instant-cast but
|
||||||
@@ -172,7 +169,7 @@ pfUI:RegisterModule("castbar", function ()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if name and startMs and endMs then
|
if name and startMs and endMs then
|
||||||
StampBar(cb, name, tex, startMs, endMs, spellID, isChan, delayMs, isTradeskill, rank, noInterrupt)
|
StampBar(cb, name, tex, startMs, endMs, spellID, isChan, delayMs, isTradeskill, rank)
|
||||||
else
|
else
|
||||||
ClearBar(cb)
|
ClearBar(cb)
|
||||||
end
|
end
|
||||||
|
|||||||
+7
-44
@@ -89,13 +89,6 @@ pfUI:RegisterModule("energytick", function()
|
|||||||
return C.unitframes.player.pwidth ~= "-1" and C.unitframes.player.pwidth or C.unitframes.player.width
|
return C.unitframes.player.pwidth ~= "-1" and C.unitframes.player.pwidth or C.unitframes.player.width
|
||||||
end
|
end
|
||||||
|
|
||||||
local rawborder, default_border = GetBorderSize("unitframes")
|
|
||||||
local cbtexture = pfUI.media[C.appearance.castbar.texture]
|
|
||||||
|
|
||||||
-- style is read once: switching it in the GUI needs a /reload, same as the
|
|
||||||
-- other structural (not cosmetic) toggles in this file
|
|
||||||
local fsrOverlay = C.unitframes.player.fsrstyle == "1"
|
|
||||||
|
|
||||||
-- was this gain the regen tick? if so, re-anchor the sweep on it
|
-- was this gain the regen tick? if so, re-anchor the sweep on it
|
||||||
local function lockTick(frame)
|
local function lockTick(frame)
|
||||||
local now, period = GetTime(), getAdjustedTickTimer()
|
local now, period = GetTime(), getAdjustedTickTimer()
|
||||||
@@ -206,21 +199,11 @@ pfUI:RegisterModule("energytick", function()
|
|||||||
end
|
end
|
||||||
this.tick = GetTime() + 0.020 -- ~50 FPS
|
this.tick = GetTime() + 0.020 -- ~50 FPS
|
||||||
|
|
||||||
-- five-second rule drains to nothing. The display is cosmetic and can be
|
-- five-second rule drains to nothing
|
||||||
-- hidden on its own; the window itself (fsrEnd/fsrGain) keeps running
|
|
||||||
-- either way -- it still dims the sweep spark below.
|
|
||||||
local remaining = this.fsrEnd and (this.fsrEnd - GetTime()) or 0
|
local remaining = this.fsrEnd and (this.fsrEnd - GetTime()) or 0
|
||||||
if this.mode == "MANA" and remaining > 0 then
|
if this.mode == "MANA" and remaining > 0 then
|
||||||
if C.unitframes.player.showfsr == "1" then
|
this.fsrbar:SetWidth(getBarWidth() * remaining / FIVE_SECOND_RULE)
|
||||||
if fsrOverlay then
|
this.fsrbar:Show()
|
||||||
this.fsrbar:SetWidth(getBarWidth() * remaining / FIVE_SECOND_RULE)
|
|
||||||
else
|
|
||||||
this.fsrbar:SetValue(remaining)
|
|
||||||
end
|
|
||||||
this.fsrbar:Show()
|
|
||||||
else
|
|
||||||
this.fsrbar:Hide()
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
this.fsrSpell, this.fsrEnd, this.fsrGain = nil, nil, nil
|
this.fsrSpell, this.fsrEnd, this.fsrGain = nil, nil, nil
|
||||||
this.fsrbar:Hide()
|
this.fsrbar:Hide()
|
||||||
@@ -257,26 +240,10 @@ pfUI:RegisterModule("energytick", function()
|
|||||||
this.spark:SetPoint("LEFT", pos - ((C.unitframes.player.pheight + 5) / 2), 0)
|
this.spark:SetPoint("LEFT", pos - ((C.unitframes.player.pheight + 5) / 2), 0)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if fsrOverlay then
|
energytick.fsrbar = energytick:CreateTexture(nil, "ARTWORK")
|
||||||
-- classic style: a translucent shade on top of the power bar's own fill
|
energytick.fsrbar:SetTexture(1, 1, 1, .15)
|
||||||
energytick.fsrbar = energytick:CreateTexture(nil, "ARTWORK")
|
energytick.fsrbar:SetPoint("TOPLEFT", 0, 0)
|
||||||
energytick.fsrbar:SetTexture(1, 1, 1, .15)
|
energytick.fsrbar:SetPoint("BOTTOMLEFT", 0, 0)
|
||||||
energytick.fsrbar:SetPoint("TOPLEFT", 0, 0)
|
|
||||||
energytick.fsrbar:SetPoint("BOTTOMLEFT", 0, 0)
|
|
||||||
else
|
|
||||||
-- a real bar below the power bar, not an overlay on top of it -- the same
|
|
||||||
-- treatment nameplate castbars get relative to the health bar, so the
|
|
||||||
-- window can't be mistaken for missing mana
|
|
||||||
energytick.fsrbar = CreateFrame("StatusBar", nil, pfUI.uf.player)
|
|
||||||
energytick.fsrbar:SetStatusBarTexture(cbtexture)
|
|
||||||
energytick.fsrbar:SetMinMaxValues(0, FIVE_SECOND_RULE)
|
|
||||||
energytick.fsrbar:SetPoint("TOPLEFT", pfUI.uf.player.power.bar, "BOTTOMLEFT", 0, -default_border * 2)
|
|
||||||
energytick.fsrbar:SetPoint("TOPRIGHT", pfUI.uf.player.power.bar, "BOTTOMRIGHT", 0, -default_border * 2)
|
|
||||||
energytick.fsrbar:SetHeight(tonumber(C.unitframes.player.fsrheight) or 4)
|
|
||||||
energytick.fsrbar:SetStatusBarColor(GetStringColor(C.appearance.castbar.fsrcolor))
|
|
||||||
CreateBackdrop(energytick.fsrbar, default_border)
|
|
||||||
CreateBackdropShadow(energytick.fsrbar)
|
|
||||||
end
|
|
||||||
energytick.fsrbar:Hide()
|
energytick.fsrbar:Hide()
|
||||||
|
|
||||||
energytick.spark = energytick:CreateTexture(nil, "OVERLAY")
|
energytick.spark = energytick:CreateTexture(nil, "OVERLAY")
|
||||||
@@ -289,10 +256,6 @@ pfUI:RegisterModule("energytick", function()
|
|||||||
function pfUI.uf.player.UpdateConfig()
|
function pfUI.uf.player.UpdateConfig()
|
||||||
energytick.spark:SetHeight(C.unitframes.player.pheight + 15)
|
energytick.spark:SetHeight(C.unitframes.player.pheight + 15)
|
||||||
energytick.spark:SetWidth(C.unitframes.player.pheight + 5)
|
energytick.spark:SetWidth(C.unitframes.player.pheight + 5)
|
||||||
if not fsrOverlay then
|
|
||||||
energytick.fsrbar:SetHeight(tonumber(C.unitframes.player.fsrheight) or 4)
|
|
||||||
energytick.fsrbar:SetStatusBarColor(GetStringColor(C.appearance.castbar.fsrcolor))
|
|
||||||
end
|
|
||||||
hookUpdateConfig(pfUI.uf.player)
|
hookUpdateConfig(pfUI.uf.player)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
+2
-11
@@ -2072,6 +2072,8 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
CreateConfig(nil, T["Combopoint Width"], C.unitframes, "combowidth")
|
CreateConfig(nil, T["Combopoint Width"], C.unitframes, "combowidth")
|
||||||
CreateConfig(nil, T["Combopoint Height"], C.unitframes, "comboheight")
|
CreateConfig(nil, T["Combopoint Height"], C.unitframes, "comboheight")
|
||||||
CreateConfig(nil, T["Show Resting"], C.unitframes.player, "showRest", "checkbox")
|
CreateConfig(nil, T["Show Resting"], C.unitframes.player, "showRest", "checkbox")
|
||||||
|
CreateConfig(nil, T["Enable Energy Ticks"], C.unitframes.player, "energy", "checkbox")
|
||||||
|
CreateConfig(nil, T["Enable Mana Ticks"], C.unitframes.player, "manatick", "checkbox")
|
||||||
CreateConfig(nil, T["Detect Enemy Buffs"], C.unitframes, "buffdetect", "checkbox", nil, nil, nil, nil)
|
CreateConfig(nil, T["Detect Enemy Buffs"], C.unitframes, "buffdetect", "checkbox", nil, nil, nil, nil)
|
||||||
CreateConfig(nil, T["Raid Mark Icon Style"], C.unitframes, "blizzard_raidicons", "dropdown", function() return {"1:Original Blizzard", "0:pfUI Design"} end)
|
CreateConfig(nil, T["Raid Mark Icon Style"], C.unitframes, "blizzard_raidicons", "dropdown", function() return {"1:Original Blizzard", "0:pfUI Design"} end)
|
||||||
|
|
||||||
@@ -2318,15 +2320,6 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
CreateConfig(U[c], T["Right Text Y Offset"], C.unitframes[c], "txtpowerrightoffy")
|
CreateConfig(U[c], T["Right Text Y Offset"], C.unitframes[c], "txtpowerrightoffy")
|
||||||
CreateConfig(U[c], T["Power Bar Anchor"], C.unitframes[c], "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position)
|
CreateConfig(U[c], T["Power Bar Anchor"], C.unitframes[c], "panchor", "dropdown", pfUI.gui.dropdowns.uf_powerbar_position)
|
||||||
|
|
||||||
if c == "player" then
|
|
||||||
CreateConfig(nil, T["Energy/Mana Ticks"], nil, nil, "header")
|
|
||||||
CreateConfig(nil, T["Enable Energy Ticks"], C.unitframes[c], "energy", "checkbox")
|
|
||||||
CreateConfig(nil, T["Enable Mana Ticks"], C.unitframes[c], "manatick", "checkbox")
|
|
||||||
CreateConfig(nil, T["Show Five Second Rule"], C.unitframes[c], "showfsr", "checkbox")
|
|
||||||
CreateConfig(nil, T["Five Second Rule Style"], C.unitframes[c], "fsrstyle", "dropdown", function() return {"0:Separate Bar", "1:Overlay"} end)
|
|
||||||
CreateConfig(nil, T["Five Second Rule Height"], C.unitframes[c], "fsrheight")
|
|
||||||
end
|
|
||||||
|
|
||||||
CreateConfig(U[c], T["Combat Text"], nil, nil, "header")
|
CreateConfig(U[c], T["Combat Text"], nil, nil, "header")
|
||||||
CreateConfig(U[c], T["Show Combat Text"], C.unitframes[c], "hitindicator", "checkbox")
|
CreateConfig(U[c], T["Show Combat Text"], C.unitframes[c], "hitindicator", "checkbox")
|
||||||
CreateConfig(U[c], T["Combat Text Font"], C.unitframes[c], "hitindicatorfont", "dropdown", pfUI.gui.dropdowns.fonts)
|
CreateConfig(U[c], T["Combat Text Font"], C.unitframes[c], "hitindicatorfont", "dropdown", pfUI.gui.dropdowns.fonts)
|
||||||
@@ -2799,8 +2792,6 @@ pfUI:RegisterModule("gui", function ()
|
|||||||
CreateConfig(nil, T["Use Unit Fonts"], C.castbar, "use_unitfonts", "checkbox")
|
CreateConfig(nil, T["Use Unit Fonts"], C.castbar, "use_unitfonts", "checkbox")
|
||||||
CreateConfig(nil, T["Casting Color"], C.appearance.castbar, "castbarcolor", "color")
|
CreateConfig(nil, T["Casting Color"], C.appearance.castbar, "castbarcolor", "color")
|
||||||
CreateConfig(nil, T["Channeling Color"], C.appearance.castbar, "channelcolor", "color")
|
CreateConfig(nil, T["Channeling Color"], C.appearance.castbar, "channelcolor", "color")
|
||||||
CreateConfig(nil, T["Uninterruptible Color"], C.appearance.castbar, "shieldcolor", "color")
|
|
||||||
CreateConfig(nil, T["Five Second Rule Color"], C.appearance.castbar, "fsrcolor", "color")
|
|
||||||
CreateConfig(nil, T["Castbar Texture"], C.appearance.castbar, "texture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
|
CreateConfig(nil, T["Castbar Texture"], C.appearance.castbar, "texture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
|
||||||
CreateConfig(nil, T["Disable Blizzard Castbar"], C.castbar.player, "hide_blizz", "checkbox")
|
CreateConfig(nil, T["Disable Blizzard Castbar"], C.castbar.player, "hide_blizz", "checkbox")
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -77,10 +77,10 @@ pfUI:RegisterModule("nameplates", function ()
|
|||||||
-- vs channel itself. Never called per frame.
|
-- vs channel itself. Never called per frame.
|
||||||
local function PollCastInfo(unit)
|
local function PollCastInfo(unit)
|
||||||
if not unit then return nil end
|
if not unit then return nil end
|
||||||
local name, _, texture, startMs, endMs, _, _, noInterrupt, spellID = C_Spell.UnitCastingInfo(unit)
|
local name, _, texture, startMs, endMs, _, _, _, spellID = C_Spell.UnitCastingInfo(unit)
|
||||||
local isChannel
|
local isChannel
|
||||||
if not name then
|
if not name then
|
||||||
name, _, texture, startMs, endMs, _, noInterrupt, spellID = C_Spell.UnitChannelInfo(unit)
|
name, _, texture, startMs, endMs, _, _, spellID = C_Spell.UnitChannelInfo(unit)
|
||||||
isChannel = true
|
isChannel = true
|
||||||
end
|
end
|
||||||
if not name or not startMs or not endMs then return nil end
|
if not name or not startMs or not endMs then return nil end
|
||||||
@@ -92,7 +92,6 @@ pfUI:RegisterModule("nameplates", function ()
|
|||||||
endTime = endMs / 1000,
|
endTime = endMs / 1000,
|
||||||
duration = (endMs - startMs) / 1000,
|
duration = (endMs - startMs) / 1000,
|
||||||
isChannel = isChannel,
|
isChannel = isChannel,
|
||||||
noInterrupt = noInterrupt,
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1752,7 +1751,7 @@ nameplates:RegisterEvent("PLAYER_GUILD_UPDATE")
|
|||||||
-- Relative 0..duration range to avoid float precision loss with large
|
-- Relative 0..duration range to avoid float precision loss with large
|
||||||
-- absolute timestamps.
|
-- absolute timestamps.
|
||||||
nameplate.castbar:SetMinMaxValues(0, duration)
|
nameplate.castbar:SetMinMaxValues(0, duration)
|
||||||
SetCastbarShield(nameplate.castbar, nameplate.castbar.icon, castInfo.noInterrupt, isChannel)
|
nameplate.castbar:SetStatusBarColor(GetStringColor(C.appearance.castbar[(isChannel and "channelcolor" or "castbarcolor")]))
|
||||||
if castInfo.icon then
|
if castInfo.icon then
|
||||||
nameplate.castbar.icon.tex:SetTexture(castInfo.icon)
|
nameplate.castbar.icon.tex:SetTexture(castInfo.icon)
|
||||||
nameplate.castbar.icon.tex:SetTexCoord(.1,.9,.1,.9)
|
nameplate.castbar.icon.tex:SetTexCoord(.1,.9,.1,.9)
|
||||||
|
|||||||
Reference in New Issue
Block a user