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:
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:
local maxshards = 4 -- 3. They got rid of the glyph and made 4 baseline.
--[[
for i = 1, GetNumGlyphSockets() do
local glyphID = select(4, GetGlyphSocketInfo(i))
if glyphID == SPEC_WARLOCK_AFFLICTION_GLYPH_SHARDS then maxshards = 4 end
end
--]]
I'm sure you can figure out how it was....
changed something else to:
Lua Code:
local maxembers = 4 -- 3. They got rid of the glyph and made 4 baseline.
--[[
for i = 1, GetNumGlyphSockets() do
local glyphID = select(4, GetGlyphSocketInfo(i))
if glyphID == SPEC_WARLOCK_DESTRUCTION_GLYPH_EMBERS then maxembers = 4 end
end
--]]
then changed / added:
Lua Code:
local wasMax = false -- this was added to the main variables at the top...
[...]
[2] = {150/255, 50/255, 150/255, 1}, -- Fury -- changed this color
[...]
[4] = {225/255, 115/255, 225/255, 1}, -- Full Fury -- added this color to the table
Lua Code:
local power = UnitPower("player", SPELL_POWER_DEMONIC_FURY)
local maxPower = UnitPowerMax("player", SPELL_POWER_DEMONIC_FURY)
if power >= (maxPower - 20) then wasMax = true end
if power <= 20 then wasMax = false end
if wasMax == false then
wsb[1]:SetStatusBarColor(unpack(Colors[SPEC_WARLOCK_DEMONOLOGY]))
if wsb[1].bg then wsb[1].bg:SetAlpha(0.15) wsb[1].bg:SetTexture(unpack(Colors[SPEC_WARLOCK_DEMONOLOGY])) end
elseif wasMax == true then
wsb[1]:SetStatusBarColor(unpack(Colors[SPEC_WARLOCK_DEMONOLOGY + 2]))
if wsb[1].bg then wsb[1].bg:SetAlpha(0.15) wsb[1].bg:SetTexture(unpack(Colors[SPEC_WARLOCK_DEMONOLOGY + 2])) end
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...