summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-06 22:40:57 -0200
committershennetsind <ind@henn.et>2013-11-06 22:40:57 -0200
commitb1f7e524a79ce3e7afd64becaa7657c71d59f18f (patch)
tree3d0f808a23cb1ead6cc0811542ac4263643203dc /src/map/storage.c
parent47401a4195c58e14f12200f1ba6aeb34ecd87df7 (diff)
parent6be40f56a21e48505baa4ff69acc198aa6206bf1 (diff)
downloadhercules-b1f7e524a79ce3e7afd64becaa7657c71d59f18f.tar.gz
hercules-b1f7e524a79ce3e7afd64becaa7657c71d59f18f.tar.bz2
hercules-b1f7e524a79ce3e7afd64becaa7657c71d59f18f.tar.xz
hercules-b1f7e524a79ce3e7afd64becaa7657c71d59f18f.zip
Merge remote-tracking branch 'origin/master'
Signed-off-by: shennetsind <ind@henn.et> Conflicts: conf/messages.conf src/common/mmo.h src/map/pc_groups.c src/map/pc_groups.h
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 45a80867d..cffbf23ec 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)) {