diff options
author | Ibrahim Hossam <ibrahem.h.basyone@gmail.com> | 2015-07-06 21:38:11 +0200 |
---|---|---|
committer | Ibrahim Hossam <ibrahem.h.basyone@gmail.com> | 2015-07-08 03:26:34 +0200 |
commit | 856b6f1feb25ca74d716a4c22fff650e0ff065a0 (patch) | |
tree | c3035ea753ff2c79c1e969056a120998e4f2dd2c /src/map/storage.c | |
parent | 0177783215ae97d08109f7af91a20b78b6a0df90 (diff) | |
download | hercules-856b6f1feb25ca74d716a4c22fff650e0ff065a0.tar.gz hercules-856b6f1feb25ca74d716a4c22fff650e0ff065a0.tar.bz2 hercules-856b6f1feb25ca74d716a4c22fff650e0ff065a0.tar.xz hercules-856b6f1feb25ca74d716a4c22fff650e0ff065a0.zip |
Update Unique ID system to match official now it cover all cash items include stackable ones.
Implement ForceSerial option in Package Item Database to force serial for
any item.
Implement ForceSerial option in item database to force serial for any item.
Implement Merge Client interface to merge stackable items with serial numbers ( check npc/other/item_merge.txt ).
Diffstat (limited to 'src/map/storage.c')
-rw-r--r-- | src/map/storage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/storage.c b/src/map/storage.c index 0a22b9ec6..95194bc47 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -109,7 +109,8 @@ int compare_item(struct item *a, struct item *b) a->refine == b->refine && a->attribute == b->attribute && a->expire_time == b->expire_time && - a->bound == b->bound ) + a->bound == b->bound && + a->unique_id == b->unique_id) { int i; for (i = 0; i < MAX_SLOTS && (a->card[i] == b->card[i]); i++); @@ -155,6 +156,7 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo {// existing items found, stack them if( amount > MAX_AMOUNT - stor->items[i].amount || ( data->stack.storage && amount > data->stack.amount - stor->items[i].amount ) ) return 1; + stor->items[i].amount += amount; clif->storageitemadded(sd,&stor->items[i],i,amount); return 0; |