summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-14 23:32:08 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-14 23:32:08 +0300
commit96fec2bda470785d384ad14274ca9c6aefda0ae8 (patch)
tree628d114892df3097ea8e04f5ec017b3addc5c897
parent6325c78e27607afe99ecc3c3d0cac154ccfd696b (diff)
downloadmanaplus-96fec2bda470785d384ad14274ca9c6aefda0ae8.tar.gz
manaplus-96fec2bda470785d384ad14274ca9c6aefda0ae8.tar.bz2
manaplus-96fec2bda470785d384ad14274ca9c6aefda0ae8.tar.xz
manaplus-96fec2bda470785d384ad14274ca9c6aefda0ae8.zip
eathena: add partial support for packet SMSG_PVP_INFO 0x0210.
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/playerhandler.cpp14
-rw-r--r--src/net/eathena/playerhandler.h2
-rw-r--r--src/net/eathena/protocol.h2
4 files changed, 18 insertions, 2 deletions
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