feat: parse and display elemental resistances and race restrictions in item tooltips

- Store holyRes/fireRes/natureRes/frostRes/shadowRes/arcaneRes in ItemQueryResponseData
- Parse resistance fields in WotLK, TBC, and Classic parsers (previously discarded)
- Display non-zero resistances (e.g. "+40 Fire Resistance") in both tooltip paths
- Add getPlayerRace() accessor to GameHandler
- Show race restriction line (e.g. "Races: Blood Elf, Draenei") in both tooltip paths,
  highlighted red when player's race is not allowed
- Useful for fire/nature/frost resist gear (Onyxia, AQ40, Naxx encounters)
This commit is contained in:
Kelsi 2026-03-13 11:23:55 -07:00
parent 0741b4d9e3
commit 03f8642fad
6 changed files with 145 additions and 18 deletions

View file

@ -1135,6 +1135,10 @@ public:
const Character* ch = getActiveCharacter();
return ch ? static_cast<uint8_t>(ch->characterClass) : 0;
}
uint8_t getPlayerRace() const {
const Character* ch = getActiveCharacter();
return ch ? static_cast<uint8_t>(ch->race) : 0;
}
void setPlayerGuid(uint64_t guid) { playerGuid = guid; }
// Player death state

View file

@ -1594,6 +1594,12 @@ struct ItemQueryResponseData {
float damageMax = 0.0f;
uint32_t delayMs = 0;
int32_t armor = 0;
int32_t holyRes = 0;
int32_t fireRes = 0;
int32_t natureRes = 0;
int32_t frostRes = 0;
int32_t shadowRes = 0;
int32_t arcaneRes = 0;
int32_t stamina = 0;
int32_t strength = 0;
int32_t agility = 0;