From 1af60893e6737942c2079c794d53a4e21cf87c58 Mon Sep 17 00:00:00 2001 From: Andreas Habel Date: Wed, 5 Nov 2008 13:40:13 +0000 Subject: * Account server now loads item database on startup and synchronizes tmw_items table in the database. * Added method to DataProvider to escape quotes in strings so that they can be used in SQL statements. --- src/account-server/dalstorage.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/account-server/dalstorage.hpp') diff --git a/src/account-server/dalstorage.hpp b/src/account-server/dalstorage.hpp index 5a879bf6..638e4d27 100644 --- a/src/account-server/dalstorage.hpp +++ b/src/account-server/dalstorage.hpp @@ -336,7 +336,8 @@ class DALStorage * * @return Version of the item database. */ - unsigned int getItemDatabaseVersion(void); + unsigned int getItemDatabaseVersion(void) const + { return mItemDbVersion; } private: /** @@ -371,7 +372,18 @@ class DALStorage */ Character *getCharacterBySQL(std::string const &query, Account *owner); + /** + * Synchronizes the base data in the connected SQL database with the xml + * files like items.xml. + * This method is called once after initialization of DALStorage. + * Probably this function should be called if a gm requests an online + * reload of the xml files to load new items or monsters without server + * restart. + */ + void SyncDatabase(void); + dal::DataProvider *mDb; /**< the data provider */ + unsigned int mItemDbVersion; /**< Version of the item database. */ }; extern DALStorage *storage; -- cgit v1.2.3-60-g2f50