mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Misc
This commit is contained in:
parent
668bf5009b
commit
1917c9da95
1 changed files with 6 additions and 11 deletions
|
@ -30,17 +30,11 @@ internal sealed class TradeStatistics {
|
|||
private readonly object Lock = new();
|
||||
|
||||
internal uint AcceptedOffers { get; private set; }
|
||||
|
||||
internal uint BlacklistedOffers { get; private set; }
|
||||
|
||||
internal uint ConfirmedOffers { get; private set; }
|
||||
|
||||
internal uint IgnoredOffers { get; private set; }
|
||||
|
||||
internal uint ItemsGiven { get; private set; }
|
||||
|
||||
internal uint ItemsReceived { get; private set; }
|
||||
|
||||
internal uint RejectedOffers { get; private set; }
|
||||
|
||||
internal void Include(ParseTradeResult result) {
|
||||
|
@ -49,25 +43,26 @@ internal sealed class TradeStatistics {
|
|||
lock (Lock) {
|
||||
switch (result.Result) {
|
||||
case ParseTradeResult.EResult.Accepted when result.Confirmed:
|
||||
++ConfirmedOffers;
|
||||
ConfirmedOffers++;
|
||||
|
||||
ItemsGiven += (uint) (result.ItemsToGive?.Count ?? 0);
|
||||
ItemsReceived += (uint) (result.ItemsToReceive?.Count ?? 0);
|
||||
|
||||
goto case ParseTradeResult.EResult.Accepted;
|
||||
case ParseTradeResult.EResult.Accepted:
|
||||
++AcceptedOffers;
|
||||
AcceptedOffers++;
|
||||
|
||||
break;
|
||||
case ParseTradeResult.EResult.Rejected:
|
||||
++RejectedOffers;
|
||||
RejectedOffers++;
|
||||
|
||||
break;
|
||||
case ParseTradeResult.EResult.Blacklisted:
|
||||
++BlacklistedOffers;
|
||||
BlacklistedOffers++;
|
||||
|
||||
break;
|
||||
case ParseTradeResult.EResult.Ignored:
|
||||
++IgnoredOffers;
|
||||
IgnoredOffers++;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue