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 From e86bf64867dd6da877934fee4ac5bafedc464389 Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 7 May 2014 12:45:20 +0200 Subject: Where is the problem with clang? --- src/Item.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 7e2fc6cff..2a1978aad 100644 --- a/src/Item.h +++ b/src/Item.h @@ -202,8 +202,8 @@ public: AString m_CustomName; AString m_Lore; - cFireworkItem m_FireworkItem; UInt16 m_RepairCost; + cFireworkItem m_FireworkItem; }; // tolua_end -- cgit v1.2.3 From fbb6404cc8793f5caef374e1eda243fa2d159eb5 Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 7 May 2014 20:43:37 +0200 Subject: Change m_RepairCost to int. --- src/Item.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 2a1978aad..1ac9280fc 100644 --- a/src/Item.h +++ b/src/Item.h @@ -87,8 +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_RepairCost (a_CopyFrom.m_RepairCost) + m_FireworkItem(a_CopyFrom.m_FireworkItem), { } @@ -202,7 +202,7 @@ public: AString m_CustomName; AString m_Lore; - UInt16 m_RepairCost; + int m_RepairCost; cFireworkItem m_FireworkItem; }; // tolua_end -- cgit v1.2.3 From df71cc931b793dc88f93bc44618d910b0bb978ee Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 7 May 2014 21:32:52 +0200 Subject: Missing comma --- src/Item.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 1ac9280fc..2f65d5344 100644 --- a/src/Item.h +++ b/src/Item.h @@ -87,8 +87,8 @@ public: m_Enchantments(a_CopyFrom.m_Enchantments), m_CustomName (a_CopyFrom.m_CustomName), m_Lore (a_CopyFrom.m_Lore), - m_RepairCost (a_CopyFrom.m_RepairCost) - m_FireworkItem(a_CopyFrom.m_FireworkItem), + m_RepairCost (a_CopyFrom.m_RepairCost), + m_FireworkItem(a_CopyFrom.m_FireworkItem) { } -- cgit v1.2.3