Documentation
¶
Overview ¶
Package brief renders plain-text briefs of captured characters. Every line comes from the capture; gaps are stated.
Index ¶
- Constants
- Variables
- func Character(c character.Character, client character.Client, now time.Time) string
- func Choose(f character.File, name string) (character.Character, error)
- func ClientLine(c character.Client) string
- func FormatMoney(copper *int) string
- func TopGroups(t *character.Talents) (names []string, points int)
- func UTC(ts int64) string
- type Entry
- type LookupError
Constants ¶
const MaxGivers = 5
MaxGivers caps the nearby quest givers the brief lists.
const StaleAfter = time.Hour
StaleAfter is the capture age after which a brief carries a warning.
Variables ¶
var Slots = []string{
"head", "neck", "shoulder", "back", "chest", "shirt", "tabard", "wrist", "hands", "waist",
"legs", "feet", "finger1", "finger2", "trinket1", "trinket2", "mainhand", "offhand", "ranged",
}
Slots are the standard inventory slots, by the lowercase names ForeverScribe uses.
Functions ¶
func Character ¶
Character renders the brief of one character. client is the capture's client (the character's, else the file's).
func ClientLine ¶
ClientLine describes the client that wrote the capture; "" when none was recorded.
func FormatMoney ¶
FormatMoney renders copper as gold, silver and copper.
Types ¶
type Entry ¶
type Entry struct {
Name string `json:"name"`
Key string `json:"key"`
Level *int `json:"level"`
Class string `json:"class"`
Realm string `json:"realm"`
CapturedAt *string `json:"captured_at"`
}
Entry is one row of list_characters.
type LookupError ¶
type LookupError struct{ Msg string }
LookupError means the requested character cannot be chosen; the message says what to do.
func (*LookupError) Error ¶
func (e *LookupError) Error() string