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.