diff options
author | shennetsind <ind@henn.et> | 2013-06-09 00:55:03 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-09 00:55:03 -0300 |
commit | 2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa (patch) | |
tree | c7f5dbb515a926c04e2cd4f38872730e0e7c3429 /src/char | |
parent | 89a571a3c5d4c9366843a462c40efdebb24d17fe (diff) | |
download | hercules-2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa.tar.gz hercules-2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa.tar.bz2 hercules-2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa.tar.xz hercules-2db09c2e6442aa3abe573d35a3a5a1c6fa3db5fa.zip |
Fixed Bug #7319
Special Thanks to KeiKun~!
http://hercules.ws/board/tracker/issue-7319-db-name/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/char.c | 5 | ||||
-rw-r--r-- | src/char/char.h | 1 | ||||
-rw-r--r-- | src/char/inter.h | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c index 8672d10ef..524c3029d 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -66,6 +66,7 @@ char skill_homunculus_db[256] = "skill_homunculus"; char mercenary_db[256] = "mercenary"; char mercenary_owner_db[256] = "mercenary_owner"; char ragsrvinfo_db[256] = "ragsrvinfo"; +char interreg_db[32] = "interreg"; // show loading/saving messages int save_log = 1; @@ -4686,6 +4687,10 @@ void sql_config_read(const char* cfgName) safestrncpy(mercenary_db,w2,sizeof(mercenary_db)); else if(!strcmpi(w1,"mercenary_owner_db")) safestrncpy(mercenary_owner_db,w2,sizeof(mercenary_owner_db)); + else if(!strcmpi(w1,"ragsrvinfo_db")) + safestrncpy(ragsrvinfo_db,w2,sizeof(ragsrvinfo_db)); + else if(!strcmpi(w1,"interreg_db")) + safestrncpy(interreg_db,w2,sizeof(interreg_db)); //support the import command, just like any other config else if(!strcmpi(w1,"import")) sql_config_read(w2); diff --git a/src/char/char.h b/src/char/char.h index 996a0e845..1a9441868 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -103,6 +103,7 @@ extern char skill_homunculus_db[256]; extern char mercenary_db[256]; extern char mercenary_owner_db[256]; extern char ragsrvinfo_db[256]; +extern char interreg_db[32]; extern int db_use_sqldbs; // added for sql item_db read for char server [Valaris] diff --git a/src/char/inter.h b/src/char/inter.h index de27b0473..f6663813a 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -7,6 +7,7 @@ struct accreg; #include "../common/sql.h" +#include "char.h" int inter_init_sql(const char *file); void inter_final(void); @@ -32,7 +33,7 @@ uint64 inter_chk_lastuid(int8 flag, uint64 value); #define dbUpdateUid(handler_)\ { \ uint64 unique_id_ = inter_chk_lastuid(0, 0); \ - if (unique_id_ && SQL_ERROR == SQL->Query(handler_, "UPDATE `interreg` SET `value`='%"PRIu64"' WHERE `varname`='unique_id'", unique_id_)) \ + if (unique_id_ && SQL_ERROR == SQL->Query(handler_, "UPDATE `%s` SET `value`='%"PRIu64"' WHERE `varname`='unique_id'", interreg_db, unique_id_)) \ Sql_ShowDebug(handler_);\ } #else |