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 | |
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')
-rw-r--r-- | src/net/ea/partyhandler.cpp | 32 | ||||
-rw-r--r-- | src/net/net.cpp | 10 | ||||
-rw-r--r-- | src/net/tmwserv/npchandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwserv/npchandler.h | 4 |
4 files changed, 28 insertions, 22 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: diff --git a/src/net/net.cpp b/src/net/net.cpp index c4dcf0a4..39575372 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -48,26 +48,31 @@ Net::AdminHandler *Net::getAdminHandler() { // TODO + return 0; } Net::CharHandler *Net::getCharHandler() { // TODO + return 0; } Net::ChatHandler *Net::getChatHandler() { // TODO + return 0; } Net::GeneralHandler *Net::getGeneralHandler() { // TODO + return 0; } Net::GuildHandler *Net::getGuildHandler() { // TODO + return 0; } Net::InventoryHandler *Net::getInventoryHandler() @@ -78,21 +83,25 @@ Net::InventoryHandler *Net::getInventoryHandler() Net::LoginHandler *Net::getLoginHandler() { // TODO + return 0; } Net::MapHandler *Net::getMapHandler() { // TODO + return 0; } Net::NpcHandler *Net::getNpcHandler() { // TODO + return 0; } Net::PartyHandler *Net::getPartyHandler() { // TODO + return 0; } Net::PlayerHandler *Net::getPlayerHandler() @@ -103,6 +112,7 @@ Net::PlayerHandler *Net::getPlayerHandler() Net::SkillHandler *Net::getSkillHandler() { // TODO + return 0; } Net::TradeHandler *Net::getTradeHandler() diff --git a/src/net/tmwserv/npchandler.cpp b/src/net/tmwserv/npchandler.cpp index bae5228c..4acd2eee 100644 --- a/src/net/tmwserv/npchandler.cpp +++ b/src/net/tmwserv/npchandler.cpp @@ -32,7 +32,7 @@ #include "gui/npcpostdialog.h" #include "gui/npc_text.h" -NPCHandler::NPCHandler() +NpcHandler::NpcHandler() { static const Uint16 _messages[] = { GPMSG_NPC_CHOICE, @@ -44,7 +44,7 @@ NPCHandler::NPCHandler() handledMessages = _messages; } -void NPCHandler::handleMessage(MessageIn &msg) +void NpcHandler::handleMessage(MessageIn &msg) { Being *being = beingManager->findBeing(msg.readInt16()); if (!being || being->getType() != Being::NPC) diff --git a/src/net/tmwserv/npchandler.h b/src/net/tmwserv/npchandler.h index 905c9b01..c8ad738b 100644 --- a/src/net/tmwserv/npchandler.h +++ b/src/net/tmwserv/npchandler.h @@ -24,10 +24,10 @@ #include "net/messagehandler.h" -class NPCHandler : public MessageHandler +class NpcHandler : public MessageHandler { public: - NPCHandler(); + NpcHandler(); void handleMessage(MessageIn &msg); }; |