//------------------------------------------------------------------------------ // // 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_skillPassiveData struct { Id int32 Desc string When string Where string AddCon []string Type string MaxEmitTimes int32 OverlayTimes byte SameID bool Tags []string RelyTags []string NoRelyTags []string } func (Game_skillPassiveData) GetTypeId() int { return -1231842596 } func NewGame_skillPassiveData(_buf map[string]interface{}) (_v *Game_skillPassiveData, err error) { _v = &Game_skillPassiveData{} { 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.Desc, _ok_ = _buf["Desc"].(string); !_ok_ { err = errors.New("Desc error"); return } } { var _ok_ bool; if _v.When, _ok_ = _buf["When"].(string); !_ok_ { err = errors.New("When error"); return } } { var _ok_ bool; if _v.Where, _ok_ = _buf["Where"].(string); !_ok_ { err = errors.New("Where error"); return } } { var _arr_ []interface{} var _ok_ bool if _arr_, _ok_ = _buf["AddCon"].([]interface{}); !_ok_ { err = errors.New("AddCon error"); return } _v.AddCon = 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.AddCon = append(_v.AddCon, _list_v_) } } { var _ok_ bool; if _v.Type, _ok_ = _buf["Type"].(string); !_ok_ { err = errors.New("Type error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["MaxEmitTimes"].(float64); !_ok_ { err = errors.New("MaxEmitTimes error"); return }; _v.MaxEmitTimes = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["OverlayTimes"].(float64); !_ok_ { err = errors.New("OverlayTimes error"); return }; _v.OverlayTimes = byte(_tempNum_) } { var _ok_ bool; if _v.SameID, _ok_ = _buf["SameID"].(bool); !_ok_ { err = errors.New("SameID error"); return } } { var _arr_ []interface{} var _ok_ bool if _arr_, _ok_ = _buf["Tags"].([]interface{}); !_ok_ { err = errors.New("Tags error"); return } _v.Tags = 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.Tags = append(_v.Tags, _list_v_) } } { var _arr_ []interface{} var _ok_ bool if _arr_, _ok_ = _buf["RelyTags"].([]interface{}); !_ok_ { err = errors.New("RelyTags error"); return } _v.RelyTags = 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.RelyTags = append(_v.RelyTags, _list_v_) } } { var _arr_ []interface{} var _ok_ bool if _arr_, _ok_ = _buf["NoRelyTags"].([]interface{}); !_ok_ { err = errors.New("NoRelyTags error"); return } _v.NoRelyTags = 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.NoRelyTags = append(_v.NoRelyTags, _list_v_) } } return }