View Single Post
12-08-14, 08:58 AM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The problem is as I described -- buffs cast by players who are not currently in your group will also have a nil caster. If you don't care about that (mainly an issue in town) then no, you don't need to check that you're in an instance.

Also:

1. You may want to show all debuffs on yourself, even if you can't dispel them.

2. You can combine the first and third of these checks:
Code:
        -- show when debuff and by me
        elseif icon.isDebuff and isPlayer[caster] then
            return true
        -- show stealable buffs
        elseif isStealable and not icon.isDebuff then
            return true
        -- show when by me and is not debuff
        elseif isPlayer[caster] and not icon.isDebuff then
            return true
Since you want to show anything you cast, regardless of whether it's a debuff or not, you don't need to check if it is a debuff, and then again if it's not a debuff.
__________________
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