Skip to content
Collection of all WoW Classic items
JavaScript
Branch: master
Clone or download
Latest commit 545473c Feb 11, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build Added vendor price, resolves #1 Feb 11, 2020
data/json Added vendor price, resolves #1 Feb 11, 2020
test Added ingame item link function Jan 11, 2020
.eslintrc.yml Initial commit Dec 17, 2019
.gitignore added built json data Dec 18, 2019
LICENSE.md Renamed license Dec 17, 2019
README.md Added ingame item link function Jan 11, 2020
index.js Added ingame item link function Jan 11, 2020
package-lock.json Create main index file Dec 18, 2019
package.json Updated npm version Feb 11, 2020

README.md

WoW Classic Items

npm Discord

Fetches all WoW Classic items and professions from Wowhead and the official Blizzard API and makes them available for use in your project.


Installation

npm install wow-classic-items

Usage

const Database = require('wow-classic-items')
const items = new Database.Items(options)
const professions = new Database.Professions(options)

items is functionally identical to an array and can be used as such:

items[0] // Returns first item
items.filter((i) => i.class === 'Weapon')
items.map((i) => i.itemId)

items.getItemLink(123468) // Returns copy paste-able ingame link
professions.get('Alchemy') // .get returns specified profession
Tooltip

The tooltip is built the following way:

[{ label: 'Thunderfury, Blessed Blade of the Windseeker', format: 'Legendary' }, ...]

Each label represents one line in the tooltip. The format field specifies if theres a special formatting:

Format Meaning
Quality If there is a quality (Common, Rare, Legendary...) it specifies the corresponding color of the label.
Misc This also refers to the label color: The item level and flavor text.
alignRight This means that the label is aligned inline to the right of the previous label (for example Armor ---- Plate).
indent This means that the label is indented and should be treated as if it was quality Poor (for example in set pieces).

Note that the actual sell price is not included in the tooltip (just the label), so you can format it how you want.


Configuration

Option Default Description
iconSrc 'blizzard' Specifies from which source the item icon URL's are generated. Valid values are 'blizzard', 'wowhead' and false (in this case only the icon name is returned).

Building and Testing

The professions database is currently handmade.
Build the item database (default output is /data/build/data.json):

npm run build

After that you can verify the build and/or check the changes between yours and the current one with:

npm run verify

Test the item class with:

npm test


License

MIT

You can’t perform that action at this time.