瀏覽代碼

fix local invetory transaction bug

Kolja Strohm 3 年之前
父節點
當前提交
fae22df5ec
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      FactoryCraft/Inventory.cpp

+ 1 - 1
FactoryCraft/Inventory.cpp

@@ -407,8 +407,8 @@ void Inventory::localTransaction( Array< ItemSlot* >* zSourceSlots, Array< ItemS
                         ItemStack* stack = sourceSlot->takeItemsOut( number, NO_DIRECTION );
                         if( stack )
                         {
-                            updateCache( sourceSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
                             targetSlot->addItems( stack, NO_DIRECTION );
+                            updateCache( sourceSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
                             updateCache( targetSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
                             if( stack->getSize() )
                             {