diff options
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; |