Pitbull4_Shields

Pitbull4_Shields

44.4k Downloads

Lua Error

matse4 opened this issue ยท 4 comments

commented

Using Pitbull V4.0.0-beta54 and Pitbull4_Shields V6000-2.0.1.
When I activate the Shield Addon I get this Error and no Pitbull Frames:

2x PitBull4_Shields\PitBull4_Shields-v60000-2.0.1.lua:59: attempt to index field 'elements' (a nil value)
PitBull4_Shields\PitBull4_Shields-v60000-2.0.1.lua:59: in function ?' PitBull4\Main.lua:941: in functionCallMethodOnModules'
PitBull4\UnitFrame.lua:630: in function func' PitBull4\Main.lua:1676: in function <PitBull4\Main.lua:1670> (tail call): ? PitBull4\UnitFrame.lua:85: in functionfunc'
PitBull4\Main.lua:1676: in function <PitBull4\Main.lua:1670>
(tail call): ?
PitBull4\Main.lua:1278: in function `OnProfileChanged'
PitBull4\Main.lua:1367: in function <PitBull4\Main.lua:1337>
(tail call): ?

[string "safecall Dispatcher[1]"]:9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?
...ceBaggins\libs\AceAddon-3.0\AceAddon-3.0-12.lua:558: in function EnableAddon' ...ceBaggins\libs\AceAddon-3.0\AceAddon-3.0-12.lua:651: in function <...ceBaggins\libs\AceAddon-3.0\AceAddon-3.0.lua:636> [C]: in functionLoadAddOn'
FrameXML\UIParent.lua:327: in function UIParentLoadAddOn' FrameXML\UIParent.lua:401: in functionTimeManager_LoadUI'
FrameXML\UIParent.lua:828: in function <FrameXML\UIParent.lua:789>

Locals:
nil

commented

Interesting. I think I have a workaround that should work; will push it shortly.

commented

I've pushed a change to fix this in e6d8b09 but curseforge seems to be having issues with letting me push the update there, so might take a bit of time to get it into Curse.

commented

Thanks works perfect (updated directly from GitHub).
Is it possible to show Shield bar width relative to maximum HP?

commented

The tricky part is that you can't easily dynamically change the pixel size of the bar in pitbull, and shields can sometimes get very much larger than the target's health. You could do something like set the shield bar to be the same size as the health bar (since generally shield amount < max health), and then fill it proportionally so that visually 1 pixels of health = 1 pixel of shield; that's require an option to change the value -> pixel size formula, but would be pretty easy to do.

I'll open another "feature request" ticket to work on that and add you to it so you can track.