From e42270f762bfe920b336da1e4426742c4249a0c0 Mon Sep 17 00:00:00 2001 From: chairmanpow Date: Tue, 6 Oct 2026 17:05:56 +0100 Subject: [PATCH] ui: seed the auction class tree before addons load, so Tmog's ItemDB builds --- crates/benilla-app/src/ui_script/lifecycle.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/benilla-app/src/ui_script/lifecycle.rs b/crates/benilla-app/src/ui_script/lifecycle.rs index 3555dbd8..9d6b3086 100644 --- a/crates/benilla-app/src/ui_script/lifecycle.rs +++ b/crates/benilla-app/src/ui_script/lifecycle.rs @@ -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::(); + let subclasses = world.get_resource::(); + script.set_auction_item_classes(crate::ui_auction::categories(classes, subclasses)); + } // Screen size and measurer before the first ``: 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.