From a97e97e7ef25feec0b2cc7106bc8f25e014b5d8f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 31 May 2012 19:00:20 +0000 Subject: Updated @changelook to support robe id added missing instruction for already-supported id #6 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16186 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9c891df2f..d616efec3 100644 --- a/src/map/atcommand.c +++ b/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 [] -- [] = 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; } -- cgit v1.2.3-60-g2f50