summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-10 19:06:53 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-10 19:06:53 +0300
commitc63a2bb4b0277758694b10d5f88b5639b57ea8a6 (patch)
tree1b553df33085ebc31078dcee6609db07615f61b6 /src/net/eathena/beinghandler.cpp
parent3b25ab9075318c52271307eefdc616a671657ee3 (diff)
downloadmanaplus-c63a2bb4b0277758694b10d5f88b5639b57ea8a6.tar.gz
manaplus-c63a2bb4b0277758694b10d5f88b5639b57ea8a6.tar.bz2
manaplus-c63a2bb4b0277758694b10d5f88b5639b57ea8a6.tar.xz
manaplus-c63a2bb4b0277758694b10d5f88b5639b57ea8a6.zip
eathena: show pvp or gvg map mode.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 895ab5c77..5a2a9208f 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -24,6 +24,7 @@
#include "actormanager.h"
#include "effectmanager.h"
+#include "game.h"
#include "guildmanager.h"
#include "being/localplayer.h"
@@ -42,6 +43,7 @@
#include "net/ea/eaprotocol.h"
+#include "net/eathena/maptypeproperty2.h"
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
#include "net/eathena/sprite.h"
@@ -50,6 +52,8 @@
#include "resources/db/itemdb.h"
+#include "resources/map/map.h"
+
#include "utils/stringutils.h"
#include "utils/timer.h"
@@ -1015,10 +1019,19 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg)
void BeingHandler::processMapTypeProperty(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- msg.readInt16("type");
- // +++ need get pvp and other flags from here
- msg.readInt32("flags");
+ const int16_t type = msg.readInt16("type");
+ const int flags = msg.readInt32("flags");
+ if (type == 0x28)
+ {
+ // +++ need get other flags from here
+ MapTypeProperty2 props;
+ props.data = static_cast<uint32_t>(flags);
+ Game *const game = Game::instance();
+ Map *const map = game->getCurrentMap();
+ if (!map)
+ return;
+ map->setPvpMode(props.bits.party | (props.bits.guild * 2));
+ }
}
void BeingHandler::processMapType(Net::MessageIn &msg)