summaryrefslogtreecommitdiffstats
path: root/src/Item.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-16 19:44:11 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-16 19:44:11 +0100
commit5d03e49c138ad45486452a5ecaebf162a4882c71 (patch)
tree11e9067d0af146b6c907779fb0e5e0d37f9558fd /src/Item.cpp
parentMerge remote-tracking branch 'origin/master' into customnames (diff)
downloadcuberite-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 '')
-rw-r--r--src/Item.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Item.cpp b/src/Item.cpp
index 9170006b6..58b3d41c9 100644
--- a/src/Item.cpp
+++ b/src/Item.cpp
@@ -99,6 +99,25 @@ bool cItem::IsFullStack(void) const
+void cItem::CustomCopy(cItem & a_OtherItem, bool a_CopyType, bool a_CopyCount, bool a_CopyDamage, bool a_CopyEnchantments, bool a_CopyCustomName, bool a_CopyLore)
+{
+ if (a_CopyType)
+ m_ItemType = a_OtherItem.m_ItemType;
+ if (a_CopyCount)
+ m_ItemCount = a_OtherItem.m_ItemCount;
+ if (a_CopyDamage)
+ m_ItemDamage = a_OtherItem.m_ItemDamage;
+ if (a_CopyEnchantments)
+ m_Enchantments = a_OtherItem.m_Enchantments;
+ if (a_CopyCustomName)
+ m_CustomName = a_OtherItem.m_CustomName;
+ if (a_CopyLore)
+ m_Lore = a_OtherItem.m_Lore;
+}
+
+
+
+
char cItem::GetMaxStackSize(void) const
{