summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;