Calculate the value of guildwars2 items
This is part of gw2efficiency. Please report all issues in the central repository.
npm install gw2e-item-value
This module can be used for Node.js as well as browsers using Browserify.
For better understanding of how and why this does things, please read the design document for the account value.
import {itemValue} from 'gw2e-account-value'
let item = {
id: 1,
sell: {price: 1337, last_known: 1337},
buy: {price: 12, last_known: 12},
crafting: {buy: 10000},
vendor_price: 5
// ...
}
let value = itemValue(item)
// -> 1337
import {itemInherits} from 'gw2e-account-value'
let item = {id: 1, /* ... */}
let itemInheritance = itemInherits(item.id)
// -> [{id: 19721, count: 50}, {gold: 888888}]
// -> false for items that don't inherit value from other items
npm test
MIT