diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-25 18:13:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-25 18:13:48 +0300 |
commit | c1657f9dd2099796c6b20b9672d500aee30e205b (patch) | |
tree | 07e274728a1ec25c8890abf07ac9943818381c55 /src/net | |
parent | a886446d41ed6656afbdd348b6dc6cb617309040 (diff) | |
download | mv-c1657f9dd2099796c6b20b9672d500aee30e205b.tar.gz mv-c1657f9dd2099796c6b20b9672d500aee30e205b.tar.bz2 mv-c1657f9dd2099796c6b20b9672d500aee30e205b.tar.xz mv-c1657f9dd2099796c6b20b9672d500aee30e205b.zip |
Move all receive (process) methods into protected.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/chathandler.h | 6 | ||||
-rw-r--r-- | src/net/ea/gamehandler.h | 10 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.h | 20 | ||||
-rw-r--r-- | src/net/ea/itemhandler.h | 1 | ||||
-rw-r--r-- | src/net/ea/loginhandler.h | 10 | ||||
-rw-r--r-- | src/net/ea/npchandler.h | 6 | ||||
-rw-r--r-- | src/net/eathena/chathandler.h | 6 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 4 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.h | 6 | ||||
-rw-r--r-- | src/net/tmwa/guildmanager.h | 4 | ||||
-rw-r--r-- | src/net/tmwa/questhandler.h | 6 |
11 files changed, 40 insertions, 39 deletions
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index c58c6e534..d5a0e86f6 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -47,16 +47,16 @@ class ChatHandler notfinal : public Net::ChatHandler void me(const std::string &restrict text, const std::string &restrict channel) const override final; + void clear() override final; + + protected: static void processMVPEffect(Net::MessageIn &msg); static void processIgnoreAllResponse(Net::MessageIn &msg); - void clear() override final; - static void processWhisperResponseContinue(Net::MessageIn &msg, const uint8_t type); - protected: static std::string getPopLastWhisperNick(); static std::string getLastWhisperNick(); diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h index 7ff3a5ca9..ee1f12701 100644 --- a/src/net/ea/gamehandler.h +++ b/src/net/ea/gamehandler.h @@ -52,17 +52,17 @@ class GameHandler notfinal : public Net::GameHandler bool canUseMagicBar() const override final A_WARN_UNUSED { return true; } + void clear() override final; + + void initEngines() const override final; + + protected: static void processWhoAnswer(Net::MessageIn &msg); static void processCharSwitchResponse(Net::MessageIn &msg); static void processMapQuitResponse(Net::MessageIn &msg); - void clear() override final; - - void initEngines() const override final; - - protected: static std::string mMap; static BeingId mCharID; // < Saved for map-server switching }; diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index fa2f2d0b2..29d24a1ac 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -73,6 +73,16 @@ class InventoryHandler notfinal : public Net::InventoryHandler static int getSlot(const int eAthenaSlot) A_WARN_UNUSED; + void destroyStorage() override final; + + void forgotStorage() override final; + + Inventory *getStorage() const override final + { return mStorage; } + + protected: + InventoryHandler(); + static void processPlayerInventoryRemove(Net::MessageIn &msg); static void processPlayerInventoryUse(Net::MessageIn &msg); @@ -87,16 +97,6 @@ class InventoryHandler notfinal : public Net::InventoryHandler static void processPlayerArrowEquip(Net::MessageIn &msg); - void destroyStorage() override final; - - void forgotStorage() override final; - - Inventory *getStorage() const override final - { return mStorage; } - - protected: - InventoryHandler(); - static EquipBackend mEquips; static InventoryItems mInventoryItems; static Inventory *mStorage; diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h index f499a5f7b..67fe288b9 100644 --- a/src/net/ea/itemhandler.h +++ b/src/net/ea/itemhandler.h @@ -42,6 +42,7 @@ class ItemHandler notfinal virtual ~ItemHandler(); + protected: static void processItemRemove(Net::MessageIn &msg); }; diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h index 2cdb9943b..96a228b07 100644 --- a/src/net/ea/loginhandler.h +++ b/src/net/ea/loginhandler.h @@ -81,17 +81,17 @@ class LoginHandler notfinal : public Net::LoginHandler const std::string &password) const override final; + void loginOrRegister(LoginData *const data) const override final; + + protected: + LoginHandler(); + static void processUpdateHost(Net::MessageIn &msg); static void processLoginData(Net::MessageIn &msg); static void processLoginError(Net::MessageIn &msg); - void loginOrRegister(LoginData *const data) const override final; - - protected: - LoginHandler(); - virtual void sendLoginRegister(const std::string &username, const std::string &password, const std::string &email) const = 0; diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h index 238c8dc1d..28a423c39 100644 --- a/src/net/ea/npchandler.h +++ b/src/net/ea/npchandler.h @@ -42,6 +42,9 @@ class NpcHandler notfinal : public Net::NpcHandler public: A_DELETE_COPY(NpcHandler) + protected: + NpcHandler(); + static void processNpcChoice(Net::MessageIn &msg); static void processNpcMessage(Net::MessageIn &msg); @@ -58,9 +61,6 @@ class NpcHandler notfinal : public Net::NpcHandler static void processChangeTitle(Net::MessageIn &msg); - protected: - NpcHandler(); - static NpcDialog *mDialog; static bool mRequestLang; diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index a1a86f20e..d934bb203 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -68,9 +68,6 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler const int limit, const bool isPublic) override final; - static void processRaw(MessageOut &restrict outMsg, - const std::string &restrict line); - void ignore(const std::string &nick) const override final; void unIgnore(const std::string &nick) const override final; @@ -101,6 +98,9 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler protected: static std::string extractChannelFromMessage(std::string &chatMsg); + static void processRaw(MessageOut &restrict outMsg, + const std::string &restrict line); + static void processChat(Net::MessageIn &msg); static void processColorChat(Net::MessageIn &msg); diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index 967df6795..46bdf8f90 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -51,8 +51,6 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void sendPetMessage(const int data) const override final; - void processPetMessage(Net::MessageIn &msg); - void setName(const std::string &name) const override final; void requestStatus() const override final; @@ -70,6 +68,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void startAi(const bool start) const override final; protected: + void processPetMessage(Net::MessageIn &msg); + static void processPetRoulette(Net::MessageIn &msg); static void processEggsList(Net::MessageIn &msg); diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index 4bb199416..176d8e3be 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -61,9 +61,6 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void unIgnoreAll() const override final; - static void processRaw(MessageOut &restrict outMsg, - const std::string &restrict line); - void createChatRoom(const std::string &title, const std::string &password, const int limit, @@ -114,6 +111,9 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler static void processBeingChat(Net::MessageIn &msg); static void processScriptMessage(Net::MessageIn &msg); + + static void processRaw(MessageOut &restrict outMsg, + const std::string &restrict line); }; } // namespace TmwAthena diff --git a/src/net/tmwa/guildmanager.h b/src/net/tmwa/guildmanager.h index 4a03f02b9..92b5eeae0 100644 --- a/src/net/tmwa/guildmanager.h +++ b/src/net/tmwa/guildmanager.h @@ -46,8 +46,6 @@ class GuildManager final static void send(const std::string &msg); - bool processGuildMessage(const std::string &msg); - void getNames(StringVect &names) const; void requestGuildInfo(); @@ -84,6 +82,8 @@ class GuildManager final ChatTab *getTab(); + bool processGuildMessage(const std::string &msg); + private: bool process(std::string msg); diff --git a/src/net/tmwa/questhandler.h b/src/net/tmwa/questhandler.h index 4fcd470e1..c63fa56b0 100644 --- a/src/net/tmwa/questhandler.h +++ b/src/net/tmwa/questhandler.h @@ -38,12 +38,12 @@ class QuestHandler final : public MessageHandler, void handleMessage(Net::MessageIn &msg) override final; + void setQeustActiveState(const int questId, + const bool active) const override final; + protected: static void processSetQuestVar(Net::MessageIn &msg); static void processPlayerQuests(Net::MessageIn &msg); - - void setQeustActiveState(const int questId, - const bool active) const override final; }; } // namespace TmwAthena |