View Single Post
08/11/14, 04:24 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
I think this is a bug on ZOS side, here is workaround:
Lua Code:
  1. local function GetFormatedItemLink(bagId, slotId, linkStyle)
  2.    local link = GetItemLink(bagId, slotId, linkStyle)
  3.    if link == "" then return end
  4.  
  5.    local name = zo_strformat(SI_TOOLTIP_ITEM_NAME, GetItemName(bagId, slotId))
  6.    local data = link:match("|H.-:(.-)|h")
  7.  
  8.    if linkStyle == LINK_STYLE_BRACKETS then
  9.       return ("|H%s:%s|h[%s]|h"):format(LINK_STYLE_BRACKETS, data, name)
  10.    else
  11.       return ("|H%s:%s|h%s|h"):format(LINK_STYLE_DEFAULT, data, name)
  12.    end
  13. end
  14.  
  15. function pickupTest(type, param1, bagId, slotIndex, param4, param5, param6, itemSoundCategory)
  16.    CHAT_SYSTEM:AddMessage(">>>"..GetFormatedItemLink(bagId, slotIndex, LINK_STYLE_BRACKETS))
  17. end
  18. EVENT_MANAGER:RegisterForEvent("MyPickupTester", EVENT_CURSOR_PICKUP, pickupTest)
  Reply With Quote