From 96fec2bda470785d384ad14274ca9c6aefda0ae8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Sep 2014 23:32:08 +0300 Subject: eathena: add partial support for packet SMSG_PVP_INFO 0x0210. --- src/net/eathena/packets.h | 2 +- src/net/eathena/playerhandler.cpp | 14 ++++++++++++++ src/net/eathena/playerhandler.h | 2 ++ src/net/eathena/protocol.h | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) (limited to 'src/net') diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 8a957a964..e13762d33 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -84,7 +84,7 @@ int16_t packet_lengths[] = //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // #0x0200 26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, 10, 0, 0, 0, - 2, -1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 22, -1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 122, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // #0x0240 diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 62eaef408..963a29c52 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -59,6 +59,7 @@ PlayerHandler::PlayerHandler() : SMSG_PLAYER_SHORTCUTS, SMSG_PLAYER_SHOW_EQUIP, SMSG_PLAYER_GET_EXP, + SMSG_PVP_INFO, 0 }; handledMessages = _messages; @@ -118,6 +119,10 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) processPlayerGetExp(msg); break; + case SMSG_PVP_INFO: + processPvpInfo(msg); + break; + default: break; } @@ -401,4 +406,13 @@ void PlayerHandler::requestPvpInfo() const outMsg.writeInt32(0, "account id"); } +void PlayerHandler::processPvpInfo(Net::MessageIn &msg) +{ + msg.readInt32("char id"); + msg.readInt32("account id"); + msg.readInt32("pvp won"); + msg.readInt32("pvp lost"); + msg.readInt32("pvp point"); +} + } // namespace EAthena diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index 5c06b5473..b58c1a752 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -75,6 +75,8 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void processPlayerGetExp(Net::MessageIn &msg); + void processPvpInfo(Net::MessageIn &msg); + static void processWalkResponse(Net::MessageIn &msg); }; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index f20e9fc58..dd4848534 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -206,6 +206,7 @@ #define SMSG_RANKS_LIST 0x097d #define SMSG_MONSTER_HP 0x0977 #define SMSG_PLAYER_HP 0x080e +#define SMSG_PVP_INFO 0x0210 #define SMSG_CHAT_IGNORE_LIST 0x00d4 @@ -378,7 +379,6 @@ #define SMSG_ONLINE_LIST 0x0211 #define SMSG_NPC_COMMAND 0x0212 -#define CMSG_ONLINE_LIST 0x0210 #define CMSG_SET_STATUS 0x0213 #define SMSG_UPDATE_HOST2 0x7534 -- cgit v1.2.3-70-g09d2