mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
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:
parent
0741b4d9e3
commit
03f8642fad
6 changed files with 145 additions and 18 deletions
|
|
@ -1468,12 +1468,12 @@ bool ClassicPacketParsers::parseItemQueryResponse(network::Packet& packet, ItemQ
|
|||
|
||||
// Remaining tail can vary by core. Read resistances + delay when present.
|
||||
if (packet.getSize() - packet.getReadPos() >= 28) {
|
||||
packet.readUInt32(); // HolyRes
|
||||
packet.readUInt32(); // FireRes
|
||||
packet.readUInt32(); // NatureRes
|
||||
packet.readUInt32(); // FrostRes
|
||||
packet.readUInt32(); // ShadowRes
|
||||
packet.readUInt32(); // ArcaneRes
|
||||
data.holyRes = static_cast<int32_t>(packet.readUInt32()); // HolyRes
|
||||
data.fireRes = static_cast<int32_t>(packet.readUInt32()); // FireRes
|
||||
data.natureRes = static_cast<int32_t>(packet.readUInt32()); // NatureRes
|
||||
data.frostRes = static_cast<int32_t>(packet.readUInt32()); // FrostRes
|
||||
data.shadowRes = static_cast<int32_t>(packet.readUInt32()); // ShadowRes
|
||||
data.arcaneRes = static_cast<int32_t>(packet.readUInt32()); // ArcaneRes
|
||||
data.delayMs = packet.readUInt32();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue