Nameplate Aura Filter
Fizzlemizz helped me with an addon a while ago to filter the nameplate auras by spell ID, and it works great. The only thing I wish I could do with it is stop it from filtering friendly nameplates. By default, friendly nameplates show all dispellable debuffs. You can't modify friendly nameplates in dungeon and raid instances, so I'd like to keep the debuffs consistent by disabling the filter on friendly nameplates.
Also, forgive my ignorance, but is there anywhere I can find a list of everything you can do with the WoW API (e.g. INCLUDE_NAME_PLATE_ONLY, Mixin, BUFF_MAX_DISPLAY, UnitIsUnit, etc.)? I'm just guessing at what these things do without much success. I'd like to learn how to write my own addons from start to finish, but I don't really know where to find good information. Most of the links I find in guides are outdated or no longer active. Code:
local whitelist = { |
You should be able to do something like changing:
Lua Code:
Lua Code:
So friendly units don't receive the filter. There may well be a better way. For documentation, WowPedia is probably the best other than asking questions here or one of the other WoW UI focused websites like the WoW UI forum or Discord |
Thanks so much for the response. It doesn't seem to work. All auras reset to default. Also, to clarify, I'd like my personal resource display to show whitelisted auras as well. I only want to ignore non-self friendly nameplates.
I replaced that function with: Lua Code:
It works for a bit, but then it starts filtering friendly nameplates again. I'm working on it, but not much luck. |
You want the whitelist on your character and other friendly "players".
Everyone else has no buffs or everyone else has all buffs? |
I want the whitelist to work on my personal resource display and enemy units. Because Blizzard made it so you can't modify friendly nameplates in dungeon and raid instances, I would like to ignore those units for consistency.
Self: Whitelisted buffs Friendlies: Blizzard's default auras (ignored by the Lua script) Enemies: Whitelisted debuffs The script in my previous post works the way I want it to at first and then at some point begins filtering friendly nameplates. I've only tested it in random battlegrounds, if that helps. |
Lua Code:
I had a go at reorganizing the code. Some notes:
NAME_PLATE_CREATED happens before UnitFrame is added, so stick with the original UNIT_ADDED event |
Hey, thanks for the help! It's not working at all. It defaults back to Blizzards nameplate auras. Here is the error report from BugGrabber:
Lua Code:
|
Kanegasi makes valid points and may well be closer to best method. This is a rework of the original with just an "ignore" for non-player friendlies.
I've been scratching my head as to if/why I would have redefined Mixin like that but... Lua Code:
|
Working perfectly, Fizzlemizz! Thanks both of you for the help, this is a huge improvement for my UI.
|
Sorry for re-posting, but I'm having another nameplate issue. I have a script that changes the width of nameplates, and it works as long as I'm not in combat when my interface is loaded. The nameplate settings are protected functions and cannot be modified in combat. A workaround for this might be to initiate the script whenever I leave combat in addition to when I load my interface for the first time. I'm trying to add PLAYER_LEAVE_COMBAT to PLAYER_LOGIN, but it's not working.
Lua Code:
EDIT: I got it working with PLAYER_REGEN_ENABLED, but I'm not sure that's always going to do the trick. There must be a better way to make the nameplates 85% of their normal width. |
There's an issue with having this code happen every time you leave combat. You're creating three frames that listen to the same event every time. Eventually, over the course of a play session, you will have dozens, eventually hundreds, of triggers that lag your game every time a new nameplate appears.
Also, what is the purpose of the one second delays? I reorganized your code so that only one frame is used. I'm assuming you want the SetScales to happen only when a nameplate appears and the three SetSizes to happen at login or end of combat. InCombatLockdown() reports true/false the status of UI combat protection, which turns on just a frame or so after PLAYER_REGEN_DISABLED and off a frame or so before PLAYER_REGEN_ENABLED. Lua Code:
|
Perhaps I should have been more clear. I didn't write the script, and I don't even remember where I found it. I eventually got it to work using OnUpdate at 0.1s intervals, but I don't know how optimal that is. I'm just learning this stuff from scratch, so most of it goes right over my head. I tried your script, and it's not working.
From BugSack: Lua Code:
|
Oops, missed some frame references to your variables that used to be local. Probably could've kept those local. My base goal with those was to put the three letter variables into indexes of the frame.
I edited my code above. I also shifted the setsizes around so that they happen every registered event. |
After testing it for a while, it's been working consistently, and it doesn't revert to default width anymore. Thanks for all your help again, and I hope this is useful to someone else as well.
|
This addon has stopped working recently. It shows no auras on nameplates. BugGrabber is not getting anything.
Lua Code:
I think this could have something to do with it(?): https://us.forums.blizzard.com/en/wo...ations/1205007 |
All times are GMT -6. The time now is 12:17 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI