diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-16 19:44:11 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-16 19:44:11 +0100 |
commit | 5d03e49c138ad45486452a5ecaebf162a4882c71 (patch) | |
tree | 11e9067d0af146b6c907779fb0e5e0d37f9558fd /src/UI | |
parent | Merge remote-tracking branch 'origin/master' into customnames (diff) | |
download | cuberite-5d03e49c138ad45486452a5ecaebf162a4882c71.tar cuberite-5d03e49c138ad45486452a5ecaebf162a4882c71.tar.gz cuberite-5d03e49c138ad45486452a5ecaebf162a4882c71.tar.bz2 cuberite-5d03e49c138ad45486452a5ecaebf162a4882c71.tar.lz cuberite-5d03e49c138ad45486452a5ecaebf162a4882c71.tar.xz cuberite-5d03e49c138ad45486452a5ecaebf162a4882c71.tar.zst cuberite-5d03e49c138ad45486452a5ecaebf162a4882c71.zip |
Diffstat (limited to 'src/UI')
-rw-r--r-- | src/UI/SlotArea.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index df3687fda..318c099e9 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -87,11 +87,8 @@ void cSlotArea::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickA { DraggingItem.m_ItemCount = (char)(((float)Slot.m_ItemCount) / 2.f + 0.5f); Slot.m_ItemCount -= DraggingItem.m_ItemCount; - DraggingItem.m_ItemType = Slot.m_ItemType; - DraggingItem.m_ItemDamage = Slot.m_ItemDamage; - DraggingItem.m_Enchantments = Slot.m_Enchantments; - DraggingItem.m_CustomName = Slot.m_CustomName; - DraggingItem.m_Lore = Slot.m_Lore; + + DraggingItem.CustomCopy(Slot, true, false, true, true, true, true); if (Slot.m_ItemCount <= 0) { @@ -104,14 +101,10 @@ void cSlotArea::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickA cItemHandler * Handler = ItemHandler(Slot.m_ItemType); if ((DraggingItem.m_ItemCount > 0) && (Slot.m_ItemCount < Handler->GetMaxStackSize())) { - Slot.m_ItemType = DraggingItem.m_ItemType; Slot.m_ItemCount++; - Slot.m_ItemDamage = DraggingItem.m_ItemDamage; DraggingItem.m_ItemCount--; - Slot.m_Enchantments = DraggingItem.m_Enchantments; - Slot.m_CustomName = DraggingItem.m_CustomName; - Slot.m_Lore = DraggingItem.m_Lore; + Slot.CustomCopy(DraggingItem, true, false, true, true, true, true); } if (DraggingItem.m_ItemCount <= 0) { |