diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-05 23:18:50 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-05 23:19:21 +0200 |
commit | 96e56ba80110b54af0ee8ebb3410bd4d9d21cdfe (patch) | |
tree | 049c627092239266e3c8443375b5116cc06a207d /src/net/ea/partyhandler.cpp | |
parent | c5afd22e3d7066837e8dd812d60cf8ce5ca0f2b2 (diff) | |
download | mana-96e56ba80110b54af0ee8ebb3410bd4d9d21cdfe.tar.gz mana-96e56ba80110b54af0ee8ebb3410bd4d9d21cdfe.tar.bz2 mana-96e56ba80110b54af0ee8ebb3410bd4d9d21cdfe.tar.xz mana-96e56ba80110b54af0ee8ebb3410bd4d9d21cdfe.zip |
Fixed compile warnings
Initialization order, return values, unused variables, missing
enumerator.
Diffstat (limited to 'src/net/ea/partyhandler.cpp')
-rw-r--r-- | src/net/ea/partyhandler.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 38adaa7e..a021c6d7 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -37,10 +37,6 @@ #include "utils/strprintf.h" PartyTab *partyTab; - -static void newPartyTab() { partyTab = new PartyTab(); } -static void deletePartyTab() { delete partyTab ; } - PartyHandler *partyHandler; PartyHandler::PartyHandler() @@ -154,21 +150,21 @@ void PartyHandler::handleMessage(MessageIn &msg) break; case SMSG_PARTY_MOVE: { - int id = msg.readInt32(); + msg.readInt32(); // id msg.skip(4); - int x = msg.readInt16(); - int y = msg.readInt16(); - bool online = msg.readInt8() == 0; - std::string party = msg.readString(24); - std::string nick = msg.readString(24); - std::string map = msg.readString(16); + msg.readInt16(); // x + msg.readInt16(); // y + msg.readInt8(); // online (if 0) + msg.readString(24); // party + msg.readString(24); // nick + msg.readString(16); // map } break; case SMSG_PARTY_LEAVE: { int id = msg.readInt32(); std::string nick = msg.readString(24); - int fail = msg.readInt8(); + msg.readInt8(); // fail partyTab->chatLog(strprintf(_("%s has left your party."), nick.c_str()), BY_SERVER); partyWindow->removeMember(id); @@ -176,16 +172,16 @@ void PartyHandler::handleMessage(MessageIn &msg) } case SMSG_PARTY_UPDATE_HP: { - int id = msg.readInt32(); - int hp = msg.readInt16(); - int hpMax = msg.readInt16(); + msg.readInt32(); // id + msg.readInt16(); // hp + msg.readInt16(); // hpMax } break; case SMSG_PARTY_UPDATE_COORDS: { - int id = msg.readInt32(); - int x = msg.readInt16(); - int y = msg.readInt16(); + msg.readInt32(); // id + msg.readInt16(); // x + msg.readInt16(); // y } break; case SMSG_PARTY_MESSAGE: |