summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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