From 392c5494d8b3a8b474b8258a3226d4993c4224c7 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 1 Aug 2012 02:40:59 +0000 Subject: Fixed favorite item tab, now items are only moved if you place them in the proper tab (before this you could try to move a consumable to the etc tab and it'd go to favorite tab.) thanks to malufett for his info&report! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16543 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index f5d371c70..518009589 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -16180,14 +16180,18 @@ void clif_parse_MoveItem(int fd, struct map_session_data *sd) { return; } - index = RFIFOW(fd,2)-2; + index = RFIFOW(fd,2)-2; + if (index < 0 || index >= MAX_INVENTORY) return; - if ( sd->status.inventory[index].favorite ) - sd->status.inventory[index].favorite = 0; - else - sd->status.inventory[index].favorite = 1; - + + if ( sd->status.inventory[index].favorite && RFIFOB(fd, 4) == 1 ) + sd->status.inventory[index].favorite = 0; + else if( RFIFOB(fd, 4) == 0 ) + sd->status.inventory[index].favorite = 1; + else + return;/* nothing to do. */ + clif_favorite_item(sd, index); #endif } @@ -16213,7 +16217,7 @@ void clif_snap( struct block_list *bl, short x, short y ) { WBUFW(buf,6) = x; WBUFW(buf,8) = y; - clif_send(buf,packet_len(0x8d2),bl,AREA); + //clif_send(buf,packet_len(0x8d2),bl,AREA); } /*========================================== -- cgit v1.2.3-60-g2f50