Pre-query vendor item information to avoid placeholder display

Proactively call ensureItemInfo() for both vendor items and buyback items
during rendering. This ensures item names and stats are available before
display, eliminating "Item <id>" placeholders and providing instant tooltip
info, matching the pattern used for quest rewards and action bar items.
This commit is contained in:
Kelsi 2026-03-11 19:29:10 -07:00
parent b5291d1883
commit 14f672ab6a

View file

@ -7756,6 +7756,8 @@ void GameScreen::renderVendorWindow(game::GameHandler& gameHandler) {
// Show only the most recently sold item (LIFO).
const int i = 0;
const auto& entry = buyback[0];
// Proactively ensure buyback item info is loaded
gameHandler.ensureItemInfo(entry.item.itemId);
uint32_t sellPrice = entry.item.sellPrice;
if (sellPrice == 0) {
if (auto* info = gameHandler.getItemInfo(entry.item.itemId); info && info->valid) {
@ -7819,6 +7821,9 @@ void GameScreen::renderVendorWindow(game::GameHandler& gameHandler) {
ImGui::TableNextRow();
ImGui::PushID(vi);
// Proactively ensure vendor item info is loaded
gameHandler.ensureItemInfo(item.itemId);
ImGui::TableSetColumnIndex(0);
auto* info = gameHandler.getItemInfo(item.itemId);
if (info && info->valid) {