diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-26 20:40:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-26 23:23:32 +0300 |
commit | 344fc37de3bbc385e04ee4109600625f9aefbeba (patch) | |
tree | 4eb8e274ff696d9b135110fbd107a3d6be4f9018 /src/net | |
parent | 7ba5e3db652be97b1007b1025d9d016e6d47ce13 (diff) | |
download | plus-344fc37de3bbc385e04ee4109600625f9aefbeba.tar.gz plus-344fc37de3bbc385e04ee4109600625f9aefbeba.tar.bz2 plus-344fc37de3bbc385e04ee4109600625f9aefbeba.tar.xz plus-344fc37de3bbc385e04ee4109600625f9aefbeba.zip |
add handling for map mask packet. (evol only)
Also change network version to 11.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/tmwa/network.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/network.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 15 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/protocol.h | 1 |
5 files changed, 19 insertions, 2 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index 9d4c60e0a..1ed7ee581 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -78,7 +78,7 @@ int16_t packet_lengths[] = // #0x0200 26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, 10, 0, 0, 0, 2, -1, 16, 0, 8, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -1, 122, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -1, 122, -1, -1, -1, -1, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const int packet_lengths_size diff --git a/src/net/tmwa/network.h b/src/net/tmwa/network.h index 7e007742c..83bd34610 100644 --- a/src/net/tmwa/network.h +++ b/src/net/tmwa/network.h @@ -31,7 +31,7 @@ * Protocol version, reported to the eAthena char and mapserver who can adjust * the protocol accordingly. */ -#define CLIENT_PROTOCOL_VERSION 10 +#define CLIENT_PROTOCOL_VERSION 11 #define CLIENT_TMW_PROTOCOL_VERSION 1 namespace TmwAthena diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 0361e125d..df56176f0 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -24,6 +24,7 @@ #include "configuration.h" #include "client.h" +#include "game.h" #include "net/net.h" @@ -56,6 +57,7 @@ PlayerHandler::PlayerHandler() : SMSG_PLAYER_STAT_UPDATE_6, SMSG_PLAYER_ARROW_MESSAGE, SMSG_ONLINE_LIST, + SMSG_MAP_MASK, 0 }; handledMessages = _messages; @@ -108,6 +110,10 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) processOnlineList(msg); break; + case SMSG_MAP_MASK: + processMapMask(msg); + break; + default: break; } @@ -295,4 +301,13 @@ void PlayerHandler::updateStatus(const uint8_t status) const outMsg.writeInt8(0); } +void PlayerHandler::processMapMask(Net::MessageIn &msg) const +{ + const int mask = msg.readInt32(); + msg.readInt32(); // unused + Map *const map = Game::instance()->getCurrentMap(); + if (map) + map->setMask(mask); +} + } // namespace TmwAthena diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 102151b05..32f40434b 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -54,6 +54,7 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void processOnlineList(Net::MessageIn &msg) const; void requestOnlineList() const override final; void updateStatus(const uint8_t status) const override final; + void processMapMask(Net::MessageIn &msg) const; void respawn() const override final; }; diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h index 9a4e39b85..f3f395148 100644 --- a/src/net/tmwa/protocol.h +++ b/src/net/tmwa/protocol.h @@ -350,6 +350,7 @@ enum #define SMSG_QUEST_SET_VAR 0x0214 #define SMSG_QUEST_PLAYER_VARS 0x0215 #define SMSG_BEING_MOVE3 0x0225 +#define SMSG_MAP_MASK 0x0226 #define CMSG_SEND_CLIENT_INFO 0x7533 #define SMSG_UPDATE_HOST2 0x7534 |