This commit is contained in:
JustArchi
2016-06-12 23:01:17 +02:00
parent fcfdbdd220
commit 60a02a4c6a
2 changed files with 8 additions and 2 deletions

View File

@@ -657,9 +657,13 @@ namespace ArchiSteamFarm {
return "Trade couldn't be send because SteamMasterID is not defined!";
}
await Trading.LimitInventoryRequestsAsync().ConfigureAwait(false);
HashSet<Steam.Item> inventory = await ArchiWebHandler.GetMyInventory(true).ConfigureAwait(false);
if (BotConfig.SteamMasterID == SteamClient.SteamID) {
return "You can't loot yourself!";
}
await Trading.LimitInventoryRequestsAsync().ConfigureAwait(false);
HashSet<Steam.Item> inventory = await ArchiWebHandler.GetMyInventory(true).ConfigureAwait(false);
if ((inventory == null) || (inventory.Count == 0)) {
return "Nothing to send, inventory seems empty!";
}

View File

@@ -162,6 +162,8 @@ namespace ArchiSteamFarm {
}
// Now check if it's worth for us to do the trade
await LimitInventoryRequestsAsync().ConfigureAwait(false);
HashSet<Steam.Item> inventory = await Bot.ArchiWebHandler.GetMyInventory(false).ConfigureAwait(false);
if ((inventory == null) || (inventory.Count == 0)) {
return true; // OK, assume that this trade is valid, we can't check our EQ