item

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptSerial

func DecryptSerial(data []byte) ([]byte, error)

func EncryptSerial

func EncryptSerial(data []byte, seed int32) ([]byte, error)

func GetBtik

func GetBtik() map[string]string

func GetSeedFromSerial

func GetSeedFromSerial(data []byte) (int32, error)

func Hash

func Hash(buffer []byte) uint

func Serialize

func Serialize(item Item, seed int32) ([]byte, error)

Types

type Assets

type Assets []string

type Data

type Data struct {
	Versions Versions `json:"versions"`
	Assets   Assets   `json:"assets"`
}

func (Data) GetBits

func (d Data) GetBits(version uint64) int

func (Data) GetPart

func (d Data) GetPart(i uint64) string

type Item

type Item struct {
	Level        int                              `json:"level"`
	Balance      string                           `json:"balance"`
	Manufacturer string                           `json:"manufacturer"`
	InvData      string                           `json:"inv_data"`
	Parts        []string                         `json:"parts"`
	Generics     []string                         `json:"generics"`
	Overflow     string                           `json:"overflow"`
	Version      uint64                           `json:"version"`
	Wrapper      *pb.OakInventoryItemSaveGameData `json:"wrapper"`
}

func Deserialize

func Deserialize(data []byte) (item Item, err error)

type PartsDatabase

type PartsDatabase map[string]Data

func GetDB

func GetDB() PartsDatabase

func (PartsDatabase) GetData

func (db PartsDatabase) GetData(key string) Data

func (PartsDatabase) GetInventoryBalanceData

func (db PartsDatabase) GetInventoryBalanceData() Data

func (PartsDatabase) GetInventoryData

func (db PartsDatabase) GetInventoryData() Data

func (PartsDatabase) GetManufacturerData

func (db PartsDatabase) GetManufacturerData() Data

type Reader

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

func NewReader

func NewReader(data []byte) *Reader

func (*Reader) Overflow

func (r *Reader) Overflow() string

func (*Reader) ReadInt

func (r *Reader) ReadInt(n int) (uint64, error)

func (*Reader) Remaining

func (r *Reader) Remaining() int

type Version

type Version struct {
	Version uint64 `json:"version"`
	Bits    int    `json:"bits"`
}

type Versions

type Versions []Version

type Writer

type Writer string

func NewWriter

func NewWriter(initial string) *Writer

func (*Writer) GetBytes

func (w *Writer) GetBytes() []byte

func (*Writer) WriteInt

func (w *Writer) WriteInt(v, n int) error

Jump to

Keyboard shortcuts

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