go_dreamfactory/sys/configure/structs/Game.RobotDataData.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 GameRobotDataData struct {
Robotid int32
Icon string
Lvshow int32
Name string
Sex int32
Showid string
}
const TypeId_GameRobotDataData = 1848956418
func (*GameRobotDataData) GetTypeId() int32 {
return 1848956418
}
func (_v *GameRobotDataData)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 DeserializeGameRobotDataData(_buf map[string]interface{}) (*GameRobotDataData, error) {
v := &GameRobotDataData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}