diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-07 18:25:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-07 18:25:22 +0300 |
commit | 2b0176f628521b5eabb2e5874ff4c211ed18c2fd (patch) | |
tree | 488263120908aed6165af56b40eac2a55933cde5 /src | |
parent | e42014689b993e63c8eef5b7b6cbf7b35d3551a8 (diff) | |
download | manaverse-2b0176f628521b5eabb2e5874ff4c211ed18c2fd.tar.gz manaverse-2b0176f628521b5eabb2e5874ff4c211ed18c2fd.tar.bz2 manaverse-2b0176f628521b5eabb2e5874ff4c211ed18c2fd.tar.xz manaverse-2b0176f628521b5eabb2e5874ff4c211ed18c2fd.zip |
Move processPartySettings from ea namespace into eathena and tmwa.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/ea/partyhandler.cpp | 18 | ||||
-rw-r--r-- | src/net/ea/partyhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/partyhandler.cpp | 23 | ||||
-rw-r--r-- | src/net/eathena/partyhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/partyhandler.cpp | 23 | ||||
-rw-r--r-- | src/net/tmwa/partyhandler.h | 3 |
6 files changed, 51 insertions, 20 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index cdcf79d16..7e2be5a95 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -234,24 +234,6 @@ void PartyHandler::processPartyInvited(Net::MessageIn &msg) const socialWindow->showPartyInvite(partyName, nick); } -void PartyHandler::processPartySettings(Net::MessageIn &msg) -{ - if (!Ea::partyTab) - { - if (!chatWindow) - return; - - Ea::partyTab = new PartyTab(chatWindow); - if (config.getBoolValue("showChatHistory")) - Ea::partyTab->loadFromLogFile("#Party"); - } - - // These seem to indicate the sharing mode for exp and items - const int16_t exp = msg.readInt16(); - const int16_t item = msg.readInt16(); - processPartySettingsContinue(exp, item); -} - void PartyHandler::processPartySettingsContinue(const int16_t exp, const int16_t item) { diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index aea58c7cd..93ebde5c4 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -68,8 +68,6 @@ class PartyHandler notfinal : public Net::PartyHandler virtual void processPartyInvited(Net::MessageIn &msg) const; - virtual void processPartySettings(Net::MessageIn &msg); - virtual void processPartyMove(Net::MessageIn &msg) const; virtual void processPartyLeave(Net::MessageIn &msg) const; diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 0cc927ab5..d4404340c 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -22,11 +22,16 @@ #include "net/eathena/partyhandler.h" #include "actormanager.h" +#include "configuration.h" #include "notifymanager.h" #include "party.h" #include "being/localplayer.h" +#include "gui/windows/chatwindow.h" + +#include "net/ea/gui/partytab.h" + #include "net/eathena/messageout.h" #include "net/eathena/protocol.h" @@ -248,4 +253,22 @@ void PartyHandler::processPartyMemberInfo(Net::MessageIn &msg) } } +void PartyHandler::processPartySettings(Net::MessageIn &msg) +{ + if (!Ea::partyTab) + { + if (!chatWindow) + return; + + Ea::partyTab = new Ea::PartyTab(chatWindow); + if (config.getBoolValue("showChatHistory")) + Ea::partyTab->loadFromLogFile("#Party"); + } + + // These seem to indicate the sharing mode for exp and items + const int16_t exp = msg.readInt16(); + const int16_t item = msg.readInt16(); + processPartySettingsContinue(exp, item); +} + } // namespace EAthena diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h index d7655cba3..690949293 100644 --- a/src/net/eathena/partyhandler.h +++ b/src/net/eathena/partyhandler.h @@ -63,6 +63,8 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void setShareItems(const Net::PartyShare::Type share) const override final; + void processPartySettings(Net::MessageIn &msg); + protected: void processPartyInvitationStats(Net::MessageIn &msg); diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 12c011c89..c438b9302 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -22,11 +22,16 @@ #include "net/tmwa/partyhandler.h" #include "actormanager.h" +#include "configuration.h" #include "notifymanager.h" #include "party.h" #include "being/localplayer.h" +#include "gui/windows/chatwindow.h" + +#include "net/ea/gui/partytab.h" + #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" @@ -206,4 +211,22 @@ void PartyHandler::setShareItems(const Net::PartyShare::Type share) const outMsg.writeInt16(static_cast<int16_t>(share)); } +void PartyHandler::processPartySettings(Net::MessageIn &msg) +{ + if (!Ea::partyTab) + { + if (!chatWindow) + return; + + Ea::partyTab = new Ea::PartyTab(chatWindow); + if (config.getBoolValue("showChatHistory")) + Ea::partyTab->loadFromLogFile("#Party"); + } + + // These seem to indicate the sharing mode for exp and items + const int16_t exp = msg.readInt16(); + const int16_t item = msg.readInt16(); + processPartySettingsContinue(exp, item); +} + } // namespace TmwAthena diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h index ec8800316..1ffc8d1e0 100644 --- a/src/net/tmwa/partyhandler.h +++ b/src/net/tmwa/partyhandler.h @@ -62,6 +62,9 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void setShareItems(const Net::PartyShare::Type share) const override final; + + protected: + void processPartySettings(Net::MessageIn &msg); }; } // namespace TmwAthena |