Browse Source

Updated @changelook to support robe id added missing instruction for already-supported id #6

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16186 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 năm trước cách đây
mục cha
commit
66e10ae1a7
1 tập tin đã thay đổi với 7 bổ sung7 xóa
  1. 7 7
      src/map/atcommand.c

+ 7 - 7
src/map/atcommand.c

@@ -5607,17 +5607,17 @@ ACMD_FUNC(divorce)
 ACMD_FUNC(changelook)
 {
 	int i, j = 0, k = 0;
-	int pos[6] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES };
-
+	int pos[7] = { LOOK_HEAD_TOP,LOOK_HEAD_MID,LOOK_HEAD_BOTTOM,LOOK_WEAPON,LOOK_SHIELD,LOOK_SHOES,LOOK_ROBE };
+	
 	if((i = sscanf(message, "%d %d", &j, &k)) < 1) {
 		clif_displaymessage(fd, "Usage: @changelook [<position>] <view id> -- [] = optional");
-		clif_displaymessage(fd, "Position: 1-Top 2-Middle 3-Bottom 4-Weapon 5-Shield");
+		clif_displaymessage(fd, "Position: 1-Top 2-Middle 3-Bottom 4-Weapon 5-Shield 6-Shoes 7-Robe");
 		return -1;
-	} else if (i == 2) {
-		if (j < 1) j = 1;
-		else if (j > 6) j = 6;	// 6 = Shoes - for beta clients only perhaps
+	} else if ( i == 2 ) {
+		if (j < 1 || j > 7)
+			j = 1;
 		j = pos[j - 1];
-	} else if (i == 1) {	// position not defined, use HEAD_TOP as default
+	} else if( i == 1 ) {	// position not defined, use HEAD_TOP as default
 		k = j;	// swap
 		j = LOOK_HEAD_TOP;
 	}