Documentation
¶
Overview ¶
Package profile keeps each character's play style and talent plan on the player's own machine (the user config directory, never a repo), and checks a plan against the captured talent tree.
A plan holds node names and target ranks only. Guide text is never stored here.
Index ¶
Constants ¶
const ( MaxPicks = 120 MaxField = 120 MaxURLLen = 300 )
Limits on what is stored.
const Env = "WOWC_PROFILES"
Env overrides the store's path.
Variables ¶
var ( Roles = []string{"damage", "tank", "healer", "balanced"} Foci = []string{"leveling", "dungeons", "pvp", "mixed"} // StatPrefs are the optional stat preferences ("" is balanced): see the stats package. StatPrefs = []string{"", "balanced", "damage", "survival"} )
Allowed values, first is listed first in the question the model asks.
Functions ¶
func Ask ¶
func Ask() string
Ask is the short multiple-choice question the model puts to a player who has no saved play style, before it gives any talent advice. The answer is saved with set_character_profile.
func Attach ¶
Attach returns c with its stored profile and plan; c is unchanged when path holds neither.
func Clean ¶
Clean checks a profile: role and focus are from the allowed lists (case-insensitive, lower-cased on save), the spec is short text and the guide is an https URL.
Types ¶
type Check ¶
type Check struct {
Plan character.TalentPlan
Dropped []string // entries not in the captured tree, or with a bad rank, with the reason
}
Check is the result of validating a plan against the captured tree.
func ValidatePlan ¶
ValidatePlan keeps the picks that name a node of the captured class tree (matched by name, case-insensitively, and written back with the captured spelling) and a rank from 1 to its max rank; the rest are dropped and listed. A repeated node keeps its first place and its highest rank. An error means nothing usable is left.