I'm trying to do some buff/debuff placement switching on whether or not my target is a player or an NPC. Since NPC's usually have a lot of debuffs and few buffs, and PC's usually have the opposite.
What I've tried so far:
Code:
if unit == "target" then
if (UnitIsPlayer("target")) then
self.Buff.blabla
self.Debuff.blabla
else
self.Buff.etc
self.Debuff.etc
end
end
But it's not working. Do I need to specify a "nil" response instead of just "else"? Have I misunderstood UnitIsPlayer?