summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/map/script.c b/src/map/script.c
index e0976e9a1..fa858c181 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11980,20 +11980,21 @@ BUILDIN_FUNC(specialeffect2)
*------------------------------------------*/
BUILDIN_FUNC(nude)
{
- TBL_PC *sd=script_rid2sd(st);
- int i,calcflag=0;
+ TBL_PC *sd = script_rid2sd(st);
+ int i, calcflag = 0;
- if(sd==NULL)
+ if( sd == NULL )
return 0;
- for(i=0;i<11;i++)
- if(sd->equip_index[i] >= 0) {
- if(!calcflag)
- calcflag=1;
- pc_unequipitem(sd,sd->equip_index[i],2);
+ for( i = 0 ; i < EQI_MAX; i++ ) {
+ if( sd->equip_index[ i ] >= 0 ) {
+ if( !calcflag )
+ calcflag = 1;
+ pc_unequipitem( sd , sd->equip_index[ i ] , 2);
}
+ }
- if(calcflag)
+ if( calcflag )
status_calc_pc(sd,0);
return 0;