diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/net/ea/playerhandler.cpp | 9 | ||||
-rw-r--r-- | src/net/ea/playerhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/network.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 9 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.h | 2 |
8 files changed, 19 insertions, 13 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 82d9139ee..8fd63a641 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -523,4 +523,13 @@ void PlayerHandler::setStat(const int type, } } +void PlayerHandler::processMapMask(Net::MessageIn &msg) +{ + const int mask = msg.readInt32("mask"); + msg.readInt32("unused"); + Map *const map = Game::instance()->getCurrentMap(); + if (map) + map->setMask(mask); +} + } // namespace Ea diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index 786c63625..211baab2e 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -72,6 +72,8 @@ class PlayerHandler notfinal : public Net::PlayerHandler static void processPlayerStatUpdate6(Net::MessageIn &msg); static void processPlayerArrowMessage(Net::MessageIn &msg); + + static void processMapMask(Net::MessageIn &msg); }; } // namespace Ea diff --git a/src/net/eathena/network.h b/src/net/eathena/network.h index 81e2131e0..f7caeef33 100644 --- a/src/net/eathena/network.h +++ b/src/net/eathena/network.h @@ -29,7 +29,7 @@ * Protocol version, reported to the eAthena char and mapserver who can adjust * the protocol accordingly. */ -#define CLIENT_PROTOCOL_VERSION 2 +#define CLIENT_PROTOCOL_VERSION 3 namespace EAthena { diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index f32df43d3..5e71c7304 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -279,7 +279,7 @@ int16_t packet_lengths[] = 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, // #0x0B00 - 16, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, -1, 10, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 3ef653de4..7e1458e90 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -59,6 +59,7 @@ PlayerHandler::PlayerHandler() : SMSG_PVP_INFO, SMSG_PLAYER_HEAL, SMSG_PLAYER_SKILL_MESSAGE, + SMSG_MAP_MASK, 0 }; handledMessages = _messages; @@ -130,6 +131,10 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) processPlayerSkillMessage(msg); break; + case SMSG_MAP_MASK: + processMapMask(msg); + break; + default: break; } diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 72b0e4fa2..b101e273a 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -307,6 +307,7 @@ #define SMSG_ELEMENTAL_INFO 0x081d #define SMSG_UPDATE_HOST 0x0063 +#define SMSG_MAP_MASK 0x0b02 /********************************** * Packets from client to server * diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index a73c4c28b..8bea7d01e 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -329,15 +329,6 @@ void PlayerHandler::updateStatus(const uint8_t status) const outMsg.writeInt8(0, "unused"); } -void PlayerHandler::processMapMask(Net::MessageIn &msg) -{ - const int mask = msg.readInt32("mask"); - msg.readInt32("unused"); - Map *const map = Game::instance()->getCurrentMap(); - if (map) - map->setMask(mask); -} - void PlayerHandler::processMapMusic(Net::MessageIn &msg) { const int size = msg.readInt16("len") - 5; diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 6f643c46f..694961354 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -85,8 +85,6 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler const int mod, const bool notify) const override final; - static void processMapMask(Net::MessageIn &msg); - static void processMapMusic(Net::MessageIn &msg); static void processPlayerStatUpdate5(Net::MessageIn &msg); |