From 36120db400691be75199ff404e35f5c289b8818f Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Fri, 31 Jan 2014 19:46:51 +0100 Subject: Some updates for enchanting (2) --- src/Item.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 727965112..1a070eafd 100644 --- a/src/Item.h +++ b/src/Item.h @@ -169,6 +169,9 @@ public: /// Returns true if the specified item type is enchantable (as per 1.2.5 protocol requirements) static bool IsEnchantable(short a_ItemType); + /** Fills a_Enchantments with the list of enchantments applicable to the specified item type */ + static void cItem::GetApplicableEnchantmentsForType(short a_ItemType, cEnchantmentsArray & a_Enchantments); + // tolua_begin short m_ItemType; -- cgit v1.2.3 From e6e702e7fdbc8b7475d3dbecc0f81a08304997ae Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Sat, 12 Apr 2014 14:58:46 +0200 Subject: Added complete Enchanting System http://minecraft.gamepedia.com/Enchantment_mechanics --- src/Item.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 620c77b29..910ecb382 100644 --- a/src/Item.h +++ b/src/Item.h @@ -175,9 +175,6 @@ public: /** Returns true if the specified item type is enchantable (as per 1.2.5 protocol requirements) */ static bool IsEnchantable(short a_ItemType); // tolua_export - /** Fills a_Enchantments with the list of enchantments applicable to the specified item type */ - static void cItem::GetApplicableEnchantmentsForType(short a_ItemType, cEnchantmentsArray & a_Enchantments); - // tolua_begin short m_ItemType; -- cgit v1.2.3 From f9343a8490b50cb28a62c7327c0013da48ca2745 Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Thu, 17 Apr 2014 13:15:35 +0200 Subject: Modified many things --- src/Item.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 910ecb382..987dea2a9 100644 --- a/src/Item.h +++ b/src/Item.h @@ -175,6 +175,13 @@ public: /** Returns true if the specified item type is enchantable (as per 1.2.5 protocol requirements) */ static bool IsEnchantable(short a_ItemType); // tolua_export + /** Returns the enchantability of the item. When the item hasn't a enchantability, it will returns 0 */ + int GetEnchantability(); // tolua_export + + /** Enchants the item using the specified number of XP levels. + Returns true if item enchanted, false if not. */ + bool EnchantByXPLevels(int a_NumXPLevels, cPlayer & a_Player, bool a_BlockConflictingEnchantments, bool a_DeleteLevelFromPlayer); // tolua_export + // tolua_begin short m_ItemType; -- cgit v1.2.3 From 0086fcfef18db58f3a4509853399c0a9b610e950 Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Thu, 17 Apr 2014 19:31:43 +0200 Subject: Fixed some Errors (not all) --- 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 987dea2a9..00316c188 100644 --- a/src/Item.h +++ b/src/Item.h @@ -180,7 +180,7 @@ public: /** Enchants the item using the specified number of XP levels. Returns true if item enchanted, false if not. */ - bool EnchantByXPLevels(int a_NumXPLevels, cPlayer & a_Player, bool a_BlockConflictingEnchantments, bool a_DeleteLevelFromPlayer); // tolua_export + bool EnchantByXPLevels(int a_NumXPLevels); // tolua_export // tolua_begin -- cgit v1.2.3