Example #1
0
        /// <summary>
        /// Grants EoC for crafting items
        /// </summary>
        private static void OnItemCraft(ItemCraftEventArgs args)
        {
            CraftItem   item   = args.CraftItem;
            CraftSystem system = args.CraftSystem;
            Player      p      = args.Player;

            double minSkill = 1.0;

            for (int i = 0; i < item.Skills.Count; i++)
            {
                if (item.Skills[i].SkillToMake != system.MainSkill)
                {
                    continue;
                }

                minSkill = item.Skills[i].MinSkill;
                break;
            }

            if (args.Success)
            {
                p.EssenceOfCharacter += (int)(minSkill / 10);
            }
            else
            {
                p.EssenceOfCharacter += (int)(minSkill / 5);
            }
        }
Example #2
0
 public static void InvokeItemCraft(ItemCraftEventArgs args)
 {
     if (ItemCraft != null)
     {
         ItemCraft(args);
     }
 }
Example #3
0
 public static void InvokeItemCraft( ItemCraftEventArgs args )
 {
     if( ItemCraft != null )
         ItemCraft(args);
 }