Thread Tools Display Modes
10-11-16, 01:38 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Custom nameplate filter

This is the Blizzard nameplate debuff filter:
https://github.com/tomrus88/Blizzard...lates.lua#L134
This is the debuff filter in oUF_SimpleConfig (it is the same):
https://github.com/zorker/rothui/blo...eplate.lua#L78
You can use a custom filter in oUF to filter out specific icons.
This is how oUF will call you
https://github.com/oUF-wow/oUF/blob/.../aura.lua#L195
This is how you define the function in your layout:
https://github.com/p3lim-wow/oUF_P3l...P3lim.lua#L382
https://github.com/p3lim-wow/oUF_P3l...P3lim.lua#L218
Blizzard has this function here for aura filtering:
https://github.com/tomrus88/Blizzard...lates.lua#L435
Basically all you need to do is copy-cat that function and make it your nameplate custom filter.
Code:
local function CustomNameplateFilter(...)
  local _, _, _, name, _, _, _, _, _, _, caster, _, nameplateShowPersonal, _, _, _, _, nameplateShowAll = ...
  return nameplateShowAll or (nameplateShowPersonal and (caster == "player" or caster == "pet" or caster == "vehicle"))
end
self.Debuffs.CustomFilter = CustomNameplateFilter
Btw what was "shouldConsolidate" is now "nameplateShowPersonal". Maybe that should be changed in oUF/elements/aura.lua.
http://wowprogramming.com/docs/api/UnitDebuff
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Custom nameplate filter

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off