Example #1
0
        /// <summary>
        /// Return the (magic) extra damage of the enchantments on player equipped item.
        /// </summary>
        public static int GetEnchantmentModifierLiving(InventoryPlayer par0InventoryPlayer, EntityLiving par1EntityLiving)
        {
            EnchantmentModifierLiving.LivingModifier = 0;
            EnchantmentModifierLiving.EntityLiving   = par1EntityLiving;
            ApplyEnchantmentModifier(EnchantmentModifierLiving, par0InventoryPlayer.GetCurrentItem());

            if (EnchantmentModifierLiving.LivingModifier > 0)
            {
                return(1 + EnchantmentRand.Next(EnchantmentModifierLiving.LivingModifier));
            }
            else
            {
                return(0);
            }
        }
Example #2
0
 /// <summary>
 /// Returns the looting enchantment modifier of the current equipped item of player.
 /// </summary>
 public static int GetLootingModifier(InventoryPlayer par0InventoryPlayer)
 {
     return(GetEnchantmentLevel(Enchantment.Looting.EffectId, par0InventoryPlayer.GetCurrentItem()));
 }
Example #3
0
 /// <summary>
 /// Returns the fortune enchantment modifier of the current equipped item of player.
 /// </summary>
 public static int GetFortuneModifier(InventoryPlayer par0InventoryPlayer)
 {
     return(GetEnchantmentLevel(Enchantment.Fortune.EffectId, par0InventoryPlayer.GetCurrentItem()));
 }
Example #4
0
 /// <summary>
 /// Returns the silk touch status of enchantments on current equipped item of player.
 /// </summary>
 public static bool GetSilkTouchModifier(InventoryPlayer par0InventoryPlayer)
 {
     return(GetEnchantmentLevel(Enchantment.SilkTouch.EffectId, par0InventoryPlayer.GetCurrentItem()) > 0);
 }
Example #5
0
 /// <summary>
 /// Return the fire aspect value of enchantments on equipped player item.
 /// </summary>
 public static int GetFireAspectModifier(InventoryPlayer par0InventoryPlayer, EntityLiving par1EntityLiving)
 {
     return(GetEnchantmentLevel(Enchantment.FireAspect.EffectId, par0InventoryPlayer.GetCurrentItem()));
 }