I´ve done that in a different way, I´ve moved the pandemic bars to a different location so strata wouldn´t ever interfere.
Here´s a before:
Notice the pandemic bar for agony above all other bars.
Here´s after:
Interesting to note is that the icon still shows up. As if the code for the duration itself is broken at that point.
Here´s the fstack of the loot thing:
[IMG]blob:http://imgur.com/da4ca904-ea21-4a9d-bf4d-12ca68c558fa[/IMG]
And lastly here´s the code of one of the pandemic bars:
Trigger
Code:
function()
return true
end
Untrigger
Code:
function()
return false
end
Duration
Code:
function()
local spell,id = "Agony",980
if UnitExists("target") and UnitDebuff("target",spell,_,"PLAYER") then
WA_OOMM_PANDEMIC_AGONY = tonumber(GetSpellDescription(id):match("[%d]+[.%d+]* sec."):match("[%d]+[.%d+]*"))*0.3
local pandemic = WA_OOMM_PANDEMIC_AGONY
local _,_,_,_,_,duration = UnitDebuff("target",spell,_,"PLAYER")
return pandemic,duration,true
end
return 0,1,true
end
- - - Updated - - -
Update to that, used a text aura to test various things (it´s crude but ah well, I´m not a lua genius):
Code:
function()
local spell,id = "Agony",980
WA_OOMM_PANDEMIC_AGONY = tonumber(GetSpellDescription(id):match("[%d]+[.%d+]* sec."):match("[%d]+[.%d+]*"))*0.3
if UnitExists("target") then
WA_EXISTS = 1
else
WA_EXISTS = 0
end
if UnitDebuff("target",spell,_,"PLAYER") then
WA_DEBUFF = 1
else
WA_DEBUFF = 0
end
if UnitExists("target") and UnitDebuff("target",spell,_,"PLAYER") then
local debu = 1
local exists = 1
local pandemic = WA_OOMM_PANDEMIC_AGONY
WA_DUR = select(6, UnitDebuff("target",spell,_,"PLAYER"))
return "pand: " .. pandemic .. " dur: " .. WA_DUR .. " exists: " .. WA_EXISTS .. " debuff: " .. WA_DEBUFF
end
if WA_DUR == nil then
WA_DUR = "nil"
else
WA_DUR = WA_DUR
end
return "nothing to show, pand: " .. WA_OOMM_PANDEMIC_AGONY .. " dur: " .. WA_DUR .. " exists: " .. WA_EXISTS .. " debuff: " .. WA_DEBUFF
end
Following states:
1. before loot, without target
"nothing to show, pand: 5.4, dur: nil exists: 0 debuff: 0"
2. before loot, with target
"pand: 5.4 dur: 18 exists: 1 debuff: 0"
3. before loot, with target & dot
"pand: 5.4 dur: 18 exists: 1 debuff: 1"
4. after loot, without target
"nothing to show, pand: 5.4 dur: 23.098 exists: 0 debuff: 0"
5. after loot, with target
"nothing to show, pand: 5.4 dur: 23.098 exists: 1 debuff: 0"
6. after loot, with target & dot
"nothing to show, pand: 5.4 dur: 23.098 exists: 1 debuff: 0"
I am completely out of ideas why the loot window would do that to the variables listed, especially considering that I am setting them to 0 or 1 depending on the debuff state on the target.