Add clickable item links in chat with stat tooltips

Parse WoW item link format (|cXXXXXXXX|Hitem:ENTRY:...|h[Name]|h|r)
in chat messages. Item names render in quality color, hover shows
tooltip with slot type, armor, and stats. Shift-click inserts the
item link into the chat input. Automatically queries server for
item info on first encounter.
This commit is contained in:
Kelsi 2026-02-14 15:58:54 -08:00
parent 148f63cffe
commit e0e927cac1
2 changed files with 214 additions and 25 deletions

View file

@ -765,6 +765,11 @@ public:
auto it = itemInfoCache_.find(itemId);
return (it != itemInfoCache_.end()) ? &it->second : nullptr;
}
// Request item info from server if not already cached/pending
void ensureItemInfo(uint32_t entry) {
if (entry == 0 || itemInfoCache_.count(entry) || pendingItemQueries_.count(entry)) return;
queryItemInfo(entry, 0);
}
uint64_t getBackpackItemGuid(int index) const {
if (index < 0 || index >= static_cast<int>(backpackSlotGuids_.size())) return 0;
return backpackSlotGuids_[index];