From d6cb6e0423fe38478c69f5d249882a01d727f0ed Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 7 May 2014 12:30:30 +0200 Subject: Add repair cost to cItem, add custom name to NBTChunkSerializer and fix anvil bugs. --- src/Item.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 8eb0a1f4e..7e2fc6cff 100644 --- a/src/Item.h +++ b/src/Item.h @@ -40,6 +40,7 @@ public: m_ItemDamage(0), m_CustomName(""), m_Lore(""), + m_RepairCost(0), m_FireworkItem() { } @@ -60,6 +61,7 @@ public: m_Enchantments(a_Enchantments), m_CustomName (a_CustomName), m_Lore (a_Lore), + m_RepairCost (0), m_FireworkItem() { if (!IsValidItem(m_ItemType)) @@ -85,7 +87,8 @@ public: m_Enchantments(a_CopyFrom.m_Enchantments), m_CustomName (a_CopyFrom.m_CustomName), m_Lore (a_CopyFrom.m_Lore), - m_FireworkItem(a_CopyFrom.m_FireworkItem) + m_FireworkItem(a_CopyFrom.m_FireworkItem), + m_RepairCost (a_CopyFrom.m_RepairCost) { } @@ -100,6 +103,7 @@ public: m_Enchantments.Clear(); m_CustomName = ""; m_Lore = ""; + m_RepairCost = 0; m_FireworkItem.EmptyData(); } @@ -109,6 +113,7 @@ public: m_ItemType = E_ITEM_EMPTY; m_ItemCount = 0; m_ItemDamage = 0; + m_RepairCost = 0; } @@ -190,14 +195,15 @@ public: // tolua_begin - short m_ItemType; - char m_ItemCount; - short m_ItemDamage; - cEnchantments m_Enchantments; - AString m_CustomName; - AString m_Lore; - - cFireworkItem m_FireworkItem; + short m_ItemType; + char m_ItemCount; + short m_ItemDamage; + cEnchantments m_Enchantments; + AString m_CustomName; + AString m_Lore; + + cFireworkItem m_FireworkItem; + UInt16 m_RepairCost; }; // tolua_end -- cgit v1.2.3