예제 #1
0
        public bool Applicable(Item item)
        {
            if (string.IsNullOrEmpty(filter))
                return false;

            return item.TypeLine.ToLower().Contains(filter.ToLower()) || item.Name.ToLower().Contains(filter.ToLower()) || isMatchedGear(item);
        }
예제 #2
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gear gear = item as Gear;

            if (gear != null && gear.SocketedItems.Any(x => Applicable(x)))
            {
                return(true);
            }

            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            try
            {
                return(gem.Properties[0].Name.ToLower().Contains(filter.ToLower()));
            }
            catch (Exception)
            {
                return(false);
            }
        }
예제 #3
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gear gear = item as Gear;

            if (gear == null)
            {
                return(false);
            }

            List <Regex>  pool = new List <Regex>(stats);
            List <string> all  = new List <string>();

            if (gear.Implicitmods != null)
            {
                all.AddRange(gear.Implicitmods.Select(s => s));
            }

            if (gear.Explicitmods != null)
            {
                all.AddRange(gear.Explicitmods.Select(s => s));
            }

            foreach (string stat in all)
            {
                Regex result = pool.Find(s => s.IsMatch(stat));
                pool.Remove(result);
            }

            return(pool.Count == 0);
        }
예제 #4
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gear gear = item as Gear;

            //Item.Properties  POEApi.Model.Property  Name=""Armor"" 154,0
            // Name = 'Energy Shield'
            // Name = 'Evasion'
            if (gear == null)
            {
                return(false);
            }

            List <Regex>  pool = new List <Regex>(stats);
            List <string> all  = new List <string>();

            if (gear.Implicitmods != null)
            {
                all.AddRange(gear.Implicitmods.Select(s => s));
            }

            if (gear.Explicitmods != null)
            {
                all.AddRange(gear.Explicitmods.Select(s => s));
            }

            foreach (string stat in all)
            {
                Regex result = pool.Find(s => s.IsMatch(stat));
                pool.Remove(result);
            }

            return(pool.Count == 0);
        }
예제 #5
0
 public static void UpdatePosition(Item item, Item clone)
 {
     switch (item.InventoryId)
     {
         case "Flask":
             clone.Y = 5;
             break;
         case "Helm":
             clone.X = 5;
             clone.Y = 5;
             break;
         case "Gloves":
             clone.X = 7;
             clone.Y = 5;
             break;
         case "Boots":
             clone.X = 9;
             clone.Y = 5;
             break;
         case "Ring":
             clone.X = 11;
             clone.Y = 5;
             break;
         case "Ring2":
             clone.X = 11;
             clone.Y = 6;
             break;
         case "Weapon":
             clone.X = 0;
             clone.Y = 7;
             break;
         case "Offhand":
             clone.X = 2;
             clone.Y = 7;
             break;
         case "Weapon2":
             clone.X = 4;
             clone.Y = 7;
             break;
         case "Offhand2":
             clone.X = 6;
             clone.Y = 7;
             break;
         case "Belt":
             clone.X = 9;
             clone.Y = 7;
             break;
         case "Amulet":
             clone.X = 11;
             clone.Y = 7;
             break;
         case "BodyArmour":
             clone.X = 9;
             clone.Y = 8;
             break;
         default:
             Logger.Log(string.Format("Unknown character inventoryId '{0}' found for {1}", clone.InventoryId, clone.TypeLine));
             break;
     }
 }
예제 #6
0
        public bool Applicable(Item item)
        {
            Gear gear = item as Gear;
            if (gear != null && gear.SocketedItems.Any(x => Applicable(x)))
                return true;

            return item is Gem;
        }
예제 #7
0
        public bool Applicable(Item item)
        {
            Gear gear = item as Gear;
            if (gear != null)
                return gear.Rarity == rarity;

            return false;
        }
예제 #8
0
파일: Link.cs 프로젝트: kakesu/Procurement
        public bool Applicable(Item item)
        {
            Gear gear = item as Gear;
            if (gear == null)
                return false;

            return gear.IsLinked(links);
        }
예제 #9
0
        public bool Applicable(Item item)
        {
            Gem gem = item as Gem;
            if (gem == null)
                return false;

            return item.Properties[0].Name.Contains("Support");
        }
예제 #10
0
        public bool Applicable(Item item)
        {
            Gem gem = item as Gem;
            if (gem == null)
                return false;

            return popular.Contains(gem.TypeLine);
        }
예제 #11
0
        public bool Applicable(Item item)
        {
            Gear gear = item as Gear;
            if (gear != null)
                return gear.GearType == gearType;

            return false;
        }
예제 #12
0
        private bool isMatchedGear(Item item)
        {
            Gear gear = item as Gear;

            if (gear == null)
                return false;

            return gear.GearType.ToString().ToLower().Contains(filter.ToLower());
        }
예제 #13
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            return(gem.Corrupted);
        }
예제 #14
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Map map = item as Map;

            if (map == null)
            {
                return(false);
            }

            return(map.MapLevel == level);
        }
예제 #15
0
        public bool Applicable(Item item)
        {
            Gear gear = item as Gear;
            if (gear == null)
                return false;

            if (gear.Properties == null)
                return false;

            return gear.Properties.Any(p => p.Name.Contains(string.Concat(handed, " ", "Handed")));
        }
예제 #16
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            return(gem.IsQuality);
        }
예제 #17
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Map map = item as Map;

            if (map == null)
            {
                return(false);
            }

            return(map.MapTier == tier);
        }
예제 #18
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gear gear = item as Gear;

            if (gear == null || gear.Rarity != Rarity.Unique || !gear.Identified)
            {
                return(false);
            }

            return(Settings.FatedUniques.Any(u => string.Equals(u.FatedItemName, gear.Name,
                                                                System.StringComparison.CurrentCultureIgnoreCase)));
        }
        public bool Applicable(POEApi.Model.Item item)
        {
            Prophecy prophecy = item as Prophecy;

            if (prophecy == null)
            {
                return(false);
            }

            return(Settings.FatedUniques.Any(u => string.Equals(u.ProphecyName, prophecy.TypeLine,
                                                                System.StringComparison.CurrentCultureIgnoreCase)));
        }
예제 #20
0
        public bool Applicable(Item item)
        {
            if (item.Microtransactions.Count > 0)
                return true;

            var gear = item as Gear;

            if (gear != null && gear.SocketedItems.Any(x => Applicable(x)))
                return true;

            return false;
        }
        public bool Applicable(POEApi.Model.Item item)
        {
            Gear gear = item as Gear;

            if (gear == null || gear.Rarity != Rarity.Unique || gear.Identified)
            {
                return(false);
            }

            // TODO: Unique items each have their own, well, unique icon URL.  It is possible to build a map from icon
            //       URL to unique item, so we can know which unique item an unidentified unique is, and therefore
            //       whether it is a fated unique target.  However, alternate art items complicate this.
            return(Settings.FatedUniques.Any(u => string.Equals(u.BaseTypeName, gear.BaseType,
                                                                System.StringComparison.CurrentCultureIgnoreCase)));
        }
예제 #22
0
        public bool Applicable(Item item)
        {
            if (string.IsNullOrEmpty(filter))
                return false;

            if (item.TypeLine.ToLower().Contains(filter.ToLower()) || item.Name.ToLower().Contains(filter.ToLower()) || containsMatchedCosmeticMod(item) || isMatchedGear(item))
                return true;

            var gear = item as Gear;

            if (gear != null && gear.SocketedItems.Any(x => Applicable(x)))
                return true;

            return false;
        }
예제 #23
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            if (this.level == 0)
            {
                return(gem.Level > 1);
            }

            return(gem.Level == this.level);
        }
예제 #24
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            try
            {
                return(gem.Properties[1].Values[0].Item1 != "1");
            }
            catch (Exception)
            {
                return(false);
            }
        }
예제 #25
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            try
            {
                return(gem.Properties[0].Name.ToLower().Contains(filter.ToLower()));
            }
            catch (Exception)
            {
                return(false);
            }
        }
예제 #26
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gear gear = item as Gear;

            if (gear != null && gear.SocketedItems.Any(x => Applicable(x)))
            {
                return(true);
            }

            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            return(gem.Corrupted);
        }
예제 #27
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gear gear = item as Gear;

            if (gear != null && gear.SocketedItems.Any(x => Applicable(x)))
            {
                return(true);
            }

            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            if (this.level == 0)
            {
                return(gem.Level > 1);
            }

            return(gem.Level == this.level);
        }
예제 #28
0
        public bool Applicable(POEApi.Model.Item item)
        {
            Gear gear = item as Gear;

            if (gear != null && gear.SocketedItems.Any(x => Applicable(x)))
            {
                return(true);
            }

            Gem gem = item as Gem;

            if (gem == null)
            {
                return(false);
            }

            if (quality == 0)
            {
                return(gem.IsQuality);
            }

            return(gem.Quality == quality);
        }
예제 #29
0
        private void setProperty(Item item)
        {
            string target = item.inventoryId;

            if (propertyMapping.ContainsKey(item.inventoryId))
                target = propertyMapping[item.inventoryId];

            if (item.inventoryId == "Flask")
                target = item.inventoryId + item.X;

            properties[target].SetValue(this, item, null);
        }
예제 #30
0
 public bool Applicable(Item item)
 {
     return item.TypeLine.ToLower().Contains("essence");
 }
예제 #31
0
 public bool Applicable(Item item)
 {
     return resistances.Count(r => r.Applicable(item)) >= 3;
 }
예제 #32
0
 public bool Applicable(POEApi.Model.Item item)
 {
     return(filters.All(filter => filter.Applicable(item)));
 }
예제 #33
0
 public bool Applicable(POEApi.Model.Item item)
 {
     return(item.inventoryId == source.inventoryId &&
            item.X == source.X &&
            item.Y == source.Y);
 }
예제 #34
0
 public bool Applicable(Item item)
 {
     return item is Prophecy;
 }
예제 #35
0
 public bool Applicable(Item item)
 {
     return item is Gem;
 }
예제 #36
0
 private bool containsMatchedCosmeticMod(Item item)
 {
     return item.Microtransactions.Any(x => x.ToLower().Contains(filter.ToLower()));
 }