mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 21:40:05 +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
|
// swap/stack items in session
|
||||||
Item* itemDat = getItemData(toItem->iID, toItem->iType);
|
Item* itemDat = getItemData(toItem->iID, toItem->iType);
|
||||||
if (itemDat->stackSize > 1 && itemDat == getItemData(fromItem->iID, fromItem->iType)) {
|
if (itemDat->stackSize > 1 && itemDat == getItemData(fromItem->iID, fromItem->iType) && fromItem->iOpt < itemDat->stackSize && toItem->iOpt < itemDat->stackSize) {
|
||||||
// items are stackable and identical, so run stacking logic
|
// items are stackable, identical, and not maxed, so run stacking logic
|
||||||
|
|
||||||
toItem->iOpt += fromItem->iOpt; // sum counts
|
toItem->iOpt += fromItem->iOpt; // sum counts
|
||||||
fromItem->iOpt = 0; // deplete from item
|
fromItem->iOpt = 0; // deplete from item
|
||||||
|
Loading…
Reference in New Issue
Block a user