This commit is contained in:
JustArchi
2016-03-13 20:56:23 +01:00
parent 7a97045412
commit 06778c9bb0
3 changed files with 4 additions and 3 deletions

View File

@@ -185,7 +185,7 @@ namespace ArchiSteamFarm {
foreach (KeyValue trade in response["trade_offers_received"].Children) {
Steam.TradeOffer tradeOffer = new Steam.TradeOffer {
tradeofferid = trade["tradeofferid"].AsString(),
accountid_other = trade["accountid_other"].AsInteger(),
accountid_other = (uint) trade["accountid_other"].AsUnsignedLong(), // TODO: Correct this when SK2 with https://github.com/SteamRE/SteamKit/pull/255 gets released
trade_offer_state = trade["trade_offer_state"].AsEnum<Steam.TradeOffer.ETradeOfferState>()
};
foreach (KeyValue item in trade["items_to_give"].Children) {

View File

@@ -81,7 +81,7 @@ namespace ArchiSteamFarm {
internal string tradeofferid { get; set; }
[JsonProperty(Required = Required.Always)]
internal int accountid_other { get; set; }
internal uint accountid_other { get; set; }
[JsonProperty(Required = Required.Always)]
internal ETradeOfferState trade_offer_state { get; set; }
@@ -97,7 +97,7 @@ namespace ArchiSteamFarm {
internal ulong OtherSteamID64 {
get {
if (_OtherSteamID64 == 0 && accountid_other != 0) {
_OtherSteamID64 = new SteamID((uint) accountid_other, EUniverse.Public, EAccountType.Individual).ConvertToUInt64();
_OtherSteamID64 = new SteamID(accountid_other, EUniverse.Public, EAccountType.Individual).ConvertToUInt64();
}
return _OtherSteamID64;

View File

@@ -48,6 +48,7 @@ namespace ArchiSteamFarm {
}
internal enum EMode : byte {
Unknown,
Normal, // Standard most common usage
Client, // WCF client only
Server // Normal + WCF server