summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game.cpp4
-rw-r--r--src/gui/setup_colors.cpp1
-rw-r--r--src/net/ea/partyhandler.cpp32
-rw-r--r--src/net/net.cpp10
-rw-r--r--src/net/tmwserv/npchandler.cpp4
-rw-r--r--src/net/tmwserv/npchandler.h4
6 files changed, 31 insertions, 24 deletions
diff --git a/src/game.cpp b/src/game.cpp
index ca436409..2f66b86f 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -359,17 +359,17 @@ Game::Game():
#else
Game::Game(Network *network):
mNetwork(network),
- mAdminHandler(new AdminHandler),
mBeingHandler(new BeingHandler(config.getValue("EnableSync", 0) == 1)),
+ mAdminHandler(new AdminHandler),
mEquipmentHandler(new EquipmentHandler),
mSkillHandler(new SkillHandler),
- mNpcHandler(new NpcHandler),
#endif
mPartyHandler(new PartyHandler),
mBuySellHandler(new BuySellHandler),
mChatHandler(new ChatHandler),
mInventoryHandler(new InventoryHandler),
mItemHandler(new ItemHandler),
+ mNpcHandler(new NpcHandler),
mPlayerHandler(new PlayerHandler),
mTradeHandler(new TradeHandler),
mLastTarget(Being::UNKNOWN),
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index ed1b6d09..da2cfb6b 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -248,6 +248,7 @@ void Setup_Colors::action(const gcn::ActionEvent &event)
case Palette::TWOHAND:
case Palette::SHIELD:
case Palette::RING:
+ case Palette::NECKLACE:
case Palette::ARMS:
case Palette::AMMO:
mTextPreview->setFont(boldFont);
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);
};