Browse Source

Fixed bugreport:6378 fixed 'nude' script command so that it may remove costume.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16542 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 12 năm trước cách đây
mục cha
commit
ba48503772
1 tập tin đã thay đổi với 10 bổ sung9 xóa
  1. 10 9
      src/map/script.c

+ 10 - 9
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;