items

package
v0.7.114 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package items holds what the advisor knows about items independent of any table: which ones the client data lists but a player can never get.

The items table has no column that marks an internal item (its columns are id, name, levels, quality, class, slot, class mask, bonding, stats and prices), and a missing loot source is true of many real items (vendor, quest and world items), so the only reliable signal is the name.

Index

Constants

View Source
const Message = "this item isn't obtainable in game (internal or placeholder)"

Message is what a tool says when it is asked about an unobtainable item.

Variables

View Source
var Patterns = []Pattern{
	{Label: "DNT", Prefix: "DNT", WholeWord: true},
	{Label: "Deprecated", Prefix: "Deprecated", WholeWord: true},
	{Label: "[PH]", Prefix: "[PH]"},
	{Label: "PH ", Prefix: "PH ", ExactCase: true},
	{Label: "OLD", Prefix: "OLD", ExactCase: true, WholeWord: true},
	{Label: "zz", Prefix: "zz", ExactCase: true},
	{Label: "ZZ", Prefix: "ZZ", ExactCase: true},
	{Label: "Test ", Prefix: "Test ", Except: []string{"test of "}},
	{Label: "TEST", Prefix: "TEST", ExactCase: true, WholeWord: true},
	{Label: "QA ", Prefix: "QA ", ExactCase: true},
	{Label: "PVP TEST", Prefix: "PVP TEST", ExactCase: true, WholeWord: true},
	{Label: "Monster -", Prefix: "Monster -"},
	{Label: "Unused", Prefix: "Unused", WholeWord: true},
	{Label: "(DNT)", Contains: "(DNT)"},
	{Label: "[DNT]", Contains: "[DNT]"},
	{Label: "DEPRECATED", Contains: "DEPRECATED"},
	{Label: "PLACEHOLDER", Contains: "PLACEHOLDER"},
}

Patterns is the one table of unobtainable-name rules. Order only decides which label a name is counted under.

Functions

func Match

func Match(name string) string

Match returns the label of the first pattern the item name matches, or "" for an obtainable one.

func RankFaction added in v0.7.99

func RankFaction(name string) string

RankFaction is the faction ("Alliance" or "Horde") whose PvP rank ladder an item name belongs to, or "" for an item that is no rank gear or whose faction the name does not settle.

func Unobtainable

func Unobtainable(name string) bool

Unobtainable reports whether an item with this name is an internal, deprecated, placeholder or test item that no player can get.

func WrongFaction added in v0.7.99

func WrongFaction(name, faction string) bool

WrongFaction reports whether an item is rank gear of the other faction than the character's. An unknown faction is never a reason to leave an item out.

Types

type Pattern

type Pattern struct {
	Label string
	// Prefix is matched at the start of the trimmed name; Contains anywhere in it. Exactly one is set.
	Prefix   string
	Contains string
	// ExactCase makes the match case-sensitive, for words real items also start with in another
	// case ("Old Blanchy's Blanket", "Testament of Light").
	ExactCase bool
	// WholeWord requires the match not to be followed by a letter or digit, so "DNT" does not
	// take "Dntfoo". Set for prefixes that end in a letter.
	WholeWord bool
	// Except lists lower-case name prefixes that stay obtainable although the pattern matches.
	Except []string
}

Pattern is one row of the table below.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL