WoW API < GetPlayerBuffTimeLeft

Retrieve info about a certain player buff of a certain type.

buffTimeLeft = GetPlayerBuffTimeLeft(buffIndex);

Parameters[edit | edit source]

Arguments[edit | edit source]

  • buffIndex (number) - The index of the buff to retrieve. Can be obtained with GetPlayerBuff

Returns[edit | edit source]

  • buffTimeLeft (number) - The time, in seconds, left until the buff expires.

Examples[edit | edit source]

local timeLeft = GetPlayerBuffTimeLeft(buffIndex)

Result - Retrieves amount of time left of the first buff you have.

 for i=0,31 do
  local id,cancel = GetPlayerBuff(i,"HELPFUL|HARMFUL|PASSIVE");
  if(id > -1) then
    local timeleft = GetPlayerBuffTimeLeft(id);

Result - Will display your buff/debuff durations.

See Also[edit | edit source]

Community content is available under CC-BY-SA unless otherwise noted.