Пример #1
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>', using '<paramref name="material"/>' to help resolve leather OreInfo instances.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info, ArmorMaterialType material)
        {
            if (material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather || material == ArmorMaterialType.Spined ||
                material == ArmorMaterialType.Horned || material == ArmorMaterialType.Barbed)
            {
                if (info.Level == 0)
                {
                    return(CraftResource.RegularLeather);
                }
                else if (info.Level == 1)
                {
                    return(CraftResource.SpinedLeather);
                }
                else if (info.Level == 2)
                {
                    return(CraftResource.HornedLeather);
                }
                else if (info.Level == 3)
                {
                    return(CraftResource.BarbedLeather);
                }

                return(CraftResource.None);
            }

            return(GetFromOreInfo(info));
        }
Пример #2
0
        /// <summary>
        ///     Returns the <see cref="CraftResource" /> value which represents '<paramref name="info" />', using '
        ///     <paramref
        ///         name="material" />
        ///     ' to help resolve leather OreInfo instances.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info, ArmorMaterialType material)
        {
            if (material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather ||
                material == ArmorMaterialType.Spined || material == ArmorMaterialType.Horned || material == ArmorMaterialType.Barbed)
            {
                switch (info.Level)
                {
                case 0:
                    return(CraftResource.RegularLeather);

                case 1:
                    return(CraftResource.SpinedLeather);

                case 2:
                    return(CraftResource.HornedLeather);

                case 3:
                    return(CraftResource.BarbedLeather);
                }

                return(CraftResource.None);
            }

            return(GetFromOreInfo(info));
        }
Пример #3
0
		public static ArmorMaterialInfo GetInfo( ArmorMaterialType type )
		{
			int v = (int) type;

			if ( v < 0 || v >= m_Table.Length )
				v = 0;

			return m_Table[v];
		}
Пример #4
0
        public static ArmorMaterialInfo GetInfo(ArmorMaterialType type)
        {
            int v = (int)type;

            if (v < 0 || v >= m_Table.Length)
            {
                v = 0;
            }

            return(m_Table[v]);
        }
Пример #5
0
        public static bool ReadMediableState(this ArmorMaterialType obj, List <ClilocItemRec> properties)
        {
            switch (obj)
            {
            case ArmorMaterialType.Cloth:
                return(true);

            case ArmorMaterialType.Leather:
                return(true);
            }
            return(false);
        }
Пример #6
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>', using '<paramref name="material"/>' to help resolve leather OreInfo instances.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info, ArmorMaterialType material)
        {
            if (material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather)
            {
                if (info.Level == 0)
                {
                    return(CraftResource.RegularLeather);
                }

                return(CraftResource.None);
            }

            return(GetFromOreInfo(info));
        }
Пример #7
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>', using '<paramref name="material"/>' to help resolve leather OreInfo instances.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info, ArmorMaterialType material)
        {
            if (material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather || material == ArmorMaterialType.Spined ||
                material == ArmorMaterialType.Horned || material == ArmorMaterialType.Barbed)
            {
                if (info.Level == 0)
                    return CraftResource.RegularLeather;
                else if (info.Level == 1)
                    return CraftResource.SpinedLeather;
                else if (info.Level == 2)
                    return CraftResource.HornedLeather;
                else if (info.Level == 3)
                    return CraftResource.BarbedLeather;

                return CraftResource.None;
            }

            return GetFromOreInfo(info);
        }
Пример #8
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>', using '<paramref name="material"/>' to help resolve leather OreInfo instances.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info, ArmorMaterialType material)
        {
            if (material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather)
            {
                if (info.Level == 0)
                {
                    return(CraftResource.RegularLeather);
                }
                else if (info.Level == 1)
                {
                    return(CraftResource.NordiqueLeather);
                }
                else if (info.Level == 2)
                {
                    return(CraftResource.DesertiqueLeather);
                }
                else if (info.Level == 3)
                {
                    return(CraftResource.MaritimeLeather);
                }
                else if (info.Level == 4)
                {
                    return(CraftResource.VolcaniqueLeather);
                }
                else if (info.Level == 5)
                {
                    return(CraftResource.GeantLeather);
                }
                else if (info.Level == 6)
                {
                    return(CraftResource.OphidienLeather);
                }
                else if (info.Level == 7)
                {
                    return(CraftResource.ArachnideLeather);
                }
                else if (info.Level == 8)
                {
                    return(CraftResource.AncienLeather);
                }
                else if (info.Level == 9)
                {
                    return(CraftResource.DemoniaqueLeather);
                }
                else if (info.Level == 10)
                {
                    return(CraftResource.DragoniqueLeather);
                }
                else if (info.Level == 11)
                {
                    return(CraftResource.LupusLeather);
                }

                return(CraftResource.None);
            }

            if (material == ArmorMaterialType.Bone)
            {
                if (info.Level == 0)
                {
                    return(CraftResource.RegularBones);
                }
                else if (info.Level == 1)
                {
                    return(CraftResource.NordiqueBones);
                }
                else if (info.Level == 2)
                {
                    return(CraftResource.DesertiqueBones);
                }
                else if (info.Level == 3)
                {
                    return(CraftResource.MaritimeBones);
                }
                else if (info.Level == 4)
                {
                    return(CraftResource.VolcaniqueBones);
                }
                else if (info.Level == 5)
                {
                    return(CraftResource.GeantBones);
                }
                else if (info.Level == 6)
                {
                    return(CraftResource.OphidienBones);
                }
                else if (info.Level == 7)
                {
                    return(CraftResource.ArachnideBones);
                }
                else if (info.Level == 8)
                {
                    return(CraftResource.AncienBones);
                }
                else if (info.Level == 9)
                {
                    return(CraftResource.DemonBones);
                }
                else if (info.Level == 10)
                {
                    return(CraftResource.DragonBones);
                }
            }

            return(GetFromOreInfo(info));
        }
Пример #9
0
		/// <summary>
		///     Returns the <see cref="CraftResource" /> value which represents '<paramref name="info" />', using '
		///     <paramref
		///         name="material" />
		///     ' to help resolve leather OreInfo instances.
		/// </summary>
		public static CraftResource GetFromOreInfo(OreInfo info, ArmorMaterialType material)
		{
			if (material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather ||
				material == ArmorMaterialType.Spined || material == ArmorMaterialType.Horned || material == ArmorMaterialType.Barbed)
			{
				switch (info.Level)
				{
					case 0:
						return CraftResource.RegularLeather;
					case 1:
						return CraftResource.SpinedLeather;
					case 2:
						return CraftResource.HornedLeather;
					case 3:
						return CraftResource.BarbedLeather;
				}

				return CraftResource.None;
			}

			return GetFromOreInfo(info);
		}