public bool IsBetter(IWowInventoryItem current, IWowInventoryItem item) { if ((ArmorTypeBlacklist != null && item.GetType() == typeof(WowArmor) && ArmorTypeBlacklist.Contains(((WowArmor)item).ArmorType)) || (WeaponTypeBlacklist != null && item.GetType() == typeof(WowWeapon) && WeaponTypeBlacklist.Contains(((WowWeapon)item).WeaponType))) { return(false); } double scoreCurrent = GearscoreFactory.Calculate(current); double scoreNew = GearscoreFactory.Calculate(item); return(scoreCurrent < scoreNew); }
public bool IsBlacklistedItem(IWowInventoryItem item) { if (ArmorTypeBlacklist != null && string.Equals(item.Type, "Armor", StringComparison.OrdinalIgnoreCase) && ArmorTypeBlacklist.Contains(((WowArmor)item).ArmorType)) { return(true); } else if (WeaponTypeBlacklist != null && string.Equals(item.Type, "Weapon", StringComparison.OrdinalIgnoreCase) && WeaponTypeBlacklist.Contains(((WowWeapon)item).WeaponType)) { return(true); } return(false); }