From 098c237a39ba32610e46faf4c90e811fa2c57acf Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 2 Jun 2013 21:20:53 +0000 Subject: Shift + click doesn't "destroy" item enchantment git-svn-id: http://mc-server.googlecode.com/svn/trunk@1540 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/UI/SlotArea.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source/UI') diff --git a/source/UI/SlotArea.cpp b/source/UI/SlotArea.cpp index 8333d0574..3f480817c 100644 --- a/source/UI/SlotArea.cpp +++ b/source/UI/SlotArea.cpp @@ -204,7 +204,8 @@ void cSlotArea::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ } if (a_Apply) { - cItem NewSlot(a_ItemStack.m_ItemType, Slot->m_ItemCount + NumFit, a_ItemStack.m_ItemDamage); + cItem NewSlot(a_ItemStack); + NewSlot.m_ItemCount = Slot->m_ItemCount + NumFit; SetSlot(i, a_Player, NewSlot); } a_ItemStack.m_ItemCount -= NumFit; @@ -623,7 +624,7 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo { if (a_ShouldApply) { - SetSlot(0, a_Player, cItem(a_ItemStack.m_ItemType, 1, a_ItemStack.m_ItemDamage)); + SetSlot(0, a_Player, a_ItemStack.CopyOne()); } a_ItemStack.m_ItemCount -= 1; } @@ -631,7 +632,7 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo { if (a_ShouldApply) { - SetSlot(1, a_Player, cItem(a_ItemStack.m_ItemType, 1, a_ItemStack.m_ItemDamage)); + SetSlot(1, a_Player, a_ItemStack.CopyOne()); } a_ItemStack.m_ItemCount -= 1; } @@ -639,7 +640,7 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo { if (a_ShouldApply) { - SetSlot(2, a_Player, cItem(a_ItemStack.m_ItemType, 1, a_ItemStack.m_ItemDamage)); + SetSlot(2, a_Player, a_ItemStack.CopyOne()); } a_ItemStack.m_ItemCount -= 1; } @@ -647,7 +648,7 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo { if (a_ShouldApply) { - SetSlot(3, a_Player, cItem(a_ItemStack.m_ItemType, 1, a_ItemStack.m_ItemDamage)); + SetSlot(3, a_Player, a_ItemStack.CopyOne()); } a_ItemStack.m_ItemCount -= 1; } -- cgit v1.2.3