summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-10-02 01:19:36 +0200
committerHaru <haru@dotalux.com>2015-10-02 01:23:28 +0200
commit4db986b93566d673c226971fa045f1dc99645242 (patch)
tree1b60b9b76d696a6127420224c78074cd43ab5565
parent5edf0c3473f5194e9872c516159b8bc971d095b5 (diff)
downloadhercules-4db986b93566d673c226971fa045f1dc99645242.tar.gz
hercules-4db986b93566d673c226971fa045f1dc99645242.tar.bz2
hercules-4db986b93566d673c226971fa045f1dc99645242.tar.xz
hercules-4db986b93566d673c226971fa045f1dc99645242.zip
Skip bound items in the mergeitem feature.
- Fixes #757, thanks to kyeme - Based on Emistry's PR #754 (improved) Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/common/mmo.h1
-rw-r--r--src/map/clif.c4
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)