summaryrefslogtreecommitdiffstats
path: root/source/Item.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-04 13:54:44 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-04 13:54:44 +0200
commitdcc3af0704f63caefd39d8488f8c6ff28c208bfd (patch)
treedb55bd48c83bc55d37f80a8a108beabbb938ec1c /source/Item.h
parentItemGrid: fixed changing item count when ToRemove == CurrentCount (diff)
downloadcuberite-dcc3af0704f63caefd39d8488f8c6ff28c208bfd.tar
cuberite-dcc3af0704f63caefd39d8488f8c6ff28c208bfd.tar.gz
cuberite-dcc3af0704f63caefd39d8488f8c6ff28c208bfd.tar.bz2
cuberite-dcc3af0704f63caefd39d8488f8c6ff28c208bfd.tar.lz
cuberite-dcc3af0704f63caefd39d8488f8c6ff28c208bfd.tar.xz
cuberite-dcc3af0704f63caefd39d8488f8c6ff28c208bfd.tar.zst
cuberite-dcc3af0704f63caefd39d8488f8c6ff28c208bfd.zip
Diffstat (limited to 'source/Item.h')
-rw-r--r--source/Item.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/Item.h b/source/Item.h
index fee549a2c..d0ba37b41 100644
--- a/source/Item.h
+++ b/source/Item.h
@@ -58,6 +58,16 @@ public:
}
+ /// Creates an exact copy of the item
+ cItem(const cItem & a_CopyFrom) :
+ m_ItemType (a_CopyFrom.m_ItemType),
+ m_ItemCount (a_CopyFrom.m_ItemCount),
+ m_ItemDamage (a_CopyFrom.m_ItemDamage),
+ m_Enchantments(a_CopyFrom.m_Enchantments)
+ {
+ }
+
+
void Empty(void)
{
m_ItemType = E_ITEM_EMPTY;
@@ -83,7 +93,11 @@ public:
bool IsEqual(const cItem & a_Item) const
{
- return (IsSameType(a_Item) && (m_ItemDamage == a_Item.m_ItemDamage));
+ return (
+ IsSameType(a_Item) &&
+ (m_ItemDamage == a_Item.m_ItemDamage) &&
+ (m_Enchantments == a_Item.m_Enchantments)
+ );
}