diff options
author | salepate <salepate@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-25 00:10:33 +0000 |
---|---|---|
committer | salepate <salepate@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-08-25 00:10:33 +0000 |
commit | a35c5b98328c02b44dc7073d31abd4015a6846eb (patch) | |
tree | 2756e4644c50070158e3fe026698acfb0aa24512 | |
parent | a87b77d0659f031dbb6d74e2c8398bbb7a11cd65 (diff) | |
download | hercules-a35c5b98328c02b44dc7073d31abd4015a6846eb.tar.gz hercules-a35c5b98328c02b44dc7073d31abd4015a6846eb.tar.bz2 hercules-a35c5b98328c02b44dc7073d31abd4015a6846eb.tar.xz hercules-a35c5b98328c02b44dc7073d31abd4015a6846eb.zip |
- fixed pc_statusup2(): status cost update condition
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16701 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/pc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 8ccccb46c..20e71988c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5824,7 +5824,7 @@ int pc_statusup(struct map_session_data* sd, int type) /// @param val The stat increase amount. int pc_statusup2(struct map_session_data* sd, int type, int val) { - int max, need; + int max; nullpo_ret(sd); if( type < SP_STR || type > SP_LUK ) @@ -5833,8 +5833,6 @@ int pc_statusup2(struct map_session_data* sd, int type, int val) return 1; } - need = pc_need_status_point(sd,type,1); - // set new value max = pc_maxparameter(sd); val = pc_setstat(sd, type, cap_value(pc_getstat(sd,type) + val, 1, max)); @@ -5842,7 +5840,7 @@ int pc_statusup2(struct map_session_data* sd, int type, int val) status_calc_pc(sd,0); // update increase cost indicator - if( need != pc_need_status_point(sd,type,1) ) + if( pc_need_status_point(sd, type, val) != pc_need_status_point(sd,type,1) ) clif_updatestatus(sd, SP_USTR + type-SP_STR); // update stat value |