//------------------------------------------------------------------------------ // // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ package cfg import "errors" type Game_skillAtkData struct { Id int32 Name string Type int32 Desc string MaxLV int32 CD []int32 Target int32 ChildSkill []*Game_ChildSkills } func (Game_skillAtkData) GetTypeId() int { return -1545475251 } func NewGame_skillAtkData(_buf map[string]interface{}) (_v *Game_skillAtkData, err error) { _v = &Game_skillAtkData{} { 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; if _v.Name, _ok_ = _buf["Name"].(string); !_ok_ { err = errors.New("Name error"); return } } { 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; if _v.Desc, _ok_ = _buf["Desc"].(string); !_ok_ { err = errors.New("Desc error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["MaxLV"].(float64); !_ok_ { err = errors.New("MaxLV error"); return }; _v.MaxLV = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool if _arr_, _ok_ = _buf["CD"].([]interface{}); !_ok_ { err = errors.New("CD error"); return } _v.CD = 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.CD = append(_v.CD, _list_v_) } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Target"].(float64); !_ok_ { err = errors.New("Target error"); return }; _v.Target = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool if _arr_, _ok_ = _buf["ChildSkill"].([]interface{}); !_ok_ { err = errors.New("ChildSkill error"); return } _v.ChildSkill = make([]*Game_ChildSkills, 0, len(_arr_)) for _, _e_ := range _arr_ { var _list_v_ *Game_ChildSkills { 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 = NewGame_ChildSkills(_x_); err != nil { return } } _v.ChildSkill = append(_v.ChildSkill, _list_v_) } } return }