WoW:API GetPlayerBuffTimeLeft: Difference between revisions
Jump to navigation
Jump to search
GetPlayerBuffTimeLeft -Documentation by Sarf-
(Fixed error with buffIndex/buffId) |
No edit summary |
||
| Line 27: | Line 27: | ||
Retrieves amount of time left of the first buff you have. | Retrieves amount of time left of the first buff you have. | ||
or | |||
;''Example'' | |||
for i=0,31 do | |||
local id,cancel = GetPlayerBuff(i,"HELPFUL|HARMFUL|PASSIVE"); | |||
if(id > -1) then | |||
local timeleft = GetPlayerBuffTimeLeft(id); | |||
DEFAULT_CHAT_FRAME:AddMessage(timeleft); | |||
end | |||
end | |||
;''Result'' | |||
Will display your buff/debuff durations. | |||
---- | ---- | ||
;''Description'' | ;''Description'' | ||
Revision as of 21:25, 21 October 2006
Retrieve info about a certain player buff of a certain type.
buffTimeLeft = GetPlayerBuffTimeLeft(buffIndex)
- Arguments
- (Number buffIndex)
- buffIndex
- The index of the buff to retrieve. Can be obtained with GetPlayerBuff
- Returns
- (Number buffTimeLeft)
- buffTimeLeft
- The time (in seconds) left until the buff expires.
- Example
local timeLeft = GetPlayerBuffTimeLeft(buffIndex)
- Result
Retrieves amount of time left of the first buff you have.
or
- Example
for i=0,31 do
local id,cancel = GetPlayerBuff(i,"HELPFUL|HARMFUL|PASSIVE");
if(id > -1) then
local timeleft = GetPlayerBuffTimeLeft(id);
DEFAULT_CHAT_FRAME:AddMessage(timeleft);
end
end
- Result
Will display your buff/debuff durations.
- Description
- Retrieves time left until a certain buff expires.
- See Also