There are internal tables used to hide some columns base on current filter:
Lua Code:
-- Inventory.lua
local typicalHiddenColumns =
{
["statValue"] = true,
}
local questHiddenColumns =
{
["statValue"] = true,
["age"] = true,
["stackSellPrice"] = true,
}
local gearHiddenColumns =
{
-- Don't hide anything!
}
local tradingHouseHiddenColumns =
{
["statValue"] = true,
["age"] = true,
}
You can get hold of these via backpack inventory, for example:
Lua Code:
-- untested
local function getHiddenColumnsByFilterType(inventory, filterType)
for i, tabData in ipairs(inventory.tabFilters) do
-- the second comparison is a bit of a hack;
-- unlike all other filters, TradingHouseFilter is a local function in Inventory.lua,
-- so we have no value to compare with -- compare type instead
if tabData.filterType == filterType or type(tabData.filterType) == filterType then
return tabData.hiddenColumns
end
end
end
local inventory = PLAYER_INVENTORY.inventories[INVENTORY_BACKPACK]
local typicalHiddenColumns = getHiddenColumnsByFilterType(inventory, ITEMFILTERTYPE_ALL)
local questHiddenColumns = getHiddenColumnsByFilterType(inventory, ITEMFILTERTYPE_QUEST)
local gearHiddenColumns = getHiddenColumnsByFilterType(inventory, ITEMFILTERTYPE_ARMOR)
local tradingHouseHiddenColumns = getHiddenColumnsByFilterType(inventory, "function")
-- then add a truthful value for "age"
typicalHiddenColumns["age"] = "hidden by add-on Foo"