mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
fix: complete TBC item query parsing for itemLevel, spells, binding, description
TBC parser was truncating item query response after armor/resistances, discarding itemLevel, requiredLevel, spell slots, bind type, and description. Now stores itemLevel/requiredLevel, reads AmmoType+RangedModRange, reads 5 spell slots into data.spells[], reads bindType and description cstring. Matches the Classic and WotLK parser fixes from the previous commits.
This commit is contained in:
parent
5004929f07
commit
6075207d94
1 changed files with 27 additions and 2 deletions
|
|
@ -906,8 +906,8 @@ bool TbcPacketParsers::parseItemQueryResponse(network::Packet& packet, ItemQuery
|
|||
|
||||
packet.readUInt32(); // AllowableClass
|
||||
packet.readUInt32(); // AllowableRace
|
||||
packet.readUInt32(); // ItemLevel
|
||||
packet.readUInt32(); // RequiredLevel
|
||||
data.itemLevel = packet.readUInt32();
|
||||
data.requiredLevel = packet.readUInt32();
|
||||
packet.readUInt32(); // RequiredSkill
|
||||
packet.readUInt32(); // RequiredSkillRank
|
||||
packet.readUInt32(); // RequiredSpell
|
||||
|
|
@ -963,6 +963,31 @@ bool TbcPacketParsers::parseItemQueryResponse(network::Packet& packet, ItemQuery
|
|||
data.delayMs = packet.readUInt32();
|
||||
}
|
||||
|
||||
// AmmoType + RangedModRange
|
||||
if (packet.getSize() - packet.getReadPos() >= 8) {
|
||||
packet.readUInt32(); // AmmoType
|
||||
packet.readFloat(); // RangedModRange
|
||||
}
|
||||
|
||||
// 5 item spells
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (packet.getReadPos() + 24 > packet.getSize()) break;
|
||||
data.spells[i].spellId = packet.readUInt32();
|
||||
data.spells[i].spellTrigger = packet.readUInt32();
|
||||
packet.readUInt32(); // SpellCharges
|
||||
packet.readUInt32(); // SpellCooldown
|
||||
packet.readUInt32(); // SpellCategory
|
||||
packet.readUInt32(); // SpellCategoryCooldown
|
||||
}
|
||||
|
||||
// Bonding type
|
||||
if (packet.getReadPos() + 4 <= packet.getSize())
|
||||
data.bindType = packet.readUInt32();
|
||||
|
||||
// Flavor/lore text
|
||||
if (packet.getReadPos() < packet.getSize())
|
||||
data.description = packet.readString();
|
||||
|
||||
data.valid = !data.name.empty();
|
||||
LOG_DEBUG("[TBC] Item query: ", data.name, " quality=", data.quality,
|
||||
" invType=", data.inventoryType, " armor=", data.armor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue