mirror of
https://github.com/mehah/otclient
synced 2026-08-15 16:29:06 -04:00
fix: read the full MonkData Virtue payload (count u8 + virtue id u16) (#1788)
Bug Fixes: - Improved handling of monk virtue data so multiple virtues are read and processed correctly. - Prevented incorrect parsing of game messages containing multiple virtue entries.
This commit is contained in:
parent
af447efa36
commit
4bee667ed4
1 changed files with 8 additions and 2 deletions
|
|
@ -5140,8 +5140,14 @@ void ProtocolGame::parseMonkData(const InputMessagePtr& msg) {
|
|||
break;
|
||||
}
|
||||
case Otc::TYPES_MONK_VIRTUE: {
|
||||
const uint8_t virtueValue = msg->getU8();
|
||||
g_logger.debug("Unused {} TO-DO L4381", virtueValue);
|
||||
// official format: count (u8) followed by one u16 virtue id per entry.
|
||||
// Reading only the count desynced the stream and dropped the rest of
|
||||
// the login bundle (VIP groups/list) for monk characters.
|
||||
const uint8_t virtueCount = msg->getU8();
|
||||
for (uint8_t i = 0; i < virtueCount; ++i) {
|
||||
const uint16_t virtueId = msg->getU16();
|
||||
g_logger.debug("Unused virtue {} TO-DO L4381", virtueId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue