summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-29 13:42:39 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-29 13:42:39 +0300
commitcc19f13863bc331e8e7a34f850370fc3bd32826a (patch)
tree2917fba1632e934bfc7981d05341fe68ba1d10d3 /src/net/eathena
parent5b1359f867190b46f3107f4e3ba85d484e14c130 (diff)
downloadplus-cc19f13863bc331e8e7a34f850370fc3bd32826a.tar.gz
plus-cc19f13863bc331e8e7a34f850370fc3bd32826a.tar.bz2
plus-cc19f13863bc331e8e7a34f850370fc3bd32826a.tar.xz
plus-cc19f13863bc331e8e7a34f850370fc3bd32826a.zip
eathena: add packet CMSG_BATTLE_REGISTER 0x08d7.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/battlegroundhandler.cpp9
-rw-r--r--src/net/eathena/battlegroundhandler.h3
-rw-r--r--src/net/eathena/protocol.h2
3 files changed, 14 insertions, 0 deletions
diff --git a/src/net/eathena/battlegroundhandler.cpp b/src/net/eathena/battlegroundhandler.cpp
index fa5bbf1aa..91078e141 100644
--- a/src/net/eathena/battlegroundhandler.cpp
+++ b/src/net/eathena/battlegroundhandler.cpp
@@ -22,6 +22,7 @@
#include "logger.h"
+#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
#include "debug.h"
@@ -150,4 +151,12 @@ void BattleGroundHandler::processBattleJoined(Net::MessageIn &msg)
msg.readInt32("position");
}
+void BattleGroundHandler::registerBg(const BattleGroundType::Type &type,
+ const std::string &name) const
+{
+ createOutPacket(CMSG_BATTLE_REGISTER);
+ outMsg.writeInt16(static_cast<int16_t>(type), "type");
+ outMsg.writeString(name, 24, "bg name");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/battlegroundhandler.h b/src/net/eathena/battlegroundhandler.h
index 6e30edda1..e2be2a1e5 100644
--- a/src/net/eathena/battlegroundhandler.h
+++ b/src/net/eathena/battlegroundhandler.h
@@ -39,6 +39,9 @@ class BattleGroundHandler final : public MessageHandler,
void handleMessage(Net::MessageIn &msg) override final;
+ void registerBg(const BattleGroundType::Type &type,
+ const std::string &name) const override final;
+
protected:
void processBattleEmblem(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index cb4bcc401..504689647 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -492,6 +492,8 @@
#define CMSG_CHAT_PART_CHANNEL 0x0b09
#define CMSG_BATTLE_CHAT_MESSAGE 0x02db
+#define CMSG_BATTLE_REGISTER 0x08d7
+
#define CMSG_CREAYE_CHAT_ROOM 0x00d5
#define CMSG_LEAVE_CHAT_ROOM 0x00e3
#define CMSG_SET_CHAT_ROOM_OPTIONS 0x00de