summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-20 15:35:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-20 15:35:36 +0300
commit130ad803401e9d582a2118d9bc92b984222b00f1 (patch)
tree007c13fcabe6754c3fb50265fa665f6bd616e938 /src/net/eathena
parent16121e499c734c00c714abd0998c24f4845329c3 (diff)
downloadplus-130ad803401e9d582a2118d9bc92b984222b00f1.tar.gz
plus-130ad803401e9d582a2118d9bc92b984222b00f1.tar.bz2
plus-130ad803401e9d582a2118d9bc92b984222b00f1.tar.xz
plus-130ad803401e9d582a2118d9bc92b984222b00f1.zip
eathena: add support for online list packets.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/playerhandler.cpp6
-rw-r--r--src/net/eathena/protocol.h7
-rw-r--r--src/net/eathena/serverfeatures.cpp2
4 files changed, 13 insertions, 4 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index af745449c..d096fd2c8 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -282,7 +282,7 @@ int16_t packet_lengths[] =
//0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// #0x0B00
16, -1, 10, -1, -1, -1, -1, 0, 27, 0, -1, -1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// #0x0B40
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 03dbb2cf5..b5bc87dcf 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -62,6 +62,7 @@ PlayerHandler::PlayerHandler() :
SMSG_PLAYER_SKILL_MESSAGE,
SMSG_MAP_MASK,
SMSG_MAP_MUSIC,
+ SMSG_ONLINE_LIST,
0
};
handledMessages = _messages;
@@ -141,6 +142,10 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
processMapMusic(msg);
break;
+ case SMSG_ONLINE_LIST:
+ processOnlineList(msg);
+ break;
+
default:
break;
}
@@ -249,6 +254,7 @@ void PlayerHandler::respawn() const
void PlayerHandler::requestOnlineList() const
{
+ createOutPacket(CMSG_ONLINE_LIST);
}
void PlayerHandler::updateStatus(const uint8_t status) const
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 73357f562..a9ab76092 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -291,8 +291,7 @@
#define SMSG_MAP_TYPE_PROPERTY2 0x099b
#define SMSG_MAP_TYPE 0x01d6
#define SMSG_IGNORE_ALL_RESPONSE 0x00d2
-// unused for now
-#define SMSG_ONLINE_LIST 0x0211
+
#define SMSG_NPC_COMMAND 0x0B00
#define SMSG_MAP_ACCOUNT_ID 0x0283
@@ -348,6 +347,8 @@
#define SMSG_SEARCHSTORE_OPEN 0x083a
#define SMSG_SEARCHSTORE_CLICK_ACK 0x083d
+#define SMSG_ONLINE_LIST 0x0b10
+
/**********************************
* Packets from client to server *
**********************************/
@@ -575,4 +576,6 @@
#define CMSG_SET_STATUS 0x0b0e
+#define CMSG_ONLINE_LIST 0x0b0f
+
#endif // NET_EATHENA_PROTOCOL_H
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index 182c97186..beb042279 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -37,7 +37,7 @@ ServerFeatures::ServerFeatures()
bool ServerFeatures::haveServerOnlineList() const
{
- return false;
+ return serverVersion >= 5;
}
bool ServerFeatures::haveOnlineList() const