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/tmwa/playerhandler.cpp | |
parent | 7ba5e3db652be97b1007b1025d9d016e6d47ce13 (diff) | |
download | mv-344fc37de3bbc385e04ee4109600625f9aefbeba.tar.gz mv-344fc37de3bbc385e04ee4109600625f9aefbeba.tar.bz2 mv-344fc37de3bbc385e04ee4109600625f9aefbeba.tar.xz mv-344fc37de3bbc385e04ee4109600625f9aefbeba.zip |
add handling for map mask packet. (evol only)
Also change network version to 11.
Diffstat (limited to 'src/net/tmwa/playerhandler.cpp')
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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 |