View Single Post
08-15-15, 01:06 PM   #8
Endzeit
A Deviate Faerie Dragon
Join Date: Aug 2015
Posts: 12
Lua Code:
  1. --  Chat Hook
  2. ChatFrame_AddMessageEventFilter("CHAT_MSG_LOOT",function(self,event,msg,...)
  3.     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)
  4.     if ItemSetNames[id] then return false,msg.." (|cff9400d3Transmog Sets: "..string.join(", ",unpack(ItemSetNames[id])).."|r).",...; end
  5. end);

works.. but it also show loot from other player.. this should not happen. i tried this:
Lua Code:
  1. --  Chat Hook
  2. ChatFrame_AddMessageEventFilter("CHAT_MSG_LOOT",function(self,event,msg,...)
  3.     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)
  4.     if ItemSetNames[id] and LOOT_ITEM_PUSHED_SELF or LOOT_ITEM_SELF ~= nil then return false,msg.." (|cff9400d3Transmog Sets: "..string.join(", ",unpack(ItemSetNames[id])).."|r).",...; end
  5. end);
this works for myself.. but get lua errors if other player loot items.
  Reply With Quote