예제 #1
0
        public override int GetHashCode()
        {
            var hash = 3;

            hash = 53 * hash + (Name?.GetHashCode() ?? 0);
            hash = 53 * hash + (TypeLine?.GetHashCode() ?? 0);
            hash = 53 * hash + (Variation?.GetHashCode() ?? 0);
            hash = 53 * hash + (Links.GetHashCode());
            hash = 53 * hash + (GemLevel.GetHashCode());
            hash = 53 * hash + (GemQuality.GetHashCode());
            hash = 53 * hash + (MapTier.GetHashCode());
            hash = 53 * hash + (GemCorrupted.GetHashCode());
            hash = 53 * hash + FrameType;

            return(hash);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (typeof(Key) != obj.GetType())
            {
                return(false);
            }

            var other = (Key)obj;

            if (FrameType != other.FrameType)
            {
                return(false);
            }

            if (!Name?.Equals(other.Name) ?? (other.Name != null))
            {
                return(false);
            }

            if (!TypeLine?.Equals(other.TypeLine) ?? (other.TypeLine != null))
            {
                return(false);
            }

            if (!Variation?.Equals(other.Variation) ?? (other.Variation != null))
            {
                return(false);
            }

            if (!Links?.Equals(other.Links) ?? (other.Links != null))
            {
                return(false);
            }

            if (!GemLevel?.Equals(other.GemLevel) ?? (other.GemLevel != null))
            {
                return(false);
            }

            if (!GemQuality?.Equals(other.GemQuality) ?? (other.GemQuality != null))
            {
                return(false);
            }

            if (!MapTier?.Equals(other.MapTier) ?? (other.MapTier != null))
            {
                return(false);
            }

            if (!GemCorrupted?.Equals(other.GemCorrupted) ?? (other.GemCorrupted != null))
            {
                return(false);
            }

            return(true);
        }
예제 #3
0
        private string FixPoeNinjaVariant(string name, string variant)
        {
            if (variant == null)
            {
                return(null);
            }

            switch (name)
            {
            case "Atziri's Splendour":
                switch (variant)
                {
                case "Armour/ES": return("ar/es");

                case "ES": return("es");

                case "Armour/Evasion": return("ar/ev");

                case "Armour/ES/Life": return("ar/es/li");

                case "Evasion/ES": return("ev/es");

                case "Armour/Evasion/ES": return("ar/ev/es");

                case "Evasion": return("ev");

                case "Evasion/ES/Life": return("ev/es/li");

                case "Armour": return("ar");
                }

                break;

            case "Yriel's Fostering":
                switch (variant)
                {
                case "Bleeding": return("ursa");

                case "Poison": return("snake");

                case "Maim": return("rhoa");
                }

                break;

            case "Volkuur's Guidance":
                switch (variant)
                {
                case "Lightning": return("lightning");

                case "Fire": return("fire");

                case "Cold": return("cold");
                }

                break;

            case "Lightpoacher":
            case "Shroud of the Lightless":
            case "Bubonic Trail":
            case "Tombfist":
            case "Command of the Pit":
            case "Hale Negator":
                switch (variant)
                {
                case "2 Jewels": return("2 sockets");

                case "1 Jewel": return("1 socket");
                }

                break;

            case "Vessel of Vinktar":
                switch (variant)
                {
                case "Added Attacks": return("attacks");

                case "Added Spells": return("spells");

                case "Penetration": return("penetration");

                case "Conversion": return("conversion");
                }

                break;

            case "Doryani's Invitation":
                switch (variant)
                {
                case null:         // Bug on poe.ninja's end
                case "Physical": return("physical");

                case "Fire": return("fire");

                case "Cold": return("cold");

                case "Lightning": return("lightning");
                }

                break;

            case "Impresence":
                switch (variant)
                {
                case "Chaos": return("chaos");

                case "Physical": return("physical");

                case "Fire": return("fire");

                case "Cold": return("cold");

                case "Lightning": return("lightning");
                }

                break;

            case "The Beachhead":
                return(MapTier.ToString());
            }

            Console.WriteLine($"no var match for {this} var {variant}");

            return(null);
        }