mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: capture and display all item stat types in tooltips
Previously only the 5 primary stats (Str/Agi/Sta/Int/Spi) were stored, discarding hit rating, crit, haste, attack power, spell power, resilience, expertise, armor penetration, MP5, and many others. Changes: - Add ItemDef::ExtraStat and ItemQueryResponseData::ExtraStat arrays - All three expansion parsers (WotLK/TBC/Classic) now capture non-primary stat type/value pairs into extraStats instead of silently dropping them - All 5 rebuildOnlineInventory paths propagate extraStats to ItemDef - Tooltip now renders each extra stat on its own line with a name lookup covering all common WotLK stat types (hit, crit, haste, AP, SP, etc.) - Also fix Classic/TBC bag-content and bank-bag paths that were missing bindType, description propagation from previous commits
This commit is contained in:
parent
6075207d94
commit
321aaeae54
7 changed files with 84 additions and 3 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
namespace wowee {
|
||||
namespace game {
|
||||
|
|
@ -52,6 +53,9 @@ struct ItemDef {
|
|||
uint32_t requiredLevel = 0;
|
||||
uint32_t bindType = 0; // 0=none, 1=BoP, 2=BoE, 3=BoU, 4=BoQ
|
||||
std::string description; // Flavor/lore text shown in tooltip (italic yellow)
|
||||
// Generic stat pairs for non-primary stats (hit, crit, haste, AP, SP, etc.)
|
||||
struct ExtraStat { uint32_t statType = 0; int32_t statValue = 0; };
|
||||
std::vector<ExtraStat> extraStats;
|
||||
};
|
||||
|
||||
struct ItemSlot {
|
||||
|
|
|
|||
|
|
@ -1563,6 +1563,9 @@ struct ItemQueryResponseData {
|
|||
std::array<ItemSpell, 5> spells{};
|
||||
uint32_t bindType = 0; // 0=none, 1=BoP, 2=BoE, 3=BoU, 4=BoQ
|
||||
std::string description; // Flavor/lore text
|
||||
// Generic stat pairs for non-primary stats (hit, crit, haste, AP, SP, etc.)
|
||||
struct ExtraStat { uint32_t statType = 0; int32_t statValue = 0; };
|
||||
std::vector<ExtraStat> extraStats;
|
||||
bool valid = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue