From 4b0e8e066ae5314bf8efd56f200b5aea338e24bc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 10 Sep 2014 20:40:12 +0300 Subject: eathena: add packet CMSG_PARTY_CHANGE_LEADER 0x07da. --- src/net/eathena/partyhandler.cpp | 8 ++++++++ src/net/eathena/partyhandler.h | 2 ++ src/net/eathena/protocol.h | 1 + src/net/partyhandler.h | 2 ++ src/net/tmwa/partyhandler.cpp | 4 ++++ src/net/tmwa/partyhandler.h | 1 + 6 files changed, 18 insertions(+) (limited to 'src/net') diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index baaa1fffe..4ea0e83ea 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -445,4 +445,12 @@ void PartyHandler::processPartyInviteResponse(Net::MessageIn &msg) const } } +void PartyHandler::changeLeader(const Being *const being) const +{ + if (!being) + return; + MessageOut outMsg(CMSG_PARTY_CHANGE_LEADER); + outMsg.writeInt32(being->getId()); +} + } // namespace EAthena diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h index 100656e83..16fa690bf 100644 --- a/src/net/eathena/partyhandler.h +++ b/src/net/eathena/partyhandler.h @@ -61,6 +61,8 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void setShareItems(const Net::PartyShare::Type share) const override final; + void changeLeader(const Being *const being) const override final; + void processPartySettings(Net::MessageIn &msg); protected: diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index df6da397d..c49550fa5 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -282,6 +282,7 @@ #define CMSG_PARTY_SETTINGS 0x0102 #define CMSG_PARTY_KICK 0x0103 #define CMSG_PARTY_MESSAGE 0x0108 +#define CMSG_PARTY_CHANGE_LEADER 0x07da #define CMSG_MOVE_TO_STORAGE 0x07ec /** Move item to storage */ #define CSMG_MOVE_FROM_STORAGE 0x0364 /** Remove item from storage */ diff --git a/src/net/partyhandler.h b/src/net/partyhandler.h index b6537b52f..393d812fb 100644 --- a/src/net/partyhandler.h +++ b/src/net/partyhandler.h @@ -70,6 +70,8 @@ class PartyHandler notfinal virtual void setShareItems(const Net::PartyShare::Type share) const = 0; + virtual void changeLeader(const Being *const being) const = 0; + virtual void clear() const = 0; virtual ChatTab *getTab() const = 0; diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 6791fca3d..bbf74a099 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -375,4 +375,8 @@ void PartyHandler::processPartyInviteResponse(Net::MessageIn &msg) const } } +void PartyHandler::changeLeader(const Being *const being A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h index f0df03a71..f81c97eed 100644 --- a/src/net/tmwa/partyhandler.h +++ b/src/net/tmwa/partyhandler.h @@ -61,6 +61,7 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void setShareItems(const Net::PartyShare::Type share) const override final; + void changeLeader(const Being *const being) const override final; protected: void processPartySettings(Net::MessageIn &msg); -- cgit v1.2.3-70-g09d2