ui: seed the auction class tree before addons load, so Tmog's ItemDB builds
This commit is contained in:
@@ -337,6 +337,15 @@ pub(crate) fn load_ingame_ui_on_world_entry(world: &mut World) {
|
||||
// The world map's continent and zone lists: static DBC data in the reference, read at file
|
||||
// scope (Astrolabe builds its whole zone table from `GetMapContinents`/`GetMapZones` there).
|
||||
crate::ui_world_map::seed_world_map_catalog(world, &mut script);
|
||||
// The auction house's category tree, the other static DBC data the reference holds from load:
|
||||
// `Blizzard_AuctionUI.lua` reads `GetAuctionItemClasses()` at file scope, and addons such as
|
||||
// Tmog build their item-type tables from `GetAuctionItemSubClasses` there, before any session.
|
||||
// `feed_auction` recreates it per open; a nil `cloth` from an empty tree fails such a load.
|
||||
{
|
||||
let classes = world.get_resource::<crate::ui_items::ItemClasses>();
|
||||
let subclasses = world.get_resource::<crate::ui_items::ItemSubClasses>();
|
||||
script.set_auction_item_classes(crate::ui_auction::categories(classes, subclasses));
|
||||
}
|
||||
// Screen size and measurer before the first `<OnLoad>`: this VM is loaded before `tick_script`
|
||||
// seats either, and the load measures text (the stock tab template's `OnLoad` sizes from its
|
||||
// text width, `UIPanelTemplates.xml:370-373`), which answers 0 with no measurer.
|
||||
|
||||
Reference in New Issue
Block a user