mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
But keep trading only of cards + foils
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user