//------------------------------------------------------------------------------ // // 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 GameRobotData struct { Robotid int32 Lvshow int32 Name string Sex int32 Showid string Betterid int32 Mtsid *Gameatn } const TypeId_GameRobotData = 2060865080 func (*GameRobotData) GetTypeId() int32 { return 2060865080 } func (_v *GameRobotData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["robotid"].(float64); !_ok_ { err = errors.New("robotid error"); return }; _v.Robotid = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lvshow"].(float64); !_ok_ { err = errors.New("lvshow error"); return }; _v.Lvshow = 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["sex"].(float64); !_ok_ { err = errors.New("sex error"); return }; _v.Sex = int32(_tempNum_) } { var _ok_ bool; if _v.Showid, _ok_ = _buf["showid"].(string); !_ok_ { err = errors.New("showid error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["betterid"].(float64); !_ok_ { err = errors.New("betterid error"); return }; _v.Betterid = int32(_tempNum_) } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["mtsid"].(map[string]interface{}); !_ok_ { err = errors.New("mtsid error"); return }; if _v.Mtsid, err = DeserializeGameatn(_x_); err != nil { return } } return } func DeserializeGameRobotData(_buf map[string]interface{}) (*GameRobotData, error) { v := &GameRobotData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { return nil, err } }