Thread Tools Display Modes
12/21/16, 01:03 AM   #1
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Detect Trading House Mode

I wanted to be able to detect when I'm viewing browse/sell/listing. I thought these would do that:

ZO_TradingHouse_Shared:GetCurrentMode()
ZO_TradingHouse_Shared:SetCurrentMode(mode)
ZO_TradingHouse_Shared:IsInSellMode()
ZO_TradingHouse_Shared:IsInSearchMode()
ZO_TradingHouse_Shared:IsInListingsMode()

But they apparently don't.
  Reply With Quote
12/21/16, 08:14 AM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
TRADING_HOUSE ?

I never really looked at this part of game, but it should be a good start.
  Reply With Quote
12/23/16, 12:16 AM   #3
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
That is indeed where it was, thanks: TRADING_HOUSE.m_currentMode
  Reply With Quote
12/23/16, 07:31 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
If you find something like ZO_Tradinghouse it is the class/object used to store the functions etc.
There should always (or at least in most cases) be an instance of this object stored in a variable like TRADING_HOUSE or TRADING_HOUSE_GAMEPAD which you are able to access ingame then.

Check the source code of eso, here:
http://www.esoui.com/downloads/info1...ourcecode.html
http://esodata.uesp.net/current/index.html
https://github.com/esoui/esoui/tree/master/esoui/ingame

In the files you'll be able to find the info about the clases / Objects and their globally accessibla variables names (most of the time the filenames like tradinghouse.lua got the globally accessible variables near the top or bottom of the file names):

Filename:
https://github.com/esoui/esoui/blob/...e_keyboard.lua

At the bottom:

Lua Code:
  1. --[[ Globals ]]--
  2.  
  3. function ZO_TradingHouse_OnInitialized(self)
  4.     TRADING_HOUSE = ZO_TradingHouseManager:New(self)
  5.     SYSTEMS:RegisterKeyboardObject(ZO_TRADING_HOUSE_SYSTEM_NAME, TRADING_HOUSE)
  6. end
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Detect Trading House Mode

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off