mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
b5291d1883
commit
14f672ab6a
1 changed files with 5 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue