Quantcast
WoWInterface - View Single Post - oUF_AuraBars
Thread: oUF_AuraBars
View Single Post
09-19-12, 06:13 PM   #16
sirann
A Flamescale Wyrmkin
Join Date: Mar 2007
Posts: 142
First let me apologize for the misunderstanding that's seemingly occurred. I never removed your "Rewritten by Phanx" from the beginning instructions. If you look at your first pass at the code, it wasn't there. I must have copied it by mistake and thus it wasn't in my file. I will revise by saying I didn't touch the comment up there, the version I copied (mistakenly) did not have that comment.

Secondly, I want to thank you for the time you've put into writing this addon. It's hard for me to show appreciation, especially when you probably think I'm an idiot who keeps ****ing up your code and posting the oops aftermath.

Thirdly, your latest revision, 6276, you added the "or 0" to count. You also have to do this for duration, as timeless buffs/debuffs are set to nil, this messes with your later if statement and throws an error:
Lua Code:
  1. if aura.duration == 0 then
  2.     bar.duration, bar.expirationTime = nil, nil
  3.     bar:SetMinMaxValues(0, 1)
  4.     bar:SetValue(1)
  5.     bar.time:SetText(nil)
  6. else
  7.     bar.duration, bar.expirationTime = aura.duration, aura.expirationTime
  8.     --print (aura.duration)
  9.     bar:SetMinMaxValues(0, aura.duration)
  10.     -- No need to set the value or time text here; the OnUpdate will do it.
  11.     numAurasWithDuration = numAurasWithDuration + 1
  12. end

Line 46 should read: local format, min, next, pairs, type, sort = format, min, next, pairs, type, sort the type, sort were backwards. I also added if not name then break end to the Update function under the if filterFunc(...

Line 81 should read return a.duration > b.duration or maybe a.expirationTime > b.expirationTime. Either way expires won't work.

Line 221 was a function calling itself causing a stack overflow I believe:
Lua Code:
  1. function table_delete(t)
  2.         if type(t) == "table" then
  3.             for k, v in pairs(t) do
  4.                 --t[k] = table_delete(t)
  5.                 t[k] = nil
  6.             end
  7.             t[true] = true
  8.             t[true] = nil
  9.             pool[t] = true
  10.         end
  11.         return nil
  12.     end

The commented out code was the line you posted in your latest revision, the t[k] = nil was the line that was in your previous table_delete(t) function.

Fourthly, this is working exactly how I wanted it. I don't know what to say besides thank you for making a reality what I've dreamt about for a few years. My final request is to be able to color bars by dispelType, DebuffTypeColor[element.dispelType or "none"] for debuffs but not buffs

Last edited by sirann : 09-19-12 at 09:07 PM.
  Reply With Quote