oUF Perfect - Adding Other Debuff Types
Hey modders!
Let me start by saying thanks to anyone who develops mods and updated so quickly with the 3.0 change! My question is, I've started using oUF as it's the best unit frame mod on the market IMO and I've started using p3lim's template as well as his oUF_Perfect (http://www.wowinterface.com/download...UFPerfect.html). Included are small text overlays which tell when the raid/party member is poisoned/cursed (as p3lim plays a druid) but I would also like to add magic debuffs (and perhaps stuns). The lines of code where these are located is: oUF.Tags['[inner]'] = function(u) return UnitAura(u, 'Innervate') and '|cff00ff33Inn|r' or '' end oUF.Tags['[afk]'] = function(u) return UnitIsAFK(u) and '<AFK>' or '' end local function HasDType(unit, t) for i=1,40 do local name,_,_,_,dtype = UnitDebuff(unit, i) if(name and dtype == t) then return true end return false end end oUF.Tags['[curse]'] = function(u) return HasDType(u, 'Curse') and '|cff9900ffCu|r ' or '' end oUF.Tags['[poison]'] = function(u) return HasDType(u, 'Poison') and '|cff009900Po|r ' or '' end oUF.TagEvents['[smarthp]'] = 'UNIT_HEALTH' oUF.TagEvents['[smartpp]'] = 'UNIT_POWER UNIT_DISPLAYPOWER' oUF.TagEvents['[inner]'] = 'UNIT_AURA' oUF.TagEvents['[afk]'] = 'PLAYER_FLAGS_CHANGED' oUF.TagEvents['[curse]'] = 'UNIT_AURA' oUF.TagEvents['[poison]'] = 'UNIT_AURA' My question is do I just add lines that say: oUF.Tags['[magic]'] = function(u) return HasDType(u, 'Magic') and '<color> ' or '' end oUF.TagEvents['[magic]'] = 'UNIT_AURA' Last time I tried to edit LUA like this (beyond positioning, text, and textures) I broke the addon, so just wanted to run this idea by the people who actually know what to do before breaking anything else :) |
It should work, but test before asking :)
|
Haven't found a willing soul to group with me to test, but as a more general LUA question, what will prevent it from showing my Mg tag when people are buffed, as aren't those magic?
Is there something in that code that will limit it to magic debuffs? EDIT: Restarted my coding, will edit again when I can get a magic debuff. |
Quote:
Quote:
|
All times are GMT -6. The time now is 01:03 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI