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 ¶
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 ¶
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"}, {Label: "Test word", Word: "Test", Except: []string{"test of ", "high test "}}, {Label: "UNUSED word", Word: "UNUSED"}, {Label: "PH word", Word: "PH", ExactCase: true}, {Label: "(old)", Contains: "(OLD)"}, }
Patterns is the one table of unobtainable-name rules. Order only decides which label a name is counted under.
Functions ¶
func Match ¶
Match returns the label of the first pattern the item name matches, or "" for an obtainable one.
func RankFaction ¶ added in v0.7.99
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 RankGearNote ¶ added in v0.7.122
RankGearNote is the clause that says a rank piece or set is one faction's, "" when the faction is not settled: PvP rank gear is bought from the faction's own quartermaster, so the other faction cannot get or wear it. It names no rank, honor cost or vendor: the data holds none.
func RankSetFaction ¶ added in v0.7.122
RankSetFaction is the faction ("Alliance" or "Horde") whose rank ladder an item set belongs to, or "" for a set that is no PvP rank set or whose faction its name and pieces do not settle. A piece named for one faction's rank settles it; the set's own name settles it when the pieces carry the game's newer names (the rank sets of the dataset whose pieces are all "Premier ...").
func Unobtainable ¶
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
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; Word as a whole word anywhere in it
// (not inside a longer word). Exactly one is set.
Prefix string
Contains string
Word 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.