View Single Post
08-11-14, 01:17 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Yeah, so just replace the part that queries combo points with a UnitBuff query, and the part that registers combo point events with a UNIT_AURA registration, in addition to renaming the element itself.

Also, please stop wasting resources looking up the buff name with GetSpellInfo every time UNIT_AURA fires -- look it up once and store it in a variable:

Code:
local ANTICIPATION = GetSpellInfo(115189)

local function Update(...)
   -- use the ANTICIPATION variable in here
end
and also stop wasting CPU time on calling select -- just ignore the first three returns:

Code:
local _, _, _, stacks = UnitBuff("player", ANTICIPATION)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote