Closed teliosdev closed 11 years ago
Why does the bot need to pull the other user's inventory anyway? Maybe this can be removed altogether.
Also the inventory fetching could probably be done outside of the trade class.
I agree with @cwhelchel. Fetching other user's inventory is unsafe and therefore should be removed.
The problem is however, we currently use the Steam Web API to figure out which defindex items have, which is not possible with the Trading API as far as I know. Also see my comment on this topic in #52.
Philipp is right. Unless there is some other way to get the item ID seen in the Trade's Poll
method into a defindex or other I don't see how we can avoid fetching the other users inventory. If this is the case then better user interaction is needed (i.e. the Bot tells the other trader that it can't trade with someone who has a private backpack).
Of course, we can make this fetching a bit more bullet proof so it doesn't die spectacularly.
Also, the whole Steam Community backpack thing is down right now and it looks like even normal Steam trades don't work. I don't know if it's even possible to trade normally with someone who has a private backpack.
Setting a custom url to bots and users profile should fix that error. But only if that bug of steam happen. When there will be connection problems bots will crash like always.
@redjazz96 I think this can be closed.
I'm wondering if there is a way outside of the Steam API and the trading "API" to grab information from the backpacks, considering TF2 can do it.
There must be and I believe I've talked to a fellow who had some info about doing that. Unfortunately, I think a lot of the bot and trade stuff has to be rewritten to do it.
krinkle: I at least think that the official version sends some item data with it and thats why you can trade w/ ppl with private bps StormReaper: yes, let me explain the process StormReaper: when both users start a trade each use a get request and receive a html text response with all the variables on the trade aswell as some data on the inventory depending on cookies StormReaper: this data is only specific to their own backpack whatever the appid is currently selected aswell as the tab "context" StormReaper: when the other user adds an item, there is a method that gets called to fetch their inventory for that item's appid and context StormReaper: the method uses some cookies i think and trade variables and only works during the trade StormReaper: the data thats included is pretty much all the description information you normally see when you look in the inventory and items are identified with the classid StormReaper: for valve games there are 2 webmethods GetAssetClassInfo and GetAssetPrices StormReaper: the GetAssetPrices is the one which is important because it contains data on which classid corresponds to which defindex StormReaper: so you can create an association between the two StormReaper: for non valve games i don't believe there's a schema so, its a bit harder krinkle: so GetAssetPrices could be part of the cant-trade-with-private-bps stuff
Either way is the crash in this issue handled?
Probably, since we're removing inventories, I think; but I'm saying in-game, team fortress 2 allows access to the backpack. There has to be some way we would be able to access that, no? The bot having access to its own backpack would be invaluable, I think, even if said backpack is private.
This is true. Further into that conversation with StormReaper he mentions cookies and some other session stuff that is needed to trade with private bps. I'd venture to guess there is something similar for the actual game client.
When the bot trades a person with a private backpack, it cashes instantly.