diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-19 17:28:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-19 17:28:57 +0300 |
commit | 34e9ca0dbab79dea6819b153ee136ae8f4caaa3d (patch) | |
tree | 7e6d8b928c2a9f50ee144143eee61313ddd54cf2 /src/net/ea | |
parent | 628219ea2bfd48ad236f9c253dc412edcc8e3004 (diff) | |
download | mv-34e9ca0dbab79dea6819b153ee136ae8f4caaa3d.tar.gz mv-34e9ca0dbab79dea6819b153ee136ae8f4caaa3d.tar.bz2 mv-34e9ca0dbab79dea6819b153ee136ae8f4caaa3d.tar.xz mv-34e9ca0dbab79dea6819b153ee136ae8f4caaa3d.zip |
add static in partyhandler.
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/partyhandler.cpp | 21 | ||||
-rw-r--r-- | src/net/ea/partyhandler.h | 24 |
2 files changed, 24 insertions, 21 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 425ba7793..a04e4861c 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -45,11 +45,14 @@ namespace Ea { Party *taParty = nullptr; +Net::PartyShare::Type PartyHandler::mShareExp = Net::PartyShare::UNKNOWN; +Net::PartyShare::Type PartyHandler::mShareItems = Net::PartyShare::UNKNOWN; PartyHandler::PartyHandler() : - mShareExp(Net::PartyShare::UNKNOWN), - mShareItems(Net::PartyShare::UNKNOWN) + Net::PartyHandler() { + mShareExp = Net::PartyShare::UNKNOWN; + mShareItems = Net::PartyShare::UNKNOWN; taParty = Party::getParty(1); } @@ -72,7 +75,7 @@ void PartyHandler::clear() const taParty = nullptr; } -void PartyHandler::processPartyCreate(Net::MessageIn &msg) const +void PartyHandler::processPartyCreate(Net::MessageIn &msg) { if (msg.readUInt8()) NotifyManager::notify(NotifyTypes::PARTY_CREATE_FAILED); @@ -80,7 +83,7 @@ void PartyHandler::processPartyCreate(Net::MessageIn &msg) const NotifyManager::notify(NotifyTypes::PARTY_CREATED); } -void PartyHandler::processPartyInvited(Net::MessageIn &msg) const +void PartyHandler::processPartyInvited(Net::MessageIn &msg) { const int id = msg.readInt32(); const std::string partyName = msg.readString(24); @@ -154,7 +157,7 @@ void PartyHandler::processPartySettingsContinue(const int16_t exp, } } -void PartyHandler::processPartyMove(Net::MessageIn &msg) const +void PartyHandler::processPartyMove(Net::MessageIn &msg) { const int id = msg.readInt32(); // id PartyMember *m = nullptr; @@ -185,7 +188,7 @@ void PartyHandler::processPartyMove(Net::MessageIn &msg) const } } -void PartyHandler::processPartyLeave(Net::MessageIn &msg) const +void PartyHandler::processPartyLeave(Net::MessageIn &msg) { const int id = msg.readInt32("account id"); const std::string nick = msg.readString(24, "nick"); @@ -269,7 +272,7 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg) const } } -void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg) const +void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg) { const int id = msg.readInt32(); const int hp = msg.readInt16(); @@ -292,7 +295,7 @@ void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg) const } } -void PartyHandler::processPartyUpdateCoords(Net::MessageIn &msg) const +void PartyHandler::processPartyUpdateCoords(Net::MessageIn &msg) { const int id = msg.readInt32(); // id PartyMember *m = nullptr; @@ -315,7 +318,7 @@ ChatTab *PartyHandler::getTab() const return partyTab; } -void PartyHandler::createTab() const +void PartyHandler::createTab() { partyTab = new PartyTab(chatWindow); if (config.getBoolValue("showChatHistory")) diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index e18e8551a..d2c82cc95 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -59,26 +59,26 @@ class PartyHandler notfinal : public Net::PartyHandler ChatTab *getTab() const override final; - virtual void processPartyCreate(Net::MessageIn &msg) const; + protected: + static void createTab(); - virtual void processPartyInvited(Net::MessageIn &msg) const; + static void processPartyCreate(Net::MessageIn &msg); - virtual void processPartyMove(Net::MessageIn &msg) const; + static void processPartyInvited(Net::MessageIn &msg); - virtual void processPartyLeave(Net::MessageIn &msg) const; + static void processPartyMove(Net::MessageIn &msg); - virtual void processPartyUpdateHp(Net::MessageIn &msg) const; + static void processPartyLeave(Net::MessageIn &msg); - virtual void processPartyUpdateCoords(Net::MessageIn &msg) const; + static void processPartyUpdateHp(Net::MessageIn &msg); - void processPartySettingsContinue(const int16_t exp, - const int16_t item); + static void processPartyUpdateCoords(Net::MessageIn &msg); - void createTab() const; + static void processPartySettingsContinue(const int16_t exp, + const int16_t item); - protected: - Net::PartyShare::Type mShareExp; - Net::PartyShare::Type mShareItems; + static Net::PartyShare::Type mShareExp; + static Net::PartyShare::Type mShareItems; }; extern Party *taParty; |