go_dreamfactory/sys/configure/structs/Game.RobotData.go

46 lines
1.8 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 GameRobotData struct {
Robotid int32
Icon string
Lvshow int32
Name string
Sex int32
Showid string
}
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; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
{ 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 } }
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
}
}