Documentation ¶
Index ¶
Constants ¶
const ( // Bop is missing reason for item is bind on pickup Bop = "bop" // NoAuctions is missing reason for item is tradeable, but no active auctions NoAuctions = "noAuctions" // Craft signifies the item is cheaper to craft Craft = "Craft" // Buy signifies the item is cheaper to buy Buy = "Buy" // Valuation signifies this is a custom valuation for an item Valuation = "Value" // AlchemyProcRate is the average potions created per 1 recipe // TODO shadowlands 9.0, find a better way to distinguish bfa and shadowlands recipes AlchemyProcRate = 1.00 )
Variables ¶
This section is empty.
Functions ¶
func ItemRankKey ¶
Types ¶
type BgTraversal ¶
type BgTraversal struct { DbAccessor *db.Accessor BnetAccessor *bnet.Accessor ValuationAccessor *ValuationAccessor AucAccessor *auction.Accessor EnableValuations bool // contains filtered or unexported fields }
BgTraversal holds accessors used to perform a recipe tree traversal
func NewBGTAccessor ¶
func NewBGTAccessor(dbAccessor *db.Accessor, bnetAccessor *bnet.Accessor, aucAccessor *auction.Accessor, cacheAccessor cache.ICache, enableValuations bool) *BgTraversal
NewBGTAccessor creates a new buyer's guide tree accessor
func (*BgTraversal) BgCreateReagentTree ¶
func (bgt *BgTraversal) BgCreateReagentTree(abLog *model.AucBotContext, startItem *model.RankedItem, profFilter string, options model.ValuationOptions, prePrices map[string]int) (*model.PriceTreeNode, error)
BgCreateReagentTree constructs a complete recipe tree including full component prices at every level. Prices are always multiplied by quantity, every price is for ALL items in the stack (price of one * quantity). BgCreateReagentTree uses auction.GetPercentile12PriceForItem for all price results. pass -1 to create a tree for a normal item (not being used for a valuation function). Supply prePrices of map of key from ItemRankKey() -> pct12 price
func (*BgTraversal) BgItemsInTree ¶
func (bgt *BgTraversal) BgItemsInTree(abLog *model.AucBotContext, startItem *model.RankedItem, profFilter string) ([]int, error)
BgItemsInTree returns a list of items which are in the recipe tree for the starting item.
type SortedRecipeComponents ¶
type SortedRecipeComponents []*model.PriceTreeNode
SortedRecipeComponents are sorted recipe components
func (SortedRecipeComponents) Len ¶
func (a SortedRecipeComponents) Len() int
func (SortedRecipeComponents) Less ¶
func (a SortedRecipeComponents) Less(i, j int) bool
func (SortedRecipeComponents) Swap ¶
func (a SortedRecipeComponents) Swap(i, j int)
type ValuationAccessor ¶
type ValuationAccessor struct { DbAccessor *db.Accessor BnetAccessor *bnet.Accessor BgTraversal *BgTraversal CacheAccessor cache.ICache AucAccessor *auction.Accessor }
ValuationAccessor holds accessors needed to retrieve the price value for an item, for use in a recipe tree.