vendors

package
v0.7.39 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 3 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 vendors finds who sells an item, from the dataset's vendor_sources table (offers players saw in game and reported to Everloot, CC BY-SA 4.0). The rules are in docs/upgrade-paths.md.

Index

Constants

View Source
const (
	Source = "everloot"
	Credit = "Everloot (CC BY-SA)"
)

Source tags the facts as Everloot's; Credit is the attribution line for an answer's sources.

View Source
const CheapPerBand = 10000

CheapPerBand is the price, in copper, a vendor path may cost per ten levels of the character's level band (level/10 + 1 bands) to count as cheap: 1 gold at levels 1-9, 2 gold at 10-19, and so on.

Variables

This section is empty.

Functions

func Money

func Money(c int64) string

Money writes copper as gold, silver and copper; "" for a price of zero or less.

Types

type Offer

type Offer struct {
	NPCID       int64  `json:"-"`
	Vendor      string `json:"vendor"`
	Zone        string `json:"zone,omitempty"`
	PriceCopper int64  `json:"price_copper"`
	Price       string `json:"price,omitempty" jsonschema:"the price in gold, silver and copper; empty when the price is unknown"`
	Limited     bool   `json:"limited,omitempty" jsonschema:"the vendor has limited stock"`
	Source      string `json:"source" jsonschema:"everloot"`
}

Offer is one vendor selling one item.

func Best

func Best(ds store.DataStore, itemID int64) (Offer, bool)

Best is the cheapest offer for the item (a known price before an unknown one, then the lowest NPC id), or false when the table is missing or has no vendor for it. A vendor the dataset does not name is skipped: advice never points at "vendor 1234".

func (Offer) Cheap

func (o Offer) Cheap(level int) bool

Cheap reports whether the price is modest for a character of the level: at or under CheapPerBand copper for each band of ten levels. An unknown price is never cheap.

func (Offer) Line

func (o Offer) Line() string

Line is "Buy from <vendor> in <zone> for <price>", with "limited stock" when it is limited.

Jump to

Keyboard shortcuts

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