527 {
528 if ( ItemManager.GetInstance().IsMicromanagmentMode() )
529 return false;
530
531 if (focusedEntity)
532 {
533 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer());
534 EntityAI entityInHands = player.GetItemInHands();
535 if (entityInHands)
536 {
537 InventoryLocation il = new InventoryLocation();
538
539 if (!GameInventory.CanSwapEntitiesEx(focusedEntity, entityInHands))
540 {
541 return GameInventory.CanForceSwapEntitiesEx( focusedEntity, null, entityInHands, il );
542 }
543 else
544 {
545 return true;
546 }
547 }
548 else
549 {
550 return player.GetInventory().CanAddEntityIntoHands(focusedEntity);
551 }
552 }
553 return false;
554 }