inventory

package
v0.7.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package inventory sorts a captured character's bags and bank into what to equip, keep for professions, hand in for quests, vendor, bank, or leave alone. The rules are in docs/inventory.md.

Nothing is guessed: an item the dataset does not know, a price the dataset does not hold and a quest link the capture does not state are each reported as unknown.

Index

Constants

This section is empty.

Variables

Order is the precedence of the groups, and the order Render lists them.

Functions

func Money

func Money(c int64) string

Money formats copper as gold, silver and copper.

func Render

func Render(r Result) string

Render is the plain-text form of a result.

Types

type Entry

type Entry struct {
	ItemID    int64
	Name      string
	Count     int
	Where     string // "bags" or "bank"
	Group     Group
	Reason    string
	SellPrice *int64 // copper per item; nil when the dataset has no price
}

Entry is one stack and why it is in its group.

type Group

type Group string

Group is where an item belongs. An item takes the first group that fits, in this order.

const (
	Equip   Group = "equip"
	Keep    Group = "keep"
	Quest   Group = "quest"
	Vendor  Group = "vendor"
	Bank    Group = "bank"
	Unknown Group = "unknown"
)

type Result

type Result struct {
	Groups map[Group][]Entry
	// VendorValue is the copper the vendor stacks sell for, over the stacks with a known price.
	VendorValue int64
	// VendorUnpriced counts vendor stacks with no known price; VendorValue leaves them out.
	VendorUnpriced int
	// SlotsFreed is the bag slots emptied by vendoring and banking what sits in the bags.
	SlotsFreed int
	Notes      []string
}

Result is what Review found.

func Review

Review groups every bag and bank stack. ds may be nil: items are then placed only by the capture (quest objectives) and everything else is unknown.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL