summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-26 23:25:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-26 23:25:32 +0300
commit3ed2e647a7ec634a91a32e7ac493c9f2b6d693b0 (patch)
treed7f1400583c5bc6916129e05fc5e0907d1081ca9 /src/net/tmwa
parent6112e911a5b702fa1a9fca7bb6300f0195cbe685 (diff)
downloadmv-3ed2e647a7ec634a91a32e7ac493c9f2b6d693b0.tar.gz
mv-3ed2e647a7ec634a91a32e7ac493c9f2b6d693b0.tar.bz2
mv-3ed2e647a7ec634a91a32e7ac493c9f2b6d693b0.tar.xz
mv-3ed2e647a7ec634a91a32e7ac493c9f2b6d693b0.zip
Fix code style.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/adminhandler.cpp3
-rw-r--r--src/net/tmwa/beinghandler.cpp4
-rw-r--r--src/net/tmwa/buysellhandler.cpp1
-rw-r--r--src/net/tmwa/charserverhandler.cpp1
-rw-r--r--src/net/tmwa/chathandler.cpp5
-rw-r--r--src/net/tmwa/gamehandler.cpp2
-rw-r--r--src/net/tmwa/guildhandler.cpp1
-rw-r--r--src/net/tmwa/inventoryhandler.cpp1
-rw-r--r--src/net/tmwa/loginhandler.cpp1
-rw-r--r--src/net/tmwa/messagein.cpp2
-rw-r--r--src/net/tmwa/npchandler.cpp1
-rw-r--r--src/net/tmwa/pethandler.cpp4
-rw-r--r--src/net/tmwa/playerhandler.cpp2
-rw-r--r--src/net/tmwa/questhandler.cpp1
-rw-r--r--src/net/tmwa/serverfeatures.cpp2
15 files changed, 8 insertions, 23 deletions
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index 5a35ed3c4..a7b3ceb5c 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -27,13 +27,14 @@
#include "gui/chatconsts.h"
#include "net/chathandler.h"
-#include "net/net.h"
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
#include "resources/notifytypes.h"
+#include "utils/stringutils.h"
+
#include <string>
#include "debug.h"
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 7108f8ac8..863c4420f 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -26,7 +26,6 @@
#include "guild.h"
#include "guildmanager.h"
#include "party.h"
-#include "position.h"
#include "being/localplayer.h"
@@ -36,11 +35,10 @@
#include "gui/windows/outfitwindow.h"
#include "gui/windows/socialwindow.h"
-#include "net/net.h"
+#include "net/serverfeatures.h"
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
-#include "net/tmwa/serverfeatures.h"
#include "net/tmwa/sprite.h"
#include "resources/iteminfo.h"
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 5de7b0556..2f1f23adc 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -29,7 +29,6 @@
#include "gui/windows/buydialog.h"
-#include "net/net.h"
#include "net/serverfeatures.h"
#include "net/tmwa/protocol.h"
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 512ef6e44..c687739e2 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -32,7 +32,6 @@
#include "net/character.h"
#include "net/logindata.h"
-#include "net/net.h"
#include "net/serverfeatures.h"
#include "net/tmwa/attrs.h"
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index c2ffca0e3..73e651da2 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -30,7 +30,6 @@
#include "gui/windows/chatwindow.h"
-#include "net/net.h"
#include "net/serverfeatures.h"
#include "net/tmwa/messageout.h"
@@ -282,7 +281,7 @@ void ChatHandler::battleTalk(const std::string &text A_UNUSED) const
void ChatHandler::processChat(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processChat")
- int chatMsgLength = msg.readInt16("len") - 4;
+ const int chatMsgLength = msg.readInt16("len") - 4;
if (chatMsgLength <= 0)
{
BLOCK_END("ChatHandler::processChat")
@@ -295,7 +294,7 @@ void ChatHandler::processChat(Net::MessageIn &msg)
void ChatHandler::processChat2(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processChat")
- int chatMsgLength = msg.readInt16("len") - 4 - 3;
+ const int chatMsgLength = msg.readInt16("len") - 4 - 3;
std::string channel;
channel = msg.readUInt8("channel byte 0");
channel += msg.readUInt8("channel byte 1");
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index cad7a12dc..c7399e9f1 100644
--- a/src/net/tmwa/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -26,8 +26,6 @@
#include "being/localplayer.h"
-#include "net/net.h"
-
#include "net/tmwa/loginhandler.h"
#include "net/tmwa/messageout.h"
#include "net/tmwa/network.h"
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index 35b25364b..d6ee27680 100644
--- a/src/net/tmwa/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -26,7 +26,6 @@
#include "being/localplayer.h"
#include "being/playerinfo.h"
-#include "net/net.h"
#include "net/serverfeatures.h"
#include "net/tmwa/messageout.h"
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index a64efd571..d76f4b990 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -29,7 +29,6 @@
#include "listeners/arrowslistener.h"
-#include "net/net.h"
#include "net/serverfeatures.h"
#include "net/tmwa/messageout.h"
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index 4e9120eae..c58e7687e 100644
--- a/src/net/tmwa/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -25,7 +25,6 @@
#include "client.h"
#include "logger.h"
-#include "net/net.h"
#include "net/serverfeatures.h"
#include "net/tmwa/messageout.h"
diff --git a/src/net/tmwa/messagein.cpp b/src/net/tmwa/messagein.cpp
index 660548bd6..55c42324e 100644
--- a/src/net/tmwa/messagein.cpp
+++ b/src/net/tmwa/messagein.cpp
@@ -27,8 +27,6 @@
#include "logger.h"
-#include "utils/stringutils.h"
-
#include <SDL_endian.h>
#include "debug.h"
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index d7b453058..0cc7c6dbf 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -28,7 +28,6 @@
#include "gui/windows/npcdialog.h"
-#include "net/net.h"
#include "net/serverfeatures.h"
#include "net/tmwa/messageout.h"
diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp
index c5e7f481c..1f278e016 100644
--- a/src/net/tmwa/pethandler.cpp
+++ b/src/net/tmwa/pethandler.cpp
@@ -22,10 +22,10 @@
#include "gui/chatconsts.h"
-#include "net/net.h"
-
#include "net/chathandler.h"
+#include "utils/stringutils.h"
+
#include "debug.h"
extern Net::PetHandler *petHandler;
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 08be2f53a..3c3173d47 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -32,8 +32,6 @@
#include "gui/windows/statuswindow.h"
-#include "net/net.h"
-
#include "net/tmwa/attrs.h"
#include "net/tmwa/inventoryhandler.h"
#include "net/tmwa/messageout.h"
diff --git a/src/net/tmwa/questhandler.cpp b/src/net/tmwa/questhandler.cpp
index fc3f7eee1..995792da0 100644
--- a/src/net/tmwa/questhandler.cpp
+++ b/src/net/tmwa/questhandler.cpp
@@ -23,7 +23,6 @@
#include "gui/windows/skilldialog.h"
#include "gui/windows/questswindow.h"
-#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
#include "resources/skillconsts.h"
diff --git a/src/net/tmwa/serverfeatures.cpp b/src/net/tmwa/serverfeatures.cpp
index 5177ac7cb..611a22fc4 100644
--- a/src/net/tmwa/serverfeatures.cpp
+++ b/src/net/tmwa/serverfeatures.cpp
@@ -23,7 +23,7 @@
#include "debug.h"
extern int serverVersion;
-extern int tmwServerVersion;
+extern unsigned int tmwServerVersion;
extern Net::ServerFeatures *serverFeatures;
namespace TmwAthena