diff options
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 |