stashvision

package module
v0.0.0-...-dc8e3b7 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChaosRecipeMinItemLevel = 60
	ChaosRecipeMaxItemLevel = 74
)
View Source
const (
	ArmourCapacity = 8
	WeaponCapacity = 2
)
View Source
const (
	PoeValueTypeWhite     = 0
	PoeValueTypeBlue      = 1
	PoeValueTypeFire      = 4
	PoeValueTypeCold      = 5
	PoeValueTypeLightning = 6
	PoeValueTypeChaos     = 7
)
View Source
const (
	PoeFrameTypeNormal    = iota
	PoeFrameTypeMagic     = iota
	PoeFrameTypeRare      = iota
	PoeFrameTypeUnique    = iota
	PoeFrameTypeGem       = iota
	PoeFrameTypeCurrency  = iota
	PoeFrameTypeDivCard   = iota
	PoeFrameTypeQuestItem = iota
	PoeFrameTypeProphecy  = iota
	PoeFrameTypeRelic     = iota
)
View Source
const PoeQuadTabSize = 24 * 24
View Source
const (
	Version string = "0.1.0"
)

Variables

View Source
var RecipeFactories = make(map[string]RecipeFactory)

Functions

func ClearIndexFromQuery

func ClearIndexFromQuery(querystring string, index bleve.Index) error

func CreateOrOpenIndex

func CreateOrOpenIndex(runtimeConfig *map[string]interface{}) (bleve.Index, error)

func IndexStashItem

func IndexStashItem(item PoeStashItem, batch bleve.Batch) error

func IndexStashItems

func IndexStashItems(items []PoeStashItem, index bleve.Index, clearTabIndex int) error

func IsClassTwoHandedWeapon

func IsClassTwoHandedWeapon(class string) (bool, error)

func RegisterRecipe

func RegisterRecipe(name string, factory RecipeFactory)

func RunServer

func RunServer(poeSessionId string, accountName string, leagueName string, tabIndex int, index *bleve.Index)

Types

type Currency

type Currency struct {
	Value int
	Name  string
}

type ItemSet

type ItemSet struct {
	UUID                       uuid.UUID
	ClassToItems               map[string][]PoeStashItem
	MinItemLevel, MaxItemLevel int
	// contains filtered or unexported fields
}

func NewItemSet

func NewItemSet(minItemLevel int, maxItemlevel int) (*ItemSet, error)

func (*ItemSet) AddStashItem

func (s *ItemSet) AddStashItem(item PoeStashItem, weaponGreedy bool) error

func (*ItemSet) IsFull

func (s *ItemSet) IsFull() bool

func (*ItemSet) Items

func (s *ItemSet) Items() (items []PoeStashItem)

func (*ItemSet) RemoveAllWeapons

func (s *ItemSet) RemoveAllWeapons()

type PoeItemProperty

type PoeItemProperty struct {
	DisplayMode int            `json:"displayMode"`
	Name        string         `json:"name"`
	Type        int            `json:"type"`
	Values      []PoeItemValue `json:"values"`
}

type PoeItemValue

type PoeItemValue struct {
	Value          string  `json:"value"`
	EffectiveValue float64 `json:"effectiveValue"`
	ValueType      int     `json:"valueType"`
}

type PoeSession

type PoeSession struct {
	// contains filtered or unexported fields
}

func (*PoeSession) GetStashItems

func (s *PoeSession) GetStashItems(accountName string, league string, tabs int, tabIndex int) (items []PoeStashItem, err error)

type PoeStashItem

type PoeStashItem struct {
	Class       string            `json:"class"`
	Corrupted   int8              `json:"corrupted"`
	FrameType   string            `json:"frameType"`
	Height      int               `json:"h"`
	Icon        string            `json:"icon"`
	ID          string            `json:"id"`
	Identified  int8              `json:"identified"`
	ItemLevel   int               `json:"ilvl"`
	InventoryId string            `json:"inventoryId"`
	League      string            `json:"league"`
	Name        string            `json:"name"`
	NumLinks    int               `json:"numLinks"`
	NumSockets  int               `json:"numSockets"`
	Properties  []PoeItemProperty `json:"properties"`
	TabIndex    int               `json:"tabIndex"`
	TypeLine    string            `json:"typeLine"`
	Verified    int8              `json:"verified"`
	Width       int               `json:"w"`
	X           int               `json:"x"`
	Y           int               `json:"y"`
}

func QueryIndex

func QueryIndex(querystring string, index bleve.Index, searchSize int) (items []PoeStashItem, err error)

func (*PoeStashItem) PositionString

func (i *PoeStashItem) PositionString() string

func (*PoeStashItem) ToString

func (i *PoeStashItem) ToString() string

type PoeStashItemSet

type PoeStashItemSet struct {
	// contains filtered or unexported fields
}

func NewPoeStashItemSet

func NewPoeStashItemSet() *PoeStashItemSet

func (*PoeStashItemSet) AddItem

func (s *PoeStashItemSet) AddItem(item PoeStashItem) error

func (*PoeStashItemSet) HasItem

func (s *PoeStashItemSet) HasItem(item PoeStashItem) bool

type Recipe

type Recipe interface {
	ScanIndex(item *PoeStashItem, tabIndex int, index bleve.Index, findAll bool) (results []RecipeResult, err error)
}

func NewUnidChaosRecipe

func NewUnidChaosRecipe() (Recipe, error)

type RecipeFactory

type RecipeFactory func() (Recipe, error)

type RecipeResult

type RecipeResult struct {
	Items  []PoeStashItem
	Reward Reward
}

type Reward

type Reward struct {
	Currency *Currency
	Item     *string
}

type UnidChaosRecipe

type UnidChaosRecipe struct{}

func (*UnidChaosRecipe) ScanIndex

func (c *UnidChaosRecipe) ScanIndex(targetItem *PoeStashItem, tabIndex int, index bleve.Index, findAll bool) (results []RecipeResult, err error)

Jump to

Keyboard shortcuts

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