From c3e9fbfc9a92e5d75a0d1002cfba48947718dc4d Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 3 Aug 2010 18:13:17 +0200 Subject: 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. --- src/net/manaserv/network.cpp | 4 ++-- src/net/manaserv/stats.cpp | 12 ++++++++---- 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 #include +#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; } -- cgit v1.2.3-70-g09d2