View Single Post
08-04-14, 06:35 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Re-read the documentation. The 8th return value is a string identifying the unit that cast the buff; the expiration time is arg7. Also, there's really no reason to use select here; it's just slowing things down for no reason.

Code:
function()
     local _, _, _, _, _, duration, expirationTime = UnitBuff("player", "Blutschild")
     return expirationTime
end
Or, if your function needs to return the amount of time left (instead of the time at which it ends) do this:

Code:
function()
     local _, _, _, _, _, duration, expirationTime = UnitBuff("player", "Blutschild")
     return expirationTime - GetTime()
end
__________________
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