diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-08-03 18:13:17 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-08-04 00:49:08 +0200 |
commit | c3e9fbfc9a92e5d75a0d1002cfba48947718dc4d (patch) | |
tree | 59d75638ee09f7efe7bc1ab56ac3fe1ac3e4cf49 | |
parent | 98abc793f8fb45d647e1e8c51cf5f38170c6b703 (diff) | |
download | mana-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.
-rw-r--r-- | src/net/manaserv/network.cpp | 4 | ||||
-rw-r--r-- | src/net/manaserv/stats.cpp | 12 | ||||
-rw-r--r-- | src/net/tmwa/gamehandler.cpp | 3 |
3 files changed, 12 insertions, 7 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; } diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp index 179d98e4..435d5d30 100644 --- a/src/net/tmwa/gamehandler.cpp +++ b/src/net/tmwa/gamehandler.cpp @@ -98,7 +98,8 @@ void GameHandler::handleMessage(Net::MessageIn &msg) case SMSG_MAP_QUIT_RESPONSE: if (msg.readInt8()) { - new OkDialog(_("Game"), _("Request to quit denied!"), NULL); + new OkDialog(_("Game"), _("Request to quit denied!"), false, + NULL); } break; } |