mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-25 22:40:16 +00:00
Match maxed stack behavior to OG
This commit is contained in:
parent
941e986ee1
commit
2c831ee115
@ -100,8 +100,8 @@ void ItemManager::itemMoveHandler(CNSocket* sock, CNPacketData* data) {
|
||||
|
||||
// swap/stack items in session
|
||||
Item* itemDat = getItemData(toItem->iID, toItem->iType);
|
||||
if (itemDat->stackSize > 1 && itemDat == getItemData(fromItem->iID, fromItem->iType)) {
|
||||
// items are stackable and identical, so run stacking logic
|
||||
if (itemDat->stackSize > 1 && itemDat == getItemData(fromItem->iID, fromItem->iType) && fromItem->iOpt < itemDat->stackSize && toItem->iOpt < itemDat->stackSize) {
|
||||
// items are stackable, identical, and not maxed, so run stacking logic
|
||||
|
||||
toItem->iOpt += fromItem->iOpt; // sum counts
|
||||
fromItem->iOpt = 0; // deplete from item
|
||||
|
Loading…
Reference in New Issue
Block a user