JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

"Updates, discussions, and documentation of the BungieNetPlatform API."

Request Join
originally posted in:BungieNetPlatform
Edited by Floppy Catfish: 5/5/2015 10:52:29 PM
1

Weapon and Armor XP Progress

Can anyone point me in the right direction on how to replicate the XP percentage bar that shows in game for unmaxed weapons/armor? The progress properties of an inventory item don't seem to provide the right data.

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • I'll attempt to answer my own question here. I can get a pretty decent percentage value by going through the talentNodes of an item and and doing talentNodes.length * 100 to get the total percentage value of all nodes and then adding up the actual percentage values for each node. I do not have access to my console right now to verify how closely these progress bars match, but it seems to be pretty close. Some pseudo js code: // Get full item // ENDPOINT: /Destiny/[membershipType]/Account/[accountId]/Character/[characterId]/Inventory/[itemInstanceId]/ var talentNodes = result.data.talentNodes; var actualPercentageAmount = 0; for (var i=0; i<talentNodes.length; i++) { var node = talentNodes[i]; actualPercentageAmount += node.progressPercent; } return actualPercentageAmount / (talentNodes.length * 100);

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    1 Reply
    You are not allowed to view this content.
    ;
    preload icon
    preload icon
    preload icon