View Single Post
02-15-15, 02:20 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You'll probably have to wait for someone who actually uses WeakAuras, but my best guess would be that the problem lies elsewhere, and your function simply isn't getting run when you cast Lifebloom on someone else. Add some print statements to see what's going on in your function:
Code:
function()
    local name, _, _, _, _, _, duration, expirationTime = UnitBuff("player", "Lifebloom", nil, "PLAYER")
    if name then
        print("Lifebloom found on player")
        return duration or 0, expirationTime or 0
    end
    if not IsInGroup() then
        print("Not in a group")
        return
    end
    
    local unit, n = "raid", GetNumGroupMembers()
    if not IsInRaid() then
        unit, n = "party", n - 1
    end
    print("Scanning", n, unit, "members...")
    for i = 1, n do
        local name, _, _, _, _, _, duration, expirationTime = UnitBuff(unit..i, "Lifebloom", nil, "PLAYER")
        if name then
            print("Lifebloom found on", unit..i)
            return duration or 0, expirationTime or 0
        end
    end
    print("Lifebloom not found")
end
If you don't see anything when you cast Lifebloom on someone else, look around for options that might be ignoring events about other players.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote