summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 02:39:29 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 02:39:29 +0000
commitfbf0ef35706d41c7929dc11c58c74cfa43363744 (patch)
treeb09dd64d7aba22cc470638c3ce637a2845d3527c
parentcb44aff61ed172eb338535078d772090b124d465 (diff)
downloadhercules-fbf0ef35706d41c7929dc11c58c74cfa43363744.tar.gz
hercules-fbf0ef35706d41c7929dc11c58c74cfa43363744.tar.bz2
hercules-fbf0ef35706d41c7929dc11c58c74cfa43363744.tar.xz
hercules-fbf0ef35706d41c7929dc11c58c74cfa43363744.zip
* Fixed 'use_sql_db' not read properly in SQL char server
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1317 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-SVN.txt4
-rw-r--r--src/char_sql/char.c12
2 files changed, 7 insertions, 9 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index 9289fdbdb..7fd141268 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -1,6 +1,8 @@
Date Added
-03/29 * Added three fields to mmo_charstatus - father/mother/child
+03/29
+ * Fixed 'use_sql_db' not read properly in SQL char server, thanks to Wallex
+ * Added three fields to mmo_charstatus - father/mother/child
needed for adoption system [veider]
* Added adoption support to charserver SQL version [veider]
* Added atcommand_adopt - create a family of three [veider]
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 0d3fc3d35..ab20b893b 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -3242,11 +3242,7 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
strcpy(db_path,w2);
//Map server option to use SQL db or not
}else if(strcmpi(w1,"use_sql_db")==0){ // added for sql item_db read for char server [Valaris]
- if (strcmpi(w2, "yes")) {
- db_use_sqldbs = 1;
- } else if (strcmpi(w2, "no")) {
- db_use_sqldbs = 0;
- }
+ db_use_sqldbs = config_switch(w2);
printf("Using SQL dbs: %s\n",w2);
//custom columns for login database
}else if(strcmpi(w1,"login_db_level")==0){
@@ -3405,9 +3401,6 @@ int char_config_read(const char *cfgName) {
}
fclose(fp);
-//Read ItemDB
- do_init_itemdb();
-
return 0;
}
@@ -3444,6 +3437,9 @@ int do_init(int argc, char **argv){
printf("charserver configuration reading done.....\n");
+ //Read ItemDB
+ do_init_itemdb();
+
inter_init((argc > 2) ? argv[2] : inter_cfgName); // inter server ÃʱâÈ­
printf("interserver configuration reading done.....\n");