summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index a895dd3b3..ff649ea4d 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1188,7 +1188,14 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB
case DIG_STATUS_SWAP_ITEM_IN_HAND:
{
- // TODO: Not yet implemented
+
+ cItem EquippedItem = m_Player->GetEquippedItem();
+ cItem OffhandItem = m_Player->GetOffHandEquipedItem();
+
+ cInventory & Intentory = m_Player->GetInventory();
+ Intentory.SetShieldSlot(EquippedItem);
+ Intentory.SetHotbarSlot(Intentory.GetEquippedSlotNum(), OffhandItem);
+
return;
}