diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-02 23:20:53 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-02 23:20:53 +0200 |
commit | 098c237a39ba32610e46faf4c90e811fa2c57acf (patch) | |
tree | e63066df567a1623ae42006b526dba6ca6e268f2 | |
parent | Enchantments: API and sending to client (diff) | |
download | cuberite-098c237a39ba32610e46faf4c90e811fa2c57acf.tar cuberite-098c237a39ba32610e46faf4c90e811fa2c57acf.tar.gz cuberite-098c237a39ba32610e46faf4c90e811fa2c57acf.tar.bz2 cuberite-098c237a39ba32610e46faf4c90e811fa2c57acf.tar.lz cuberite-098c237a39ba32610e46faf4c90e811fa2c57acf.tar.xz cuberite-098c237a39ba32610e46faf4c90e811fa2c57acf.tar.zst cuberite-098c237a39ba32610e46faf4c90e811fa2c57acf.zip |
Diffstat (limited to '')
-rw-r--r-- | source/UI/SlotArea.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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;
}
|