summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-04-07 00:13:10 +0300
committerAndrei Karas <akaras@inbox.ru>2018-04-07 00:22:30 +0300
commit0cd149ef9bcac3d136406e4d90e8875dbb85c925 (patch)
treeece086b51026e90c9bc51b318d5206cf1b3bf958 /src/net
parent2bd8b34e2cc809a0adbebdadf5a777fbb57cf5a8 (diff)
downloadmv-0cd149ef9bcac3d136406e4d90e8875dbb85c925.tar.gz
mv-0cd149ef9bcac3d136406e4d90e8875dbb85c925.tar.bz2
mv-0cd149ef9bcac3d136406e4d90e8875dbb85c925.tar.xz
mv-0cd149ef9bcac3d136406e4d90e8875dbb85c925.zip
Update packet SMSG_FRIENDS_PLAYER_ONLINE for new packet versions.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/friendsrecv.cpp5
-rw-r--r--src/net/eathena/network.cpp2
-rw-r--r--src/net/eathena/packetsin.inc10
3 files changed, 14 insertions, 3 deletions
diff --git a/src/net/eathena/friendsrecv.cpp b/src/net/eathena/friendsrecv.cpp
index cddda0c4f..874466de0 100644
--- a/src/net/eathena/friendsrecv.cpp
+++ b/src/net/eathena/friendsrecv.cpp
@@ -26,6 +26,9 @@
#include "debug.h"
+extern int packetVersionMain;
+extern int packetVersionRe;
+
namespace EAthena
{
@@ -35,6 +38,8 @@ void FriendsRecv::processPlayerOnline(Net::MessageIn &msg)
msg.readBeingId("account id");
msg.readInt32("char id");
msg.readUInt8("flag"); // 0 - online, 1 - offline
+ if (packetVersionMain >= 20180307 || packetVersionRe >= 20180221)
+ msg.readString(24, "player name");
}
void FriendsRecv::processFriendsList(Net::MessageIn &msg)
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index a68194e28..375fdea54 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -88,6 +88,8 @@
#include "debug.h"
extern int packetVersion;
+extern int packetVersionMain;
+extern int packetVersionRe;
extern int serverVersion;
extern int evolPacketOffset;
extern bool packets_zero;
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 6fe266937..40e6419ce 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -1029,12 +1029,16 @@ if (packetVersion >= 20180221)
}
// main 20180307
-if (packets_main == true)
-{
-if (packetVersion >= 20180307)
+if (packetVersionMain >= 20180307)
{
packet(SMSG_SOLVE_CHAR_NAME, 0x0af7, 32, &BeingRecv::processSolveCharName, 20180307);
+ packet(SMSG_FRIENDS_PLAYER_ONLINE, 0x0206, 35, &FriendsRecv::processPlayerOnline, 20180307);
}
+
+// re 20180221
+if (packetVersionRe >= 20180221)
+{
+ packet(SMSG_FRIENDS_PLAYER_ONLINE, 0x0206, 35, &FriendsRecv::processPlayerOnline, 20180221);
}
// 0