sd

package
v0.0.0-...-2d88998 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	G_C_Depose_Frag string = "5" // 普通品质分解获得碎片数
	G_C_xxx_Frag    string = "3" // 普通品质分解获得碎片数
)

Variables

View Source
var (
	GlobalMgr = newGlobalManager()
	TestMgr   = newTestManager()
	Test2Mgr  = newTest2Manager()
)

Functions

func AfterLoadAll

func AfterLoadAll() (success bool)

func LoadAll

func LoadAll() (success bool)

Types

type Global

type Global struct {
	ID int64 `excel_column:"0" excel_name:"id"` // 公共配置表ID

	Name string `excel_column:"1" excel_name:"name"` // 配置名

	Value string `excel_column:"2" excel_name:"value"` // 配置值

	Desc string `excel_column:"3" excel_name:"desc"` // 配置说明

}

func NewGlobal

func NewGlobal() *Global

func (Global) Clone

func (sd Global) Clone() *Global

func (Global) String

func (sd Global) String() string

type GlobalManager

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

////////////////////////////////////////////////////////////////////////////////////////////////////

func (*GlobalManager) AfterLoadAll

func (mgr *GlobalManager) AfterLoadAll(fileName string) (success bool)

func (GlobalManager) Each

func (mgr GlobalManager) Each(f func(sd *Global) bool)

func (GlobalManager) FindIf

func (mgr GlobalManager) FindIf(f func(sd *Global) bool) *Global

func (GlobalManager) Get

func (mgr GlobalManager) Get(id int64) *Global

func (*GlobalManager) Load

func (mgr *GlobalManager) Load(data []byte, fileName string) (success bool)

func (GlobalManager) Size

func (mgr GlobalManager) Size() int

type Item

type Item [2]int

func (Item) Clone

func (sd Item) Clone() (nsd Item)

type Reward

type Reward struct {
	Type int `json:"类型"`
	Num  int `json:"数量"`
}

func (Reward) Clone

func (sd Reward) Clone() (nsd Reward)

type Test

type Test struct {
	ID int64 `excel_column:"1" excel_name:"id"` // 整型

	Tb bool `excel_column:"2" excel_name:"tb"` // sfsg

	Time time.Duration `excel_column:"4" excel_name:"time"` // 时间

	IntArray []int `excel_column:"5" excel_name:"int_array"` // 整型数组

	Int2dArray [][]int `excel_column:"6" excel_name:"int_2d_array"` // 二维整型数组

	StringArray []string `excel_column:"7" excel_name:"string_array"` // 字符串数组

	String2dArray [][]string `excel_column:"8" excel_name:"string_2d_array"` // 二维字符串数组

	Float float64 `excel_column:"9" excel_name:"float"` // 浮点

	FloatArr []float64 `excel_column:"10" excel_name:"float_arr"` // 浮点数组

	Float2dArr [][]float64 `excel_column:"11" excel_name:"float_2d_arr"` // 浮点二维数组

	Reward Reward `excel_column:"12" excel_name:"reward"` // 对象2

	RewardArr []Reward `excel_column:"13" excel_name:"reward_arr"` // 对象2数组

	Reward2darr [][]Reward `excel_column:"14" excel_name:"reward_2darr"` // 对象2二维数组

	Item Item `excel_column:"15" excel_name:"item"` // 对象

	ItemArr []Item `excel_column:"16" excel_name:"item_arr"` // 对象数组

}

func NewTest

func NewTest() *Test

func (Test) Clone

func (sd Test) Clone() *Test

func (Test) String

func (sd Test) String() string

type Test2

type Test2 struct {
	ID int64 `excel_column:"1" excel_name:"id"` // 船只ID

	Name string `excel_column:"3" excel_name:"name"` // 名字

	Icon string `excel_column:"4" excel_name:"icon"` // 头像资源

	Quality int `excel_column:"5" excel_name:"quality"` // 品质

	Type int `excel_column:"6" excel_name:"type"` // 类型

	Str int `excel_column:"7" excel_name:"str"` // 船只初始攻击

	SailorStr int `excel_column:"8" excel_name:"sailor_str"` // 水手初始攻击

	Def int `excel_column:"9" excel_name:"def"` // 船只初始耐久

	Sailors int `excel_column:"10" excel_name:"sailors"` // 船只搭载水手数量

	SailorLimit int `excel_column:"11" excel_name:"sailor_limit"` // 出港保底水手数

	Power int `excel_column:"12" excel_name:"power"` // 船只初始推进力

	Carrying int `excel_column:"13" excel_name:"carrying"` // 船只初始载货量

	StrLimit int `excel_column:"14" excel_name:"str_limit"` // 船只攻击改造上限值

	DefLimit int `excel_column:"15" excel_name:"def_limit"` // 船只耐久改造上限值

	SailorsLimit int `excel_column:"16" excel_name:"sailors_limit"` // 船只搭载水手数量改造上限值

	PowerLimit int `excel_column:"17" excel_name:"power_limit"` // 船只推进力改造上限值

	CarryingLimit int `excel_column:"18" excel_name:"carrying_limit"` // 船只载货量改造上限值

	ItemTypeID int `excel_column:"19" excel_name:"item_type_id"` // 材料表中对应专属订造材料id

	MakeMoney int `excel_column:"20" excel_name:"make_money"` // 订造价格

	TransformationMoney int `excel_column:"21" excel_name:"transformation_money"` // 改造价格

	SellMoney int `excel_column:"22" excel_name:"sell_money"` // 出售价格

	FormulaShipID int `excel_column:"23" excel_name:"formula_ship_id"` // 对应合成表中船图纸id

}

func NewTest2

func NewTest2() *Test2

func (Test2) Clone

func (sd Test2) Clone() *Test2

func (Test2) String

func (sd Test2) String() string

type Test2Manager

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

////////////////////////////////////////////////////////////////////////////////////////////////////

func (*Test2Manager) AfterLoadAll

func (mgr *Test2Manager) AfterLoadAll(fileName string) (success bool)

func (Test2Manager) Each

func (mgr Test2Manager) Each(f func(sd *Test2) bool)

func (Test2Manager) FindIf

func (mgr Test2Manager) FindIf(f func(sd *Test2) bool) *Test2

func (Test2Manager) Get

func (mgr Test2Manager) Get(id int64) *Test2

func (*Test2Manager) Load

func (mgr *Test2Manager) Load(data []byte, fileName string) (success bool)

func (Test2Manager) Size

func (mgr Test2Manager) Size() int

type Test3

type Test3 struct {
	ID int64 `excel_column:"1" excel_name:"id"` // 船只ID

	Name string `excel_column:"3" excel_name:"name"` // 名字

	Icon string `excel_column:"4" excel_name:"icon"` // 头像资源

	Quality int `excel_column:"5" excel_name:"quality"` // 品质

	Type int `excel_column:"6" excel_name:"type"` // 类型

	Str int `excel_column:"7" excel_name:"str"` // 船只初始攻击

	SailorStr int `excel_column:"8" excel_name:"sailor_str"` // 水手初始攻击

	Def int `excel_column:"9" excel_name:"def"` // 船只初始耐久

	Sailors int `excel_column:"10" excel_name:"sailors"` // 船只搭载水手数量

	SailorLimit int `excel_column:"11" excel_name:"sailor_limit"` // 出港保底水手数

	Power int `excel_column:"12" excel_name:"power"` // 船只初始推进力

	Carrying int `excel_column:"13" excel_name:"carrying"` // 船只初始载货量

	StrLimit int `excel_column:"14" excel_name:"str_limit"` // 船只攻击改造上限值

	DefLimit int `excel_column:"15" excel_name:"def_limit"` // 船只耐久改造上限值

	SailorsLimit int `excel_column:"16" excel_name:"sailors_limit"` // 船只搭载水手数量改造上限值

	PowerLimit int `excel_column:"17" excel_name:"power_limit"` // 船只推进力改造上限值

	CarryingLimit int `excel_column:"18" excel_name:"carrying_limit"` // 船只载货量改造上限值

	ItemTypeID int `excel_column:"19" excel_name:"item_type_id"` // 材料表中对应专属订造材料id

	MakeMoney int `excel_column:"20" excel_name:"make_money"` // 订造价格

	TransformationMoney int `excel_column:"21" excel_name:"transformation_money"` // 改造价格

	SellMoney int `excel_column:"22" excel_name:"sell_money"` // 出售价格

	FormulaShipID int `excel_column:"23" excel_name:"formula_ship_id"` // 对应合成表中船图纸id

}

func NewTest3

func NewTest3() *Test3

func (Test3) Clone

func (sd Test3) Clone() *Test3

func (Test3) String

func (sd Test3) String() string

type Test3Manager

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

////////////////////////////////////////////////////////////////////////////////////////////////////

func (*Test3Manager) AfterLoadAll

func (mgr *Test3Manager) AfterLoadAll(fileName string) (success bool)

func (Test3Manager) Each

func (mgr Test3Manager) Each(f func(sd *Test3) bool)

func (Test3Manager) FindIf

func (mgr Test3Manager) FindIf(f func(sd *Test3) bool) *Test3

func (Test3Manager) Get

func (mgr Test3Manager) Get(id int64) *Test3

func (*Test3Manager) Load

func (mgr *Test3Manager) Load(data []byte, fileName string) (success bool)

func (Test3Manager) Size

func (mgr Test3Manager) Size() int

type TestManager

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

////////////////////////////////////////////////////////////////////////////////////////////////////

func (*TestManager) AfterLoadAll

func (mgr *TestManager) AfterLoadAll(fileName string) (success bool)

func (TestManager) Each

func (mgr TestManager) Each(f func(sd *Test) bool)

func (TestManager) FindIf

func (mgr TestManager) FindIf(f func(sd *Test) bool) *Test

func (TestManager) Get

func (mgr TestManager) Get(id int64) *Test

func (*TestManager) Load

func (mgr *TestManager) Load(data []byte, fileName string) (success bool)

func (TestManager) Size

func (mgr TestManager) Size() int

Jump to

Keyboard shortcuts

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