oUF_ArtifactPower

oUF_ArtifactPower

7.3k Downloads

Heart of Azeroth in BFA Beta

VaporAPX opened this issue ยท 12 comments

commented

Not so much an issue as a request, I use ouf_DrK for my unit frames and it contains an artifact xp bar, the author has told me that the info for this bar is pulled from this. As of current it doesn't show the xp for the Heart of Azeroth and I'm just wondering if there will be support for it?

Thanks in advance.

commented

Please give #4 a go if you can or poke the author of oUF_DrK

commented

I get the following error when using the updated version (which I have also submitted to the oUF_DrK author who has recently been assisting me with updating his addon as well). Not sure if this is an issue for you or him, so I've submitted it regardless.

3x oUF_Drk\units\player-Player.lua:261: attempt to compare number with nil
oUF_Drk\units\player-Player.lua:261: in function <oUF_Drk\units\player.lua:255>
(tail call): ?
(tail call): ?
oUF\ouf-@[email protected]:206: in function <oUF\ouf.lua:195>
(tail call): ?
[C]: in function `Show'
FrameXML\SecureStateDriver.lua:83: in function <FrameXML\SecureStateDriver.lua:73>
FrameXML\SecureStateDriver.lua:137: in function <FrameXML\SecureStateDriver.lua:119>
Locals:
self = {
__owner = oUF_DrkPlayerFrame {
}
current = 934
PostUpdate = defined @oUF_Drk\units\player.lua:255
color =

{
}
Text = {
}
UpdateColor = defined @oUF_ArtifactPower\oUF_ArtifactPower.lua:232
ForceUpdate = defined @oUF_ArtifactPower\oUF_ArtifactPower.lua:317
max = 1250
unusableColor =
{
}
level = 3
bg = {
}
0 =
}
event = "OnShow"
isShown = 934
(*temporary) = defined =[C]:-1
(*temporary) = {
0 =
}
(*temporary) = "%d / %d%s"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to compare number with nil"

commented

The BfA version is not a drop-in replacement of the old one, the layout has to adapt for the changes I introduced. The pull request linked above has a list of those changes.

commented

Working on it right now. However there will be some slight changes and layout authors may have to adapt. I am also unsure if I'll be able to release a version that works both on Live and Beta.

commented

Adapted the layout for the changes and it should hopefully be working now. I can't test it myself though since I don't have beta access, so I need to wait for feedback from Vapor.

Thanks for the great plugin. ๐Ÿ‘

commented

Thanks for your support! I can take a look of the changes you made too (probably tomorrow)

commented

@VaporAPX I had a stupid mistake in the Update function which led to the bar not updating properly for azerite power. See 746b3a0. Please update your copy

commented

With the update, it still doesn't track anything related to azerite.
No errors, the bar simply doesn't track your azerite power (bar sits at 100% full, no mouseover functionality at all)
This is what I use to create the bar
` --create the Artifact Bar
bars.createArtifactPowerBar = function(self)

local cfg = self.cfg.ArtifactPower
if not cfg.show then return end

local w, h = 365, 5

-- Create the Bar Frame
local f = CreateFrame("StatusBar","Roth_UIArtifactPower",self)
f:SetFrameStrata("BACKGROUND")
f:SetFrameLevel(1)
f:SetSize(w,h)
f:SetPoint(cfg.pos.a1, cfg.pos.af, cfg.pos.a2, cfg.pos.x, cfg.pos.y)
f:SetScale(cfg.scale)
f:SetStatusBarTexture(cfg.texture)
f:SetStatusBarColor(.05,.5,.5)

--Add Drag Functionality
func.applyDragFunctionality(f)

--Add Text
local t = f:CreateFontString(nil,"TOOLTIP")
t:SetPoint("CENTER")
t:SetFontObject(GameFontHighlight)

--Create Bar Background
local bg = f:CreateTexture(nil,"BACKGROUND",nil,-8)
bg:SetAllPoints(f)
bg:SetTexture(cfg.texture)
bg:SetVertexColor(.05,.5,.5)
bg:SetAlpha(0.3)
f.bg = bg

--Add Mouseover
f:EnableMouse(true)

--Register with oUF
self.ArtifactPower = f

end`

commented

I would guess you forgot to load oUF_ArtifactPower.

commented

Since artifacts are "disabled" on live the associated API calls return weird high values that cause integer overflows. I temporarily fixed it by just commenting out the Artifact parts that are followed by elseif (HasArtifactEquipped()). Not sure if they can be safely removed, but my guess would be yes.

commented

Thanks for the report, I take a look into it. Haven't played on live yet since the pre-patch :)

commented

Strange enough I was able to reproduce the issue on only one character :) For now I changed it so that is won't show the bar if the equipped artifact is disabled. The reason is that I don't know if the pre-patch has been released on all regions yet.