From 59b18ffcf7c834c78e1112337983d86e3649709f Mon Sep 17 00:00:00 2001 From: malufett Date: Mon, 20 Apr 2015 23:03:38 +0800 Subject: Fixed Bug#8638 -http://hercules.ws/board/tracker/issue-8638-sp/?gopid=25021#entry25021 Signed-off-by: malufett --- src/map/status.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/status.c b/src/map/status.c index 9977332df..0b406850e 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -12104,7 +12104,7 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) memcpy(&status->aspd_base[idx], &status->aspd_base[iidx], sizeof(status->aspd_base[iidx])); for (w = 1; w <= MAX_LEVEL && status->HP_table[iidx][w]; w++) { status->HP_table[idx][w] = status->HP_table[iidx][w]; - total += status->HP_table[idx][w]; + total += status->HP_table[idx][w] - status->HP_table[idx][w - 1]; } ave = total / (w - 1); for ( ; w <= pc->max_level[idx][0]; w++) { @@ -12112,7 +12112,7 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) } for (w = 1; w <= MAX_LEVEL && status->SP_table[iidx][w]; w++) { status->SP_table[idx][w] = status->SP_table[iidx][w]; - total += status->SP_table[idx][w]; + total += status->SP_table[idx][w] - status->SP_table[idx][w - 1]; } ave = total / (w - 1); for ( ; w <= pc->max_level[idx][0]; w++) { @@ -12132,7 +12132,7 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) iidx = pc->class2idx(iclass); for (w = 1; w <= MAX_LEVEL && status->HP_table[iidx][w]; w++) { status->HP_table[idx][w] = status->HP_table[iidx][w]; - total += status->HP_table[idx][w]; + total += status->HP_table[idx][w] - status->HP_table[idx][w - 1]; } ave = total / (w - 1); for ( ; w <= pc->max_level[idx][0]; w++ ) { @@ -12152,7 +12152,7 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb) iidx = pc->class2idx(iclass); for (w = 1; w <= MAX_LEVEL && status->SP_table[iidx][w]; w++) { status->SP_table[idx][w] = status->SP_table[iidx][w]; - total += status->SP_table[idx][w]; + total += status->SP_table[idx][w] - status->SP_table[idx][w-1]; } ave = total / (w - 1); for ( ; w <= pc->max_level[idx][0]; w++) { @@ -12243,6 +12243,7 @@ void status_read_job_db(void) { /* [malufett/Hercules] */ idx = pc->class2idx(class_); status->read_job_db_sub(idx, name, jdb); } + ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", i, config_filename); libconfig->destroy(&job_db_conf); } -- cgit v1.2.3-60-g2f50