View Single Post
05-27-13, 12:23 PM   #7
Aerials
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 92
Here's the parts I changed (I think they were changed at least 10%, allowing me to post this even if it's copyrighted, I can't find ANY copyright info for the plugin anywhere, so dono how legal this is...)

I added:
Lua Code:
  1. wsb.Visibility:RegisterEvent("PLAYER_ENTERING_WORLD")
to the visibility part.... he has a comment indicating that he's pissed that it doesn't show when logging in... this is a pretty easy fix, IMO...

and I changed something to:
Lua Code:
  1. local maxshards = 4 -- 3. They got rid of the glyph and made 4 baseline.
  2.             --[[
  3.             for i = 1, GetNumGlyphSockets() do
  4.                 local glyphID = select(4, GetGlyphSocketInfo(i))
  5.                 if glyphID == SPEC_WARLOCK_AFFLICTION_GLYPH_SHARDS then maxshards = 4 end
  6.             end        
  7.             --]]
I'm sure you can figure out how it was....

changed something else to:
Lua Code:
  1. local maxembers = 4 -- 3. They got rid of the glyph and made 4 baseline.
  2.             --[[
  3.             for i = 1, GetNumGlyphSockets() do
  4.                 local glyphID = select(4, GetGlyphSocketInfo(i))
  5.                 if glyphID == SPEC_WARLOCK_DESTRUCTION_GLYPH_EMBERS then maxembers = 4 end
  6.             end        
  7.             --]]

then changed / added:

Lua Code:
  1. local wasMax = false -- this was added to the main variables at the top...
  2. [...]
  3. [2] = {150/255, 50/255,  150/255, 1}, -- Fury -- changed this color
  4. [...]
  5. [4] = {225/255, 115/255,  225/255, 1}, -- Full Fury -- added this color to the table

Lua Code:
  1. local power = UnitPower("player", SPELL_POWER_DEMONIC_FURY)
  2.             local maxPower = UnitPowerMax("player", SPELL_POWER_DEMONIC_FURY)
  3.             if power >= (maxPower - 20) then wasMax = true end
  4.             if power <= 20 then wasMax = false end
  5.            
  6.             if wasMax == false then
  7.                 wsb[1]:SetStatusBarColor(unpack(Colors[SPEC_WARLOCK_DEMONOLOGY]))
  8.                 if wsb[1].bg then wsb[1].bg:SetAlpha(0.15) wsb[1].bg:SetTexture(unpack(Colors[SPEC_WARLOCK_DEMONOLOGY])) end
  9.             elseif wasMax == true then
  10.                 wsb[1]:SetStatusBarColor(unpack(Colors[SPEC_WARLOCK_DEMONOLOGY + 2]))
  11.                 if wsb[1].bg then wsb[1].bg:SetAlpha(0.15) wsb[1].bg:SetTexture(unpack(Colors[SPEC_WARLOCK_DEMONOLOGY + 2])) end
  12.             end
in two locations... they're in the visibility (when bar is spawned), and update. I was assuming people are sometimes going to log in and not enter combat at all (AH runs)... This seems redundant but I'm too lazy to think through the logic right now.

Do you see any possible issues with this all? do you know if there's a specific ammount in the default UI at which the bar will change color? It never seems to actually reach 0 and changes a bit before full...
  Reply With Quote