diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 18 | ||||
-rw-r--r-- | src/map/pc.c | 18 |
2 files changed, 17 insertions, 19 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a59748b9e..d9f4810ee 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4868,21 +4868,19 @@ ACMD(undisguiseguild) *------------------------------------------*/ ACMD(exp) { - char output[CHAT_SIZE_MAX]; - double nextb, nextj; - - memset(output, '\0', sizeof(output)); + double percentb = 0.0, percentj = 0.0; + uint64 nextb, nextj; nextb = pc->nextbaseexp(sd); - if (nextb) - nextb = sd->status.base_exp*100.0/nextb; + if (nextb != 0) + percentb = sd->status.base_exp * 100.0 / nextb; nextj = pc->nextjobexp(sd); - if (nextj) - nextj = sd->status.job_exp*100.0/nextj; + if (nextj != 0) + percentj = sd->status.job_exp * 100.0 / nextj; - sprintf(output, msg_fd(fd,1148), sd->status.base_level, nextb, sd->status.job_level, nextj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%) - clif->message(fd, output); + sprintf(atcmd_output, msg_fd(fd,1148), sd->status.base_level, percentb, sd->status.job_level, percentj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%) + clif->message(fd, atcmd_output); return true; } diff --git a/src/map/pc.c b/src/map/pc.c index 760519298..0636ebafa 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8332,7 +8332,7 @@ int pc_setparam(struct map_session_data *sd, int type, int64 val) if (val >= sd->status.job_level) { if (val > pc->maxjoblv(sd)) val = pc->maxjoblv(sd); - sd->status.skill_point += val - sd->status.job_level; + sd->status.skill_point += (int)val - sd->status.job_level; clif->updatestatus(sd, SP_SKILLPOINT); } sd->status.job_level = (int32)val; @@ -8413,28 +8413,28 @@ int pc_setparam(struct map_session_data *sd, int type, int64 val) } break; case SP_STR: - sd->status.str = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.str = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_AGI: - sd->status.agi = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.agi = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_VIT: - sd->status.vit = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.vit = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_INT: - sd->status.int_ = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.int_ = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_DEX: - sd->status.dex = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.dex = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_LUK: - sd->status.luk = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.luk = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_KARMA: - sd->status.karma = val; + sd->status.karma = (int)val; break; case SP_MANNER: - sd->status.manner = val; + sd->status.manner = (int)val; if( val < 0 ) sc_start(NULL, &sd->bl, SC_NOCHAT, 100, 0, 0); else { |