diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-06 00:03:16 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-06 00:03:16 +0000 |
commit | b23e86c84c2532d5900422295c5b352b99a13b30 (patch) | |
tree | 5be95d7331b200d6cf512b8da4a81bd3843c2a85 /src/map/atcommand.c | |
parent | 5eb3f45f49a8437e82fa27a52c70c0a611acaeb3 (diff) | |
download | hercules-b23e86c84c2532d5900422295c5b352b99a13b30.tar.gz hercules-b23e86c84c2532d5900422295c5b352b99a13b30.tar.bz2 hercules-b23e86c84c2532d5900422295c5b352b99a13b30.tar.xz hercules-b23e86c84c2532d5900422295c5b352b99a13b30.zip |
- Fixed @lvup, #lvup not doing a stat reset and lowering your status points if you had 0 status points at that time.
- Fixed MvP exp and item rewards being given even when the mob_dead flag specifies you should not receive exp or items.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9795 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 76dfdd879..68b1909d0 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2743,17 +2743,15 @@ int atcommand_baselevelup(const int fd, struct map_session_data* sd, const char* level*=-1; if ((unsigned int)level >= sd->status.base_level) level = sd->status.base_level-1; - if (sd->status.status_point > 0) { - for (i = 0; i > -level; i--) - status_point += (sd->status.base_level + i + 14) / 5; - if (sd->status.status_point < status_point) - pc_resetstate(sd); - if (sd->status.status_point < status_point) - sd->status.status_point = 0; - else - sd->status.status_point -= status_point; - clif_updatestatus(sd, SP_STATUSPOINT); - } /* to add: remove status points from stats */ + for (i = 0; i > -level; i--) + status_point += (sd->status.base_level + i + 14) / 5; + if (sd->status.status_point < status_point) + pc_resetstate(sd); + if (sd->status.status_point < status_point) + sd->status.status_point = 0; + else + sd->status.status_point -= status_point; + clif_updatestatus(sd, SP_STATUSPOINT); sd->status.base_level -= (unsigned int)level; clif_updatestatus(sd, SP_BASELEVEL); clif_updatestatus(sd, SP_NEXTBASEEXP); |