mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: show socket gems and consolidate enchant name DBC cache in item tooltips
Extends OnlineItemInfo to track gem enchant IDs (socket slots 2-4) from item update fields; socket display now shows inserted gem name inline (e.g. "Red Socket: Bold Scarlet Ruby"). Consolidates redundant SpellItemEnchantment DBC loads into one shared static per tooltip variant.
This commit is contained in:
parent
167e710f92
commit
d7c377292e
3 changed files with 133 additions and 116 deletions
|
|
@ -2135,6 +2135,12 @@ public:
|
|||
if (it == onlineItems_.end()) return {0, 0};
|
||||
return {it->second.permanentEnchantId, it->second.temporaryEnchantId};
|
||||
}
|
||||
// Returns the socket gem enchant IDs (3 slots; 0 = empty socket) for an item by GUID.
|
||||
std::array<uint32_t, 3> getItemSocketEnchantIds(uint64_t guid) const {
|
||||
auto it = onlineItems_.find(guid);
|
||||
if (it == onlineItems_.end()) return {};
|
||||
return it->second.socketEnchantIds;
|
||||
}
|
||||
uint64_t getVendorGuid() const { return currentVendorItems.vendorGuid; }
|
||||
|
||||
/**
|
||||
|
|
@ -2633,6 +2639,7 @@ private:
|
|||
uint32_t maxDurability = 0;
|
||||
uint32_t permanentEnchantId = 0; // ITEM_ENCHANTMENT_SLOT 0 (enchanting)
|
||||
uint32_t temporaryEnchantId = 0; // ITEM_ENCHANTMENT_SLOT 1 (sharpening stones, poisons)
|
||||
std::array<uint32_t, 3> socketEnchantIds{}; // ITEM_ENCHANTMENT_SLOT 2-4 (gems)
|
||||
};
|
||||
std::unordered_map<uint64_t, OnlineItemInfo> onlineItems_;
|
||||
std::unordered_map<uint32_t, ItemQueryResponseData> itemInfoCache_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue