View Single Post
03-05-18, 03:18 AM   #8
FranekW
A Cyclonian
 
FranekW's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 44
Thanks for the link. My addon will be super basic I also found WoWWiki with plenty of links and suggestions.

Just one question. If I want to check if buff exists, is it all right if I just check UnitBuff() itself, e.g.:

Lua Code:
  1. -- code
  2. if UnitBuff("PLAYER", buff) then
  3.     -- code to calculate times
  4. end

or should I always test variables returned from the function:

Lua Code:
  1. local _, _, _, _, _, dur, exptime = UnitBuff("PLAYER", buff)
  2. if dur and exptime then
  3.     -- code to calculate times
  4. end

Thanks
  Reply With Quote