Documentation
¶
Index ¶
- Variables
- type BasicItem
- type BasicNetworthItem
- type CalculationData
- type CategoryInfo
- type DecodedDisplay
- type DecodedInventory
- type DecodedNewYearCakeBagData
- type GemstoneCost
- type GemstoneSlot
- type Handler
- type HypixelItem
- type HypixelItemsResponse
- type ItemProvider
- type Level
- type NetworthItem
- func (item *NetworthItem) Calculate(handlers []Handler)
- func (item *NetworthItem) GetBasePrice()
- func (item *NetworthItem) GetCalculation() []CalculationData
- func (item *NetworthItem) GetPrice() float64
- func (item *NetworthItem) IsCosmetic() bool
- func (item *NetworthItem) IsRecombobulated() bool
- func (item *NetworthItem) IsSoulbound() bool
- type NetworthItemResult
- type NetworthOptions
- type NetworthPet
- type NetworthResult
- type NetworthType
- type ParsedItems
- type PetHandler
- type PrestigeCost
- type UpgradeCost
Constants ¶
This section is empty.
Variables ¶
View Source
var REMOVE_COLOR_CODES_REGEX = regexp.MustCompile(`§[0-9a-fk-orA-FK-OR]`)
View Source
var REMOVE_PERCENTAGE_COLOR_CODES_REGEX = regexp.MustCompile(`%%[^%]+%%`)
Functions ¶
This section is empty.
Types ¶
type BasicNetworthItem ¶
type BasicNetworthItem struct {
ItemId string `json:"itemId"`
Amount int `json:"amount"`
ItemName string `json:"itemName"`
SkyblockItem *HypixelItem `json:"skyblockItem"`
Prices map[string]float64 `json:"prices"`
NonCosmetic bool `json:"nonCosmetic"`
Calculation []CalculationData `json:"calculation"`
BasePrice float64 `json:"basePrice"`
Price float64 `json:"price"`
SoulboundPortion float64 `json:"soulboundPortion"`
}
func NewBasicItemNetworthCalculator ¶
func NewBasicItemNetworthCalculator(item *BasicItem, prices map[string]float64, itemProvider ItemProvider) *BasicNetworthItem
func (*BasicNetworthItem) Calculate ¶
func (item *BasicNetworthItem) Calculate()
type CalculationData ¶
type CategoryInfo ¶
type CategoryInfo struct {
Items interface{}
Type string // "decoded", "basic", "pets"
}
type DecodedDisplay ¶
type DecodedInventory ¶
type DecodedInventory struct {
Items []skycrypttypes.Item `nbt:"i" json:"items,omitempty"`
}
type DecodedNewYearCakeBagData ¶
type DecodedNewYearCakeBagData struct {
Items []skycrypttypes.Item `nbt:"i" json:"items,omitempty"`
}
type GemstoneCost ¶
type GemstoneSlot ¶
type GemstoneSlot struct {
SlotType string `json:"slot_type"`
Costs []GemstoneCost `json:"costs"`
}
type Handler ¶
type Handler interface {
Applies(item *NetworthItem) bool
Calculate(item *NetworthItem, prices map[string]float64)
IsCosmetic() bool
}
type HypixelItem ¶
type HypixelItem struct {
Material string `json:"material"`
Skin skin `json:"skin,omitempty"`
Name string `json:"name"`
Category string `json:"category"`
Rarity string `json:"tier"`
SkyBlockID string `json:"id,omitempty"`
Damage int `json:"damage,omitempty"`
Origin string `json:"origin,omitempty"`
RiftTransferrable bool `json:"rift_transferrable,omitempty"`
UpgradeCosts [][]UpgradeCost `json:"upgrade_costs,omitempty"`
GemstoneSlots []GemstoneSlot `json:"gemstone_slots,omitempty"`
Prestige PrestigeCost `json:"prestige,omitempty"`
}
type HypixelItemsResponse ¶
type HypixelItemsResponse struct {
Success bool `json:"success"`
Cause string `json:"cause,omitempty"`
LastUpdated int64 `json:"lastUpdated"`
Items []HypixelItem `json:"items"`
}
type ItemProvider ¶
type ItemProvider interface {
GetItem(itemId string) *HypixelItem
}
ItemProvider is an interface for getting item data
type NetworthItem ¶
type NetworthItem struct {
ItemName string `json:"itemName"`
ExtraAttributes *skycrypttypes.ExtraAttributes `json:"extraAttributes"`
ItemId string `json:"itemId"`
SkyblockItem *HypixelItem `json:"skyblockItem"`
ItemLore []string `json:"itemLore"`
Count int `json:"count"`
BaseItemId string `json:"baseItemId"`
Prices map[string]float64 `json:"prices"`
NonCosmetic bool `json:"nonCosmetic"`
Calculation []CalculationData `json:"calculation"`
BasePrice float64 `json:"basePrice"`
Price float64 `json:"price"`
SoulboundPortion float64 `json:"soulboundPortion"`
}
func NewSkyBlockItemCaclulator ¶
func NewSkyBlockItemCaclulator(item *skycrypttypes.Item, prices map[string]float64, itemProvider ItemProvider, options NetworthOptions) *NetworthItem
func (*NetworthItem) Calculate ¶
func (item *NetworthItem) Calculate(handlers []Handler)
func (*NetworthItem) GetBasePrice ¶
func (item *NetworthItem) GetBasePrice()
func (*NetworthItem) GetCalculation ¶
func (item *NetworthItem) GetCalculation() []CalculationData
func (*NetworthItem) GetPrice ¶
func (item *NetworthItem) GetPrice() float64
func (*NetworthItem) IsCosmetic ¶
func (item *NetworthItem) IsCosmetic() bool
func (*NetworthItem) IsRecombobulated ¶
func (item *NetworthItem) IsRecombobulated() bool
func (*NetworthItem) IsSoulbound ¶
func (item *NetworthItem) IsSoulbound() bool
type NetworthItemResult ¶
type NetworthItemResult struct {
Name string `json:"name"`
LoreName string `json:"loreName"`
Id string `json:"id"`
CustomId string `json:"customId"`
Price float64 `json:"price"`
SoulboundPortion float64 `json:"soulboundPortion"`
BasePrice float64 `json:"basePrice"`
Calculation []CalculationData `json:"calculation"`
Count int `json:"count"`
Soulbound bool `json:"soulbound"`
Cosmetic bool `json:"cosmetic"`
ItemData interface{} `json:"itemData,omitempty"`
}
type NetworthOptions ¶
type NetworthPet ¶
type NetworthPet struct {
PetData skycrypttypes.Pet `json:"petData"`
NonCosmetic bool `json:"nonCosmetic"`
Skin string `json:"string"`
BasePetId string `json:"basePetId"`
PetId string `json:"petId"`
Level Level `json:"level"`
PetName string `json:"petName"`
Prices map[string]float64 `json:"prices"`
Calculation []CalculationData `json:"calculation"`
BasePrice float64 `json:"basePrice"`
Price float64 `json:"price"`
}
func NewSkyBlockPetCalculator ¶
func NewSkyBlockPetCalculator(item *skycrypttypes.Pet, prices map[string]float64, options NetworthOptions) *NetworthPet
func (*NetworthPet) Calculate ¶
func (item *NetworthPet) Calculate(handlers []PetHandler)
func (*NetworthPet) GetCalculation ¶
func (item *NetworthPet) GetCalculation() []CalculationData
func (*NetworthPet) GetPetId ¶
func (item *NetworthPet) GetPetId() string
func (*NetworthPet) GetPrice ¶
func (item *NetworthPet) GetPrice() float64
func (*NetworthPet) IsCosmetic ¶
func (item *NetworthPet) IsCosmetic() bool
func (*NetworthPet) IsSoulbound ¶
func (item *NetworthPet) IsSoulbound() bool
type NetworthResult ¶
type NetworthResult struct {
Networth float64 `json:"networth"`
UnsoulboundNetworth float64 `json:"unsoulboundNetworth"`
NoInventory bool `json:"noInventory"`
IsNonCosmetic bool `json:"isNonCosmetic"`
Purse float64 `json:"purse"`
Bank float64 `json:"bank"`
PersonalBank float64 `json:"personalBank"`
Types map[string]*NetworthType `json:"types"`
}
type NetworthType ¶
type NetworthType struct {
Total float64 `json:"total"`
UnsoulboundTotal float64 `json:"unsoulboundTotal"`
Items []NetworthItemResult `json:"items"`
}
type ParsedItems ¶
type ParsedItems struct {
Accessories []*skycrypttypes.Item `json:"accessories"`
Armor []*skycrypttypes.Item `json:"armor"`
CandyInventory []*skycrypttypes.Item `json:"candy_inventory"`
CarnivalMaskInventory []*skycrypttypes.Item `json:"carnival_mask_inventory"`
Equipment []*skycrypttypes.Item `json:"equipment"`
Enderchest []*skycrypttypes.Item `json:"enderchest"`
Essence []*BasicItem `json:"essence"`
FishingBag []*skycrypttypes.Item `json:"fishing_bag"`
Inventory []*skycrypttypes.Item `json:"inventory"`
PersonalVault []*skycrypttypes.Item `json:"personal_vault"`
Pets []*skycrypttypes.Pet `json:"pets"`
PotionBag []*skycrypttypes.Item `json:"potion_bag"`
Quiver []*skycrypttypes.Item `json:"quiver"`
Sacks []*BasicItem `json:"sacks"`
SacksBag []*skycrypttypes.Item `json:"sacks_bag"`
Storage []*skycrypttypes.Item `json:"storage"`
Wardrobe []*skycrypttypes.Item `json:"wardrobe"`
Museum []*skycrypttypes.Item `json:"museum"`
}
type PetHandler ¶
type PetHandler interface {
Applies(pet *NetworthPet) bool
Calculate(pet *NetworthPet, prices map[string]float64)
IsCosmetic() bool
}
type PrestigeCost ¶
type PrestigeCost struct {
ItemId string `json:"item_id"`
Costs []UpgradeCost `json:"costs"`
}
Click to show internal directories.
Click to hide internal directories.