diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-25 15:17:12 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-25 15:17:12 +0000 |
commit | 87a94469012eeb0da72ecd8247788de8d4ee7cd4 (patch) | |
tree | 8117b5ac4c708081bca6b75aca96456760942f28 /src | |
parent | 18f01d4f113b8ac7430946688292011c5fc3c2fb (diff) | |
download | hercules-87a94469012eeb0da72ecd8247788de8d4ee7cd4.tar.gz hercules-87a94469012eeb0da72ecd8247788de8d4ee7cd4.tar.bz2 hercules-87a94469012eeb0da72ecd8247788de8d4ee7cd4.tar.xz hercules-87a94469012eeb0da72ecd8247788de8d4ee7cd4.zip |
- Fixed #baselevelup adding instead of substracting status points when used with negative levels. Also made it reset your stats if there wasn't enough to substract from.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8861 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/charcommand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c index 8772c18dc..fdb91bea9 100644 --- a/src/map/charcommand.c +++ b/src/map/charcommand.c @@ -1320,7 +1320,9 @@ int charcommand_baselevel( level = pl_sd->status.base_level -1;
if (pl_sd->status.status_point > 0) {
for (i = 0; i > -level; i--)
- status_point -= (pl_sd->status.base_level +i + 14) / 5;
+ status_point += (pl_sd->status.base_level +i + 14) / 5;
+ if (pl_sd->status.status_point < status_point)
+ pc_resetstate(sd);
if (pl_sd->status.status_point < status_point)
pl_sd->status.status_point = 0;
else
|