Hey guys, I am looking for a WeakAura or an AddOn that shows class icon over a friendly nameplate. Something like https://wago.io/P1aKl8fSn
which unfortunately shows it only for the enemy nameplate or something like this https://www.curseforge.com/wow/addons/platesclasses
but for retail.
Basically like the widged function from ThreatPlates.
As of 7.1.5 you canât modify friendly nameplates while inside instanced content.
I need it for arena and it works there. ThreatPlates provide such an option but I am using a different nameplate addon and canât make only the widged from TP work with my current addon.
A WeakAura does the trick too. I found one but itâs only for enemy nameplates.
Next time you enter an arena, do /etrace
then enable friendly nameplates, search the etrace window for ânameplateâ, and see if itâs using NAMEPLATE_UNIT_ADDED
or FORBIDDEN_NAMEPLATE_UNIT_ADDED
If itâs using the latter, you should just need to update the WA to support the forbidden added and removed events.
The WA is working, itâs just not doing what I need, which is why I am asking here for help.
Right, and I need more information on how friendly nameplates work in arenas in order to help you, hence my previous post.
It seems to be NAMEPLATE_UNIT_ADDED
https://imgur.com/20bCskl
I thought it might be possible to simply swap enemy nameplate for friendly in the current WA and thatâs about it.
Thatâs unfortunate. I looked through the WA code and Iâm not seeing anything thatâs explicitly limiting it to enemy nameplates.
Trigger:
function(allstates, event, unit)
if event == "NAME_PLATE_UNIT_ADDED" then
if UnitExists(unit) and string.match(unit, "nameplate") and UnitIsPlayer(unit) then
if UnitIsUnit("player", unit) then return end
local _, class = UnitClass(unit)
local icon = aura_env.class_icon[class]
for _, state in pairs(allstates) do
if UnitIsUnit(state.unit, unit) then
state.changed = true
state.show = false
end
end
allstates[unit] = {
changed = false,
show = true,
icon = icon,
unit = unit
}
end
end
if event == "NAME_PLATE_UNIT_REMOVED" then
for _, state in pairs(allstates) do
if state.unit == unit then
state.show = false
state.changed = true
end
end
end
return true
end
Text:
function()
if aura_env.state and aura_env.state.unit then
local region = aura_env.region
local plate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit)
if plate then
region:ClearAllPoints()
region:SetPoint("CENTER", plate, "LEFT", 3, 0)
region:SetParent(plate)
region:Show()
else
region:Hide()
end
end
end
Aside from filtering out the Personal Resource display it all looks reaction agnostic.
Ye, that was my issue.
Whatâs the second part?
So I finally bothered to turn off ElvUI so I could actually test the WA, and itâs definitely working on allies using default nameplates.
[added]
If you donât have sufficient permissions to post screenshots on the forums, you can wrap the url in code tags, `
(key to the left of 1) or the </>
button in the editor.
So it canât work with KUI nameplates then I assume?
Youâd need to change
local plate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit)
to whatever KUI uses.
[added]
Best guess:
local plate = KuiNameplates:GetNameplateForUnit(aura_env.state.unit)
[added-2]
Actually, Iâm confused because you said it was working with Enemy Nameplates, and I assume that means KUI ones so it must be hooking properly somehow.
Tried several things, no idea how you made it work.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.