summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-15 01:07:47 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-15 02:05:50 +0200
commite2150d04662a4ba8b5304dabcc74be0bacded5b7 (patch)
treecbeb05c2f056a7d5ac4a08e7b80799b5cfd4785b /src/net/tmwa
parentedda37acb9d66f2751ef712c83dced62428fa685 (diff)
downloadmv-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.gz
mv-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.bz2
mv-e2150d04662a4ba8b5304dabcc74be0bacded5b7.tar.xz
mv-e2150d04662a4ba8b5304dabcc74be0bacded5b7.zip
Fix code style, apply some fixes after checking with cppcheck from git.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/buysellhandler.cpp1
-rw-r--r--src/net/tmwa/gamehandler.cpp1
-rw-r--r--src/net/tmwa/guildhandler.h2
-rw-r--r--src/net/tmwa/inventoryhandler.cpp4
-rw-r--r--src/net/tmwa/network.cpp4
5 files changed, 8 insertions, 4 deletions
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 84a02e92a..02613cebd 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -65,6 +65,7 @@ BuySellHandler::BuySellHandler()
mNpcId = 0;
handledMessages = _messages;
buySellHandler = this;
+ mBuyDialog = 0;
}
void BuySellHandler::handleMessage(Net::MessageIn &msg)
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index 5f949ce6e..e35a31898 100644
--- a/src/net/tmwa/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -59,6 +59,7 @@ GameHandler::GameHandler()
};
handledMessages = _messages;
gameHandler = this;
+ mCharID = 0;
listen(CHANNEL_GAME);
}
diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h
index 80b03bd01..d1f19d37c 100644
--- a/src/net/tmwa/guildhandler.h
+++ b/src/net/tmwa/guildhandler.h
@@ -76,7 +76,7 @@ class GuildHandler : public Net::GuildHandler, public MessageHandler
private:
// TmwAthena (and eAthena) only supports one guild per player
- Guild *mGuild;
+// Guild *mGuild;
};
}
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 186f9ceb3..ad5ff4fff 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -372,9 +372,11 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
InventoryItems::iterator it = mInventoryItems.begin();
InventoryItems::iterator it_end = mInventoryItems.end();
- for (; it != it_end; it++)
+ for (; it != it_end; ++it)
+ {
mStorage->setItem((*it).slot, (*it).id, (*it).quantity,
(*it).equip);
+ }
mInventoryItems.clear();
if (!mStorageWindow)
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index 7aa9ad7d2..b96cfd2b5 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -290,12 +290,12 @@ void Network::skip(int len)
bool Network::messageReady()
{
- int len = -1, msgId;
+ int len = -1;
SDL_mutexP(mMutex);
if (mInSize >= 2)
{
- msgId = readWord(0);
+ int msgId = readWord(0);
if (msgId == SMSG_SERVER_VERSION_RESPONSE)
len = 10;
else