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

57 lines
2.9 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_heroStarupData struct {
Key int32
Id string
Star int32
Needhero string
Needherostar int32
Needheronum int32
Needrace []int32
Needracestar int32
Needracenum int32
Gold int32
}
func (Game_heroStarupData) GetTypeId() int {
return -1429351731
}
func NewGame_heroStarupData(_buf map[string]interface{}) (_v *Game_heroStarupData, err error) {
_v = &Game_heroStarupData{}
{ 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["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
{ var _ok_ bool; if _v.Needhero, _ok_ = _buf["needhero"].(string); !_ok_ { err = errors.New("needhero error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["needherostar"].(float64); !_ok_ { err = errors.New("needherostar error"); return }; _v.Needherostar = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["needheronum"].(float64); !_ok_ { err = errors.New("needheronum error"); return }; _v.Needheronum = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["needrace"].([]interface{}); !_ok_ { err = errors.New("needrace error"); return }
_v.Needrace = 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.Needrace = append(_v.Needrace, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["needracestar"].(float64); !_ok_ { err = errors.New("needracestar error"); return }; _v.Needracestar = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["needracenum"].(float64); !_ok_ { err = errors.New("needracenum error"); return }; _v.Needracenum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["gold"].(float64); !_ok_ { err = errors.New("gold error"); return }; _v.Gold = int32(_tempNum_) }
return
}