View Single Post
01/10/15, 09:55 PM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Sonar View Post
Well I'm trying to use ExecuteTradingHouseSearch to get a list of items in guild stores, but it returns only names and I need their itemIds/links.
You should be using GetTradingHouseSearchResultItemLink instead of GetTradingHouseSearchResultItemInfo.

lua Code:
  1. local function OnSearchResultsReceived(eventId, guildId, numItemsOnPage, currentPage, hasMorePages)
  2.     for i = 1, numItemsOnPage do
  3.         local itemLink = GetTradingHouseSearchResultItemLink(i)
  4.         local itemId = select(4, ZO_LinkHandler_ParseLink(itemLink)) --return value is a string
  5.         d(itemId)
  6.     end
  7. end
  8.  
  9. EVENT_MANAGER:RegisterForEvent("MyUniqueName", EVENT_TRADING_HOUSE_SEARCH_RESULTS_RECEIVED, OnSearchResultsReceived)
  Reply With Quote