diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/partyhandler.cpp | 20 | ||||
-rw-r--r-- | src/net/eathena/partyhandler.h | 23 |
2 files changed, 22 insertions, 21 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 9f7772757..b128d3879 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -102,13 +102,13 @@ void PartyHandler::handleMessage(Net::MessageIn &msg) } } -void PartyHandler::create(const std::string &name) +void PartyHandler::create(const std::string &name) const { MessageOut outMsg(CMSG_PARTY_CREATE); outMsg.writeString(name.substr(0, 23), 24); } -void PartyHandler::invite(Being *being) +void PartyHandler::invite(Being *const being) const { if (being) { @@ -117,7 +117,7 @@ void PartyHandler::invite(Being *being) } } -void PartyHandler::invite(const std::string &name) +void PartyHandler::invite(const std::string &name) const { if (!actorSpriteManager) return; @@ -132,7 +132,7 @@ void PartyHandler::invite(const std::string &name) } void PartyHandler::inviteResponse(const std::string &inviter A_UNUSED, - bool accept) + const bool accept) const { if (player_node) { @@ -142,12 +142,12 @@ void PartyHandler::inviteResponse(const std::string &inviter A_UNUSED, } } -void PartyHandler::leave() +void PartyHandler::leave() const { MessageOut outMsg(CMSG_PARTY_LEAVE); } -void PartyHandler::kick(Being *being) +void PartyHandler::kick(Being *const being) const { if (being) { @@ -157,7 +157,7 @@ void PartyHandler::kick(Being *being) } } -void PartyHandler::kick(const std::string &name) +void PartyHandler::kick(const std::string &name) const { if (!Ea::taParty) return; @@ -174,14 +174,14 @@ void PartyHandler::kick(const std::string &name) outMsg.writeString(name, 24); //Unused } -void PartyHandler::chat(const std::string &text) +void PartyHandler::chat(const std::string &text) const { MessageOut outMsg(CMSG_PARTY_MESSAGE); outMsg.writeInt16(static_cast<int16_t>(text.length() + 4)); outMsg.writeString(text, static_cast<int>(text.length())); } -void PartyHandler::setShareExperience(PartyShare share) +void PartyHandler::setShareExperience(const PartyShare share) const { if (share == PARTY_SHARE_NOT_POSSIBLE) return; @@ -191,7 +191,7 @@ void PartyHandler::setShareExperience(PartyShare share) outMsg.writeInt16(mShareItems); } -void PartyHandler::setShareItems(PartyShare share) +void PartyHandler::setShareItems(const PartyShare share) const { if (share == PARTY_SHARE_NOT_POSSIBLE) return; diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h index bf58b58aa..7e3e6630b 100644 --- a/src/net/eathena/partyhandler.h +++ b/src/net/eathena/partyhandler.h @@ -41,27 +41,28 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler ~PartyHandler(); - void handleMessage(Net::MessageIn &msg); + void handleMessage(Net::MessageIn &msg) override; - void create(const std::string &name); + void create(const std::string &name) const override; - void invite(Being *being); + void invite(Being *const being) const override; - void invite(const std::string &name); + void invite(const std::string &name) const override; - void inviteResponse(const std::string &inviter, bool accept); + void inviteResponse(const std::string &inviter, + const bool accept) const override; - void leave(); + void leave() const override; - void kick(Being *being); + void kick(Being *const being) const override; - void kick(const std::string &name); + void kick(const std::string &name) const override; - void chat(const std::string &text); + void chat(const std::string &text) const override; - void setShareExperience(PartyShare share); + void setShareExperience(const PartyShare share) const override; - void setShareItems(PartyShare share); + void setShareItems(const PartyShare share) const override; }; } // namespace EAthena |