summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-04-12 04:56:52 -0300
committerpanikon <panikon@zoho.com>2014-04-12 04:56:52 -0300
commit7dab561f42bcc47199013d7a6c86e8aa2a9e6266 (patch)
tree982e495049228f48c945020e5d343222f319d34c /src
parent93ebe55b4db88c372436cc755b990453528d3364 (diff)
downloadhercules-7dab561f42bcc47199013d7a6c86e8aa2a9e6266.tar.gz
hercules-7dab561f42bcc47199013d7a6c86e8aa2a9e6266.tar.bz2
hercules-7dab561f42bcc47199013d7a6c86e8aa2a9e6266.tar.xz
hercules-7dab561f42bcc47199013d7a6c86e8aa2a9e6266.zip
Added sanity checks in itemboundretrieve_sub
Diffstat (limited to 'src')
-rw-r--r--src/char/int_storage.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 8c49c038d..966e61bb3 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -316,8 +316,17 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd)
StrBuf->Printf(&buf, " `id`=%d",items[j].id);
if( items[j].bound && items[j].equip ) {
- bound_item[bound_qt] = items[j].equip;
- bound_qt++;
+ // Only the items that are also stored in `char` `equip`
+ if( items[j].equip&EQP_HAND_R
+ || items[j].equip&EQP_HAND_L
+ || items[j].equip&EQP_HEAD_TOP
+ || items[j].equip&EQP_HEAD_MID
+ || items[j].equip&EQP_HEAD_LOW
+ || items[j].equip&EQP_GARMENT
+ ) {
+ bound_item[bound_qt] = items[j].equip;
+ bound_qt++;
+ }
}
}