From 712ca58c011123505c807266dcc8d9d84ca1aa44 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 27 Mar 2009 19:44:23 +0100 Subject: Made eAthena's Network class statically accessible Now the instance doesn't need to be passed into the MessageOut class anymore. Expect a lot of cleanup in the next commit. --- src/party.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/party.cpp') diff --git a/src/party.cpp b/src/party.cpp index 51a86360..4a7912ee 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -56,8 +56,7 @@ void Party::respond(const std::string &command, const std::string &args) localChatTab->chatLog(_("Not yet implemented!"), BY_SERVER); return; /* - MessageOut outMsg(mNetwork); - outMsg.writeInt16(CMSG_PARTY_SETTINGS); + MessageOut outMsg(CMSG_PARTY_SETTINGS); outMsg.writeInt16(0); // Experience outMsg.writeInt16(0); // Item */ @@ -72,16 +71,14 @@ void Party::create(const std::string &party) localChatTab->chatLog(_("Party name is missing."), BY_SERVER); return; } - MessageOut outMsg(mNetwork); - outMsg.writeInt16(CMSG_PARTY_CREATE); + MessageOut outMsg(CMSG_PARTY_CREATE); outMsg.writeString(party.substr(0, 23), 24); mCreating = true; } void Party::leave(const std::string &args) { - MessageOut outMsg(mNetwork); - outMsg.writeInt16(CMSG_PARTY_LEAVE); + MessageOut outMsg(CMSG_PARTY_LEAVE); localChatTab->chatLog(_("Left party."), BY_SERVER); mInParty = false; } @@ -137,8 +134,7 @@ void Party::invitedAsk(const std::string &nick, int gender, void Party::InviteListener::action(const gcn::ActionEvent &event) { - MessageOut outMsg(mNetwork); - outMsg.writeInt16(CMSG_PARTY_INVITED); + MessageOut outMsg(CMSG_PARTY_INVITED); outMsg.writeInt32(player_node->getId()); bool accept = event.getId() == "yes"; outMsg.writeInt32(accept ? 1 : 0); -- cgit v1.2.3-60-g2f50