Esempio n. 1
0
        public static IEnumerable <EVEMaterial> AdjustForME(IEnumerable <EVEMaterial> materials, int matEfficiency)
        {
            List <EVEMaterial> result = new List <EVEMaterial>();

            foreach (EVEMaterial m in materials)
            {
                if (m.isExtra)
                {
                    result.Add(m);
                }
                else
                {
                    EVEMaterial newMat = new EVEMaterial(m.item, m.quantity, m.damage, m.isExtra);
                    int         waste;
                    if (matEfficiency >= 0)
                    {
                        waste = (int)Math.Floor(0.5 + newMat.quantity * 0.1 * (1 / (matEfficiency + 1)));
                    }
                    else
                    {
                        waste = (int)Math.Floor(0.5 + newMat.quantity * 0.1 * (1 - matEfficiency));
                    }
                    newMat.quantity += waste;
                    result.Add(newMat);
                }
            }

            return(result);
        }
Esempio n. 2
0
        public static IEnumerable<EVEMaterial> AdjustForME(IEnumerable<EVEMaterial> materials, int matEfficiency)
        {
            List<EVEMaterial> result = new List<EVEMaterial>();

            foreach (EVEMaterial m in materials)
            {
                if (m.isExtra)
                    result.Add(m);
                else
                {
                    EVEMaterial newMat = new EVEMaterial(m.item, m.quantity, m.damage, m.isExtra);
                    int waste;
                    if (matEfficiency >= 0)
                        waste = (int)Math.Floor(0.5 + newMat.quantity * 0.1 * (1 / (matEfficiency + 1)));
                    else
                    {
                        waste = (int)Math.Floor(0.5 + newMat.quantity * 0.1 * (1 - matEfficiency));
                    }
                    newMat.quantity += waste;
                    result.Add(newMat);
                }
            }

            return result;
        }
Esempio n. 3
0
        public static IEnumerable <EVEMaterial> GetInventionRequirements(string t2ItemName)
        {
            List <EVEMaterial> result = new List <EVEMaterial>();

            invType          t1type = TypesHelper.GetMeta0Type(t2ItemName);
            invBlueprintType bpType = TypesHelper.GetBlueprintType(t1type);
            IEnumerable <ramTypeRequirement> ramReqs = TypesHelper.GetRamTypeRequirements(bpType).Where(x => x.activityID == 8);

            foreach (ramTypeRequirement r in ramReqs)
            {
                invType     reqType = TypesHelper.GetType(r.requiredTypeID);
                EVEMaterial newMat  = new EVEMaterial(EVECache.GetItem(reqType), r.quantity.Value, r.damagePerJob.Value, true);

                if (reqType.groupID == 716)
                {
                    newMat.damage = 0;
                }

                result.Add(newMat);
            }

            return(result);
        }
Esempio n. 4
0
        public static IEnumerable<EVEMaterial> GetInventionRequirements(string t2ItemName)
        {
            List<EVEMaterial> result = new List<EVEMaterial>();

            invType t1type = TypesHelper.GetMeta0Type(t2ItemName);
            invBlueprintType bpType = TypesHelper.GetBlueprintType(t1type);
            IEnumerable<ramTypeRequirement> ramReqs = TypesHelper.GetRamTypeRequirements(bpType).Where(x => x.activityID == 8);

            foreach (ramTypeRequirement r in ramReqs)
            {
                invType reqType = TypesHelper.GetType(r.requiredTypeID);
                EVEMaterial newMat = new EVEMaterial(EVECache.GetItem(reqType), r.quantity.Value, r.damagePerJob.Value, true);

                if (reqType.groupID == 716)
                    newMat.damage = 0;

                result.Add(newMat);
            }

            return result;
        }