Esempio n. 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)
            {
                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));
        }
Esempio n. 2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 1:
            {
                m_Resource = (CraftResource)reader.ReadInt();
                break;
            }

            case 0:
            {
                OreInfo info = new OreInfo(reader.ReadInt(), reader.ReadInt(), reader.ReadString());

                m_Resource = CraftResources.GetFromOreInfo(info);
                break;
            }
            }

            Hue = CraftResources.GetHue(m_Resource);
        }
Esempio n. 3
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));
        }
Esempio n. 4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 2:     // Reset from Resource System
                this.m_Resource = this.DefaultResource;
                reader.ReadString();
                break;

            case 1:
            {
                this.m_Resource = (CraftResource)reader.ReadInt();
                break;
            }

            case 0:
            {
                OreInfo info = new OreInfo(reader.ReadInt(), reader.ReadInt(), reader.ReadString());

                this.m_Resource = CraftResources.GetFromOreInfo(info);
                break;
            }
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
            {
                return(CraftResource.SpinedLeather);
            }
            else if (info.Name.IndexOf("Horned") >= 0)
            {
                return(CraftResource.HornedLeather);
            }
            else if (info.Name.IndexOf("Barbed") >= 0)
            {
                return(CraftResource.BarbedLeather);
            }
            else if (info.Name.IndexOf("Leather") >= 0)
            {
                return(CraftResource.RegularLeather);
            }

            if (info.Level == 0)
            {
                return(CraftResource.Iron);
            }
            else if (info.Level == 1)
            {
                return(CraftResource.DullCopper);
            }
            else if (info.Level == 2)
            {
                return(CraftResource.ShadowIron);
            }
            else if (info.Level == 3)
            {
                return(CraftResource.Copper);
            }
            else if (info.Level == 4)
            {
                return(CraftResource.Bronze);
            }
            else if (info.Level == 5)
            {
                return(CraftResource.Gold);
            }
            else if (info.Level == 6)
            {
                return(CraftResource.Agapite);
            }
            else if (info.Level == 7)
            {
                return(CraftResource.Verite);
            }
            else if (info.Level == 8)
            {
                return(CraftResource.Valorite);
            }

            return(CraftResource.None);
        }
Esempio n. 6
0
        /// <summary>
        ///     Returns the <see cref="CraftResource" /> value which represents '<paramref name="info" />' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined", StringComparison.Ordinal) >= 0)
            {
                return(CraftResource.SpinedLeather);
            }

            if (info.Name.IndexOf("Horned", StringComparison.Ordinal) >= 0)
            {
                return(CraftResource.HornedLeather);
            }

            if (info.Name.IndexOf("Barbed", StringComparison.Ordinal) >= 0)
            {
                return(CraftResource.BarbedLeather);
            }

            if (info.Name.IndexOf("Leather", StringComparison.Ordinal) >= 0)
            {
                return(CraftResource.RegularLeather);
            }

            if (info.Level == 0)
            {
                return(CraftResource.Iron);
            }

            switch (info.Level)
            {
            case 1:
                return(CraftResource.DullCopper);

            case 2:
                return(CraftResource.ShadowIron);

            case 3:
                return(CraftResource.Copper);

            case 4:
                return(CraftResource.Bronze);

            case 5:
                return(CraftResource.Gold);

            case 6:
                return(CraftResource.Agapite);

            case 7:
                return(CraftResource.Verite);

            case 8:
                return(CraftResource.Valorite);
            }

            return(CraftResource.None);
        }
Esempio n. 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)
            {
                if (info.Level == 0)
                {
                    return(CraftResource.RegularLeather);
                }

                return(CraftResource.None);
            }

            return(GetFromOreInfo(info));
        }
Esempio n. 8
0
        private void Deserialize(IGenericReader reader, int version)
        {
            switch (version)
            {
            case 1:
            {
                _resource = (CraftResource)reader.ReadInt();
                break;
            }

            case 0:
            {
                var info = new OreInfo(reader.ReadInt(), reader.ReadInt(), reader.ReadString());

                _resource = CraftResources.GetFromOreInfo(info);
                break;
            }
            }
        }
Esempio n. 9
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				{
					m_Resource = (CraftResource)reader.ReadInt();
					break;
				}
				case 0:
				{
					OreInfo info = new OreInfo( reader.ReadInt(), reader.ReadInt(), reader.ReadString() );

					m_Resource = CraftResources.GetFromOreInfo( info );
					break;
				}
			}
		}
Esempio n. 10
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            //Obsolete

            if (info.Name.IndexOf("Spined") >= 0)
            {
                return(CraftResource.SpinedLeather);
            }

            else if (info.Name.IndexOf("Horned") >= 0)
            {
                return(CraftResource.HornedLeather);
            }

            else if (info.Name.IndexOf("Barbed") >= 0)
            {
                return(CraftResource.BarbedLeather);
            }

            else if (info.Name.IndexOf("Leather") >= 0)
            {
                return(CraftResource.RegularLeather);
            }

            if (info.Level == 0)
            {
                return(CraftResource.Iron);
            }
            else if (info.Level == 1)
            {
                return(CraftResource.OldCopper);
            }
            else if (info.Level == 2)
            {
                return(CraftResource.ShadowIron);
            }
            else if (info.Level == 3)
            {
                return(CraftResource.Silver);
            }
            else if (info.Level == 4)
            {
                return(CraftResource.Verite);
            }
            else if (info.Level == 5)
            {
                return(CraftResource.Rose);
            }
            else if (info.Level == 6)
            {
                return(CraftResource.Gold);
            }
            else if (info.Level == 7)
            {
                return(CraftResource.Ice);
            }
            else if (info.Level == 8)
            {
                return(CraftResource.Amethyst);
            }
            else if (info.Level == 9)
            {
                return(CraftResource.Valorite);
            }
            else if (info.Level == 10)
            {
                return(CraftResource.BloodRock);
            }
            else if (info.Level == 11)
            {
                return(CraftResource.Aqua);
            }

            /*else if (info.Level == 11)
             *  return CraftResource.Opiate;*/

            return(CraftResource.None);
        }
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo( OreInfo info )
        {
            if ( info.Name.IndexOf( "Spined" ) >= 0 )
                return CraftResource.SpinedLeather;
            else if ( info.Name.IndexOf( "Horned" ) >= 0 )
                return CraftResource.HornedLeather;
            else if ( info.Name.IndexOf( "Barbed" ) >= 0 )
                return CraftResource.BarbedLeather;
            else if ( info.Name.IndexOf( "Leather" ) >= 0 )
                return CraftResource.RegularLeather;

            if (info.Level == 0)
                return CraftResource.Iron;
            else if (info.Level == 1)
                return CraftResource.Rusty;
            else if (info.Level == 2)
                return CraftResource.OldCopper;
            else if (info.Level == 3)
                return CraftResource.DullCopper;
            else if (info.Level == 4)
                return CraftResource.Ruby;
            else if (info.Level == 5)
                return CraftResource.Copper;
            else if (info.Level == 6)
                return CraftResource.Bronze;
            else if (info.Level == 7)
                return CraftResource.ShadowIron;
            else if (info.Level == 8)
                return CraftResource.Silver;
            else if (info.Level == 9)
                return CraftResource.Mercury;
            else if (info.Level == 10)
                return CraftResource.Rose;
            else if (info.Level == 11)
                return CraftResource.Gold;
            else if (info.Level == 12)
                return CraftResource.Agapite;
            else if (info.Level == 13)
                return CraftResource.Verite;
            else if (info.Level == 14)
                return CraftResource.Plutonio;
            else if (info.Level == 15)
                return CraftResource.BloodRock;
            else if (info.Level == 16)
                return CraftResource.Valorite;
            else if (info.Level == 17)
                return CraftResource.BlackRock;
            else if (info.Level == 18)
                return CraftResource.Mytheril;
            else if (info.Level == 19)
                return CraftResource.Aqua;

            return CraftResource.None;
        }
Esempio n. 12
0
		/// <summary>
		/// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
		/// </summary>
		public static CraftResource GetFromOreInfo( OreInfo info )
		{
            //Obsolete

			if ( info.Name.IndexOf( "Spined" ) >= 0 )
				return CraftResource.SpinedLeather;

			else if ( info.Name.IndexOf( "Horned" ) >= 0 )
				return CraftResource.HornedLeather;

			else if ( info.Name.IndexOf( "Barbed" ) >= 0 )
				return CraftResource.BarbedLeather;

			else if ( info.Name.IndexOf( "Leather" ) >= 0 )
				return CraftResource.RegularLeather;

            if (info.Level == 0)
                return CraftResource.Iron;
            else if (info.Level == 1)
                return CraftResource.OldCopper;
            else if (info.Level == 2)
                return CraftResource.ShadowIron;
            else if (info.Level == 3)
                return CraftResource.Silver;
            else if (info.Level == 4)
                return CraftResource.Verite;
            else if (info.Level == 5)
                return CraftResource.Rose;
            else if (info.Level == 6)
                return CraftResource.Gold;
            else if (info.Level == 7)
                return CraftResource.Ice;
            else if (info.Level == 8)
                return CraftResource.Amethyst;
            else if (info.Level == 9)
                return CraftResource.Valorite;
            else if (info.Level == 10)
                return CraftResource.BloodRock;
            else if (info.Level == 11)
                return CraftResource.Aqua;
            /*else if (info.Level == 11)
                return CraftResource.Opiate;*/

			return CraftResource.None;
		}
Esempio n. 13
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch ( version )
            {
                case 2: // Reset from Resource System
                    this.m_Resource = this.DefaultResource;
                    reader.ReadString();
                    break;
                case 1:
                    {
                        this.m_Resource = (CraftResource)reader.ReadInt();
                        break;
                    }
                case 0:
                    {
                        OreInfo info = new OreInfo(reader.ReadInt(), reader.ReadInt(), reader.ReadString());

                        this.m_Resource = CraftResources.GetFromOreInfo(info);
                        break;
                    }
            }
        }
Esempio n. 14
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
            {
                return(CraftResource.SpinedLeather);
            }
            else if (info.Name.IndexOf("Horned") >= 0)
            {
                return(CraftResource.HornedLeather);
            }
            else if (info.Name.IndexOf("Barbed") >= 0)
            {
                return(CraftResource.BarbedLeather);
            }
            else if (info.Name.IndexOf("Tufted") >= 0)
            {
                return(CraftResource.TuftedLeather);
            }
            else if (info.Name.IndexOf("Scaled") >= 0)
            {
                return(CraftResource.ScaledLeather);
            }
            else if (info.Name.IndexOf("Leather") >= 0)
            {
                return(CraftResource.RegularLeather);
            }

            if (info.Name.IndexOf("Frost") >= 0)
            {
                return(CraftResource.Frost);
            }
            else if (info.Name.IndexOf("Ice") >= 0)
            {
                return(CraftResource.Ice);
            }
            else if (info.Name.IndexOf("Glacial Ice") >= 0)
            {
                return(CraftResource.Glacial);
            }

            if (info.Level == 0)
            {
                return(CraftResource.Iron);
            }
            else if (info.Level == 1)
            {
                return(CraftResource.DullCopper);
            }
            else if (info.Level == 2)
            {
                return(CraftResource.ShadowIron);
            }
            else if (info.Level == 3)
            {
                return(CraftResource.Copper);
            }
            else if (info.Level == 4)
            {
                return(CraftResource.Bronze);
            }
            else if (info.Level == 5)
            {
                return(CraftResource.Gold);
            }
            else if (info.Level == 6)
            {
                return(CraftResource.Agapite);
            }
            else if (info.Level == 7)
            {
                return(CraftResource.Verite);
            }
            else if (info.Level == 8)
            {
                return(CraftResource.Valorite);
            }
            else if (info.Level == 9)
            {
                return(CraftResource.Mithril);
            }
            else if (info.Level == 10)
            {
                return(CraftResource.Bloodrock);
            }
            else if (info.Level == 11)
            {
                return(CraftResource.Steel);
            }
            else if (info.Level == 12)
            {
                return(CraftResource.Adamantite);
            }
            else if (info.Level == 13)
            {
                return(CraftResource.Ithilmar);
            }
            else if (info.Level == 14)
            {
                return(CraftResource.Silver);
            }
            else if (info.Level == 15)
            {
                return(CraftResource.Blackrock);
            }
            else if (info.Level == 16)
            {
                return(CraftResource.Ferite);
            }
            else if (info.Level == 17)
            {
                return(CraftResource.Malachite);
            }
            else if (info.Level == 18)
            {
                return(CraftResource.Pyrite);
            }
            else if (info.Level == 19)
            {
                return(CraftResource.Umbrite);
            }
            else if (info.Level == 20)
            {
                return(CraftResource.Amirite);
            }
            else if (info.Level == 21)
            {
                return(CraftResource.Oak);
            }
            else if (info.Level == 22)
            {
                return(CraftResource.Pine);
            }
            else if (info.Level == 23)
            {
                return(CraftResource.Redwood);
            }
            else if (info.Level == 24)
            {
                return(CraftResource.WhitePine);
            }
            else if (info.Level == 25)
            {
                return(CraftResource.Ashwood);
            }
            else if (info.Level == 26)
            {
                return(CraftResource.SilverBirch);
            }
            else if (info.Level == 27)
            {
                return(CraftResource.Yew);
            }
            else if (info.Level == 28)
            {
                return(CraftResource.BlackOak);
            }
            else if (info.Level == 29)
            {
                return(CraftResource.RedScales);
            }
            else if (info.Level == 30)
            {
                return(CraftResource.YellowScales);
            }
            else if (info.Level == 31)
            {
                return(CraftResource.BlackScales);
            }
            else if (info.Level == 32)
            {
                return(CraftResource.GreenScales);
            }
            else if (info.Level == 33)
            {
                return(CraftResource.WhiteScales);
            }
            else if (info.Level == 34)
            {
                return(CraftResource.BlueScales);
            }


            return(CraftResource.None);
        }
Esempio n. 15
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo( OreInfo info )
        {
            if ( info.Name.IndexOf( "Thick" ) >= 0 )
                return CraftResource.ThickLeather;
            else if ( info.Name.IndexOf( "Beast" ) >= 0 )
                return CraftResource.BeastLeather;
            else if ( info.Name.IndexOf( "Scaled" ) >= 0 )
                return CraftResource.ScaledLeather;
            else if ( info.Name.IndexOf( "Leather" ) >= 0 )
                return CraftResource.RegularLeather;

            if ( info.Level == 0 )
                return CraftResource.Copper;
            else if ( info.Level == 1 )
                return CraftResource.Bronze;
            else if ( info.Level == 2 )
                return CraftResource.Iron;
            else if ( info.Level == 3 )
                return CraftResource.Gold;
            else if ( info.Level == 4 )
                return CraftResource.Silver;
            else if ( info.Level == 5 )
                return CraftResource.Obsidian;
            else if ( info.Level == 6 )
                return CraftResource.Steel;
            else if ( info.Level == 7 )
                return CraftResource.Tin;
            else if ( info.Level == 8 )
                return CraftResource.Starmetal;

            if ( info.Level == 301 )
                return CraftResource.Oak;
            else if ( info.Level == 302 )
                return CraftResource.Yew;
            else if ( info.Level == 303 )
                return CraftResource.Redwood;
            else if ( info.Level == 304 )
                return CraftResource.Ash;
            else if ( info.Level == 305 )
                return CraftResource.Greenheart;

            if ( info.Level == 401 )
                return CraftResource.Cotton;
            else if ( info.Level == 402 )
                return CraftResource.Linen;
            else if( info.Level == 403 )
                return CraftResource.Silk;
            else if( info.Level == 404 )
                return CraftResource.Satin;
            else if( info.Level == 405 )
                return CraftResource.Velvet;
            else if( info.Level == 406 )
                return CraftResource.Wool;

            return CraftResource.None;
        }
Esempio n. 16
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
                return CraftResource.SpinedLeather;
            else if (info.Name.IndexOf("Horned") >= 0)
                return CraftResource.HornedLeather;
            else if (info.Name.IndexOf("Barbed") >= 0)
                return CraftResource.BarbedLeather;
            else if (info.Name.IndexOf("Leather") >= 0)
                return CraftResource.RegularLeather;

            if (info.Level == 0)
                return CraftResource.Iron;
            else if (info.Level == 1)
                return CraftResource.DullCopper;
            else if (info.Level == 2)
                return CraftResource.ShadowIron;
            else if (info.Level == 3)
                return CraftResource.Copper;
            else if (info.Level == 4)
                return CraftResource.Bronze;
            else if (info.Level == 5)
                return CraftResource.Gold;
            else if (info.Level == 6)
                return CraftResource.Agapite;
            else if (info.Level == 7)
                return CraftResource.Verite;
            else if (info.Level == 8)
                return CraftResource.Valorite;

            return CraftResource.None;
        }
Esempio n. 17
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
            {
                return(CraftResource.SpinedLeather);
            }
            else if (info.Name.IndexOf("Horned") >= 0)
            {
                return(CraftResource.HornedLeather);
            }
            else if (info.Name.IndexOf("Barbed") >= 0)
            {
                return(CraftResource.BarbedLeather);
            }
            else if (info.Name.IndexOf("DragonL") >= 0)
            {
                return(CraftResource.DragonLeather);
            }
            else if (info.Name.IndexOf("Daemon") >= 0)
            {
                return(CraftResource.DaemonLeather);
            }
            else if (info.Name.IndexOf("Leather") >= 0)
            {
                return(CraftResource.RegularLeather);
            }

            if (info.Level == 0)
            {
                return(CraftResource.Iron);
            }
            else if (info.Level == 1)
            {
                return(CraftResource.DullCopper);
            }
            else if (info.Level == 2)
            {
                return(CraftResource.ShadowIron);
            }
            else if (info.Level == 3)
            {
                return(CraftResource.Copper);
            }
            else if (info.Level == 4)
            {
                return(CraftResource.Bronze);
            }
            else if (info.Level == 5)
            {
                return(CraftResource.Gold);
            }
            else if (info.Level == 6)
            {
                return(CraftResource.Agapite);
            }
            else if (info.Level == 7)
            {
                return(CraftResource.Verite);
            }
            else if (info.Level == 8)
            {
                return(CraftResource.Valorite);
            }
            else if (info.Level == 9)
            {
                return(CraftResource.Silver);
            }
            else if (info.Level == 10)
            {
                return(CraftResource.Platinum);
            }
            else if (info.Level == 11)
            {
                return(CraftResource.Mythril);
            }
            else if (info.Level == 12)
            {
                return(CraftResource.Obsidian);
            }
            else if (info.Level == 13)
            {
                return(CraftResource.Jade);
            }
            else if (info.Level == 14)
            {
                return(CraftResource.Moonstone);
            }
            else if (info.Level == 15)
            {
                return(CraftResource.Sunstone);
            }
            else if (info.Level == 16)
            {
                return(CraftResource.Bloodstone);
            }
            else if (info.Level == 17)
            {
                return(CraftResource.Log);
            }
            else if (info.Level == 18)
            {
                return(CraftResource.Oak);
            }
            else if (info.Level == 19)
            {
                return(CraftResource.Ash);
            }
            else if (info.Level == 20)
            {
                return(CraftResource.Yew);
            }
            else if (info.Level == 21)
            {
                return(CraftResource.Heartwood);
            }
            else if (info.Level == 22)
            {
                return(CraftResource.Bloodwood);
            }
            else if (info.Level == 23)
            {
                return(CraftResource.Frostwood);
            }
            else if (info.Level == 24)
            {
                return(CraftResource.Pine);
            }
            else if (info.Level == 25)
            {
                return(CraftResource.Cedar);
            }
            else if (info.Level == 26)
            {
                return(CraftResource.Cherry);
            }
            else if (info.Level == 27)
            {
                return(CraftResource.Mahogany);
            }


            return(CraftResource.None);
        }
Esempio n. 18
0
		/// <summary>
		///     Returns the <see cref="CraftResource" /> value which represents '<paramref name="info" />' -or- CraftResource.None if unable to convert.
		/// </summary>
		public static CraftResource GetFromOreInfo(OreInfo info)
		{
			if (info.Name.IndexOf("Spined", StringComparison.Ordinal) >= 0)
			{
				return CraftResource.SpinedLeather;
			}

			if (info.Name.IndexOf("Horned", StringComparison.Ordinal) >= 0)
			{
				return CraftResource.HornedLeather;
			}

			if (info.Name.IndexOf("Barbed", StringComparison.Ordinal) >= 0)
			{
				return CraftResource.BarbedLeather;
			}

			if (info.Name.IndexOf("Leather", StringComparison.Ordinal) >= 0)
			{
				return CraftResource.RegularLeather;
			}

			if (info.Level == 0)
			{
				return CraftResource.Iron;
			}

			switch (info.Level)
			{
				case 1:
					return CraftResource.DullCopper;
				case 2:
					return CraftResource.ShadowIron;
				case 3:
					return CraftResource.Copper;
				case 4:
					return CraftResource.Bronze;
				case 5:
					return CraftResource.Gold;
				case 6:
					return CraftResource.Agapite;
				case 7:
					return CraftResource.Verite;
				case 8:
					return CraftResource.Valorite;
			}

			return CraftResource.None;
		}
Esempio n. 19
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);
		}
Esempio n. 20
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
            {
                return(CraftResource.SpinedLeather);
            }
            else if (info.Name.IndexOf("Horned") >= 0)
            {
                return(CraftResource.HornedLeather);
            }
            else if (info.Name.IndexOf("Barbed") >= 0)
            {
                return(CraftResource.BarbedLeather);
            }
            else if (info.Name.IndexOf("Leather") >= 0)
            {
                return(CraftResource.RegularLeather);
            }

            if (info.Level == 0)
            {
                return(CraftResource.Iron);
            }
            else if (info.Level == 1)
            {
                return(CraftResource.Rusty);
            }
            else if (info.Level == 2)
            {
                return(CraftResource.OldCopper);
            }
            else if (info.Level == 3)
            {
                return(CraftResource.DullCopper);
            }
            else if (info.Level == 4)
            {
                return(CraftResource.Ruby);
            }
            else if (info.Level == 5)
            {
                return(CraftResource.Copper);
            }
            else if (info.Level == 6)
            {
                return(CraftResource.Bronze);
            }
            else if (info.Level == 7)
            {
                return(CraftResource.ShadowIron);
            }
            else if (info.Level == 8)
            {
                return(CraftResource.Silver);
            }
            else if (info.Level == 9)
            {
                return(CraftResource.Mercury);
            }
            else if (info.Level == 10)
            {
                return(CraftResource.Rose);
            }
            else if (info.Level == 11)
            {
                return(CraftResource.Gold);
            }
            else if (info.Level == 12)
            {
                return(CraftResource.Agapite);
            }
            else if (info.Level == 13)
            {
                return(CraftResource.Verite);
            }
            else if (info.Level == 14)
            {
                return(CraftResource.Plutonio);
            }
            else if (info.Level == 15)
            {
                return(CraftResource.BloodRock);
            }
            else if (info.Level == 16)
            {
                return(CraftResource.Valorite);
            }
            else if (info.Level == 17)
            {
                return(CraftResource.BlackRock);
            }
            else if (info.Level == 18)
            {
                return(CraftResource.Mytheril);
            }
            else if (info.Level == 19)
            {
                return(CraftResource.Aqua);
            }

            return(CraftResource.None);
        }
Esempio n. 21
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            /*if ( info.Name.IndexOf( "Spined" ) >= 0 )
             *      return CraftResource.SpinedLeather;
             * else if ( info.Name.IndexOf( "Horned" ) >= 0 )
             *      return CraftResource.HornedLeather;
             * else if ( info.Name.IndexOf( "Barbed" ) >= 0 )
             *      return CraftResource.BarbedLeather;
             * else if ( info.Name.IndexOf( "Leather" ) >= 0 )
             *      return CraftResource.RegularLeather;*/

            if (info.Level == 0)
            {
                return(CraftResource.Fer);
            }
            else if (info.Level == 1)
            {
                return(CraftResource.Cuivre);
            }
            else if (info.Level == 2)
            {
                return(CraftResource.Bronze);
            }
            else if (info.Level == 3)
            {
                return(CraftResource.Acier);
            }
            else if (info.Level == 4)
            {
                return(CraftResource.Argent);
            }
            else if (info.Level == 5)
            {
                return(CraftResource.Or);
            }
            else if (info.Level == 6)
            {
                return(CraftResource.Mytheril);
            }
            else if (info.Level == 7)
            {
                return(CraftResource.Luminium);
            }
            else if (info.Level == 8)
            {
                return(CraftResource.Obscurium);
            }
            else if (info.Level == 9)
            {
                return(CraftResource.Mystirium);
            }
            else if (info.Level == 10)
            {
                return(CraftResource.Dominium);
            }
            else if (info.Level == 11)
            {
                return(CraftResource.Eclarium);
            }
            else if (info.Level == 12)
            {
                return(CraftResource.Venarium);
            }
            else if (info.Level == 13)
            {
                return(CraftResource.Athenium);
            }
            else if (info.Level == 14)
            {
                return(CraftResource.Umbrarium);
            }

            return(CraftResource.None);
        }
Esempio n. 22
0
		/// <summary>
		/// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
		/// </summary>
		public static CraftResource GetFromOreInfo( OreInfo info )
		{
			if ( info.Name.IndexOf( "Spined" ) >= 0 )
				return CraftResource.SpinedLeather;
			else if ( info.Name.IndexOf( "Horned" ) >= 0 )
				return CraftResource.HornedLeather;
			else if ( info.Name.IndexOf( "Barbed" ) >= 0 )
				return CraftResource.BarbedLeather;			
			else if ( info.Name.IndexOf( "DragonL" ) >= 0 )
				return CraftResource.DragonLeather;				
			else if ( info.Name.IndexOf( "Daemon" ) >= 0 )
				return CraftResource.DaemonLeather;
			else if ( info.Name.IndexOf( "Leather" ) >= 0 )
				return CraftResource.RegularLeather;

			if ( info.Level == 0 )
				return CraftResource.Iron;
			else if ( info.Level == 1 )
				return CraftResource.DullCopper;
			else if ( info.Level == 2 )
				return CraftResource.ShadowIron;
			else if ( info.Level == 3 )
				return CraftResource.Copper;
			else if ( info.Level == 4 )
				return CraftResource.Bronze;
			else if ( info.Level == 5 )
				return CraftResource.Gold;
			else if ( info.Level == 6 )
				return CraftResource.Agapite;
			else if ( info.Level == 7 )
				return CraftResource.Verite;
			else if ( info.Level == 8 )
				return CraftResource.Valorite;
			else if ( info.Level == 9 )
				return CraftResource.Silver;
			else if (info.Level == 10 )
			    return CraftResource.Jade;
			else if (info.Level == 11 )
				return CraftResource.Moonstone;
			else if (info.Level == 12 )
				return CraftResource.Sunstone;
			else if (info.Level == 13 )
				return CraftResource.Log;
			else if (info.Level == 14 )
				return CraftResource.Oak;
			else if ( info.Level == 15 )
				return CraftResource.Ash;
			else if ( info.Level == 16 )
				return CraftResource.Yew;
			else if ( info.Level == 17 )
				return CraftResource.Heartwood;
			else if ( info.Level == 18 )
				return CraftResource.Bloodwood;
			else if ( info.Level == 19 )
				return CraftResource.Frostwood;
            else if (info.Level == 20 )
                return CraftResource.Pine;
            else if (info.Level == 21)
                return CraftResource.Cedar;
            else if (info.Level == 22)
                return CraftResource.Cherry;
            else if (info.Level == 23)
                return CraftResource.Mahogany;
			//#endregion

			return CraftResource.None;
		}
Esempio n. 23
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));
        }
Esempio n. 24
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);
        }
Esempio n. 25
0
        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
                return CraftResource.SpinedLeather;
            else if (info.Name.IndexOf("Horned") >= 0)
                return CraftResource.HornedLeather;
            else if (info.Name.IndexOf("Barbed") >= 0)
                return CraftResource.BarbedLeather;
            else if (info.Name.IndexOf("Leather") >= 0)
                return CraftResource.RegularLeather;
            else if (info.Name.IndexOf("Daemon") >= 0)
                return CraftResource.DaemonLeather;

            if (info.Level == 0)
                return CraftResource.MIron;
            else if (info.Level == 1)
                return CraftResource.MBronze;
            else if (info.Level == 2)
                return CraftResource.MGold;
            else if (info.Level == 3)
                return CraftResource.MCopper;
            else if (info.Level == 4)
                return CraftResource.MOldcopper;
            else if (info.Level == 5)
                return CraftResource.MDullcopper;
            else if (info.Level == 6)
                return CraftResource.MSilver;
            else if (info.Level == 7)
                return CraftResource.MShadow;
            else if (info.Level == 8)
                return CraftResource.MBloodrock;
            else if (info.Level == 9)
                return CraftResource.MBlackrock;
            else if (info.Level == 10)
                return CraftResource.MMytheril;
            else if (info.Level == 11)
                return CraftResource.MRose;
            else if (info.Level == 12)
                return CraftResource.MVerite;
            else if (info.Level == 13)
                return CraftResource.MAgapite;
            else if (info.Level == 14)
                return CraftResource.MRusty;
            else if (info.Level == 15)
                return CraftResource.MValorite;
            else if (info.Level == 16)
                return CraftResource.MDragon;
            else if (info.Level == 17)
                return CraftResource.MTitan;
            else if (info.Level == 18)
                return CraftResource.MCrystaline;
            else if (info.Level == 19)
                return CraftResource.MKrynite;
            else if (info.Level == 20)
                return CraftResource.MVulcan;
            else if (info.Level == 21)
                return CraftResource.MBloodcrest;
            else if (info.Level == 22)
                return CraftResource.MElvin;
            else if (info.Level == 23)
                return CraftResource.MAcid;
            else if (info.Level == 24)
                return CraftResource.MAqua;
            else if (info.Level == 25)
                return CraftResource.MEldar;
            else if (info.Level == 26)
                return CraftResource.MGlowing;
            else if (info.Level == 27)
                return CraftResource.MGorgan;
            else if (info.Level == 28)
                return CraftResource.MSandrock;
            else if (info.Level == 29)
                return CraftResource.MSteel;

            return CraftResource.None;
        }