From 4db986b93566d673c226971fa045f1dc99645242 Mon Sep 17 00:00:00 2001 From: Haru Date: Fri, 2 Oct 2015 01:19:36 +0200 Subject: Skip bound items in the mergeitem feature. - Fixes #757, thanks to kyeme - Based on Emistry's PR #754 (improved) Signed-off-by: Haru --- src/common/mmo.h | 1 + src/map/clif.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/mmo.h b/src/common/mmo.h index 75b62fdc4..012eec935 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -299,6 +299,7 @@ enum e_mmo_charstatus_opt { }; enum e_item_bound_type { + IBT_NONE = 0x0, IBT_MIN = 0x1, IBT_ACCOUNT = 0x1, IBT_GUILD = 0x2, diff --git a/src/map/clif.c b/src/map/clif.c index 0d25be0a6..243aa6a43 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -18362,7 +18362,7 @@ void clif_openmergeitem(int fd, struct map_session_data *sd) for (i = 0; i < MAX_INVENTORY; i++) { struct item *item_data = &sd->status.inventory[i]; - if (item_data->nameid == 0 || !itemdb->isstackable(item_data->nameid)) + if (item_data->nameid == 0 || !itemdb->isstackable(item_data->nameid) || item_data->bound != IBT_NONE) continue; merge_items[n].nameid = item_data->nameid; @@ -18436,7 +18436,7 @@ void clif_ackmergeitems(int fd, struct map_session_data *sd) it = &sd->status.inventory[idx]; - if (it->nameid == 0 || !itemdb->isstackable(it->nameid)) + if (it->nameid == 0 || !itemdb->isstackable(it->nameid) || it->bound != IBT_NONE) continue; if (nameid == 0) -- cgit v1.2.3-70-g09d2