mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-27 01:00:13 +00:00
refactor: consolidate duplicate enchantment name cache in inventory tooltips
Extract getEnchantmentNames() to share a single SpellItemEnchantment.dbc cache between both renderItemTooltip overloads, replacing two identical 19-line lazy-load blocks with single-line references.
This commit is contained in:
parent
a491202f93
commit
97b44bf833
2 changed files with 13 additions and 27 deletions
|
|
@ -163,6 +163,7 @@ private:
|
|||
game::EquipSlot equipSlot,
|
||||
int bagIndex = -1, int bagSlotIndex = -1);
|
||||
void renderItemTooltip(const game::ItemDef& item, const game::Inventory* inventory = nullptr, uint64_t itemGuid = 0);
|
||||
const std::unordered_map<uint32_t, std::string>& getEnchantmentNames();
|
||||
|
||||
// Held item helpers
|
||||
void pickupFromBackpack(game::Inventory& inv, int index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue