上传配置
This commit is contained in:
parent
0d6dd44a29
commit
77e828e0b4
@ -1,9 +1,9 @@
|
||||
[
|
||||
{
|
||||
"key": 1,
|
||||
"id": "20030001",
|
||||
"grow": 1,
|
||||
"id": "20030003",
|
||||
"type": 1,
|
||||
"interact": 1,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -13,9 +13,9 @@
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"id": "20030001",
|
||||
"grow": 1,
|
||||
"type": 2,
|
||||
"id": "20030003",
|
||||
"type": 1,
|
||||
"interact": 2,
|
||||
"exp": 300,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -25,9 +25,9 @@
|
||||
},
|
||||
{
|
||||
"key": 3,
|
||||
"id": "20030001",
|
||||
"grow": 2,
|
||||
"type": 1,
|
||||
"id": "20030003",
|
||||
"type": 2,
|
||||
"interact": 1,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -37,9 +37,9 @@
|
||||
},
|
||||
{
|
||||
"key": 4,
|
||||
"id": "20030001",
|
||||
"grow": 2,
|
||||
"id": "20030003",
|
||||
"type": 2,
|
||||
"interact": 2,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -55,9 +55,9 @@
|
||||
},
|
||||
{
|
||||
"key": 5,
|
||||
"id": "20030001",
|
||||
"grow": 2,
|
||||
"type": 3,
|
||||
"id": "20030003",
|
||||
"type": 2,
|
||||
"interact": 3,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -67,9 +67,9 @@
|
||||
},
|
||||
{
|
||||
"key": 6,
|
||||
"id": "20030001",
|
||||
"grow": 2,
|
||||
"type": 4,
|
||||
"id": "20030003",
|
||||
"type": 2,
|
||||
"interact": 4,
|
||||
"exp": 100,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -79,9 +79,9 @@
|
||||
},
|
||||
{
|
||||
"key": 7,
|
||||
"id": "20030001",
|
||||
"grow": 3,
|
||||
"type": 1,
|
||||
"id": "20030003",
|
||||
"type": 3,
|
||||
"interact": 1,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -91,9 +91,9 @@
|
||||
},
|
||||
{
|
||||
"key": 8,
|
||||
"id": "20030001",
|
||||
"grow": 3,
|
||||
"type": 2,
|
||||
"id": "20030003",
|
||||
"type": 3,
|
||||
"interact": 2,
|
||||
"exp": 300,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -109,9 +109,9 @@
|
||||
},
|
||||
{
|
||||
"key": 9,
|
||||
"id": "20030002",
|
||||
"grow": 1,
|
||||
"id": "20030001",
|
||||
"type": 1,
|
||||
"interact": 1,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -121,9 +121,9 @@
|
||||
},
|
||||
{
|
||||
"key": 10,
|
||||
"id": "20030002",
|
||||
"grow": 1,
|
||||
"type": 2,
|
||||
"id": "20030001",
|
||||
"type": 1,
|
||||
"interact": 2,
|
||||
"exp": 300,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -133,9 +133,9 @@
|
||||
},
|
||||
{
|
||||
"key": 11,
|
||||
"id": "20030002",
|
||||
"grow": 2,
|
||||
"type": 1,
|
||||
"id": "20030001",
|
||||
"type": 2,
|
||||
"interact": 1,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -145,9 +145,9 @@
|
||||
},
|
||||
{
|
||||
"key": 12,
|
||||
"id": "20030002",
|
||||
"grow": 2,
|
||||
"id": "20030001",
|
||||
"type": 2,
|
||||
"interact": 2,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -157,9 +157,9 @@
|
||||
},
|
||||
{
|
||||
"key": 13,
|
||||
"id": "20030002",
|
||||
"grow": 2,
|
||||
"type": 3,
|
||||
"id": "20030001",
|
||||
"type": 2,
|
||||
"interact": 3,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -169,9 +169,9 @@
|
||||
},
|
||||
{
|
||||
"key": 14,
|
||||
"id": "20030002",
|
||||
"grow": 2,
|
||||
"type": 4,
|
||||
"id": "20030001",
|
||||
"type": 2,
|
||||
"interact": 4,
|
||||
"exp": 100,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -181,9 +181,9 @@
|
||||
},
|
||||
{
|
||||
"key": 15,
|
||||
"id": "20030002",
|
||||
"grow": 3,
|
||||
"type": 1,
|
||||
"id": "20030001",
|
||||
"type": 3,
|
||||
"interact": 1,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -193,9 +193,9 @@
|
||||
},
|
||||
{
|
||||
"key": 16,
|
||||
"id": "20030002",
|
||||
"grow": 3,
|
||||
"type": 2,
|
||||
"id": "20030001",
|
||||
"type": 3,
|
||||
"interact": 2,
|
||||
"exp": 300,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -205,9 +205,9 @@
|
||||
},
|
||||
{
|
||||
"key": 17,
|
||||
"id": "20030003",
|
||||
"grow": 1,
|
||||
"id": "20030002",
|
||||
"type": 1,
|
||||
"interact": 1,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -217,9 +217,9 @@
|
||||
},
|
||||
{
|
||||
"key": 18,
|
||||
"id": "20030003",
|
||||
"grow": 2,
|
||||
"id": "20030002",
|
||||
"type": 2,
|
||||
"interact": 2,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -229,9 +229,9 @@
|
||||
},
|
||||
{
|
||||
"key": 19,
|
||||
"id": "20030003",
|
||||
"grow": 3,
|
||||
"type": 1,
|
||||
"id": "20030002",
|
||||
"type": 3,
|
||||
"interact": 1,
|
||||
"exp": 200,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
@ -241,9 +241,9 @@
|
||||
},
|
||||
{
|
||||
"key": 20,
|
||||
"id": "20030003",
|
||||
"grow": 3,
|
||||
"type": 2,
|
||||
"id": "20030002",
|
||||
"type": 3,
|
||||
"interact": 2,
|
||||
"exp": 300,
|
||||
"time": 1,
|
||||
"cd": 0,
|
||||
|
@ -68,7 +68,7 @@ func (this *configureComp) LoadDragonPlay() {
|
||||
this.play = make(map[string]*cfg.GameDragonPlayData)
|
||||
if _configure, ok := v.(*cfg.GameDragonPlay); ok {
|
||||
for _, v := range _configure.GetDataList() {
|
||||
this.play[v.Id+"-"+strconv.Itoa(int(v.Grow))+"-"+strconv.Itoa(int(v.Type))] = v
|
||||
this.play[v.Id+"-"+strconv.Itoa(int(v.Type))+"-"+strconv.Itoa(int(v.Interact))] = v
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ import "errors"
|
||||
type GameDragonPlayData struct {
|
||||
Key int32
|
||||
Id string
|
||||
Grow int32
|
||||
Type int32
|
||||
Interact int32
|
||||
Exp int32
|
||||
Time int32
|
||||
Cd int32
|
||||
@ -32,8 +32,8 @@ func (*GameDragonPlayData) GetTypeId() int32 {
|
||||
func (_v *GameDragonPlayData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Id, _ok_ = _buf["id"].(string); !_ok_ { err = errors.New("id error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["grow"].(float64); !_ok_ { err = errors.New("grow error"); return }; _v.Grow = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["interact"].(float64); !_ok_ { err = errors.New("interact error"); return }; _v.Interact = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["exp"].(float64); !_ok_ { err = errors.New("exp error"); return }; _v.Exp = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cd"].(float64); !_ok_ { err = errors.New("cd error"); return }; _v.Cd = int32(_tempNum_) }
|
||||
|
42
sys/configure/structs/Game.GameId.go
Normal file
42
sys/configure/structs/Game.GameId.go
Normal file
@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
type GameGameId struct {
|
||||
_dataMap map[int32]*GameGameIdData
|
||||
_dataList []*GameGameIdData
|
||||
}
|
||||
|
||||
func NewGameGameId(_buf []map[string]interface{}) (*GameGameId, error) {
|
||||
_dataList := make([]*GameGameIdData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGameIdData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGameIdData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameGameId{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGameId) GetDataMap() map[int32]*GameGameIdData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGameId) GetDataList() []*GameGameIdData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGameId) Get(key int32) *GameGameIdData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
37
sys/configure/structs/Game.GameIdData.go
Normal file
37
sys/configure/structs/Game.GameIdData.go
Normal file
@ -0,0 +1,37 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type GameGameIdData struct {
|
||||
Id int32
|
||||
Type int32
|
||||
}
|
||||
|
||||
const TypeId_GameGameIdData = 1662075251
|
||||
|
||||
func (*GameGameIdData) GetTypeId() int32 {
|
||||
return 1662075251
|
||||
}
|
||||
|
||||
func (_v *GameGameIdData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameGameIdData(_buf map[string]interface{}) (*GameGameIdData, error) {
|
||||
v := &GameGameIdData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.GameKlotski.go
Normal file
42
sys/configure/structs/Game.GameKlotski.go
Normal file
@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
type GameGameKlotski struct {
|
||||
_dataMap map[int32]*GameGameKlotskiData
|
||||
_dataList []*GameGameKlotskiData
|
||||
}
|
||||
|
||||
func NewGameGameKlotski(_buf []map[string]interface{}) (*GameGameKlotski, error) {
|
||||
_dataList := make([]*GameGameKlotskiData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGameKlotskiData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGameKlotskiData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameGameKlotski{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGameKlotski) GetDataMap() map[int32]*GameGameKlotskiData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGameKlotski) GetDataList() []*GameGameKlotskiData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGameKlotski) Get(key int32) *GameGameKlotskiData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
56
sys/configure/structs/Game.GameKlotskiData.go
Normal file
56
sys/configure/structs/Game.GameKlotskiData.go
Normal file
@ -0,0 +1,56 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type GameGameKlotskiData struct {
|
||||
Id int32
|
||||
Chequer *Gamekv
|
||||
Start int32
|
||||
Blockstype []*Gamekv
|
||||
Finish int32
|
||||
}
|
||||
|
||||
const TypeId_GameGameKlotskiData = -634857145
|
||||
|
||||
func (*GameGameKlotskiData) GetTypeId() int32 {
|
||||
return -634857145
|
||||
}
|
||||
|
||||
func (_v *GameGameKlotskiData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["chequer"].(map[string]interface{}); !_ok_ { err = errors.New("chequer error"); return }; if _v.Chequer, err = DeserializeGamekv(_x_); err != nil { return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["start"].(float64); !_ok_ { err = errors.New("start error"); return }; _v.Start = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["blockstype"].([]interface{}); !_ok_ { err = errors.New("blockstype error"); return }
|
||||
|
||||
_v.Blockstype = make([]*Gamekv, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Gamekv
|
||||
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGamekv(_x_); err != nil { return } }
|
||||
_v.Blockstype = append(_v.Blockstype, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["finish"].(float64); !_ok_ { err = errors.New("finish error"); return }; _v.Finish = int32(_tempNum_) }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameGameKlotskiData(_buf map[string]interface{}) (*GameGameKlotskiData, error) {
|
||||
v := &GameGameKlotskiData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
@ -17,6 +17,7 @@ type GameMainStageData struct {
|
||||
PreviousGroupId []int32
|
||||
Previoustage int32
|
||||
Episodetype int32
|
||||
StageParam int32
|
||||
Venturemodelspeed float32
|
||||
Venturemodelscale float32
|
||||
MoveType int32
|
||||
@ -85,6 +86,7 @@ func (_v *GameMainStageData)Deserialize(_buf map[string]interface{}) (err error)
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["previoustage"].(float64); !_ok_ { err = errors.New("previoustage error"); return }; _v.Previoustage = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Episodetype"].(float64); !_ok_ { err = errors.New("Episodetype error"); return }; _v.Episodetype = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["stage_param"].(float64); !_ok_ { err = errors.New("stage_param error"); return }; _v.StageParam = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["venturemodelspeed"].(float64); !_ok_ { err = errors.New("venturemodelspeed error"); return }; _v.Venturemodelspeed = float32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["venturemodelscale"].(float64); !_ok_ { err = errors.New("venturemodelscale error"); return }; _v.Venturemodelscale = float32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["move_type"].(float64); !_ok_ { err = errors.New("move_type error"); return }; _v.MoveType = int32(_tempNum_) }
|
||||
|
@ -258,6 +258,8 @@ type Tables struct {
|
||||
Qualifying *GameQualifying
|
||||
DragonPlay *GameDragonPlay
|
||||
DragonPlot *GameDragonPlot
|
||||
GameId *GameGameId
|
||||
GameKlotski *GameGameKlotski
|
||||
}
|
||||
|
||||
func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
@ -1747,5 +1749,17 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.DragonPlot, err = NewGameDragonPlot(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_gameid") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.GameId, err = NewGameGameId(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_gameklotski") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.GameKlotski, err = NewGameGameKlotski(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return tables, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user