npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wow-classic-items

v2.0.1

Published

Collection of all WoW Vanilla, TBC and WotLK Classic items.

Downloads

25

Readme

WoW Classic Items

npm Discord

This project aims to provide a well-rounded WoW Classic database and to make that available for use in your project, by scraping Wowhead and the official Blizzard API.

Current content:

  • Items (General properties, icons, tooltips, crafting, sources)
  • Professions
  • Zones
  • Classes

Installation

npm install wow-classic-items
or
yarn add wow-classic-items

This package is currently laid out for node.js, as this is what we're using in production. However, if you need the database available for another language, simply read in the JSON yourself from /data/json

Usage

const Database = require('wow-classic-items')

const items = new Database.Items(options)
const professions = new Database.Professions(options)
const zones = new Database.Zones(options)
const classes = new Database.Classes(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

Item Properties

[{
  itemId: 19019, // Unique Item Id
  name: 'Thunderfury, Blessed Blade of the Windseeker', // Display name
  icon: 'inv_sword_39', // Display icon
  class: 'Weapon', // Item class
  subclass: 'Sword', // Item subclass, if available
  sellPrice: 255355, // Price for what this item can be sold to a vendor
  quality: 'Legendary', // Item quality
  itemLevel: 80, // Item level
  requiredLevel: 60, // Required level for this item
  slot: 'One-Hand', // Item slot
  tooltip: [Object], // Item tooltip (see below)
  itemLink: '|cffff8000|Hitem:19019::::::::::0|h[Thunderfury, Blessed Blade of the Windseeker]|h|r', // Copy-pasteable ingame item link
  uniqueName: 'thunderfury-blessed-blade-of-the-windseeker', // Unique item name
  contentPhase: 3, // Content phase in which this item becomes available
  vendorPrice: 1312, // Weighted vendor price if this item can be bought from a vendor
  source: { // Source, either Boss Drop, Rare Drop, Zone Drop or Quest
    category: 'Boss Drop',
    name: 'Some Random Boss', // Only set on Boss Drop
    zone: [209], // Only set on Zone Drop or Boss Drop
    dropChance: 0.33, // Only set on Drops
    quests: [{ questId: 256, name: 'Some Random Quest', faction: 'Horde' }] // Only set on Quest
  }
}, ...]
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

Install Dependencies:

yarn

Create a file called blizzard_token in the root directory and add your Blizzard API Access token

Create directory data/build

mkdir data/build

Build the item database (default output is /data/build/data.json):

yarn build

The professions database is currently handmade.

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

yarn validate

Test the item class with:

yarn test

License

MIT