Jump to content
McKay Development

In node-tf2, check item's eligibility for crafting/trading


Recommended Posts

How do I check whether is item can be crafted or traded? The official WebAPI documentation says that items have optional fields flag_cannot_trade and flag_cannot_craft and if they're absent they're should be assumed false. Hovewer, in node-tf2 I'm not having these fields on all items, even those that aren't tradeable or craftable.

Link to post
Share on other sites

Unfortunately, the data received from the GC (what you get via node-tf2) is incredibly messy and there's like a dozen conditions you need to check to see whether an item is untradable/uncraftable. It's probably not worth your time doing and you should probably just pull that data from the web instead, but if you really want to, a starting point is that a few conditions that determine uncraftability is a flag in the flags field, an "achievement" origin, a "tradable after date" attribute, and a "never tradable" attribute. That's not an exhaustive list though.

Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...