summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
authorsevenzz23 <sevenzz23@yahoo.com>2013-10-31 12:07:06 +0700
committersevenzz23 <sevenzz23@yahoo.com>2013-10-31 12:42:05 +0700
commitc47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151 (patch)
tree4df1018ccbb52543c4e97409764b4381714ba2f8 /src/map/storage.c
parent566529c819bcf9aeb1bd3a4a691c443c2b88d076 (diff)
downloadhercules-c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.tar.gz
hercules-c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.tar.bz2
hercules-c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.tar.xz
hercules-c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.zip
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 <sevenzz23@yahoo.com>
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)) {