Alright - I've created an addon and managed it for a few months now. It is mostly for personal use. Now with the current changes to some of the abilities in 3.1 I've run into a problem.
What the addon does is it creates bars for certain paladin unique spells such as Beacon of Light and Sacred Shield. With 3.1 - Sacred Shield can only be applied to one target at a time, and it seems that my dispel-checking/bar-removal code isn't working properly when a spell is applied on another target. The spell that doesn't actually exist any longer on the target who had the spell before it was put on another target still shows.
The problem has always been there with Beacon of Light - as that has always been a "one-target-only" spell. It just wasn't annoying because you rarely cast it unless it has already run out.
function xx:CombatLogHandler(event, timestamp, clevent, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, spellId, spellName)
if clevent == "SPELL_HEAL" then
local token = nameLookup[spellId]
if token and srcGUID == playerGUID and track[token].enabled then
elseif clevent == "SPELL_AURA_REMOVED" and srcGUID == playerGUID then
local id = makeBarId(spellId, dstName)
if self.bars[id] then
SPELL_AURA_REMOVED does fire for when you move Beacon of Light from one player to another. But why watch for such an event in the first place when clevent == "SPELL_AURA_APPLIED" and srcGUID == playerGUID means anyway that the old one is removed and you need to update the bar?
Uhm, I used AURA_REMOVED previously because I didn't want Sacred Shield to disappear when applying it twice - anyway, I'm not sure what you're getting at. How would adding SPELL_AURA_APPLIED solve the problem?
And how would I best implement that to my code? Just changing SPELL_AURA_REMOVED with APPLIED makes no difference at all - and being fairly new to lua, I haven't really gotten into the whole checking if the bar already exists process.
I've been looking around for quite a while now trying to find some documentation on LibBars-1.0. I'm having trouble finding any, to say the least. I've been going through the lua of the library but I still can't figure out quite how to solve this problem.