diff options
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 |