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 CountsText ¶
CountsText writes the counts one profession per line, sorted.
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"`
}
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"`
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"`
Line string `json:"line"`
// contains filtered or unexported fields
}
Way is one place to learn the recipe.