Enchanting
Understanding enchanting.
Last updated
Understanding enchanting.
Last updated
There isn't really a class that handles enchanting. Enchanting is handled through the Item Stack class. Each item has an Enchantment struct, which simply stores enchantment data. An ItemStack
stores a list of these since enchantments need to be a part of the item once they are enchanted.
Basically, a successful enchantment is achieved only if an enchanter item is used to enchantable item, and the player has the currency to cover the cost (if costs were enabled).
Enchanter items is a term that refers to an Item Stack which has an Item Type with the set to Enchanter
.
Enchanter items is a term that refers to an Item Stack which has an Item Type with the set to Enchantable
.
If an item has an EnchantmentMode
set to None
, it cannot contribute to the enchanting system.
Enchanting may cost the player some currency if the cost was enabled.
When an enchantment is successful, one stack of the enchanter item is used. The enchanter item's enchantment
field will be added to the enchantable item stack's enchants
list.
If an enchantment fails, it simply means that the requirements were not met.