summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-10-08 05:48:29 +0000
committerFate <fate-tmw@googlemail.com>2009-10-08 05:48:29 +0000
commitd90c344f576d0be5206db7f7e7eb265a6a38019c (patch)
tree6af512881122e492f9aa2b9bece5d0395e6f740a /src/map/pc.c
parent4298d06a2e8885022f745973b3400d6c1660a531 (diff)
parent40792ad45c1929f999602dd386483ce99b0ed30a (diff)
downloadtmwa-d90c344f576d0be5206db7f7e7eb265a6a38019c.tar.gz
tmwa-d90c344f576d0be5206db7f7e7eb265a6a38019c.tar.bz2
tmwa-d90c344f576d0be5206db7f7e7eb265a6a38019c.tar.xz
tmwa-d90c344f576d0be5206db7f7e7eb265a6a38019c.zip
Merge branch 'master' of gitorious.org:tmw-eathena/mainline
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index f87569b..d09680f 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4623,52 +4623,49 @@ int pc_statusup(struct map_session_data *sd,int type)
nullpo_retr(0, sd);
+ switch(type){
+ case SP_STR:
+ val= sd->status.str;
+ break;
+ case SP_AGI:
+ val= sd->status.agi;
+ break;
+ case SP_VIT:
+ val= sd->status.vit;
+ break;
+ case SP_INT:
+ val= sd->status.int_;
+ break;
+ case SP_DEX:
+ val= sd->status.dex;
+ break;
+ case SP_LUK:
+ val= sd->status.luk;
+ break;
+ }
+
need=pc_need_status_point(sd,type);
- if(type<SP_STR || type>SP_LUK || need<0 || need>sd->status.status_point){
- clif_statusupack(sd,type,0,0);
+ if(type<SP_STR || type>SP_LUK || need<0 || need>sd->status.status_point || val >= battle_config.max_parameter){
+ clif_statusupack(sd,type,0,val);
return 1;
}
switch(type){
case SP_STR:
- if(sd->status.str >= battle_config.max_parameter) {
- clif_statusupack(sd,type,0,0);
- return 1;
- }
val= ++sd->status.str;
break;
case SP_AGI:
- if(sd->status.agi >= battle_config.max_parameter) {
- clif_statusupack(sd,type,0,0);
- return 1;
- }
val= ++sd->status.agi;
break;
case SP_VIT:
- if(sd->status.vit >= battle_config.max_parameter) {
- clif_statusupack(sd,type,0,0);
- return 1;
- }
val= ++sd->status.vit;
break;
case SP_INT:
- if(sd->status.int_ >= battle_config.max_parameter) {
- clif_statusupack(sd,type,0,0);
- return 1;
- }
val= ++sd->status.int_;
break;
case SP_DEX:
- if(sd->status.dex >= battle_config.max_parameter) {
- clif_statusupack(sd,type,0,0);
- return 1;
- }
val= ++sd->status.dex;
break;
case SP_LUK:
- if(sd->status.luk >= battle_config.max_parameter) {
- clif_statusupack(sd,type,0,0);
- return 1;
- }
val= ++sd->status.luk;
break;
}