diff options
author | Haru <haru@dotalux.com> | 2018-06-18 20:27:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-18 20:27:06 +0200 |
commit | a9d70598a44e000479d4b2a9347e2b76f35bd9d6 (patch) | |
tree | 551303019160b2a6962751afba6144d902520824 | |
parent | d2c0e453fc95b3f8ce9270e8290d15687e6e3235 (diff) | |
parent | 01e7abdf093ae78b6b8b78414b80764cee2c2420 (diff) | |
download | hercules-a9d70598a44e000479d4b2a9347e2b76f35bd9d6.tar.gz hercules-a9d70598a44e000479d4b2a9347e2b76f35bd9d6.tar.bz2 hercules-a9d70598a44e000479d4b2a9347e2b76f35bd9d6.tar.xz hercules-a9d70598a44e000479d4b2a9347e2b76f35bd9d6.zip |
Merge pull request #2071 from Asheraf/expdbfollowup
Fix a crash caused by removing entries in job_db
-rw-r--r-- | db/pre-re/job_db.conf | 2 | ||||
-rw-r--r-- | db/re/job_db.conf | 2 | ||||
-rw-r--r-- | src/map/status.c | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/db/pre-re/job_db.conf b/db/pre-re/job_db.conf index ac4ad1582..af8cabf9a 100644 --- a/db/pre-re/job_db.conf +++ b/db/pre-re/job_db.conf @@ -31,6 +31,8 @@ ************* Entry structure ******************************************** ************************************************************************** Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there) + BaseExpGroup: "Exp Group Name" (string) // Name of base exp group defined in exp_group_db.conf + JobExpGroup: "Exp Group Name" (string) // Name of job exp group defined in exp_group_db.conf Inherit: ("Other_Job_Name") // Base job from which this job will inherit its max weight, base ASPD set and HP/SP table. InheritHP: ("Other_Job_Name") // Base job from which this job will inherit its HP table (if different). InheritSP: ("Other_Job_Name") // Base job from which this job will inherit its SP table (if different). diff --git a/db/re/job_db.conf b/db/re/job_db.conf index 93bab17e0..21ba3f4cc 100644 --- a/db/re/job_db.conf +++ b/db/re/job_db.conf @@ -31,6 +31,8 @@ ************* Entry structure ******************************************** ************************************************************************** Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there) + BaseExpGroup: "Exp Group Name" (string) // Name of base exp group defined in exp_group_db.conf + JobExpGroup: "Exp Group Name" (string) // Name of job exp group defined in exp_group_db.conf Inherit: ("Other_Job_Name") // Base job from which this job will inherit its max weight, base ASPD set and HP/SP table. InheritHP: ("Other_Job_Name") // Base job from which this job will inherit its HP table (if different). InheritSP: ("Other_Job_Name") // Base job from which this job will inherit its SP table (if different). diff --git a/src/map/status.c b/src/map/status.c index bf48d2301..4e2724d61 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -13114,7 +13114,8 @@ void status_read_job_db_sub(int idx, const char *name, struct config_setting_t * pc->dbs->class_exp_table[idx][CLASS_EXP_TABLE_BASE] = &VECTOR_INDEX(pc->class_exp_groups[CLASS_EXP_TABLE_BASE], i); } } else { - ShowError("status_read_job_db: BaseExpGroup setting not found for entry '%s'\n", name); + ShowError("status_read_job_db: BaseExpGroup setting not found for entry '%s', skipping..\n", name); + return; } /** @@ -13129,7 +13130,8 @@ void status_read_job_db_sub(int idx, const char *name, struct config_setting_t * pc->dbs->class_exp_table[idx][CLASS_EXP_TABLE_JOB] = &VECTOR_INDEX(pc->class_exp_groups[CLASS_EXP_TABLE_JOB], i); } } else { - ShowError("status_read_job_db: JobExpGroup setting not found for entry '%s'\n", name); + ShowError("status_read_job_db: JobExpGroup setting not found for entry '%s', skipping..\n", name); + return; } if ((temp = libconfig->setting_get_member(jdb, "Inherit"))) { |