pob

package
v0.0.0-...-25a4f9c Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: GPL-3.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ViewModeTree   = BuildViewMode("TREE")
	ViewModeItems  = BuildViewMode("ITEMS")
	ViewModeImport = BuildViewMode("IMPORT")
	ViewModeNotes  = BuildViewMode("NOTES")
	ViewModeConfig = BuildViewMode("CONFIG")
	ViewModeSkills = BuildViewMode("SKILLS")
	ViewModeCalc   = BuildViewMode("CALC")
)
View Source
const (
	GameVersion3_0 = GameVersion("3_0")
)
View Source
const LiveTargetVersion = GameVersion3_0

Variables

View Source
var AscendancyNameByID = map[AscendancyID]AscendancyName{
	Ascendant:    "Ascendant",
	Assassin:     "Assassin",
	Berserker:    "Berserker",
	Champion:     "Champion",
	Chieftain:    "Chieftain",
	Deadeye:      "Deadeye",
	Elementalist: "Elementalist",
	Gladiator:    "Gladiator",
	Guardian:     "Guardian",
	Hierophant:   "Hierophant",
	Inquisitor:   "Inquisitor",
	Juggernaut:   "Juggernaut",
	Necromancer:  "Necromancer",
	Occultist:    "Occultist",
	Pathfinder:   "Pathfinder",
	Raider:       "Raider",
	Saboteur:     "Saboteur",
	Slayer:       "Slayer",
	Trickster:    "Trickster",
}
View Source
var ClassNameByID = map[ClassID]ClassName{
	Scion:    "Scion",
	Marauder: "Marauder",
	Ranger:   "Ranger",
	Witch:    "Witch",
	Duelist:  "Duelist",
	Templar:  "Templar",
	Shadow:   "Shadow",
}

Functions

func CompressEncode

func CompressEncode(xml string) (string, error)

func DecodeDecompress

func DecodeDecompress(code string) (string, error)

Types

type AscendancyID

type AscendancyID int
const (
	Ascendant AscendancyID = iota
	Assassin
	Berserker
	Champion
	Chieftain
	Deadeye
	Elementalist
	Gladiator
	Guardian
	Hierophant
	Inquisitor
	Juggernaut
	Necromancer
	Occultist
	Pathfinder
	Raider
	Saboteur
	Slayer
	Trickster
)

type AscendancyName

type AscendancyName string

type Build

type Build struct {
	PantheonMinorGod string         `xml:"pantheonMinorGod,attr"` // TODO Enum
	PantheonMajorGod string         `xml:"pantheonMajorGod,attr"` // TODO Enum
	Bandit           string         `xml:"bandit,attr"`           // TODO Enum
	ViewMode         BuildViewMode  `xml:"viewMode,attr"`
	ClassName        ClassName      `xml:"className,attr"`
	AscendClassName  AscendancyName `xml:"ascendClassName,attr"`
	Level            int            `xml:"level,attr"`
	MainSocketGroup  int            `xml:"mainSocketGroup,attr"`
	TargetVersion    GameVersion    `xml:"targetVersion,attr"`
	PassiveNodes     []int64

	PlayerStats []PlayerStat `xml:"PlayerStat" crystalline:"not_nil"`
}

type BuildViewMode

type BuildViewMode string

type Calcs

type Calcs struct {
	Inputs   []Input   `xml:"Input" crystalline:"not_nil"`
	Sections []Section `xml:"Section" crystalline:"not_nil"`
}

type ClassID

type ClassID int
const (
	Scion ClassID = iota
	Marauder
	Ranger
	Witch
	Duelist
	Templar
	Shadow
)

type ClassName

type ClassName string

type Config

type Config struct {
	Inputs       []Input `xml:"Input" crystalline:"not_nil"`
	Placeholders []Input `xml:"Placeholder" crystalline:"not_nil"`
}

type GameVersion

type GameVersion string

type Gem

type Gem struct {
	Quality            int    `xml:"quality,attr"`
	SkillPart          int    `xml:"skillPart,attr"`
	EnableGlobal2      bool   `xml:"enableGlobal2,attr"`
	SkillPartCalcs     int    `xml:"skillPartCalcs,attr"`
	QualityID          string `xml:"qualityId,attr"`
	GemID              string `xml:"gemId,attr"`
	Enabled            bool   `xml:"enabled,attr"`
	Count              int    `xml:"count,attr"`
	EnableGlobal1      bool   `xml:"enableGlobal1,attr"`
	NameSpec           string `xml:"nameSpec,attr"`
	Level              int    `xml:"level,attr"`
	SkillID            string `xml:"skillId,attr"`
	SkillMinionItemSet int    `xml:"skillMinionItemSet,attr"`
	SkillMinion        string `xml:"skillMinion,attr"`
}

type Input

type Input struct {
	Name    string   `xml:"name,attr"`
	Boolean *bool    `xml:"boolean,attr"`
	Number  *float64 `xml:"number,attr"`
	String  *string  `xml:"string,attr"`
}

type Item

type Item struct {
	ID   int    `xml:"id,attr"`
	Text string `xml:",innerxml"`
}

type ItemSet

type ItemSet struct {
	ID                 string `xml:"id,attr"`
	UseSecondWeaponSet *bool  `xml:"useSecondWeaponSet,attr,omitempty"`

	Slots []Slot `xml:"Slot"`
}

type Items

type Items struct {
	ActiveItemSet      int   `xml:"activeItemSet,attr"`
	UseSecondWeaponSet *bool `xml:"useSecondWeaponSet,attr,omitempty"`

	ItemSets []ItemSet `xml:"ItemSet" crystalline:"not_nil"`
	Items    []Item    `xml:"Item"`
}

type OilType

type OilType string

type PathOfBuilding

type PathOfBuilding struct {
	Build    Build    `xml:"Build"`
	Tree     Tree     `xml:"Tree"`
	Calcs    Calcs    `xml:"Calcs"`
	Notes    string   `xml:"Notes"`
	Items    Items    `xml:"Items"`
	Skills   Skills   `xml:"Skills"`
	TreeView TreeView `xml:"TreeView"`
	Config   Config   `xml:"Config"`
}

func (*PathOfBuilding) AddNewSocketGroup

func (b *PathOfBuilding) AddNewSocketGroup()

func (*PathOfBuilding) AllocateNodes

func (b *PathOfBuilding) AllocateNodes(nodeIds []int64)

func (*PathOfBuilding) DeallocateNodes

func (b *PathOfBuilding) DeallocateNodes(nodeIds []int64)

func (*PathOfBuilding) DeleteAllSocketGroups

func (b *PathOfBuilding) DeleteAllSocketGroups()

func (*PathOfBuilding) DeleteSocketGroup

func (b *PathOfBuilding) DeleteSocketGroup(index int)

func (*PathOfBuilding) GetBooleanOption

func (b *PathOfBuilding) GetBooleanOption(name string) bool

func (*PathOfBuilding) GetNumberOption

func (b *PathOfBuilding) GetNumberOption(name string) float64

func (*PathOfBuilding) GetStringOption

func (b *PathOfBuilding) GetStringOption(name string) string

func (*PathOfBuilding) RemoveConfigOption

func (b *PathOfBuilding) RemoveConfigOption(name string)

func (*PathOfBuilding) SetAscendancy

func (b *PathOfBuilding) SetAscendancy(ascendancyName AscendancyName)

func (*PathOfBuilding) SetClass

func (b *PathOfBuilding) SetClass(className ClassName)

func (*PathOfBuilding) SetConfigOption

func (b *PathOfBuilding) SetConfigOption(value Input)

func (*PathOfBuilding) SetDefaultGemLevel

func (b *PathOfBuilding) SetDefaultGemLevel(gemLevel int)

func (*PathOfBuilding) SetDefaultGemQuality

func (b *PathOfBuilding) SetDefaultGemQuality(gemQuality int)

func (*PathOfBuilding) SetLevel

func (b *PathOfBuilding) SetLevel(level int)

func (*PathOfBuilding) SetMainSocketGroup

func (b *PathOfBuilding) SetMainSocketGroup(mainSocketGroup int)

func (*PathOfBuilding) SetMatchGemLevelToCharacterLevel

func (b *PathOfBuilding) SetMatchGemLevelToCharacterLevel(enabled bool)

func (*PathOfBuilding) SetShowAltQualityGems

func (b *PathOfBuilding) SetShowAltQualityGems(enabled bool)

func (*PathOfBuilding) SetShowSupportGemTypes

func (b *PathOfBuilding) SetShowSupportGemTypes(gemTypes string)

func (*PathOfBuilding) SetSkillGroupName

func (b *PathOfBuilding) SetSkillGroupName(skillSet int, socketGroup int, label string)

func (*PathOfBuilding) SetSocketGroupGems

func (b *PathOfBuilding) SetSocketGroupGems(skillSet int, socketGroup int, gems []Gem)

func (*PathOfBuilding) SetSortGemsByDPS

func (b *PathOfBuilding) SetSortGemsByDPS(enabled bool)

func (*PathOfBuilding) SetSortGemsByDPSField

func (b *PathOfBuilding) SetSortGemsByDPSField(field string)

func (*PathOfBuilding) WithMainSocketGroup

func (b *PathOfBuilding) WithMainSocketGroup(mainSocketGroup int) *PathOfBuilding

type PlayerStat

type PlayerStat struct {
	Value float64 `xml:"value,attr"`
	Stat  string  `xml:"stat,attr"`
}

type Results

type Results struct {
	AverageHit     float64
	AverageDamage  float64
	AttackRate     float64
	CastRate       float64
	HitChance      float64
	CritChance     float64
	CritMultiplier float64
	TotalDPS       float64
	IgniteDPS      float64
	CullingDPS     float64
	AoERadius      float64
	ManaCost       int
}

type Section

type Section struct {
	Collapsed  bool   `xml:"collapsed,attr"`
	ID         string `xml:"id,attr"`
	Subsection string `xml:"subsection,attr"`
}

type Skill

type Skill struct {
	MainActiveSkillCalcs int    `xml:"mainActiveSkillCalcs,attr"`
	MainActiveSkill      int    `xml:"mainActiveSkill,attr"`
	Label                string `xml:"label,attr"`
	Enabled              bool   `xml:"enabled,attr"`
	IncludeInFullDPS     *bool  `xml:"includeInFullDPS,attr,omitempty"`

	Gems []Gem `xml:"Gem" crystalline:"not_nil"`

	Slot                  string // TODO Slot
	SlotEnabled           bool
	Source                interface{} // TODO Source
	DisplayLabel          string
	DisplaySkillList      interface{}
	DisplaySkillListCalcs interface{}
}

type SkillSet

type SkillSet struct {
	ID int `xml:"id,attr"`

	Skills []Skill `xml:"Skill" crystalline:"not_nil"`
}

type Skills

type Skills struct {
	SortGemsByDPSField            string  `xml:"sortGemsByDPSField,attr"`  // TODO Enum
	ShowSupportGemTypes           string  `xml:"showSupportGemTypes,attr"` // TODO Enum
	DefaultGemLevel               *string `xml:"defaultGemLevel,attr,omitempty"`
	MatchGemLevelToCharacterLevel bool    `xml:"matchGemLevelToCharacterLevel,attr"`
	ShowAltQualityGems            bool    `xml:"showAltQualityGems,attr"`
	DefaultGemQuality             *int    `xml:"defaultGemQuality,attr,omitempty"`
	ActiveSkillSet                int     `xml:"activeSkillSet,attr"`
	SortGemsByDPS                 bool    `xml:"sortGemsByDPS,attr"`

	SkillSets []SkillSet `xml:"SkillSet" crystalline:"not_nil"`
}

type Slot

type Slot struct {
	ItemID int    `xml:"itemId,attr"`
	Name   string `xml:"name,attr"`
}

type Spec

type Spec struct {
	ClassID        ClassID      `xml:"classID,attr"`
	AscendClassID  AscendancyID `xml:"ascendClassID,attr"`
	TreeVersion    TreeVersion  `xml:"treeVersion,attr"` // TODO Enum
	NodesAttr      string       `xml:"nodes,attr"`
	MasteryEffects string       `xml:"masteryEffects,attr"`
	URL            string       `xml:"URL"`
}

type Tree

type Tree struct {
	ActiveSpec int `xml:"activeSpec,attr"`

	Specs []Spec `xml:"Spec" crystalline:"not_nil"`
}

type TreeVersion

type TreeVersion string

type TreeView

type TreeView struct {
	ZoomLevel           int     `xml:"zoomLevel,attr"`
	ZoomX               float64 `xml:"zoomX,attr"`
	ZoomY               float64 `xml:"zoomY,attr"`
	SearchStr           string  `xml:"searchStr,attr"`
	ShowHeatMap         *bool   `xml:"showHeatMap,attr,omitempty"`
	ShowStatDifferences bool    `xml:"showStatDifferences,attr"`
}

Jump to

Keyboard shortcuts

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