Lesu Posted September 22, 2016 Report Posted September 22, 2016 When accepting a trade, items change assetids. Comparing ItemsToReceive coming from a sentOfferChanged event with the actual items after they change inventories gives different results. Is there any way to find out a post-trade item's ID? Perhaps a way to detect incoming items and their sender / pertaining offer's id? Many thanks in advance. Quote
Dr. McKay Posted September 22, 2016 Report Posted September 22, 2016 offer.getReceivedItems will give you post-trade IDs and descriptions. Quote
Lesu Posted September 22, 2016 Author Report Posted September 22, 2016 (edited) When you think you know how to fully scroll down a page, and this happens... thanks! EDIT: Sorry, one last thing, does it work if a trade is cancelled? Apparently assetids can change when items are involved in trades even if they aren't completed, is there a way to get the ID of an item that just changed it because it felt like it during a broken trade? Edited September 22, 2016 by Lesu Quote
Dr. McKay Posted September 22, 2016 Report Posted September 22, 2016 It doesn't work if the trade didn't complete fully, no. Quote
Lesu Posted September 23, 2016 Author Report Posted September 23, 2016 (edited) Considering then that I cannot eternally bind an assetid from a bot to a person as for different reasons it may as well change before it is traded back to someone else, do you think it would be good practice to instead bind the classid and instanceid, as the combination, as I understood here --> https://dev.doctormckay.com/topic/332-identifying-steam-items/ <-- , seems to be unique for as long as the item's properties go? Are sticker and item wear *percentage* from CS:GO also considered in the uniqueness of these IDs? Edited September 23, 2016 by Lesu Quote
Dr. McKay Posted September 23, 2016 Report Posted September 23, 2016 classid and instanceid can change whenever they want. And no, they don't include wear for uniqueness. Quote
Lesu Posted September 24, 2016 Author Report Posted September 24, 2016 Could I perhaps ask how would you do it? How could I relate an item to their sender, if not by relating them to the item's IDs? Or...could I ever? Is comparing each and every single one of the item's properties the only way? That'd sadly be quite unefficient... Quote
Dr. McKay Posted September 24, 2016 Report Posted September 24, 2016 Trade failures which result in ID changes are infrequent enough that you can fix them manually. Or you could detect when a trade goes InvalidItems and automatically figure out which items in your inventory have unrecorded asset IDs and match the description of the missing items. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.