summaryrefslogtreecommitdiff
path: root/src/map/charcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 16:54:24 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 16:54:24 +0000
commit7751fc21990d18f215dff82669a470b7c3660b11 (patch)
treefa1816a802c506ef88ca73f0492340423da64df1 /src/map/charcommand.c
parent996f20c134b0aa6de62b06b286b626b950527479 (diff)
downloadhercules-7751fc21990d18f215dff82669a470b7c3660b11.tar.gz
hercules-7751fc21990d18f215dff82669a470b7c3660b11.tar.bz2
hercules-7751fc21990d18f215dff82669a470b7c3660b11.tar.xz
hercules-7751fc21990d18f215dff82669a470b7c3660b11.zip
- Modified PA_GOSPEL so that the random damage attack becomes a BF_MISC attack.
- Added pc_resetskill when lowering job level and there's not enough skpoints to substract. - Fixed compile error of SG_FUSION in pc.c - Modified pc_resetskill to receive a flag to indicate if it should or not do status_calc_pc and send skill block updates. Meant to optimize performance when used in the middle of a larger update. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5269 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charcommand.c')
-rw-r--r--src/map/charcommand.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index b685f4bfd..69a5a9ac4 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -523,7 +523,7 @@ int charcommand_reset(
if ((pl_sd = map_nick2sd(character)) != NULL) {
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can reset a character only for lower or same GM level
pc_resetstate(pl_sd);
- pc_resetskill(pl_sd);
+ pc_resetskill(pl_sd,1);
sprintf(output, msg_table[208], character); // '%s' skill and stats points reseted!
clif_displaymessage(fd, output);
} else {
@@ -1357,12 +1357,12 @@ int charcommand_joblevel(
pl_sd->status.job_level -= level;
clif_updatestatus(pl_sd, SP_JOBLEVEL);
clif_updatestatus(pl_sd, SP_NEXTJOBEXP);
- if (pl_sd->status.skill_point > 0) {
- pl_sd->status.skill_point -= level;
- if (pl_sd->status.skill_point < 0)
- pl_sd->status.skill_point = 0;
- clif_updatestatus(pl_sd, SP_SKILLPOINT);
- } // to add: remove status points from skills
+ if (pl_sd->status.skill_point < level)
+ pc_resetskill(pl_sd, 0); //Need more skill points to substract
+ pl_sd->status.skill_point -= level;
+ if (pl_sd->status.skill_point < 0)
+ pl_sd->status.skill_point = 0;
+ clif_updatestatus(pl_sd, SP_SKILLPOINT);
status_calc_pc(pl_sd, 0);
clif_displaymessage(fd, msg_table[69]); // Character's job level lowered.
}
@@ -1492,7 +1492,7 @@ int charcommand_skreset(
if ((pl_sd = map_nick2sd(player)) != NULL) {
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can reset skill points only lower or same gm level
- pc_resetskill(pl_sd);
+ pc_resetskill(pl_sd,1);
sprintf(tmp_cmdoutput, msg_table[206], player); // '%s' skill points reseted!
clif_displaymessage(fd, tmp_cmdoutput);
} else {