From 97db9f1a4f677fe0433b7cad65b5146f5c7c9c00 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 29 Mar 2015 14:14:52 +0300 Subject: eathena: add packet CMSG_BATTLE_BEGIN_ACK 0x08e0. --- src/net/battlegroundhandler.h | 4 ++++ src/net/eathena/battlegroundhandler.cpp | 10 ++++++++++ src/net/eathena/battlegroundhandler.h | 4 ++++ src/net/eathena/protocol.h | 1 + src/net/tmwa/battlegroundhandler.cpp | 6 ++++++ src/net/tmwa/battlegroundhandler.h | 5 +++++ 6 files changed, 30 insertions(+) (limited to 'src/net') diff --git a/src/net/battlegroundhandler.h b/src/net/battlegroundhandler.h index 99249543b..4d36054b4 100644 --- a/src/net/battlegroundhandler.h +++ b/src/net/battlegroundhandler.h @@ -42,6 +42,10 @@ class BattleGroundHandler notfinal const std::string &name) const = 0; virtual void rekoveRequest(const std::string &name) const = 0; + + virtual void beginAck(const bool result, + const std::string &bgName, + const std::string &gameName) const = 0; }; } // namespace Net diff --git a/src/net/eathena/battlegroundhandler.cpp b/src/net/eathena/battlegroundhandler.cpp index a876a708e..bc34d351a 100644 --- a/src/net/eathena/battlegroundhandler.cpp +++ b/src/net/eathena/battlegroundhandler.cpp @@ -165,4 +165,14 @@ void BattleGroundHandler::rekoveRequest(const std::string &name) const outMsg.writeString(name, 24, "bg name"); } +void BattleGroundHandler::beginAck(const bool result, + const std::string &bgName, + const std::string &gameName) const +{ + createOutPacket(CMSG_BATTLE_BEGIN_ACK); + outMsg.writeInt8(static_cast(result ? 1 : 0), "result"); + outMsg.writeString(bgName, 24, "bg name"); + outMsg.writeString(gameName, 24, "game name"); +} + } // namespace EAthena diff --git a/src/net/eathena/battlegroundhandler.h b/src/net/eathena/battlegroundhandler.h index 1ddf201de..291da2877 100644 --- a/src/net/eathena/battlegroundhandler.h +++ b/src/net/eathena/battlegroundhandler.h @@ -44,6 +44,10 @@ class BattleGroundHandler final : public MessageHandler, void rekoveRequest(const std::string &name) const override final; + void beginAck(const bool result, + const std::string &bgName, + const std::string &gameName) const override final; + protected: void processBattleEmblem(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index ffe418d09..32dc2f829 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -494,6 +494,7 @@ #define CMSG_BATTLE_REGISTER 0x08d7 #define CMSG_BATTLE_REVOKE 0x08da +#define CMSG_BATTLE_BEGIN_ACK 0x08e0 #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 5834be174..916e27a33 100644 --- a/src/net/tmwa/battlegroundhandler.cpp +++ b/src/net/tmwa/battlegroundhandler.cpp @@ -52,4 +52,10 @@ void BattleGroundHandler::rekoveRequest(const std::string &name A_UNUSED) const { } +void BattleGroundHandler::beginAck(const bool result A_UNUSED, + const std::string &bgName A_UNUSED, + const std::string &gameName A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/battlegroundhandler.h b/src/net/tmwa/battlegroundhandler.h index b393573bc..c5fdeea27 100644 --- a/src/net/tmwa/battlegroundhandler.h +++ b/src/net/tmwa/battlegroundhandler.h @@ -44,6 +44,11 @@ class BattleGroundHandler final : public MessageHandler, const std::string &name) const override final; void rekoveRequest(const std::string &name) const override final; + + void beginAck(const bool result, + const std::string &bgName, + const std::string &gameName) const override final; + }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2