1
0

Shift + click doesn't "destroy" item enchantment

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1540 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-06-02 21:20:53 +00:00
parent a19a070121
commit 098c237a39

View File

@ -204,7 +204,8 @@ void cSlotArea::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_
} }
if (a_Apply) 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); SetSlot(i, a_Player, NewSlot);
} }
a_ItemStack.m_ItemCount -= NumFit; a_ItemStack.m_ItemCount -= NumFit;
@ -623,7 +624,7 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo
{ {
if (a_ShouldApply) 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; a_ItemStack.m_ItemCount -= 1;
} }
@ -631,7 +632,7 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo
{ {
if (a_ShouldApply) 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; a_ItemStack.m_ItemCount -= 1;
} }
@ -639,7 +640,7 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo
{ {
if (a_ShouldApply) 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; a_ItemStack.m_ItemCount -= 1;
} }
@ -647,7 +648,7 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo
{ {
if (a_ShouldApply) 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; a_ItemStack.m_ItemCount -= 1;
} }