From c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151 Mon Sep 17 00:00:00 2001 From: sevenzz23 Date: Thu, 31 Oct 2013 12:07:06 +0700 Subject: No error after compilation, but when logging in at map server it will crash. Im pretty sure its on the clif.c Signed-off-by: sevenzz23 --- src/map/storage.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/map/storage.c') diff --git a/src/map/storage.c b/src/map/storage.c index cc1100d28..df406257d 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -107,7 +107,8 @@ int compare_item(struct item *a, struct item *b) a->identify == b->identify && a->refine == b->refine && a->attribute == b->attribute && - a->expire_time == b->expire_time ) + a->expire_time == b->expire_time && + a->bound == b->bound ) { int i; for (i = 0; i < MAX_SLOTS && (a->card[i] == b->card[i]); i++); @@ -140,6 +141,11 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo return 1; } + if( (item_data->bound > 1) && !pc->can_give_bounded_items(sd) ) { + clif->message(sd->fd, msg_txt(294)); + return 1; + } + if( itemdb->isstackable2(data) ) {//Stackable for( i = 0; i < MAX_STORAGE; i++ ) @@ -429,12 +435,17 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto return 1; } - if( !itemdb_canguildstore(item_data, pc->get_group_level(sd)) || item_data->expire_time ) - { //Check if item is storable. [Skotlex] + if( !itemdb_canguildstore(item_data, pc->get_group_level(sd)) || item_data->expire_time || (item_data->bound && !pc->can_give_bounded_items(sd)) ) + { //Check if item is storable. [Skotlex] clif->message (sd->fd, msg_txt(264)); return 1; } + if( (item_data->bound == 1 || item_data->bound > 2) && !pc->can_give_bounded_items(sd) ) { + clif->message(sd->fd, msg_txt(294)); + return 1; + } + if(itemdb->isstackable2(data)){ //Stackable for(i=0;iitems[i], item_data)) { -- cgit v1.2.3-70-g09d2