Well, I can't tell you why that doesn't work with WeakAuras I don't use it, but you can reduce quite a bit of duplication in your code:
Code:
local name, _, _, _, _, _, expirationTime = UnitBuff("player", "Lifebloom", nil, "PLAYER")
if name then
return expirationTime or 0
end
if not IsInGroup() then
return
end
local unit, n = "raid", GetNumGroupMembers()
if not IsInRaid() then
unit, n = "party", n - 1
end
for i = 1, n do
local name, _, _, _, _, _, expirationTime = UnitBuff(unit..i, "Lifebloom", nil, "PLAYER")
if name then
return expirationTime or 0
end
end