08-27-16, 09:11 AM | #21 |
I'm sorry but I'm missing something crucial here..
I'm trying to impliment a similar feature into my UI addon, but Code:
local _, _, _, _, _, duration, expirationTime = UnitAura(PlayerFrame.unit, index, filter) if duration > 0 and expirationTime then -- This aura has a duration: BuffStatusBar:SetMinMaxValues(expirationTime - duration, expirationTime) else -- This aura doesn't have a duration: BuffStatusBar:SetMinMaxValues(0, 1) BuffStatusBar:SetValue(1) end Code:
if duration > 0 and expirationTime then I have everything else working except this. |
|
08-27-16, 12:04 PM | #22 |
There's still something wrong with the timers´
Lua Code:
|
|
08-28-16, 07:12 AM | #23 | |
2. As a general tip, it can be helpful to add some print statements to let you see when things are happening and what data the API is giving you. For example: Code:
hooksecurefunc("AuraButton_Update", function(self, index, filter) local ABuffFrame = _G[self..index] print("AuraButton_Update", self, index, filter, ABuffFrame) Code:
hooksecurefunc("AuraButton_Update", function(self, index, filter) local ABuffFrame = _G[self..index] if not ABuffFrame then return end
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. |
||
08-28-16, 08:22 AM | #24 |
Heres my full code: http://hastebin.com/uresuxiyug.lua
and Lua Code:
Worked all fine to remove all other if ... then besides Lua Code:
So i just added like you said and works all fine Lua Code:
But yet theres a mystery with the statubar buff timer, it doesn't seem to be updating correctly, whenever i first logg on or reload my ui, it works perfect, until i get my 2nd buff, it doesn't update correctly anymore. |
|
08-28-16, 01:58 PM | #25 |
You still have the same problem I already told you about several posts back:
Code:
local BuffStatusBar = ABuffFrame.StatusBar if not BuffStatusBar then -- Everything in here only runs the FIRST TIME a button is used! end -- Code out here runs every time the button updates. Edit: Also, you should move lines 212-237 into the "only run the first time" section. There's no need to run all that stuff over and over.
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. Last edited by Phanx : 08-28-16 at 02:00 PM. |
|
08-28-16, 02:20 PM | #26 |
Got this error.
Full Code:http://hastebin.com/edadejohag.lua Lua Code:
Lua Code:
|
|
08-28-16, 02:36 PM | #27 |
Got this error now.
Full Code: http://hastebin.com/cacosemema.lua Lua Code:
|
|
08-30-16, 07:10 AM | #28 |
bump still has issue!
Hope everyone had a good legion launch! |
|
08-30-16, 10:52 PM | #29 |
I just resorted to using ShinyBuffs instead of my old buff frame, and I rather like it.
Also I noticed zork's 7.0 git has a rBuffDurationBar? Not sure if published yet, but maybe you can get with him about using it if it is, he's great at those module addons that can just fit in whereever you need them :P |
|
08-31-16, 08:28 AM | #30 |
I like how I'm doing 100% of the work here, and you don't seem to be making any effort to debug or learn how any of the code is actually working.
I have neither the time nor the interest in figuring out exactly why you're actually getting that error, so just band-aid it: Code:
if BuffButton.timeLeft and BuffButton.StatusBar then
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Don’t message me about addon bugs or programming questions. |
|
08-31-16, 09:30 AM | #31 | |
|
||
02-15-17, 04:55 AM | #32 |
Managed to fix this yesterday, thanks Vlad & Phanx!
Lua Code:
|
|
WoWInterface » Developer Discussions » Lua/XML Help » Buff Timer to be Statusbar instead of text |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|