From 3902490d6bd7c375a50b6de5c8a36427db4f8c9a Mon Sep 17 00:00:00 2001 From: otfallen Date: Mon, 24 Sep 2012 13:59:23 +0000 Subject: [PATCH] Minor changes --- src/otclient/creatures.cpp | 2 +- src/otclient/houses.cpp | 2 +- src/otclient/luafunctions.cpp | 2 ++ src/otclient/mapio.cpp | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/otclient/creatures.cpp b/src/otclient/creatures.cpp index c7bff20c..aa5d0bc0 100644 --- a/src/otclient/creatures.cpp +++ b/src/otclient/creatures.cpp @@ -253,7 +253,7 @@ void CreatureManager::saveSpawns(const std::string& fileName) } if(!doc.SaveFile(fileName)) - stdext::throw_exception(stdext::format("failed to save spawns XML: %s", doc.ErrorDesc())); + stdext::throw_exception(stdext::format("failed to save spawns XML %s: %s", fileName, doc.ErrorDesc())); } void CreatureManager::loadCreatureBuffer(const std::string& buffer) diff --git a/src/otclient/houses.cpp b/src/otclient/houses.cpp index 561e1799..3846bc3b 100644 --- a/src/otclient/houses.cpp +++ b/src/otclient/houses.cpp @@ -153,7 +153,7 @@ void HouseManager::save(const std::string& fileName) } if(!doc.SaveFile(fileName)) - stdext::throw_exception(stdext::format("failed to save houses XML: %s", doc.ErrorDesc())); + stdext::throw_exception(stdext::format("failed to save houses XML %s: %s", fileName, doc.ErrorDesc())); } HouseList::iterator HouseManager::findHouse(uint32 houseId) diff --git a/src/otclient/luafunctions.cpp b/src/otclient/luafunctions.cpp index fa589e5c..a225b947 100644 --- a/src/otclient/luafunctions.cpp +++ b/src/otclient/luafunctions.cpp @@ -109,7 +109,9 @@ void OTClient::registerLuaFunctions() g_lua.bindSingletonFunction("g_map", "loadOtcm", &Map::loadOtcm, &g_map); g_lua.bindSingletonFunction("g_map", "saveOtcm", &Map::saveOtcm, &g_map); g_lua.bindSingletonFunction("g_map", "getHouseFile", &Map::getHouseFile, &g_map); + g_lua.bindSingletonFunction("g_map", "setHouseFile", &Map::setHouseFile, &g_map); g_lua.bindSingletonFunction("g_map", "getSpawnFile", &Map::getSpawnFile, &g_map); + g_lua.bindSingletonFunction("g_map", "setSpawnFile", &Map::setSpawnFile, &g_map); g_lua.bindSingletonFunction("g_map", "createTile", &Map::createTile, &g_map); g_lua.bindSingletonFunction("g_map", "getSize", &Map::getSize, &g_map);; diff --git a/src/otclient/mapio.cpp b/src/otclient/mapio.cpp index 36054bfc..b91014fe 100644 --- a/src/otclient/mapio.cpp +++ b/src/otclient/mapio.cpp @@ -211,7 +211,7 @@ void Map::loadOtbm(const std::string& fileName, const UIWidgetPtr& pbar) fin->close(); } -void Map::saveOtbm(const std::string &fileName, const UIWidgetPtr&/* pbar*/) +void Map::saveOtbm(const std::string& fileName, const UIWidgetPtr&/* pbar*/) { FileStreamPtr fin = g_resources.createFile(fileName); if(!fin)