01-26-2014, 11:23 PM
(This post was last modified: 01-26-2014, 11:24 PM by daniel0916.)
(01-26-2014, 08:58 PM)xoft Wrote:// In Enchantments.h: typedef std::vector<cEnchantment> cEnchantments;
Do you mean?
typedef std::vector<cEnchantments> cEnchantments;or should i create a cEnchantment Class?
(01-26-2014, 04:08 AM)xoft Wrote:
class cEnchantment
{
enum eEnchantmentType { enchProtection ... }; // <-- NAME the enchantment enum
...
/** Returns true if the item type supports the specified enchantment type and level */
static bool CanEnchantItemType(short a_ItemType, eEnchantmentType a_EnchantmentType, int a_Level);
/** Returns true if the specified item can be enchanted with the specified enchantment
This includes checks for mutually exclusive enchantments, such as Sharpness and Smite */
static bool CanEnchantItem(const cItem & a_Item, eEnchantmentType a_EnchantmentType, int a_Level);
} ;
Ah okay. I will create this.

