From f561f389d49d9a440dbf9f141a80fefb43086e6a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 20 May 2015 18:05:14 +0300 Subject: eathena: impliment packet CMSG_GUILD_ALLIANCE_DELETE. --- src/net/ea/guildhandler.cpp | 5 ----- src/net/ea/guildhandler.h | 3 --- src/net/eathena/guildhandler.cpp | 8 ++++++++ src/net/eathena/guildhandler.h | 3 +++ src/net/guildhandler.h | 2 +- src/net/tmwa/guildhandler.cpp | 5 +++++ src/net/tmwa/guildhandler.h | 4 ++++ 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp index 6dbcb202a..d0beb4881 100644 --- a/src/net/ea/guildhandler.cpp +++ b/src/net/ea/guildhandler.cpp @@ -60,11 +60,6 @@ GuildHandler::~GuildHandler() delete2(guildTab); } -void GuildHandler::endAlliance(const int guildId A_UNUSED, - const int otherGuildId A_UNUSED) const -{ -} - void GuildHandler::processGuildCreateResponse(Net::MessageIn &msg) { const uint8_t flag = msg.readUInt8("flag"); diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h index 2defc0072..db7f94fa4 100644 --- a/src/net/ea/guildhandler.h +++ b/src/net/ea/guildhandler.h @@ -42,9 +42,6 @@ class GuildHandler notfinal : public Net::GuildHandler virtual ~GuildHandler(); - void endAlliance(const int guildId, - const int otherGuildId) const override final; - static void processGuildCreateResponse(Net::MessageIn &msg); static void processGuildMasterOrMember(Net::MessageIn &msg); diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index 76b7b0450..85000d79f 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -469,4 +469,12 @@ void GuildHandler::requestAllianceResponse(const int beingId, outMsg.writeInt32(accept, "accept flag"); } +void GuildHandler::endAlliance(const int guildId, + const int flag) const +{ + createOutPacket(CMSG_GUILD_ALLIANCE_DELETE); + outMsg.writeInt32(guildId, "guild id"); + outMsg.writeInt32(flag, "flag"); +} + } // namespace EAthena diff --git a/src/net/eathena/guildhandler.h b/src/net/eathena/guildhandler.h index 3eac0136f..89144ebad 100644 --- a/src/net/eathena/guildhandler.h +++ b/src/net/eathena/guildhandler.h @@ -75,6 +75,9 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void requestAllianceResponse(const int beingId, const bool accept) const override final; + void endAlliance(const int guildId, + const int flag) const override final; + protected: static void processGuildUpdateCoords(Net::MessageIn &msg); diff --git a/src/net/guildhandler.h b/src/net/guildhandler.h index 5c67cda15..8ba843e84 100644 --- a/src/net/guildhandler.h +++ b/src/net/guildhandler.h @@ -67,7 +67,7 @@ class GuildHandler notfinal const bool accept) const = 0; virtual void endAlliance(const int guildId, - const int otherGuildId) const = 0; + const int flag) const = 0; virtual void changeNotice(const int guildId, const std::string &restrict msg1, diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp index 5a6c5e4d5..f02009aea 100644 --- a/src/net/tmwa/guildhandler.cpp +++ b/src/net/tmwa/guildhandler.cpp @@ -430,4 +430,9 @@ void GuildHandler::requestAllianceResponse(const int beingId A_UNUSED, { } +void GuildHandler::endAlliance(const int guildId A_UNUSED, + const int flag A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h index f14a897b6..719991fdc 100644 --- a/src/net/tmwa/guildhandler.h +++ b/src/net/tmwa/guildhandler.h @@ -74,6 +74,10 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void requestAllianceResponse(const int beingId, const bool accept) const override final; + + void endAlliance(const int guildId, + const int flag) const override final; + protected: static void processGuildPositionInfo(Net::MessageIn &msg); -- cgit v1.2.3-70-g09d2