mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
148f63cffe
commit
e0e927cac1
2 changed files with 214 additions and 25 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue