上传颜色配置表
This commit is contained in:
parent
1a03f9d02d
commit
ae9d4dd723
26
bin/json/game_color.json
Normal file
26
bin/json/game_color.json
Normal file
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"star": 1,
|
||||
"color": "#6dba00"
|
||||
},
|
||||
{
|
||||
"star": 2,
|
||||
"color": "#4a96e3"
|
||||
},
|
||||
{
|
||||
"star": 3,
|
||||
"color": "#be3ce8"
|
||||
},
|
||||
{
|
||||
"star": 4,
|
||||
"color": "#e8893c"
|
||||
},
|
||||
{
|
||||
"star": 5,
|
||||
"color": "#fd424e"
|
||||
},
|
||||
{
|
||||
"star": 6,
|
||||
"color": "#e1a6ff"
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
42
sys/configure/structs/Game.Color.go
Normal file
42
sys/configure/structs/Game.Color.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 GameColor struct {
|
||||
_dataMap map[int32]*GameColorData
|
||||
_dataList []*GameColorData
|
||||
}
|
||||
|
||||
func NewGameColor(_buf []map[string]interface{}) (*GameColor, error) {
|
||||
_dataList := make([]*GameColorData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameColorData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameColorData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Star] = _v
|
||||
}
|
||||
}
|
||||
return &GameColor{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameColor) GetDataMap() map[int32]*GameColorData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameColor) GetDataList() []*GameColorData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameColor) Get(key int32) *GameColorData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
37
sys/configure/structs/Game.ColorData.go
Normal file
37
sys/configure/structs/Game.ColorData.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 GameColorData struct {
|
||||
Star int32
|
||||
Color string
|
||||
}
|
||||
|
||||
const TypeId_GameColorData = -608833871
|
||||
|
||||
func (*GameColorData) GetTypeId() int32 {
|
||||
return -608833871
|
||||
}
|
||||
|
||||
func (_v *GameColorData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Color, _ok_ = _buf["color"].(string); !_ok_ { err = errors.New("color error"); return } }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameColorData(_buf map[string]interface{}) (*GameColorData, error) {
|
||||
v := &GameColorData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
@ -64,7 +64,6 @@ type Tables struct {
|
||||
Pagoda *GamePagoda
|
||||
PagodaTaskReward *GamePagodaTaskReward
|
||||
PagodaSeasonReward *GamePagodaSeasonReward
|
||||
PagodaseasonLoop *GamePagodaseasonLoop
|
||||
Rdtask *GameRdtask
|
||||
RdtaskCondi *GameRdtaskCondi
|
||||
RdtaskChoose *GameRdtaskChoose
|
||||
@ -99,6 +98,7 @@ type Tables struct {
|
||||
LibraryFavor *GameLibraryFavor
|
||||
Robot *GameRobot
|
||||
Ip *GameIp
|
||||
Color *GameColor
|
||||
}
|
||||
|
||||
func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
@ -424,12 +424,6 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.PagodaSeasonReward, err = NewGamePagodaSeasonReward(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_pagodaseasonloop") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.PagodaseasonLoop, err = NewGamePagodaseasonLoop(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_rdtask") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -634,5 +628,11 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.Ip, err = NewGameIp(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_color") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.Color, err = NewGameColor(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return tables, nil
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ type GamePagodaData struct {
|
||||
Key int32
|
||||
PagodaType int32
|
||||
LevelType int32
|
||||
PreLevel int32
|
||||
LayerNum int32
|
||||
MonsterId []int32
|
||||
Reward []*Gameatn
|
||||
@ -34,7 +33,6 @@ func (_v *GamePagodaData)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; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pagoda_type"].(float64); !_ok_ { err = errors.New("pagoda_type error"); return }; _v.PagodaType = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Level_type"].(float64); !_ok_ { err = errors.New("Level_type error"); return }; _v.LevelType = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["PreLevel"].(float64); !_ok_ { err = errors.New("PreLevel error"); return }; _v.PreLevel = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["layer_num"].(float64); !_ok_ { err = errors.New("layer_num error"); return }; _v.LayerNum = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
|
Loading…
Reference in New Issue
Block a user