summaryrefslogtreecommitdiff
path: root/src/party.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 19:44:23 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 20:18:11 +0100
commit712ca58c011123505c807266dcc8d9d84ca1aa44 (patch)
tree27c0dfe49f21bffe25007f70475be3223d3fa851 /src/party.cpp
parentff5e1957dd4fde40e41e4c5e4b9e04e1f36e5ef2 (diff)
downloadmana-712ca58c011123505c807266dcc8d9d84ca1aa44.tar.gz
mana-712ca58c011123505c807266dcc8d9d84ca1aa44.tar.bz2
mana-712ca58c011123505c807266dcc8d9d84ca1aa44.tar.xz
mana-712ca58c011123505c807266dcc8d9d84ca1aa44.zip
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.
Diffstat (limited to 'src/party.cpp')
-rw-r--r--src/party.cpp12
1 files changed, 4 insertions, 8 deletions
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);