Documentation
¶
Overview ¶
Package farm lists the creatures and objects that drop an item, ranked for a captured character, from the dataset's loot_sources and npcs tables. The rules are in docs/farm.md.
Index ¶
- func Crafted(ds store.DataStore, itemID int64) bool
- func IsCrafted(kind string) bool
- func Render(item string, spots []Spot, crafted bool, limit int) string
- func Resolve(ds store.DataStore, text string) (id int64, name string, candidates []string)
- func Value(ds store.DataStore, itemID int64) string
- type Spot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Crafted ¶
Crafted is true when the dataset lists a crafting source for the item, which profession_plan covers instead.
func IsCrafted ¶
IsCrafted is true for a loot_sources kind that is a recipe or other crafting source, not a drop.
func Resolve ¶
Resolve turns an item id or name into an item id and name. A name is matched exactly, then by prefix, through the dataset's name index; otherwise it returns the candidate names and id 0.
Types ¶
type Spot ¶
type Spot struct {
Kind string // creature or object
ID int64
Name string // empty when the dataset has no name
// Everloot is true when the name comes from Everloot's drop rows (npcs.name_source).
Everloot bool
MinLevel *int
MaxLevel *int
// InRange is true when the level range is known and overlaps the character's level window.
InRange bool
// Zone is empty when unknown; ZoneSource then is too.
Zone string
ZoneSource string
// Chance is 100 * drops / kills over the source's loot windows; nil when kills is zero or
// unrecorded.
Chance *float64
Kills int64
Drops int64
}
Spot is one creature or object that drops the item.