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