I think this is a bug on ZOS side, here is workaround:
Lua Code:
local function GetFormatedItemLink(bagId, slotId, linkStyle)
local link = GetItemLink(bagId, slotId, linkStyle)
if link == "" then return end
local name = zo_strformat(SI_TOOLTIP_ITEM_NAME, GetItemName(bagId, slotId))
local data = link:match("|H.-:(.-)|h")
if linkStyle == LINK_STYLE_BRACKETS then
return ("|H%s:%s|h[%s]|h"):format(LINK_STYLE_BRACKETS, data, name)
else
return ("|H%s:%s|h%s|h"):format(LINK_STYLE_DEFAULT, data, name)
end
end
function pickupTest(type, param1, bagId, slotIndex, param4, param5, param6, itemSoundCategory)
CHAT_SYSTEM:AddMessage(">>>"..GetFormatedItemLink(bagId, slotIndex, LINK_STYLE_BRACKETS))
end
EVENT_MANAGER:RegisterForEvent("MyPickupTester", EVENT_CURSOR_PICKUP, pickupTest)