go_dreamfactory/sys/configure/structs/Game.ProLineupData.go
2022-11-15 09:54:40 +08:00

42 lines
1.6 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 GameProLineupData struct {
Robotid string
Ranking int32
Difficulty int32
First float32
}
const TypeId_GameProLineupData = 1408766826
func (*GameProLineupData) GetTypeId() int32 {
return 1408766826
}
func (_v *GameProLineupData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; if _v.Robotid, _ok_ = _buf["robotid"].(string); !_ok_ { err = errors.New("robotid error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ranking"].(float64); !_ok_ { err = errors.New("ranking error"); return }; _v.Ranking = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["difficulty"].(float64); !_ok_ { err = errors.New("difficulty error"); return }; _v.Difficulty = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["first"].(float64); !_ok_ { err = errors.New("first error"); return }; _v.First = float32(_tempNum_) }
return
}
func DeserializeGameProLineupData(_buf map[string]interface{}) (*GameProLineupData, error) {
v := &GameProLineupData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}