This is no longer a part of the World of Warcraft API .
Use UnitAura (or derived functions) to retrieve information about buffs.
It was removed in patch 3.0 .
Retrieve info about a certain player buff of a certain type.
buffTimeLeft = GetPlayerBuffTimeLeft(buffIndex);
Arguments Edit
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.
Read more
Flags/unflags the user for PvP combat. EnablePVP(); Arguments none Returns nil Example EnablePVP();
API EnablePVP
Determine if the current 'crafting' skill is the pet training one. isPetTraining = CraftIsPetTrainin
API CraftIsPetTraining
Returns the state of Auto Loot. state = GetAutoLootDefault(); This toggles Auto Loot on and off when
API GetAutoLootDefault