From 32bf758a1267689cac65e10f69c73b8efa40bb94 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 29 Mar 2015 14:21:43 +0300 Subject: eathena: add packet CMSG_BATTLE_CHECK_STATE 0x090a. --- src/net/battlegroundhandler.h | 2 ++ src/net/eathena/battlegroundhandler.cpp | 6 ++++++ src/net/eathena/battlegroundhandler.h | 2 ++ src/net/eathena/protocol.h | 1 + src/net/tmwa/battlegroundhandler.cpp | 4 ++++ src/net/tmwa/battlegroundhandler.h | 1 + 6 files changed, 16 insertions(+) diff --git a/src/net/battlegroundhandler.h b/src/net/battlegroundhandler.h index 4d36054b4..e03757141 100644 --- a/src/net/battlegroundhandler.h +++ b/src/net/battlegroundhandler.h @@ -46,6 +46,8 @@ class BattleGroundHandler notfinal virtual void beginAck(const bool result, const std::string &bgName, const std::string &gameName) const = 0; + + virtual void checkState(const std::string &name) const = 0; }; } // namespace Net diff --git a/src/net/eathena/battlegroundhandler.cpp b/src/net/eathena/battlegroundhandler.cpp index bc34d351a..3444c9434 100644 --- a/src/net/eathena/battlegroundhandler.cpp +++ b/src/net/eathena/battlegroundhandler.cpp @@ -175,4 +175,10 @@ void BattleGroundHandler::beginAck(const bool result, outMsg.writeString(gameName, 24, "game name"); } +void BattleGroundHandler::checkState(const std::string &name) const +{ + createOutPacket(CMSG_BATTLE_CHECK_STATE); + outMsg.writeString(name, 24, "bg name"); +} + } // namespace EAthena diff --git a/src/net/eathena/battlegroundhandler.h b/src/net/eathena/battlegroundhandler.h index 291da2877..233f99e76 100644 --- a/src/net/eathena/battlegroundhandler.h +++ b/src/net/eathena/battlegroundhandler.h @@ -48,6 +48,8 @@ class BattleGroundHandler final : public MessageHandler, const std::string &bgName, const std::string &gameName) const override final; + void checkState(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 32dc2f829..be9537e3c 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -495,6 +495,7 @@ #define CMSG_BATTLE_REGISTER 0x08d7 #define CMSG_BATTLE_REVOKE 0x08da #define CMSG_BATTLE_BEGIN_ACK 0x08e0 +#define CMSG_BATTLE_CHECK_STATE 0x090a #define CMSG_CREAYE_CHAT_ROOM 0x00d5 #define CMSG_LEAVE_CHAT_ROOM 0x00e3 diff --git a/src/net/tmwa/battlegroundhandler.cpp b/src/net/tmwa/battlegroundhandler.cpp index 916e27a33..e9a26180b 100644 --- a/src/net/tmwa/battlegroundhandler.cpp +++ b/src/net/tmwa/battlegroundhandler.cpp @@ -58,4 +58,8 @@ void BattleGroundHandler::beginAck(const bool result A_UNUSED, { } +void BattleGroundHandler::checkState(const std::string &name A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/battlegroundhandler.h b/src/net/tmwa/battlegroundhandler.h index c5fdeea27..cb8e5b679 100644 --- a/src/net/tmwa/battlegroundhandler.h +++ b/src/net/tmwa/battlegroundhandler.h @@ -49,6 +49,7 @@ class BattleGroundHandler final : public MessageHandler, const std::string &bgName, const std::string &gameName) const override final; + void checkState(const std::string &name) const override final; }; } // namespace TmwAthena -- cgit v1.2.3-60-g2f50