summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/storage.c')
-rw-r--r--src/map/storage.c17
1 files changed, 14 insertions, 3 deletions
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;i<MAX_GUILD_STORAGE;i++){
if(compare_item(&stor->items[i], item_data)) {