summaryrefslogtreecommitdiff
path: root/src/net/eathena/gamehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-17 21:09:08 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-17 21:09:08 +0300
commitd792bfdd47f922b18b320444249db68255e1728a (patch)
tree8dc752a2f02b5692e8623dcc342e2327272d0f83 /src/net/eathena/gamehandler.cpp
parent5cb81c6bda794f6898f692cc8b9a36a04fa989fd (diff)
downloadmv-d792bfdd47f922b18b320444249db68255e1728a.tar.gz
mv-d792bfdd47f922b18b320444249db68255e1728a.tar.bz2
mv-d792bfdd47f922b18b320444249db68255e1728a.tar.xz
mv-d792bfdd47f922b18b320444249db68255e1728a.zip
Impliment packets CMSG_PLAYER_CHANGE_DIR and CMSG_MAP_PING for all packet versions.
Diffstat (limited to 'src/net/eathena/gamehandler.cpp')
-rw-r--r--src/net/eathena/gamehandler.cpp95
1 files changed, 95 insertions, 0 deletions
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 6327cb794..067e5ff38 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -40,6 +40,7 @@
#include "debug.h"
extern Net::GameHandler *gameHandler;
+extern int packetVersion;
namespace EAthena
{
@@ -116,6 +117,100 @@ void GameHandler::quit() const
void GameHandler::ping(const int tick) const
{
createOutPacket(CMSG_MAP_PING);
+ if (packetVersion >= 20101124)
+ {
+ // nothing here
+ }
+ else if (packetVersion >= 20080827)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20070212)
+ {
+ outMsg.writeInt16(0, "unknown");
+ }
+ else if (packetVersion >= 20070108)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20050719)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20050718)
+ {
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20050628)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20050509)
+ {
+ outMsg.writeInt16(0, "unknown");
+ }
+ else if (packetVersion >= 20050110)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20041129)
+ {
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20041025)
+ {
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20041005)
+ {
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20040920)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20040906)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20040809)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ outMsg.writeInt8(0, "unknown");
+ }
+ else if (packetVersion >= 20040726)
+ {
+ outMsg.writeInt16(0, "unknown");
+ outMsg.writeInt16(0, "unknown");
+ }
outMsg.writeInt32(tick, "tick");
}