Quantcast
(Weakauras) Duration info raid/party - WoWInterface
Thread Tools Display Modes
02-14-15, 02:47 PM   #1
dihavs
A Murloc Raider
Join Date: Feb 2015
Posts: 5
(Weakauras) Duration info raid/party

I'm trying to track the time remaining of Lifebloom casted on raidtargets but can't seem to get this working, maybe I just got off on the wrong foot and did it all wrong. Any help would be appreciated!

Code:
function()
    if not IsInGroup() then
        local has_lifebloom, _, _, _, _, _, expirationTime = UnitBuff("player", "Lifebloom", nil, "PLAYER")
        if has_lifebloom then 
            return expirationTime or 0
        end 
    elseif IsInRaid() then 
        local group_size = GetNumGroupMembers()
        for i=1, group_size do
            local has_lifebloom, _, _, _, _, _, expirationTime = UnitBuff("raid"..i , "Lifebloom", nil, "PLAYER")
            if has_lifebloom then 
                return expirationTime or 0
            end
        end
    else 
        local group_size = GetNumGroupMembers() - 1
        for i=1, group_size do
            local has_lifebloom, _, _, _, _, _, expirationTime = UnitBuff("party"..i , "Lifebloom", nil, "PLAYER")
            if has_lifebloom then 
                return expirationTime or 0
            end
        end
        local has_lifebloom, _, _, _, _, _, expirationTime = UnitBuff("player", "Lifebloom", nil, "PLAYER")
        if has_lifebloom then 
            return expirationTime or 0
        end
    end 
end

Last edited by dihavs : 02-14-15 at 02:50 PM.
  Reply With Quote
02-14-15, 08:35 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
02-15-15, 03:03 AM   #3
dihavs
A Murloc Raider
Join Date: Feb 2015
Posts: 5
Tried that one, but it does not seem to work.

This one however does return the timer when I case Lifebloom on myself:

Code:
function()
    local _, _, _, _, _, duration, expirationTime = UnitBuff("player", "Lifebloom")
    return duration or 0, expirationTime or 0
end
So I modified your script to this to have it show the timer when I cast Lifebloom on raid/partymembers, but it doesnt show me the timer, any idea what's going wrong? Thanks for your efforts so far!

Code:
function()
    local name, _, _, _, _, _, duration, expirationTime = UnitBuff("player", "Lifebloom", nil, "PLAYER")
    if name then
        return duration or 0, 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, _, _, _, _, _, duration, expirationTime = UnitBuff(unit..i, "Lifebloom", nil, "PLAYER")
        if name then
            return duration or 0, expirationTime or 0
        end
    end
end
  Reply With Quote
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.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
02-16-15, 03:39 AM   #5
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
Post your WeakAura string. (using "Export to string" functionality).
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker
  Reply With Quote
02-16-15, 03:17 PM   #6
dihavs
A Murloc Raider
Join Date: Feb 2015
Posts: 5
Here's the WA string, or http://pastebin.com/jatCtM3p

Code:
dCemhbGif1LirQQrjKoLqmlkClkIDPagMaQJPKyzku5zKGAAsrCnPO2Mui(gLu14KcPZPqK5rIK7PG2hjsLdkalKe1djrknrkPYfvOSrfQ6JsbJukuoPcPvkuVKePWmjHUPuK2jLKFkfQgkjWsvGEQunvkXvjrSvsKQ8vsKIoRcH5Qqu7vL)ssdgDyrwSI8yLyYsPllzZuQpRKA0uuNwvVMskZMQUnr2nv(nHHlOLlQNRutNuxNO2ojiFxjPXtr68c06fq2p8TYz56PZYPV((6JBGapWinWiDDPR3E92ZY1nTXTT3L(gVjnPrAKvgPXz9R0CtgxJ2inpsJ7SnPjn56bBCB7DPVX3eRVjJuJA9JutgPM0S13Ka3Ob(SnPjnF9D5TvG4D6RRCJBXsJ3ufhB8wUEUw)cNLGH11xNfYHx3jlzj)Rxx59z1kx)BVUIVDn5fcPR7fP2ZY1L3L6IpT3301ZcFDwUUKSx)NLtF6RRt(YPplxxs2R)ZYPp91ZPL6SCDjzV(plN(0N(6LPHjxB1EkF6RVCwoRw5SC9ToTyTD)duDwnUMV(ViC301Tfo949P17R34kXIIJA1yxFkLvAfEr(SCwTYnERFKwzCJlWnst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s
A Murloc Raider
Join Date: Feb 2015
Posts: 5
This one here is actually printing the correct duration in "self" chatpanel but it's not showing the timer in the progressbar

Code:
function()
    local lbloom, _, _, _, _, _, expiration  = UnitAura("player", "Lifebloom", nil, "PLAYER")
    if (lbloom) then
        howlateisit = (expiration - GetTime())
        print (howlateisit)
        return (howlateisit)
    end
end
  Reply With Quote
02-16-15, 05:31 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by dihavs View Post
This one here is actually printing the correct duration in "self" chatpanel but it's not showing the timer in the progressbar
Didn't you establish earlier that WeakAuras needs 2 return values for a status bar? The code you just posted only provides one value.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
02-17-15, 07:47 AM   #9
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
Originally Posted by Phanx View Post
Didn't you establish earlier that WeakAuras needs 2 return values for a status bar? The code you just posted only provides one value.
Correct.
The duration function needs 2 and can handle 3 arguments.

for a time-based/animated statusbar: duration (#), expiration time (#)
for a value based/static statusbar: value (#), max-value (#), static (boolean: true)


The display-function should return true or false (and the hide function vice versa).
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker

Last edited by humfras : 02-17-15 at 07:57 AM.
  Reply With Quote
02-17-15, 09:01 AM   #10
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
You can do it like this:
http://pastebin.com/S6tTaxHy
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker
  Reply With Quote
02-18-15, 12:24 PM   #11
dihavs
A Murloc Raider
Join Date: Feb 2015
Posts: 5
Thank you for your efforts! Works perfect!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » (Weakauras) Duration info raid/party

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off