View Single Post
01/15/18, 05:28 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
I'm not using MM and won't test nor support the addon in any way, but it may work and help:

Try to change the code in the file MasterMerchant.lua at lines 2324ff to the following:

Lua Code:
  1. function MasterMerchant:initBuyingAdvice()
  2.   if MasterMerchant.originalSetupCallback then return end
  3. --Inserted by Baertram - START
  4.   if TRADING_HOUSE.m_searchResultsList == nil then return false end
  5. --Inserted by Baertram - END
  6.   local dataType = TRADING_HOUSE.m_searchResultsList.dataTypes[1]
  7.  
  8.   MasterMerchant.originalSetupCallback = dataType.setupCallback
  9.   if MasterMerchant.originalSetupCallback then
  10.       dataType.setupCallback = function(...)
  11.           local row, data = ...
  12.           MasterMerchant.originalSetupCallback(...)
  13.           zo_callLater(function() MasterMerchant.AddBuyingAdvice(row, data) end, 25)
  14.       end
  15.   else
  16.       d(GetString(MM_ADVICE_ERROR))
  17.   end
  18. end

And in lines 2272ff then:
Lua Code:
  1. function MasterMerchant:initSellingAdvice()
  2.   if MasterMerchant.originalSellingSetupCallback then return end
  3. --Inserted by Baertram - START
  4.   if TRADING_HOUSE.m_postedItemsList == nil then return false end
  5. --Inserted by Baertram - END
  6.   local dataType = TRADING_HOUSE.m_postedItemsList.dataTypes[2]
  7.  
  8.   MasterMerchant.originalSellingSetupCallback = dataType.setupCallback
  9.   if MasterMerchant.originalSellingSetupCallback then
  10.       dataType.setupCallback = function(...)
  11.           local row, data = ...
  12.           MasterMerchant.originalSellingSetupCallback(...)
  13.           zo_callLater(function() MasterMerchant.AddSellingAdvice(row, data) end, 25)
  14.       end
  15.   else
  16.       d(GetString(MM_ADVICE_ERROR))
  17.   end
  18. end

I'm not sure what the addon is adding there (Buying/Selling advice) but the funcitons might not work with my changes then.
  Reply With Quote