Definitions for DB Pathing (#3964)
* Added the use of DBPATH/DBIMPORT definition for guild EXP, job information, level penalties, and map cache to remove hardcoded values. Thanks to @marky291!
This commit is contained in:
parent
7e64920191
commit
a5c93b60a6
@ -750,7 +750,7 @@ int inter_guild_CharOffline(uint32 char_id, int guild_id)
|
|||||||
// Initialize guild sql
|
// Initialize guild sql
|
||||||
int inter_guild_sql_init(void)
|
int inter_guild_sql_init(void)
|
||||||
{
|
{
|
||||||
const char *filename[]={ DBPATH"exp_guild.txt","import/exp_guild.txt"};
|
const char *filename[]={ DBPATH"exp_guild.txt", DBIMPORT"/exp_guild.txt"};
|
||||||
int i;
|
int i;
|
||||||
//Initialize the guild cache
|
//Initialize the guild cache
|
||||||
guild_db_= idb_alloc(DB_OPT_RELEASE_DATA);
|
guild_db_= idb_alloc(DB_OPT_RELEASE_DATA);
|
||||||
|
@ -3772,7 +3772,7 @@ int map_readallmaps (void)
|
|||||||
else {
|
else {
|
||||||
const char* mapcachefilepath[] = {
|
const char* mapcachefilepath[] = {
|
||||||
"db/" DBPATH "map_cache.dat",
|
"db/" DBPATH "map_cache.dat",
|
||||||
"db/import/map_cache.dat"
|
"db/" DBIMPORT "/map_cache.dat"
|
||||||
};
|
};
|
||||||
|
|
||||||
for( int i = 0; i < 2; i++ ){
|
for( int i = 0; i < 2; i++ ){
|
||||||
|
@ -11618,7 +11618,7 @@ void pc_readdb(void) {
|
|||||||
memset(job_info,0,sizeof(job_info)); // job_info table
|
memset(job_info,0,sizeof(job_info)); // job_info table
|
||||||
|
|
||||||
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
|
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
|
||||||
sv_readdb(db_path, "re/level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty, 0);
|
sv_readdb(db_path, DBPATH "level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty, 0);
|
||||||
sv_readdb(db_path, DBIMPORT"/level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty, 1);
|
sv_readdb(db_path, DBIMPORT"/level_penalty.txt", ',', 4, 4, -1, &pc_readdb_levelpenalty, 1);
|
||||||
for( k=1; k < 3; k++ ){ // fill in the blanks
|
for( k=1; k < 3; k++ ){ // fill in the blanks
|
||||||
int j;
|
int j;
|
||||||
@ -11656,9 +11656,9 @@ void pc_readdb(void) {
|
|||||||
s = pc_read_statsdb(dbsubpath2,s,i > 0);
|
s = pc_read_statsdb(dbsubpath2,s,i > 0);
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
#ifdef RENEWAL_ASPD
|
#ifdef RENEWAL_ASPD
|
||||||
sv_readdb(dbsubpath1, "re/job_db1.txt",',',6+MAX_WEAPON_TYPE,6+MAX_WEAPON_TYPE,CLASS_COUNT,&pc_readdb_job1, false);
|
sv_readdb(dbsubpath1, DBPATH "job_db1.txt",',',6+MAX_WEAPON_TYPE,6+MAX_WEAPON_TYPE,CLASS_COUNT,&pc_readdb_job1, false);
|
||||||
#else
|
#else
|
||||||
sv_readdb(dbsubpath1, "pre-re/job_db1.txt",',',5+MAX_WEAPON_TYPE,5+MAX_WEAPON_TYPE,CLASS_COUNT,&pc_readdb_job1, false);
|
sv_readdb(dbsubpath1, DBPATH "job_db1.txt",',',5+MAX_WEAPON_TYPE,5+MAX_WEAPON_TYPE,CLASS_COUNT,&pc_readdb_job1, false);
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
sv_readdb(dbsubpath1, "job_db1.txt",',',5+MAX_WEAPON_TYPE,6+MAX_WEAPON_TYPE,CLASS_COUNT,&pc_readdb_job1, true);
|
sv_readdb(dbsubpath1, "job_db1.txt",',',5+MAX_WEAPON_TYPE,6+MAX_WEAPON_TYPE,CLASS_COUNT,&pc_readdb_job1, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user