summaryrefslogtreecommitdiff
path: root/src/net/manaserv
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-08-03 18:13:17 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-08-04 00:49:08 +0200
commitc3e9fbfc9a92e5d75a0d1002cfba48947718dc4d (patch)
tree59d75638ee09f7efe7bc1ab56ac3fe1ac3e4cf49 /src/net/manaserv
parent98abc793f8fb45d647e1e8c51cf5f38170c6b703 (diff)
downloadmana-c3e9fbfc9a92e5d75a0d1002cfba48947718dc4d.tar.gz
mana-c3e9fbfc9a92e5d75a0d1002cfba48947718dc4d.tar.bz2
mana-c3e9fbfc9a92e5d75a0d1002cfba48947718dc4d.tar.xz
mana-c3e9fbfc9a92e5d75a0d1002cfba48947718dc4d.zip
Changed the stats.xml to attributes.xml according to the server commit.
Also, fixed a compilation warning about passing a NULL value to a boolean parameter. The built-ins are kept for now. Reviewed-by: Jaxad0127.
Diffstat (limited to 'src/net/manaserv')
-rw-r--r--src/net/manaserv/network.cpp4
-rw-r--r--src/net/manaserv/stats.cpp12
2 files changed, 10 insertions, 6 deletions
diff --git a/src/net/manaserv/network.cpp b/src/net/manaserv/network.cpp
index 4b9751d7..636585c9 100644
--- a/src/net/manaserv/network.cpp
+++ b/src/net/manaserv/network.cpp
@@ -73,7 +73,7 @@ void finalize()
if (connections)
{
logger->error("Tried to shutdown the network subsystem while there "
- "are network connections left!");
+ "are network connections left!");
}
clearNetworkHandlers();
@@ -85,7 +85,7 @@ Connection *getConnection()
if (!client)
{
logger->error("Tried to instantiate a network object before "
- "initializing the network subsystem!");
+ "initializing the network subsystem!");
}
return new Connection(client);
diff --git a/src/net/manaserv/stats.cpp b/src/net/manaserv/stats.cpp
index f109a232..ece0e72a 100644
--- a/src/net/manaserv/stats.cpp
+++ b/src/net/manaserv/stats.cpp
@@ -32,6 +32,8 @@
#include <list>
#include <map>
+#define DEFAULT_ATTRIBUTESDB_FILE "attributes.xml"
+
namespace ManaServ {
namespace Stats {
typedef struct {
@@ -123,12 +125,13 @@ namespace Stats {
void load()
{
- XML::Document doc("stats.xml");
+ XML::Document doc(DEFAULT_ATTRIBUTESDB_FILE);
xmlNodePtr rootNode = doc.rootNode();
if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "stats"))
{
- logger->log("Stats: Error while loading stats.xml!");
+ logger->log("Stats: Error while loading "
+ DEFAULT_ATTRIBUTESDB_FILE ". Using Built-ins.");
loadBuiltins();
return;
}
@@ -142,7 +145,8 @@ namespace Stats {
if (id == 0)
{
- logger->log("Stats: Invalid or missing stat ID in stats.xml!");
+ logger->log("Stats: Invalid or missing stat ID in "
+ DEFAULT_ATTRIBUTESDB_FILE "!");
continue;
}
else if (stats.find(id) != stats.end())
@@ -155,7 +159,7 @@ namespace Stats {
if (name.empty())
{
logger->log("Stats: Invalid or missing stat name in "
- "stats.xml!");
+ DEFAULT_ATTRIBUTESDB_FILE "!");
continue;
}