public SearchResultItem(ItemDetails.ItemSearchResult item) { this.Name = item.Name; this.Id = item.Tag; this.Type = "item"; var isPet = IsPet(item); if (!item.Tag.StartsWith("POTION") && !isPet && !item.Tag.StartsWith("RUNE")) { IconUrl = "https://sky.lea.moe/item/" + item.Tag; } else { this.IconUrl = item.IconUrl; } if (isPet && !Name.Contains("Pet")) { this.Name += " Pet"; } this.HitCount = item.HitCount + ITEM_EXTRA_IMPORTANCE; if (ItemReferences.RemoveReforgesAndLevel(Name) != Name) { this.HitCount -= NOT_NORMALIZED_PENILTY; } }
private static bool IsPet(ItemDetails.ItemSearchResult item) { return(item.Tag.StartsWith("PET") && !item.Tag.StartsWith("PET_SKIN")); }