diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2015-04-20 23:03:38 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2015-04-20 23:03:38 +0800 |
commit | 59b18ffcf7c834c78e1112337983d86e3649709f (patch) | |
tree | cb69187a7b4fc4dcc3f44968fe18d20abc847040 /src/map/status.c | |
parent | 169f1dcd2b08cab26ac73297dca048296503eac0 (diff) | |
download | hercules-59b18ffcf7c834c78e1112337983d86e3649709f.tar.gz hercules-59b18ffcf7c834c78e1112337983d86e3649709f.tar.bz2 hercules-59b18ffcf7c834c78e1112337983d86e3649709f.tar.xz hercules-59b18ffcf7c834c78e1112337983d86e3649709f.zip |
Fixed Bug#8638
-http://hercules.ws/board/tracker/issue-8638-sp/?gopid=25021#entry25021
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 9 |
1 files changed, 5 insertions, 4 deletions
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); } |