View Single Post
01-03-09, 07:20 AM   #191
Xuerian
A Fallenroot Satyr
 
Xuerian's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 27
Originally Posted by p3lim View Post
1st argument is the event you want to register.
2nd argument is the function you want to assign to that event.
Indeed, that's as I'm registering it:
Code:
local function addDebuffs(self)
    local pc = playerClass
    if pc ~= "DRUID" and pc ~= "MAGE" and pc ~= "PRIEST" and pc ~= "SHAMAN" and pc ~= "PALADIN" then return nil end
    ...
    --self:RegisterEvent("UNIT_AURA", updateAura)
    self.PostUpdateAura = updateAura
    self.Buffs = CreateFrame("Frame")
end
The RegisterEvent line ends up with all enabled frames showing the debuff when one (Haven't figured out if it matters which...) has it.
The PostUpdateAura method works fine, though I'd rather not have the overhead of .Buffs.


What I don't get is that as I read it, I'm doing it exactly the same way that it's done in auras.lua.
One trigger method and it works exactly as expected, the other doesn't.

I'm testing this with a pally and a rogue in a group, on the scorpids outside of org. To illustrate, as seen from pally:
(RegisterEvent) Rogue gets poisoned, icon shows up on both pally (player) and rogue (party1). Cleanse poison, both icons vanish.
(PostUpdateAura) Rogue gets poisoned, icon shows up on rogue (party1). Cleanse poison, icon vanishes.

Last edited by Xuerian : 01-03-09 at 07:27 AM. Reason: STOP INJECTING SMILIES YOU TWISTED BBS