Documentation ¶
Index ¶
- Constants
- Variables
- func ClearIndexFromQuery(querystring string, index bleve.Index) error
- func CreateOrOpenIndex(runtimeConfig *map[string]interface{}) (bleve.Index, error)
- func IndexStashItem(item PoeStashItem, batch bleve.Batch) error
- func IndexStashItems(items []PoeStashItem, index bleve.Index, clearTabIndex int) error
- func IsClassTwoHandedWeapon(class string) (bool, error)
- func RegisterRecipe(name string, factory RecipeFactory)
- func RunServer(poeSessionId string, accountName string, leagueName string, tabIndex int, ...)
- type Currency
- type ItemSet
- type PoeItemProperty
- type PoeItemValue
- type PoeSession
- type PoeStashItem
- type PoeStashItemSet
- type Recipe
- type RecipeFactory
- type RecipeResult
- type Reward
- type UnidChaosRecipe
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 ConfigDirs configdir.ConfigDir
View Source
var RecipeFactories = make(map[string]RecipeFactory)
Functions ¶
func CreateOrOpenIndex ¶
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 RegisterRecipe ¶
func RegisterRecipe(name string, factory RecipeFactory)
Types ¶
type ItemSet ¶
type ItemSet struct { UUID uuid.UUID ClassToItems map[string][]PoeStashItem MinItemLevel, MaxItemLevel int // contains filtered or unexported fields }
func (*ItemSet) AddStashItem ¶
func (s *ItemSet) AddStashItem(item PoeStashItem, weaponGreedy bool) error
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 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 (*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 ¶
type RecipeFactory ¶
type RecipeResult ¶
type RecipeResult struct { Items []PoeStashItem Reward Reward }
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)
Click to show internal directories.
Click to hide internal directories.