diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-08-18 12:29:54 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2017-08-18 12:29:54 +0200 |
commit | b8dda388e0cf300f573d411dc670099e56c2e3c3 (patch) | |
tree | 6c3f40beb7a652f9c5afa560954e68a53db54401 /src/Item.h | |
parent | Changed type of FastRandom in monster drop calculation. (#3920) (diff) | |
download | cuberite-b8dda388e0cf300f573d411dc670099e56c2e3c3.tar cuberite-b8dda388e0cf300f573d411dc670099e56c2e3c3.tar.gz cuberite-b8dda388e0cf300f573d411dc670099e56c2e3c3.tar.bz2 cuberite-b8dda388e0cf300f573d411dc670099e56c2e3c3.tar.lz cuberite-b8dda388e0cf300f573d411dc670099e56c2e3c3.tar.xz cuberite-b8dda388e0cf300f573d411dc670099e56c2e3c3.tar.zst cuberite-b8dda388e0cf300f573d411dc670099e56c2e3c3.zip |
Diffstat (limited to 'src/Item.h')
-rw-r--r-- | src/Item.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/Item.h b/src/Item.h index 18a1e69c0..493061d93 100644 --- a/src/Item.h +++ b/src/Item.h @@ -41,7 +41,6 @@ public: m_ItemCount(0), m_ItemDamage(0), m_CustomName(""), - m_Lore(""), m_RepairCost(0), m_FireworkItem(), m_ItemColor() @@ -56,14 +55,14 @@ public: short a_ItemDamage = 0, const AString & a_Enchantments = "", const AString & a_CustomName = "", - const AString & a_Lore = "" + const AStringVector & a_LoreTable = {} ) : m_ItemType (a_ItemType), m_ItemCount (a_ItemCount), m_ItemDamage (a_ItemDamage), m_Enchantments(a_Enchantments), m_CustomName (a_CustomName), - m_Lore (a_Lore), + m_LoreTable (a_LoreTable), m_RepairCost (0), m_FireworkItem(), m_ItemColor() @@ -106,7 +105,7 @@ public: m_ItemDamage = 0; m_Enchantments.Clear(); m_CustomName = ""; - m_Lore = ""; + m_LoreTable.clear(); m_RepairCost = 0; m_FireworkItem.EmptyData(); m_ItemColor.Clear(); @@ -137,7 +136,7 @@ public: (m_ItemDamage == a_Item.m_ItemDamage) && (m_Enchantments == a_Item.m_Enchantments) && (m_CustomName == a_Item.m_CustomName) && - (m_Lore == a_Item.m_Lore) && + (m_LoreTable == a_Item.m_LoreTable) && m_FireworkItem.IsEqualTo(a_Item.m_FireworkItem) ); } @@ -151,12 +150,12 @@ public: bool IsBothNameAndLoreEmpty(void) const { - return (m_CustomName.empty() && m_Lore.empty()); + return (m_CustomName.empty() && m_LoreTable.empty()); } bool IsCustomNameEmpty(void) const { return (m_CustomName.empty()); } - bool IsLoreEmpty(void) const { return (m_Lore.empty()); } + bool IsLoreEmpty(void) const { return (m_LoreTable.empty()); } /** Returns a copy of this item with m_ItemCount set to 1. Useful to preserve enchantments etc. on stacked items */ cItem CopyOne(void) const; @@ -221,7 +220,12 @@ public: short m_ItemDamage; cEnchantments m_Enchantments; AString m_CustomName; - AString m_Lore; + + // tolua_end + + AStringVector m_LoreTable; // Exported in ManualBindings.cpp + + // tolua_begin int m_RepairCost; cFireworkItem m_FireworkItem; |