Quantcast [fixed] Missing furnishing categories in trading house interface - ESOUI
Thread Tools Display Modes
01/02/18, 10:24 AM   #1
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,127
[fixed] Missing furnishing categories in trading house interface

I noticed that there is no category for crafting stations in the vanilla trading house interface.
After some investigation I found that GetFurnitureCategoryInfo returns availableInTradingHouse=false for the "Services" category, even though it contains subcategories that return true.
The function InitializeHouseFurnitureCategoryTypeData then just ignores the whole category and doesn't even check the subcategories.

Changing it to look into subcategories regardless of the state of the parent category solves the problem:
Lua Code:
  1. local function InitializeHouseFurnitureCategoryTypeData()
  2.     for categoryIndex = 1, GetNumFurnitureCategories() do
  3.         local categoryId = GetFurnitureCategoryId(categoryIndex)
  4.         local categoryDisplayName, _, categoryAvailableInTradingHouse = GetFurnitureCategoryInfo(categoryId)
  5.         local numSubcategories = GetNumFurnitureSubcategories(categoryIndex)
  6.         if numSubcategories > 0 then
  7.             local subcategoryContainer = {}
  8.             ---subcategoryInfo arguments: nil, nil, text
  9.             local subcategoryInfo = {nil, nil, SI_TRADING_HOUSE_BROWSE_ITEM_TYPE_ALL}
  10.             table.insert(subcategoryContainer, subcategoryInfo)
  11.             for subcategoryIndex = 1, numSubcategories do
  12.                 local subcategoryId = GetFurnitureSubcategoryId(categoryIndex, subcategoryIndex)
  13.                 local subcategoryDisplayName, _, subcategoryAvailableInTradingHouse = GetFurnitureCategoryInfo(subcategoryId)
  14.                 if subcategoryAvailableInTradingHouse then
  15.                     ---subcategoryInfo arguments: filterKey, nil, text
  16.                     subcategoryInfo = {subcategoryId, nil, subcategoryDisplayName}
  17.                     table.insert(subcategoryContainer, subcategoryInfo)
  18.                     categoryAvailableInTradingHouse = true
  19.                 end
  20.             end
  21.             ZO_TRADING_HOUSE_FILTER_FURNITURE_CATEGORY_TYPE_DATA[categoryId] = subcategoryContainer
  22.         end
  23.         if categoryAvailableInTradingHouse then
  24.             --categoryInfo arguments: filterKey, nil, text, childKey
  25.             local categoryInfo = {categoryId, nil, categoryDisplayName, categoryId}
  26.             table.insert(ZO_TRADING_HOUSE_FILTER_FURNITURE_CATEGORY_TYPE_DATA["root"], categoryInfo)
  27.         end
  28.     end
  29. end

What I was actually looking for was how crafting stations and attunable stations are found in the vanilla store interface, but unfortunately they don't have any common ground and cannot be found in the same search.

Normal Crafting Stations:
Furniture Category / Subcategory: Services(25) > Crafting Stations(104)

Attunable Crafting Stations:
Furniture Category / Subcategory: ??? (shows in "All Furnishings")

I hope you can change it so the specialized itemtype and/or furniture category is identical for both.
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.

ESOUI » Developer Discussions » Bug Reports » [fixed] Missing furnishing categories in trading house interface

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