Lore archive · Warcraft Wiki, 2023 dump
API GetPlayerBuffTimeLeft
Last wiki revision 2020-01-08
Retrieve info about a certain player buff of a certain type. buffTimeLeft = GetPlayerBuffTimeLeft(buffIndex);
- buffIndex : The index of the buff to retrieve. Can be obtained with GetPlayerBuff
- buffTimeLeft : The time (in seconds) left until the buff expires.
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); DEFAULT_CHAT_FRAME:AddMessage(timeleft); end end
- Result : Will display your buff/debuff durations.
- GetPlayerBuff
- GetPlayerBuffTexture
Source
https://warcraft.wiki.gg/wiki/API_GetPlayerBuffTimeLeft · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.