Skip to content

Commit

Permalink
Revert "Revert back to using AWH for inventory fetching"
Browse files Browse the repository at this point in the history
This reverts commit d68141d.
  • Loading branch information
Citrinate committed Mar 27, 2024
1 parent d68141d commit cd29516
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions BoosterManager/Handlers/GemHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal static class GemHandler {
internal static async Task<string> GetGemCount(Bot bot) {
HashSet<Asset> inventory;
try {
inventory = await bot.ArchiWebHandler.GetInventoryAsync().Where(item => ItemIdentifier.GemAndSackIdentifier.IsItemMatch(item)).ToHashSetAsync().ConfigureAwait(false);
inventory = await bot.ArchiHandler.GetMyInventoryAsync().Where(item => ItemIdentifier.GemAndSackIdentifier.IsItemMatch(item)).ToHashSetAsync().ConfigureAwait(false);
} catch (Exception e) {
bot.ArchiLogger.LogGenericException(e);
return Commands.FormatBotResponse(bot, ArchiSteamFarm.Localization.Strings.WarningFailed);
Expand Down Expand Up @@ -53,7 +53,7 @@ internal static async Task<string> GetGemCount(Bot bot) {
internal static async Task<string> UnpackGems(Bot bot) {
HashSet<Asset> sacks;
try {
sacks = await bot.ArchiWebHandler.GetInventoryAsync().Where(item => ItemIdentifier.SackIdentifier.IsItemMatch(item) && (BoosterHandler.AllowCraftUntradableBoosters || item.Tradable)).ToHashSetAsync().ConfigureAwait(false);
sacks = await bot.ArchiHandler.GetMyInventoryAsync().Where(item => ItemIdentifier.SackIdentifier.IsItemMatch(item) && (BoosterHandler.AllowCraftUntradableBoosters || item.Tradable)).ToHashSetAsync().ConfigureAwait(false);
} catch (Exception e) {
bot.ArchiLogger.LogGenericException(e);
return Commands.FormatBotResponse(bot, ArchiSteamFarm.Localization.Strings.WarningFailed);
Expand Down
4 changes: 2 additions & 2 deletions BoosterManager/Handlers/InventoryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal static async Task<string> SendItemToMultipleBots(Bot sender, List<(Bot

HashSet<Asset> itemStacks;
try {
itemStacks = await sender.ArchiWebHandler.GetInventoryAsync(appID: appID, contextID: contextID).Where(item => item.Tradable && itemIdentifier.IsItemMatch(item)).ToHashSetAsync().ConfigureAwait(false);
itemStacks = await sender.ArchiHandler.GetMyInventoryAsync(appID: appID, contextID: contextID).Where(item => item.Tradable && itemIdentifier.IsItemMatch(item)).ToHashSetAsync().ConfigureAwait(false);
} catch (Exception e) {
sender.ArchiLogger.LogGenericException(e);
return Commands.FormatBotResponse(sender, ArchiSteamFarm.Localization.Strings.WarningFailed);
Expand Down Expand Up @@ -80,7 +80,7 @@ internal static async Task<string> SendMultipleItemsToMultipleBots(Bot sender, H

HashSet<Asset> inventory;
try {
inventory = await sender.ArchiWebHandler.GetInventoryAsync(appID: appID, contextID: contextID).ToHashSetAsync().ConfigureAwait(false);
inventory = await sender.ArchiHandler.GetMyInventoryAsync(appID: appID, contextID: contextID).ToHashSetAsync().ConfigureAwait(false);
} catch (Exception e) {
sender.ArchiLogger.LogGenericException(e);
return Commands.FormatBotResponse(sender, ArchiSteamFarm.Localization.Strings.WarningFailed);
Expand Down
2 changes: 1 addition & 1 deletion BoosterManager/Handlers/KeyHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal static class KeyHandler {
internal static async Task<string> GetKeyCount(Bot bot) {
HashSet<Asset> inventory;
try {
inventory = await bot.ArchiWebHandler.GetInventoryAsync(appID: KeyAppID, contextID: KeyContextID).Where(item => ItemIdentifier.KeyIdentifier.IsItemMatch(item)).ToHashSetAsync().ConfigureAwait(false);
inventory = await bot.ArchiHandler.GetMyInventoryAsync(appID: KeyAppID, contextID: KeyContextID).Where(item => ItemIdentifier.KeyIdentifier.IsItemMatch(item)).ToHashSetAsync().ConfigureAwait(false);
} catch (Exception e) {
bot.ArchiLogger.LogGenericException(e);
return Commands.FormatBotResponse(bot, ArchiSteamFarm.Localization.Strings.WarningFailed);
Expand Down

0 comments on commit cd29516

Please sign in to comment.