go_dreamfactory/sys/configure/structs/game.drawUpdrawData.go

77 lines
3.2 KiB
Go

//------------------------------------------------------------------------------
// <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 Game_drawUpdrawData struct {
Key int32
TimeOn int32
TimeOff int32
UpHero []string
UpWeight []int32
TriggerNum int32
IncreaseWeight []int32
}
func (Game_drawUpdrawData) GetTypeId() int {
return 297664649
}
func NewGame_drawUpdrawData(_buf map[string]interface{}) (_v *Game_drawUpdrawData, err error) {
_v = &Game_drawUpdrawData{}
{ 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["time_on"].(float64); !_ok_ { err = errors.New("time_on error"); return }; _v.TimeOn = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time_off"].(float64); !_ok_ { err = errors.New("time_off error"); return }; _v.TimeOff = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["up_hero"].([]interface{}); !_ok_ { err = errors.New("up_hero error"); return }
_v.UpHero = make([]string, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
_v.UpHero = append(_v.UpHero, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["up_weight"].([]interface{}); !_ok_ { err = errors.New("up_weight error"); return }
_v.UpWeight = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.UpWeight = append(_v.UpWeight, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["trigger_num"].(float64); !_ok_ { err = errors.New("trigger_num error"); return }; _v.TriggerNum = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["Increase_weight"].([]interface{}); !_ok_ { err = errors.New("Increase_weight error"); return }
_v.IncreaseWeight = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.IncreaseWeight = append(_v.IncreaseWeight, _list_v_)
}
}
return
}