WoW:API GetPlayerBuffTimeLeft: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
(Fixed error with buffIndex/buffId)
Line 3: Line 3:
Retrieve info about a certain player buff of a certain type.
Retrieve info about a certain player buff of a certain type.


buffTimeLeft = GetPlayerBuffTimeLeft(buffIndex);
buffTimeLeft = GetPlayerBuffTimeLeft(buffIndex)


----
----
Line 10: Line 10:
:(Number buffIndex)
:(Number buffIndex)


:;buffIndex : The id of the buff to retrieve.
:;buffIndex : The index of the buff to retrieve. Can be obtained with [[API GetPlayerBuff|GetPlayerBuff]]


----
----
Line 21: Line 21:
----
----
;''Example''
;''Example''
  local timeLeft = GetPlayerBuffTimeLeft(0);
  local timeLeft = GetPlayerBuffTimeLeft(buffIndex)


;''Result''
;''Result''

Revision as of 11:44, 14 February 2006

GetPlayerBuffTimeLeft -Documentation by Sarf-

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.


Description
Retrieves time left until a certain buff expires.
See Also

Template:WoW API