/// <summary> /// /// </summary> /// <param name="slot"></param> /// <param name="value"></param> public void SetEnchantCharges( EnchantmentSlot slot, uint value ) { int enchBase = GetEnchantmentBase( slot ); SetUInt32( enchBase + 2, value ); }
/// <summary> /// /// </summary> /// <param name="slot"></param> /// <returns></returns> private int GetEnchantmentBase( EnchantmentSlot slot ) { return (int)(int)ItemFields.ENCHANTMENT + ( (int)slot * 3 ); }
/// <summary> /// /// </summary> /// <param name="slot"></param> /// <param name="value"></param> public void SetEnchantDuration( EnchantmentSlot slot, uint value ) { int enchBase = GetEnchantmentBase( slot ); SetUInt32( enchBase + 1, value ); }
/// <summary> /// /// </summary> /// <param name="slot"></param> /// <param name="value"></param> public void SetEnchantCharges(EnchantmentSlot slot, uint value) { int enchBase = GetEnchantmentBase(slot); SetUInt32(enchBase + 2, value); }
public EnchantDuration(Item _item = null, EnchantmentSlot _slot = EnchantmentSlot.Max, uint _leftduration = 0) { item = _item; slot = _slot; leftduration = _leftduration; }
/// <summary> /// /// </summary> /// <param name="slot"></param> /// <param name="value"></param> public void SetEnchantDuration(EnchantmentSlot slot, uint value) { int enchBase = GetEnchantmentBase(slot); SetUInt32(enchBase + 1, value); }
/// <summary> /// /// </summary> /// <param name="slot"></param> /// <returns></returns> private int GetEnchantmentBase(EnchantmentSlot slot) { return((int)(int)ItemFields.ENCHANTMENT + ((int)slot * 3)); }
uint GetEnchantmentCharges(EnchantmentSlot slot) { return(GetValue <uint>(ItemFields.Enchantment + (int)slot * (int)EnchantmentOffset.Max + (int)EnchantmentOffset.Charges)); }
uint GetEnchantmentDuration(EnchantmentSlot slot) { return(GetValue <uint>(ItemFields.Enchantment + (int)slot * (int)EnchantmentOffset.Max + (int)EnchantmentOffset.Duration)); }
public uint GetEnchantmentId(EnchantmentSlot slot) { return(GetValue <uint>(ItemFields.Enchantment + (int)slot * (int)EnchantmentOffset.Max + (int)EnchantmentOffset.Id)); }