From dd1627eb548a7705f749d2e8529207e6123e5e2e Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Thu, 9 May 2024 15:33:40 +0000 Subject: Fix guild lvl-up packet parsing AND change password causing client exit in ML What happened: 1) herc evol sends 0x100 as packet ID offset 2) 0x100 is added to 0x0062 of SMSG_CHAR_PASSWORD_RESPONSE 3) SMSG_CHAR_PASSWORD_RESPONSE is then inserted into 0x162 slot of packet map, shadowing SMSG_GUILD_SKILL_INFO 4) on guild lvl-up, server sends this in SMSG_GUILD_SKILL_INFO 5) ManaVerse exits in confusion. Note 1: due to popupmenu paste not working in change password dialog, tested password change only with invalid old password, which worked (opened error dialog instead of client exiting). Note 2: Some packet handlers are bound using &Ea::LoginRecv prefix, this one had &LoginRecv and this was kept this way (uses vtable lookup?). ~~TODO: SMSG_CHAR_PASSWORD_RESPONSE seems to be something about password changes, but I could not find this packet either in TMWA or herc. Still, I need to test if these still work on all active servers~~ Tested. Squashed with: * Fix exit on password change, too * Fix guild lvl-up packet parsing causing client exit in ML **** mana/plus!81 --- src/net/eathena/packetsin.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 443c583c0..2a8e26264 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -84,6 +84,7 @@ packet(SMSG_CHAR_DELETE_SUCCEEDED, 0x006f, 2, &Ea::CharServerRecv::pro packet(SMSG_CHAR_LOGIN, 0x006b, -1, &CharServerRecv::processCharLogin, 0); packet(SMSG_CHAR_LOGIN2, 0x082d, -1, &CharServerRecv::processCharLogin2, 0); packet(SMSG_CHAR_LOGIN_ERROR, 0x006c, 3, &Ea::CharServerRecv::processCharLoginError, 0); +packet(SMSG_CHAR_PASSWORD_RESPONSE, 0x0062, 3, &LoginRecv::processCharPasswordResponse, 0); packet(SMSG_CHAR_MAP_INFO, 0x0071, 28, &CharServerRecv::processCharMapInfo, 0); packet(SMSG_CHAR_PINCODE_STATUS, 0x08b9, 12, &CharServerRecv::processPincodeStatus, 0); packet(SMSG_CHAR_PINCODE_MAKE_STATUS, 0x08bb, 8, &CharServerRecv::processPincodeMakeStatus, 0); @@ -1006,9 +1007,6 @@ if (serverVersion > 0) packet2(SMSG_QUEST_LIST2, 0x0b23, -1, &QuestRecv::processAddQuests2, 0); packet2(SMSG_QUEST_ADD2, 0x0b24, 23, &QuestRecv::processAddQuest2, 0); packet2(SMSG_PLAYER_ATTRS, 0x0b25, -1, &PlayerRecv::processPlayerAttrs, 0); - - // char server - packet2(SMSG_CHAR_PASSWORD_RESPONSE, 0x0062, 3, &LoginRecv::processCharPasswordResponse, 0); } // 20150225 main -- cgit v1.2.3-70-g09d2