diff options
Diffstat (limited to 'source/Item.h')
-rw-r--r-- | source/Item.h | 16 |
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) + ); } |