Rename card checks methods to match ArchiBoT

This commit is contained in:
JustArchi
2016-09-12 03:49:17 +02:00
parent e4df12fc5b
commit 0cea70ef6a
2 changed files with 3 additions and 3 deletions

View File

@@ -269,9 +269,9 @@ namespace ArchiSteamFarm.JSON {
State = state; State = state;
} }
internal bool IsSteamCardsOnlyTradeForUs() => ItemsToGive.All(item => (item.AppID == Item.SteamAppID) && (item.ContextID == Item.SteamContextID) && (item.Type == Item.EType.TradingCard)); internal bool IsSteamCardsRequest() => ItemsToGive.All(item => (item.AppID == Item.SteamAppID) && (item.ContextID == Item.SteamContextID) && (item.Type == Item.EType.TradingCard));
internal bool IsPotentiallyDupesTradeForUs() { internal bool IsFairTypesExchange() {
Dictionary<uint, Dictionary<Item.EType, uint>> itemsToGivePerGame = new Dictionary<uint, Dictionary<Item.EType, uint>>(); Dictionary<uint, Dictionary<Item.EType, uint>> itemsToGivePerGame = new Dictionary<uint, Dictionary<Item.EType, uint>>();
foreach (Item item in ItemsToGive) { foreach (Item item in ItemsToGive) {
Dictionary<Item.EType, uint> itemsPerType; Dictionary<Item.EType, uint> itemsPerType;

View File

@@ -206,7 +206,7 @@ namespace ArchiSteamFarm {
} }
// Decline trade if we're losing anything but steam cards, or if it's non-dupes trade // Decline trade if we're losing anything but steam cards, or if it's non-dupes trade
if (!tradeOffer.IsSteamCardsOnlyTradeForUs() || !tradeOffer.IsPotentiallyDupesTradeForUs()) { if (!tradeOffer.IsSteamCardsRequest() || !tradeOffer.IsFairTypesExchange()) {
return new ParseTradeResult(tradeOffer.TradeOfferID, ParseTradeResult.EResult.RejectedPermanently); return new ParseTradeResult(tradeOffer.TradeOfferID, ParseTradeResult.EResult.RejectedPermanently);
} }