summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-05 20:57:59 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-05 20:57:59 +0000
commitaa1989471451e15321357f4422afb79c9a9bae20 (patch)
tree634bc0b3b109a0ded6aa4796e75e9babd5cdf4d6
parentbda06fa4cfb5a3e45310317071f9608bea895e67 (diff)
downloadmana-aa1989471451e15321357f4422afb79c9a9bae20.tar.gz
mana-aa1989471451e15321357f4422afb79c9a9bae20.tar.bz2
mana-aa1989471451e15321357f4422afb79c9a9bae20.tar.xz
mana-aa1989471451e15321357f4422afb79c9a9bae20.zip
Changed some printf statements to log statements.
-rw-r--r--ChangeLog4
-rw-r--r--src/main.cpp4
-rw-r--r--src/net/beinghandler.cpp10
-rw-r--r--src/net/network.cpp2
-rw-r--r--src/net/skillhandler.cpp4
5 files changed, 14 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index bb357931..d2e0ee22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
* src/CMakeLists.txt: Added shoplistbox.h/cpp files.
* src/gui/updatewindow.cpp: Fixed percentage indicator of update
window.
+ * src/main.cpp, src/net/beinghandler.cpp, src/net/skillhandler.cpp,
+ src/net/network.cpp: Changed some printf statements to log statements.
2006-11-05 Bjørn Lindeijer <bjorn@lindeijer.nl>
@@ -26,7 +28,7 @@
precisions about the total money in it.
* src/gui/shop.h, src/gui/shop.cpp, src/gui/sell.cpp: Fixes to Sell
dialog.
- * src/gui/sell.cpp: Fixes the money value after seling something.
+ * src/gui/sell.cpp: Fixes the money value after selling something.
2006-11-05 Björn Steinbrink <B.Steinbrink@gmx.de>
diff --git a/src/main.cpp b/src/main.cpp
index 13fc09f4..8cd993fb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -708,12 +708,12 @@ int main(int argc, char *argv[])
break;
case CHAR_CONNECT_STATE:
- printf("Char: %i\n", loginData.sex);
+ logger->log("Char: %i\n", loginData.sex);
charLogin(network, &loginData);
break;
case ACCOUNT_STATE:
- printf("Account: %i\n", loginData.sex);
+ logger->log("Account: %i\n", loginData.sex);
accountLogin(network, &loginData);
break;
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index cd5653fc..85760112 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -256,7 +256,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
{
break;
}
-
+
int type = msg->readInt8();
switch (type) {
@@ -278,7 +278,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
dstBeing->setHairColor(msg->readInt8());
break;
default:
- printf("c3: %i\n", msg->readInt8()); // unsupported
+ logger->log("c3: %i\n", msg->readInt8()); // unsupported
break;
}
}
@@ -370,9 +370,9 @@ void BeingHandler::handleMessage(MessageIn *msg)
case 0x0119:
// Change in players look
- printf("0x0119 %i %i %i %x %i\n", msg->readInt32(),
- msg->readInt16(), msg->readInt16(), msg->readInt16(),
- msg->readInt8());
+ logger->log("0x0119 %i %i %i %x %i\n", msg->readInt32(),
+ msg->readInt16(), msg->readInt16(), msg->readInt16(),
+ msg->readInt8());
break;
}
}
diff --git a/src/net/network.cpp b/src/net/network.cpp
index 757a533e..a7ff6d1d 100644
--- a/src/net/network.cpp
+++ b/src/net/network.cpp
@@ -299,7 +299,7 @@ MessageIn Network::getNextMessage()
len = readWord(2);
#ifdef DEBUG
- printf("Received packet 0x%x of length %d\n", msgId, length);
+ logger->log("Received packet 0x%x of length %d\n", msgId, length);
#endif
MessageIn msg(mInBuffer, len);
diff --git a/src/net/skillhandler.cpp b/src/net/skillhandler.cpp
index e9dc9c19..828c2378 100644
--- a/src/net/skillhandler.cpp
+++ b/src/net/skillhandler.cpp
@@ -26,6 +26,8 @@
#include "messagein.h"
#include "protocol.h"
+#include "../log.h"
+
#include "../gui/chat.h"
#include "../gui/skill.h"
@@ -85,7 +87,7 @@ void SkillHandler::handleMessage(MessageIn *msg)
if (action.success != SKILL_FAILED &&
action.bskill == BSKILL_EMOTE)
{
- printf("Action: %d/%d", action.bskill, action.success);
+ logger->log("Action: %d/%d", action.bskill, action.success);
}
chatWindow->chatLog(action);
break;