mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Rename card checks methods to match ArchiBoT
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user