But keep trading only of cards + foils

This commit is contained in:
JustArchi
2016-04-20 23:16:15 +02:00
parent 1df9af08e6
commit 770a8fee66
2 changed files with 6 additions and 6 deletions

View File

@@ -249,16 +249,16 @@ namespace ArchiSteamFarm {
}
}
internal bool IsSteamOnlyTrade {
internal bool IsSteamCardsOnlyTrade {
get {
foreach (Item item in ItemsToGive) {
if (item.AppID != Item.SteamAppID || item.ContextID != Item.SteamContextID) {
if (item.AppID != Item.SteamAppID || item.ContextID != Item.SteamContextID || (item.Type != Item.EType.FoilTradingCard && item.Type != Item.EType.TradingCard)) {
return false;
}
}
foreach (Item item in ItemsToReceive) {
if (item.AppID != Item.SteamAppID || item.ContextID != Item.SteamContextID) {
if (item.AppID != Item.SteamAppID || item.ContextID != Item.SteamContextID || (item.Type != Item.EType.FoilTradingCard && item.Type != Item.EType.TradingCard)) {
return false;
}
}

View File

@@ -153,13 +153,13 @@ namespace ArchiSteamFarm {
return false;
}
// Rule 2 - We always trade steam itmes and only for the same set
if (!tradeOffer.IsSteamOnlyTrade || !tradeOffer.IsPotentiallyDupesTrade) {
// Rule 2 - We always trade steam cards and only for the same set
if (!tradeOffer.IsSteamCardsOnlyTrade || !tradeOffer.IsPotentiallyDupesTrade) {
return false;
}
// This STM trade SHOULD be fine
// Potential TODO: Ensure that our inventory in fact has proper amount of both received and given items
// Potential TODO: Ensure that our inventory in fact has proper amount of both received and given cards
// This way we could calculate amounts before and after trade, ensuring that we're in fact trading dupes and not 1 + 2 -> 0 + 3
return true;
}