View Single Post
Old 10-06-08, 06:46 AM   #47
Kellen
A Deviate Faerie Dragon
Join Date: Mar 2008
Posts: 18
I'm setting up player auras and wanted to have them displayed with a numeric duration next to them, like Elk's BuffBars (just time, I don't care about bars).

Looking at the Blizzard API's, it seems like you're only supposed to be able to get durations for things you cast. Elk's code gets around this (I think) with the follow type of code:

Code:
local buffIndex, untilCancelled = GetPlayerBuff(index, "HELPFUL")
local name, rank = GetPlayerBuffName(buffIndex)
local timeleft = GetPlayerBuffTimeLeft(buffIndex)
local timemax = timeleft
It also looks like there's a lookup table in there for recording/comparing the maximum time. Furthermore, I'm aware that the way you get aura information and calculate duration is changing, but until it does, I'd like to do things for the Live server.

I think I can duplicate this, but I'd love two pointers:

1. Is PostUpdateAuraIcon() the hook I want to be using for this? It seems to have the information I want and is per-aura.
2. If so, why is the 'index' parameter a table?

Still noobish with this stuff.
Kellen is offline