|
@@ -115,6 +115,7 @@ void InventoryInteraction::transaction( Inventory* zSource, Inventory* zTarget,
|
|
|
if( !sourceSlot->zStack() )
|
|
|
toDelete.add( index, 0 );
|
|
|
targetSlot->addItems( stack, dir );
|
|
|
+ zSource->updateCache( sourceSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
|
|
|
zSource->afterPullStack( sourceSlot, sourceView, targetSlot->zStack()->zItem(), number );
|
|
|
zTarget->afterPushStack( targetSlot, targetView, targetSlot->zStack()->zItem(), number );
|
|
|
if( stack->getSize() )
|
|
@@ -150,7 +151,7 @@ void InventoryInteraction::transaction( Inventory* zSource, Inventory* zTarget,
|
|
|
{
|
|
|
targetSlot->addItems( stack, dir );
|
|
|
zSource->updateCache( sourceSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
|
|
|
- zTarget->updateCache( targetSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
|
|
|
+ zTarget->updateCache( targetSlot, -1 );
|
|
|
zSource->afterPullStack( sourceSlot, sourceView, targetSlot->zStack()->zItem(), number );
|
|
|
zTarget->afterPushStack( targetSlot, targetView, targetSlot->zStack()->zItem(), number );
|
|
|
if( stack->getSize() )
|
|
@@ -371,6 +372,7 @@ void Inventory::localTransaction( Array< ItemSlot* >* zSourceSlots, Array< ItemS
|
|
|
if( !sourceSlot->zStack() )
|
|
|
toDelete.add( index, 0 );
|
|
|
targetSlot->addItems( stack, NO_DIRECTION );
|
|
|
+ updateCache( sourceSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
|
|
|
if( stack->getSize() )
|
|
|
{
|
|
|
cs.unlock();
|
|
@@ -409,7 +411,7 @@ void Inventory::localTransaction( Array< ItemSlot* >* zSourceSlots, Array< ItemS
|
|
|
{
|
|
|
targetSlot->addItems( stack, NO_DIRECTION );
|
|
|
updateCache( sourceSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
|
|
|
- updateCache( targetSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
|
|
|
+ updateCache( targetSlot, -1 );
|
|
|
if( stack->getSize() )
|
|
|
{
|
|
|
cs.unlock();
|
|
@@ -473,7 +475,7 @@ void Inventory::addItems( ItemStack* items, Direction dir )
|
|
|
if( stack )
|
|
|
{
|
|
|
targetSlot->addItems( stack, dir );
|
|
|
- updateCache( targetSlot, targetSlot->zStack()->zItem()->zItemType()->getId() );
|
|
|
+ updateCache( targetSlot, -1 );
|
|
|
afterPushStack( targetSlot, dir, targetSlot->zStack()->zItem(), number );
|
|
|
if( stack->getSize() )
|
|
|
throw stack;
|