this cannot be working like this
for example playername: "Killer"
target returns "Killer"
UnitName("player") returns "Killer nil"
Lua Code:
ChatFrame_AddMessageEventFilter("CHAT_MSG_LOOT",function(self,event,msg,_,_,_,target, ...)
local name, realm = UnitName("player")
if target==name then
local id=tonumber(msg:match("|Hitem:(%d+)")) or 0;-- Force nil to zero if we have an invalid link (no items exist at index zero)
if ItemSetNames[id] then return false,msg.." (|cff9400d3Transmog Sets: "..string.join(", ",unpack(ItemSetNames[id])).."|r).",...; end
end
end);
this works for UnitName("player"), cant check now if it works for other players