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); }
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); } }
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); }
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); }
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; } }
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; }
public bool Applicable(Item item) { Gear gear = item as Gear; if (gear != null) return gear.Rarity == rarity; return false; }
public bool Applicable(Item item) { Gear gear = item as Gear; if (gear == null) return false; return gear.IsLinked(links); }
public bool Applicable(Item item) { Gem gem = item as Gem; if (gem == null) return false; return item.Properties[0].Name.Contains("Support"); }
public bool Applicable(Item item) { Gem gem = item as Gem; if (gem == null) return false; return popular.Contains(gem.TypeLine); }
public bool Applicable(Item item) { Gear gear = item as Gear; if (gear != null) return gear.GearType == gearType; return false; }
private bool isMatchedGear(Item item) { Gear gear = item as Gear; if (gear == null) return false; return gear.GearType.ToString().ToLower().Contains(filter.ToLower()); }
public bool Applicable(POEApi.Model.Item item) { Gem gem = item as Gem; if (gem == null) { return(false); } return(gem.Corrupted); }
public bool Applicable(POEApi.Model.Item item) { Map map = item as Map; if (map == null) { return(false); } return(map.MapLevel == level); }
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"))); }
public bool Applicable(POEApi.Model.Item item) { Gem gem = item as Gem; if (gem == null) { return(false); } return(gem.IsQuality); }
public bool Applicable(POEApi.Model.Item item) { Map map = item as Map; if (map == null) { return(false); } return(map.MapTier == tier); }
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))); }
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))); }
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; }
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); }
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); } }
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); } }
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); }
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); }
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); }
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); }
public bool Applicable(Item item) { return item.TypeLine.ToLower().Contains("essence"); }
public bool Applicable(Item item) { return resistances.Count(r => r.Applicable(item)) >= 3; }
public bool Applicable(POEApi.Model.Item item) { return(filters.All(filter => filter.Applicable(item))); }
public bool Applicable(POEApi.Model.Item item) { return(item.inventoryId == source.inventoryId && item.X == source.X && item.Y == source.Y); }
public bool Applicable(Item item) { return item is Prophecy; }
public bool Applicable(Item item) { return item is Gem; }
private bool containsMatchedCosmeticMod(Item item) { return item.Microtransactions.Any(x => x.ToLower().Contains(filter.ToLower())); }