mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-03-28 01:00:15 +08:00
Re-add "pos" property to inventory items for backwards compatibility
This commit is contained in:
parent
d0af8584c1
commit
35e6dd16e7
@ -263,7 +263,8 @@ SteamCommunity.prototype.getUserInventory = function(userID, appID, contextID, t
|
||||
if(typeof userID === 'string') {
|
||||
userID = new SteamID(userID);
|
||||
}
|
||||
|
||||
|
||||
var pos = 1;
|
||||
get([], [], 1);
|
||||
|
||||
function get(inventory, currency, step, start) {
|
||||
@ -305,6 +306,7 @@ SteamCommunity.prototype.getUserInventory = function(userID, appID, contextID, t
|
||||
var description = getDescription(body.descriptions, body.assets[i].classid, body.assets[i].instanceid);
|
||||
|
||||
if (!tradableOnly || (description && description.tradable)) {
|
||||
body.assets[i].pos = pos++;
|
||||
(body.assets[i].currencyid ? currency : inventory).push(new CEconItem(body.assets[i], description, contextID));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user