mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 16:50:15 +00:00
fix: correct quest offer reward parser and trade slot trail size
- QuestOfferRewardParser: replace 4-variant heuristic with 0..16 byte prefix scan × fixed/variable arrays (34 candidates total). AzerothCore WotLK 3.3.5a sends uint32 autoFinish + uint32 suggestedPlayers = 8 bytes before emoteCount; old uint8 read caused 3-byte misalignment, producing wrong item IDs and missing icons on quest reward windows. Scoring now strongly favours the 8-byte prefix and exact byte consumption. - Quest reward tooltip: delegate to InventoryScreen::renderItemTooltip() for full stats (armor, DPS, stats, bind type, etc.); show "Loading…" while item data is still fetching instead of showing nothing. - SMSG_TRADE_STATUS_EXTENDED: fix SLOT_TRAIL 49→52 bytes. AC 3.3.5a sends giftCreatorGuid(8) + 6 enchant slots(24) + randPropId(4) + suffixFactor(4) + durability(4) + maxDurability(4) + createPlayedTime(4) = 52 bytes after isWrapped; wrong skip misaligned all subsequent slots.
This commit is contained in:
parent
170ff1597c
commit
568c566e1a
3 changed files with 70 additions and 49 deletions
|
|
@ -19167,16 +19167,16 @@ void GameHandler::handleTradeStatusExtended(network::Packet& packet) {
|
|||
uint32_t displayId = packet.readUInt32();
|
||||
uint32_t stackCount = packet.readUInt32();
|
||||
|
||||
// isWrapped + giftCreatorGuid + several enchant fields — skip them all
|
||||
// We need at least 1+8+4*5 = 29 bytes for the rest of this slot entry
|
||||
bool isWrapped = false;
|
||||
if (packet.getSize() - packet.getReadPos() >= 1) {
|
||||
isWrapped = (packet.readUInt8() != 0);
|
||||
}
|
||||
// Skip giftCreatorGuid (8) + enchantId*5 (20) + suffixFactor (4) + randPropId (4) + lockId (4)
|
||||
// + maxDurability (4) + durability (4) = 49 bytes
|
||||
// Plus if wrapped: giftCreatorGuid already consumed; additional guid = 0
|
||||
constexpr size_t SLOT_TRAIL = 49;
|
||||
// AzerothCore 3.3.5a SendUpdateTrade() field order after isWrapped:
|
||||
// giftCreatorGuid (8) + PERM enchant (4) + SOCK enchants×3 (12)
|
||||
// + BONUS enchant (4) + TEMP enchant (4) [total enchants: 24]
|
||||
// + randomPropertyId (4) + suffixFactor (4)
|
||||
// + durability (4) + maxDurability (4) + createPlayedTime (4) = 52 bytes
|
||||
constexpr size_t SLOT_TRAIL = 52;
|
||||
if (packet.getSize() - packet.getReadPos() >= SLOT_TRAIL) {
|
||||
packet.setReadPos(packet.getReadPos() + SLOT_TRAIL);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue