Skip to content

Commit

Permalink
fix: prevent client debug when purchase/sale statistics are missing (#…
Browse files Browse the repository at this point in the history
…2693)

This PR introduces a change to ensure proper handling of cases where
sale statistics for a specific item with tier are not found in the
tierStatsMap.

Fixes #2656
  • Loading branch information
lamonato29 authored Jun 15, 2024
1 parent 81e250a commit b682da7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5857,6 +5857,8 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) {
msg.add<uint64_t>(purchaseStatistics.highestPrice);
msg.add<uint64_t>(purchaseStatistics.lowestPrice);
}
} else {
msg.addByte(0x00);
}
} else {
msg.addByte(0x00); // send to old protocol ?
Expand All @@ -5880,6 +5882,8 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) {
msg.add<uint64_t>(saleStatistics.highestPrice);
msg.add<uint64_t>(saleStatistics.lowestPrice);
}
} else {
msg.addByte(0x00);
}
} else {
msg.addByte(0x00); // send to old protocol ?
Expand Down

0 comments on commit b682da7

Please sign in to comment.