summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorediejohnny <ediejohnny@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-28 00:39:28 +0000
committerediejohnny <ediejohnny@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-28 00:39:28 +0000
commitdf3a626f0375fa50c21b1371d565178ec1415935 (patch)
tree5ae98a74598a6780ce804cfb67eaaa63f4e9e6bf
parent793c5d77e23357c5880e1422c539e5e0cd581eb7 (diff)
downloadhercules-df3a626f0375fa50c21b1371d565178ec1415935.tar.gz
hercules-df3a626f0375fa50c21b1371d565178ec1415935.tar.bz2
hercules-df3a626f0375fa50c21b1371d565178ec1415935.tar.xz
hercules-df3a626f0375fa50c21b1371d565178ec1415935.zip
Removed the (int)var 'statlimit' from the pc.c to avoid some lines of code at "pc_setparam" function.
Zephyr git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17054 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/pc.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 378c44ab5..1f7697b0d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6862,7 +6862,7 @@ int pc_readparam(struct map_session_data* sd,int type)
*------------------------------------------*/
int pc_setparam(struct map_session_data *sd,int type,int val)
{
- int i = 0, statlimit;
+ int i = 0;
nullpo_ret(sd);
@@ -6959,28 +6959,22 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
}
break;
case SP_STR:
- statlimit = pc_maxparameter(sd);
- sd->status.str = cap_value(val, 1, statlimit);
+ sd->status.str = cap_value(val, 1, pc_maxparameter(sd));
break;
case SP_AGI:
- statlimit = pc_maxparameter(sd);
- sd->status.agi = cap_value(val, 1, statlimit);
+ sd->status.agi = cap_value(val, 1, pc_maxparameter(sd));
break;
case SP_VIT:
- statlimit = pc_maxparameter(sd);
- sd->status.vit = cap_value(val, 1, statlimit);
+ sd->status.vit = cap_value(val, 1, pc_maxparameter(sd));
break;
case SP_INT:
- statlimit = pc_maxparameter(sd);
- sd->status.int_ = cap_value(val, 1, statlimit);
+ sd->status.int_ = cap_value(val, 1, pc_maxparameter(sd));
break;
case SP_DEX:
- statlimit = pc_maxparameter(sd);
- sd->status.dex = cap_value(val, 1, statlimit);
+ sd->status.dex = cap_value(val, 1, pc_maxparameter(sd));
break;
case SP_LUK:
- statlimit = pc_maxparameter(sd);
- sd->status.luk = cap_value(val, 1, statlimit);
+ sd->status.luk = cap_value(val, 1, pc_maxparameter(sd));
break;
case SP_KARMA:
sd->status.karma = val;