Pārlūkot izejas kodu

fix local invetory transaction bug

Kolja Strohm 3 gadi atpakaļ
vecāks
revīzija
fae22df5ec
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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() )
                             {