Преглед изворни кода

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() )
                             {