iff

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0, BSD-3-Clause, ISC Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	ItemMap map[uint32]*Item
}

func Load

func Load(log zerolog.Logger, data []byte) (*Archive, error)

func LoadFromPak

func LoadFromPak(log zerolog.Logger, fs pak.FS) (*Archive, error)

type Common

type Common struct {
}

type Course

type Course struct {
	Active bool

	ID    uint32
	Name  string `struct:"[40]byte"`
	Level byte
	Icon  string `struct:"[40]byte"`

	Price            uint32
	DiscountPrice    uint32
	Condition        uint32
	ShopFlag         byte
	MoneyFlag        byte
	TimeFlag         byte
	TimeByte         byte
	Point            uint32
	Unknown          [0x1C]byte
	StartTime        pangya.SystemTime
	EndTime          pangya.SystemTime
	ShortName        string `struct:"[40]byte"`
	LocalizedName    string `struct:"[40]byte"`
	CourseFlag       byte
	PropertyFileName string `struct:"[40]byte"`
	Unknown2         uint32
	CourseSequence   string `struct:"[40]byte"`
	// contains filtered or unexported fields
}

type File added in v0.0.2

type File[T any] struct {
	Header
	Records []T `struct:"size=Header.RecordCount"`
}

func LoadFile added in v0.0.2

func LoadFile[T any](data []byte) (*File[T], error)

func LoadItems added in v0.0.2

func LoadItems(data []byte) (*File[Item], error)
type Header struct {
	RecordCount uint16
	BindingID   uint16
	Version     Version
}

type Item added in v0.0.2

type Item struct {
	Active        bool
	ID            uint32
	Name          string
	Rank          byte
	Icon          string
	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	Point         uint32
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Common        Common
	Model         string
	Quantity      uint16
	Unknown2      [4]uint16
}

type ItemV11_78 added in v0.0.2

type ItemV11_78 struct {
	Active bool

	ID   uint32
	Name string `struct:"[40]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV11_78) Generic added in v0.0.2

func (i ItemV11_78) Generic() Item

type ItemV11_98 added in v0.0.2

type ItemV11_98 struct {
	Active bool

	ID   uint32
	Name string `struct:"[40]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV11_98) Generic added in v0.0.2

func (i ItemV11_98) Generic() Item

type ItemV11_B0 added in v0.0.2

type ItemV11_B0 struct {
	Active bool

	ID   uint32
	Name string `struct:"[64]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV11_B0) Generic added in v0.0.2

func (i ItemV11_B0) Generic() Item

type ItemV11_C0 added in v0.0.2

type ItemV11_C0 struct {
	Active bool

	ID   uint32
	Name string `struct:"[40]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Model         string `struct:"[40]byte"`
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV11_C0) Generic added in v0.0.2

func (i ItemV11_C0) Generic() Item

type ItemV11_C4 added in v0.0.2

type ItemV11_C4 struct {
	Active bool

	ID   uint32
	Name string `struct:"[40]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	Unknown       uint32
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Model         string `struct:"[40]byte"`
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV11_C4) Generic added in v0.0.2

func (i ItemV11_C4) Generic() Item

type ItemV11_D8_1 added in v0.0.2

type ItemV11_D8_1 struct {
	Active bool

	ID   uint32
	Name string `struct:"[64]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	Model         string `struct:"[40]byte"`
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV11_D8_1) Generic added in v0.0.2

func (i ItemV11_D8_1) Generic() Item

type ItemV11_D8_2 added in v0.0.2

type ItemV11_D8_2 struct {
	Active bool

	ID   uint32
	Name string `struct:"[64]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Model         string `struct:"[40]byte"`
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV11_D8_2) Generic added in v0.0.2

func (i ItemV11_D8_2) Generic() Item

type ItemV13_E0 added in v0.0.2

type ItemV13_E0 struct {
	Active bool

	ID   uint32
	Name string `struct:"[40]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	Point         uint32
	Unknown       [0x1C]byte
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Model         string `struct:"[40]byte"`
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV13_E0) Generic added in v0.0.2

func (i ItemV13_E0) Generic() Item

type ItemV13_F8 added in v0.0.2

type ItemV13_F8 struct {
	Active bool

	ID   uint32
	Name string `struct:"[64]byte"`
	Rank byte
	Icon string `struct:"[40]byte"`

	Price         uint32
	DiscountPrice uint32
	Condition     uint32
	ShopFlag      byte
	MoneyFlag     byte
	TimeFlag      byte
	TimeByte      byte
	Point         uint32
	Unknown       [0x1C]byte
	StartTime     pangya.SystemTime
	EndTime       pangya.SystemTime
	Model         string `struct:"[40]byte"`
	Quantity      uint16
	Unknown2      [4]uint16
	// contains filtered or unexported fields
}

func (ItemV13_F8) Generic added in v0.0.2

func (i ItemV13_F8) Generic() Item

type Version added in v0.0.2

type Version uint32
const (
	Version11 Version = 11
	Version13 Version = 13 // US 852, JP 977
)

Jump to

Keyboard shortcuts

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