summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHownaer <franzi.moos@googlemail.com>2014-08-28 15:21:50 +0200
committerHownaer <franzi.moos@googlemail.com>2014-08-28 15:21:50 +0200
commitc0c4ac5236779af648fd64d32eb7075553e4a88a (patch)
tree85fa24482d1ca1fc2948c31e28a77bc21b259266 /src
parentFixed bad values in the IsEnchantable() method. (diff)
downloadcuberite-c0c4ac5236779af648fd64d32eb7075553e4a88a.tar
cuberite-c0c4ac5236779af648fd64d32eb7075553e4a88a.tar.gz
cuberite-c0c4ac5236779af648fd64d32eb7075553e4a88a.tar.bz2
cuberite-c0c4ac5236779af648fd64d32eb7075553e4a88a.tar.lz
cuberite-c0c4ac5236779af648fd64d32eb7075553e4a88a.tar.xz
cuberite-c0c4ac5236779af648fd64d32eb7075553e4a88a.tar.zst
cuberite-c0c4ac5236779af648fd64d32eb7075553e4a88a.zip
Diffstat (limited to 'src')
-rw-r--r--src/UI/SlotArea.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index 88af257a0..b4facb2d3 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -1468,6 +1468,7 @@ void cSlotAreaEnchanting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickActio
if (DraggingItem.IsEmpty())
{
+ // DraggingItem is empty -> Switch draggingitem and slot
if (!Slot.IsEmpty())
{
std::swap(DraggingItem, Slot);
@@ -1475,6 +1476,7 @@ void cSlotAreaEnchanting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickActio
}
else if (Slot.IsEmpty())
{
+ // DraggingItem isn't empty and slot is empty -> Set one dragging item in the slot
Slot = DraggingItem.CopyOne();
DraggingItem.m_ItemCount -= 1;
@@ -1485,7 +1487,7 @@ void cSlotAreaEnchanting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickActio
}
else if ((DraggingItem.m_ItemCount == 1) && !DraggingItem.IsEqual(Slot))
{
- // Switch contents
+ // DraggingItem and slot aren't empty -> Switch items
std::swap(DraggingItem, Slot);
}