Example #1
0
        public static CodeValue[] getItemAmmoTypes(Int32 subCategory)
        {
            List <CodeValue> codeValueList = new List <CodeValue>();

            if (subCategory == 100)
            {
                // Override the ammo type for beam weapons
                codeValueList.Add(CodeValue.Formatted(4, "EMP"));
                codeValueList.Add(CodeValue.Formatted(3, "Energy"));
                codeValueList.Add(CodeValue.Formatted(2, "Plasma"));
            }
            else
            {
                String query = "SELECT "
                               + ColumnData.GetName(Net7.Table_item_type._id) + ", "
                               + ColumnData.GetName(Net7.Table_item_type._name)
                               + " FROM "
                               + Net7.Tables.item_ammo_type.ToString()
                               + " WHERE "
                               + ColumnData.GetName(Net7.Table_item_ammo_type._sub_category)
                               + " = "
                               + subCategory
                               + " ORDER BY "
                               + ColumnData.GetName(Net7.Table_item_type._name);
                DataTable dataTable = DB.Instance.executeQuery(query, null, null);
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    codeValueList.Add(CodeValue.Formatted(ColumnData.GetInt32(dataRow, Net7.Table_item_type._id),
                                                          ColumnData.GetString(dataRow, Net7.Table_item_type._name)));
                }
            }
            return(codeValueList.ToArray());
        }
Example #2
0
        public static CodeValue[] getItemSubCategories()
        {
            List <CodeValue> codeValueList = new List <CodeValue>();

            foreach (Items.ItemSubCategory subCategory in Enum.GetValues(typeof(Items.ItemSubCategory)))
            {
                codeValueList.Add(CodeValue.Formatted((int)subCategory, Items.SubCategoryLookup(subCategory)));
            }
            return(codeValueList.ToArray());
        }
Example #3
0
        public static CodeValue[] getItemStatus()
        {
            List <CodeValue> codeValueList = new List <CodeValue>();

            codeValueList.Add(CodeValue.Formatted(0, "Incomplete data"));
            codeValueList.Add(CodeValue.Formatted(1, "Unverified"));
            codeValueList.Add(CodeValue.Formatted(2, "Verified by 1"));
            codeValueList.Add(CodeValue.Formatted(3, "Verified by 2"));
            codeValueList.Add(CodeValue.Formatted(4, "Verified by 3"));

            return(codeValueList.ToArray());
        }
Example #4
0
        public static CodeValue[] getItemManufacturingLevels()
        {
            List <CodeValue> codeValueList = new List <CodeValue>();

            // Okeanos: http://forum.enb-emulator.com/index.php?showtopic=4164&st=0&#
            codeValueList.Add(CodeValue.Formatted(1, "Automatic"));
            codeValueList.Add(CodeValue.Formatted(2, "Easy"));
            codeValueList.Add(CodeValue.Formatted(3, "Moderate"));
            codeValueList.Add(CodeValue.Formatted(4, "Hard"));
            codeValueList.Add(CodeValue.Formatted(5, "VeryHard"));
            codeValueList.Add(CodeValue.Formatted(6, "Impossible"));
            return(codeValueList.ToArray());
        }
        private static CodeValue[] GetVarableType()
        {
            List <CodeValue> codeValueList = new List <CodeValue>();

            codeValueList.Add(CodeValue.Formatted(0, "Not Used"));
            codeValueList.Add(CodeValue.Formatted(1, "Increase Value"));
            codeValueList.Add(CodeValue.Formatted(2, "Increase Percent"));
            codeValueList.Add(CodeValue.Formatted(3, "Decrease Value"));
            codeValueList.Add(CodeValue.Formatted(4, "Decrease Percent"));
            codeValueList.Add(CodeValue.Formatted(5, "Duration"));

            return(codeValueList.ToArray());
        }
Example #6
0
        public static CodeValue[] getItemDamageTypes()
        {
            List <CodeValue> codeValueList = new List <CodeValue>();

            codeValueList.Add(CodeValue.Formatted(6, "Absolute"));
            codeValueList.Add(CodeValue.Formatted(5, "Chemical"));
            codeValueList.Add(CodeValue.Formatted(8, "Effect"));
            codeValueList.Add(CodeValue.Formatted(4, "EMP"));
            codeValueList.Add(CodeValue.Formatted(3, "Energy"));
            codeValueList.Add(CodeValue.Formatted(1, "Explosive"));
            codeValueList.Add(CodeValue.Formatted(0, "Impact"));
            codeValueList.Add(CodeValue.Formatted(2, "Plasma"));
            codeValueList.Add(CodeValue.Formatted(7, "System"));

            return(codeValueList.ToArray());
        }
Example #7
0
        public static CodeValue[] getItemTypes()
        {
            List <CodeValue> valueList = new List <CodeValue>();
            String           query     = "SELECT "
                                         + ColumnData.GetName(Net7.Table_item_type._id) + ", "
                                         + ColumnData.GetName(Net7.Table_item_type._name)
                                         + " FROM "
                                         + Net7.Tables.item_type.ToString()
                                         + " ORDER BY "
                                         + ColumnData.GetName(Net7.Table_item_type._name);
            DataTable dataTable = DB.Instance.executeQuery(query, null, null);

            foreach (DataRow dataRow in dataTable.Rows)
            {
                valueList.Add(CodeValue.Formatted(ColumnData.GetInt32(dataRow, Net7.Table_item_type._id),
                                                  ColumnData.GetString(dataRow, Net7.Table_item_type._name)));
            }
            return(valueList.ToArray());
        }
Example #8
0
        public static CodeValue[] getItemCategories()
        {
            List <CodeValue> codeValueList = new List <CodeValue>();

            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Invalid, "Invalid"));

            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Ammo_Component, "Ammo Component"));
            //codeValueList.Add(CodeValue.Formatted((int) Items.ItemCategory.Consumable, "Consumable"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Core_Item, "Core Item"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Device, "Device"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Electronic_Item, "Electronic Item"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Fabricated_Item, "Fabricated Item"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Looted_Item, "Looted Item"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Raw_Resource, "Raw Resource"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Reactor_Component, "Reactor Component"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Refined_Resource, "Refined Resource"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Trade_Good, "Trade Good"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Weapon, "Weapon"));
            codeValueList.Add(CodeValue.Formatted((int)Items.ItemCategory.Weapon_Component, "Weapon Component"));

            return(codeValueList.ToArray());
        }
Example #9
0
        public static CodeValue[] getItemSubCategories(int itemCategory)
        {
            List <CodeValue> codeValueList = new List <CodeValue>();

            switch ((Items.ItemCategory)itemCategory)
            {
            case Items.ItemCategory.Weapon:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Ammo, "Ammo"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Beam_Weapon, "Beam Weapon"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Missile_Launcher, "Missile Launcher"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Projectile_Launcher, "Projectile Launcher"));
                break;

            case Items.ItemCategory.Device:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Device, "Device"));
                break;

            case Items.ItemCategory.Core_Item:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Engine, "Engine"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Reactor, "Reactor"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Shield, "Shield"));
                break;

            case Items.ItemCategory.Electronic_Item:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Electronic_Item, "Electronic Item"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Computer, "Computer"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Software, "Software"));
                break;

            case Items.ItemCategory.Reactor_Component:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Power_Converter, "Power Converter"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Power_Core, "Power Core"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Power_Coupling, "Power Coupling"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Power_Generator, "Power Generator"));
                break;

            case Items.ItemCategory.Fabricated_Item:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Casing, "Casing"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Drone_Frame, "Drone Frame"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Engine_Frame, "Engine Frame"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Mount, "Mount"));
                break;

            case Items.ItemCategory.Weapon_Component:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Ammunition_Feeder, "Ammunition Feeder"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Beam_Optic, "Beam Optic"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Firing_Mechanism, "Firing Mechanism"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Weapon_Barrel, "Weapon Barrel"));
                break;

            case Items.ItemCategory.Ammo_Component:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Ammunition_Slug, "Ammunition Slug"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Propellant, "Propellant"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Shell_Casing, "Shell Casing"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Warhead, "Warhead"));
                break;

            case Items.ItemCategory.Raw_Resource:
            case Items.ItemCategory.Refined_Resource:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Alloy, "Alloy"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Catalyst, "Catalyst"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Core_Metal, "Core Metal"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Conductor, "Conductor"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Gas, "Gas"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Gemstone, "Gemstone"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Hydrocarbon, "Hydrocarbon"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Magnetic, "Magnetic"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Metal, "Metal"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Optic_Gem, "Optic Gem"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Radioactive, "Radioactive"));
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Silicate, "Silicate"));
                break;

            case Items.ItemCategory.Trade_Good:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Other, "Other"));
                break;

            case Items.ItemCategory.Looted_Item:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Other, "Other"));
                break;

            default:
                codeValueList.Add(CodeValue.Formatted((int)Items.ItemSubCategory.Invalid, "--= Invalid Sub-Category =--"));
                break;
            }
            return(codeValueList.ToArray());
        }