Use GetRaidBuffInfo() to determine if a Buff is missing or not available
This commit is contained in:
parent
714393167f
commit
417a817f15
|
@ -124,6 +124,8 @@ local BrokerConsolidatedBuffs = LDB:NewDataObject("Broker_ConsolidatedBuffs", {
|
||||||
tooltip:AddSeparator()
|
tooltip:AddSeparator()
|
||||||
--tooltip:AddLine(" ")
|
--tooltip:AddLine(" ")
|
||||||
|
|
||||||
|
local buffmask = GetRaidBuffInfo() or 0
|
||||||
|
local mask = 1
|
||||||
for i = 1, NUM_LE_RAID_BUFF_TYPES do
|
for i = 1, NUM_LE_RAID_BUFF_TYPES do
|
||||||
local name, rank, texture, duration, expiration, spellId, slot = GetRaidBuffTrayAuraInfo(i)
|
local name, rank, texture, duration, expiration, spellId, slot = GetRaidBuffTrayAuraInfo(i)
|
||||||
local c
|
local c
|
||||||
|
@ -131,7 +133,11 @@ local BrokerConsolidatedBuffs = LDB:NewDataObject("Broker_ConsolidatedBuffs", {
|
||||||
if name then
|
if name then
|
||||||
c = "FF00FF00"
|
c = "FF00FF00"
|
||||||
else
|
else
|
||||||
|
if bit.band(buffmask, mask) > 0 then
|
||||||
c = "FFFF0000"
|
c = "FFFF0000"
|
||||||
|
else
|
||||||
|
c = "FF888888"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local classes = ""
|
local classes = ""
|
||||||
|
@ -151,6 +157,8 @@ local BrokerConsolidatedBuffs = LDB:NewDataObject("Broker_ConsolidatedBuffs", {
|
||||||
|
|
||||||
--tooltip:AddLine("\124T"..defaults[i][1]..":0\124t \124c"..c.._G["RAID_BUFF_"..i].."\124r "..list)
|
--tooltip:AddLine("\124T"..defaults[i][1]..":0\124t \124c"..c.._G["RAID_BUFF_"..i].."\124r "..list)
|
||||||
--tooltip:AddLine(" "..list)
|
--tooltip:AddLine(" "..list)
|
||||||
|
|
||||||
|
mask = bit.lshift(mask, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
tooltip:SmartAnchorTo(self)
|
tooltip:SmartAnchorTo(self)
|
||||||
|
@ -164,11 +172,14 @@ local BrokerConsolidatedBuffs = LDB:NewDataObject("Broker_ConsolidatedBuffs", {
|
||||||
|
|
||||||
OnClick = function(button)
|
OnClick = function(button)
|
||||||
local missing = ""
|
local missing = ""
|
||||||
|
local buffmask = GetRaidBuffInfo() or 0
|
||||||
|
local mask = 1
|
||||||
|
|
||||||
for i = 1, NUM_LE_RAID_BUFF_TYPES do
|
for i = 1, NUM_LE_RAID_BUFF_TYPES do
|
||||||
if not GetRaidBuffTrayAuraInfo(i) then
|
if not GetRaidBuffTrayAuraInfo(i) and bit.band(buffmask, mask) > 0 then
|
||||||
missing = missing .. _G["RAID_BUFF_"..i] ..", "
|
missing = missing .. _G["RAID_BUFF_"..i] ..", "
|
||||||
end
|
end
|
||||||
|
mask = bit.lshift(mask, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
if missing ~= "" then
|
if missing ~= "" then
|
||||||
|
@ -195,8 +206,10 @@ local function updateBuffs(self, event, unitID)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
BrokerConsolidatedBuffs.text = c.."/"..NUM_LE_RAID_BUFF_TYPES
|
local buffcount = select(2, GetRaidBuffInfo())
|
||||||
BrokerConsolidatedBuffs.value = c.."/"..NUM_LE_RAID_BUFF_TYPES -- for ElvUI datatexts
|
|
||||||
|
BrokerConsolidatedBuffs.text = c.."/"..max(c, buffcount)
|
||||||
|
BrokerConsolidatedBuffs.value = c.."/"..max(c, buffcount) -- for ElvUI datatexts
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue