Weakaura code help
So I'm not the original creator of this Weakaura, I can't remember where it's from unfortunately so I can't contact the creator of it either. This currently attaches a Diminishing Return icon next to nameplates, it's exactly what I want. BUT this also applies to friendly nameplates. I want that feature removed, and make it so it's only attached to Enemy / Attackable nameplates.
This is the code inside Trigger -> Custom -> Trigger State Updater(Advanced) -> Event(s) -> COMBAT_LOG_EVENT_UNFILTERED, NAME_PLATE_UNIT_ADDED, NAME_PLATE_UNIT_REMOVED, PLAYER_REGEN_DISABLED, PLAYER_REGEN_ENABLED Then this is inside the custom trigger there's this "function(allstates, event, ...) if event == 'PLAYER_REGEN_DISABLED' or event == 'PLAYER_REGEN_ENABLED' then aura_env.clean_drs() return false end if event == "NAME_PLATE_UNIT_ADDED" then local np = select(1, ...) return aura_env.track_plate(allstates, np) end if event == "NAME_PLATE_UNIT_REMOVED" then local np = select(1, ...) return aura_env.untrack_plate(allstates, np) end if event ~= 'COMBAT_LOG_EVENT_UNFILTERED' then aura_env.debug('returning early from event ' .. event) return end local sub_event = select(2, ...) if sub_event == "UNIT_DIED" then local dest_guid = select(8, ...) return aura_env.untrack_guid(allstates, dest_guid) end if sub_event == 'SPELL_AURA_REMOVED' or sub_event == 'SPELL_AURA_REFRESH' then return aura_env.check_aura(allstates, ...) end end Is there anything in that code that can be changed to only apply to enemies? Here's the entire Weakaura, might be easier - https://wago.io/VA0oXiTQ5 |
NAME_PLATE_UNIT_ADDED fires with a UnitID for what the nameplate is attached to. You can add a check on that by adding the highlighted lines to this code block.
Code:
if event == "NAME_PLATE_UNIT_ADDED" then |
All times are GMT -6. The time now is 03:30 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI