From 87a94469012eeb0da72ecd8247788de8d4ee7cd4 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 25 Sep 2006 15:17:12 +0000 Subject: - 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 --- Changelog-Trunk.txt | 3 +++ src/map/charcommand.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index d7b2655b4..d876a9bce 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/09/25 + * 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. [Skotlex] * Applied FlavioJS's suggestion of expanding WFIFOPOS to also take the direction. This had the side effect of fixing the direction missing from the mob spawn packet, which explains why all npcs face north when you are 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 -- cgit v1.2.3-70-g09d2