Jump to content
McKay Development

Recommended Posts

Posted

I need the

app_data.def_index

of the items i’m receiving or giving in a tradeoffer, but many times app_data is missing.
 
I managed to get around this by editing

checkNeededDescriptions()

in classes/TradeOffer.js so it ignores the

if(!manager._hasDescription(item))

part and pushes the item anyway but i don’t think this is the right solution.
 
Any help? I'm trying to get the def_index in a wrong way? Thanks  :)

Posted

If you absolutely need the def_index I think you will have to keep re-checking the trade offer (try again later using TradeOfferManager#getOffer) until you find that the app_data exists.

  • 2 weeks later...
Posted (edited)

Only app_data

EconItem {
  appid: 440,
  contextid: '2',
  assetid: '4723781293',
  classid: '2674',
  instanceid: '11040547',
  amount: 1,
  missing: false,
  currency: false,
  background_color: '3C352E',
  icon_url: '...',
  icon_url_large: '...',
  tradable: false,
  actions: 
   [ { link: 'http://wiki.teamfortress.com/scripts/itemredirect.php?id=5002&lang=en_US',
       name: 'Item Wiki Page...' } ],
  name: 'Refined Metal',
  name_color: '7D6D00',
  type: 'Level 3 Craft Item',
  market_name: 'Refined Metal',
  market_hash_name: 'Refined Metal',
  commodity: false,
  market_tradable_restriction: 7,
  market_marketable_restriction: 0,
  id: '4723781293',
  fraudwarnings: [],
  descriptions: [],
  owner_descriptions: [],
  owner_actions: [],
  tags: [],
  marketable: false }
 
After restarting the bot (or by editing that part of code in OP) app_data is returned correctly again.
Edited by turtleslol

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...