Documentation
¶
Overview ¶
Package learn answers "who teaches this recipe?": the nearest trainer or vendor for the character's faction, with zone and coordinates, and the recipe's real skill gate. Trainers come from the dataset's trainers table, vendors from vendor_sources; a place the dataset lacks comes from the player's own QuestieDB. The rules are in docs/professions.md.
Index ¶
Constants ¶
const ( Trainer = "trainer" Vendor = "vendor" Drop = "drop" Quest = "quest" )
Way kinds.
const MaxWays = 3
MaxWays is how many ways to learn a recipe an answer lists.
Variables ¶
This section is empty.
Functions ¶
func ContinentOf ¶ added in v0.7.86
ContinentOf is the zone's continent, or "" when the zone is not known.
func CountsText ¶
CountsText writes the counts one profession per line, sorted.
func Crossing ¶ added in v0.7.97
Crossing is the travel step between two continents for a faction: "Zeppelin to Orgrimmar", or for Outland the Dark Portal (after the zeppelin or boat first when the player is on Kalimdor). "" when both are the same continent, or either is not known: the player then walks or rides.
Types ¶
type Gate ¶
type Gate struct {
Skill int `json:"skill,omitempty" jsonschema:"the skill needed; 0 when no number is known"`
Unknown bool `json:"unknown,omitempty" jsonschema:"a trainer recipe whose only value is the client minimum of 1: no number is stated"`
Line string `json:"line"`
}
Gate is the skill needed to learn the recipe.
type Result ¶
type Result struct {
Recipe string `json:"recipe"`
Profession string `json:"profession,omitempty"`
Ways []Way `json:"ways"`
Gate Gate `json:"gate"`
Text string `json:"text"`
// contains filtered or unexported fields
}
Result is where to learn one recipe.
type Way ¶
type Way struct {
Kind string `json:"kind" jsonschema:"trainer, vendor, drop or quest"`
Name string `json:"name,omitempty"`
Title string `json:"title,omitempty" jsonschema:"a Questie trainer's rank title, such as Journeyman Blacksmith"`
Zone string `json:"zone,omitempty"`
X float64 `json:"x,omitempty"`
Y float64 `json:"y,omitempty"`
HasXY bool `json:"has_xy,omitempty"`
Questie bool `json:"from_questie,omitempty" jsonschema:"the place comes from the player's own Questie database"`
Item string `json:"item,omitempty" jsonschema:"the recipe item, for a vendor, drop or quest"`
Price string `json:"price,omitempty"`
Seen bool `json:"seen_by_you,omitempty" jsonschema:"the player saw this trainer or vendor in game: it comes before the dataset"`
Line string `json:"line"`
// contains filtered or unexported fields
}
Way is one place to learn the recipe.
func ProfessionTrainers ¶ added in v0.7.90
func ProfessionTrainers(c character.Character, ds store.DataStore, qx *questie.Index, prof string) []Way
ProfessionTrainers lists the trainers of one profession open to the character's faction, nearest first. It is the profession's own trainers only, never a class trainer or a quest NPC.