//------------------------------------------------------------------------------ // // 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 GamedrawReplaceData struct { Id int32 Pool int32 HeroInitial string HeroReplace string ReplaceCd int32 ReplaceNum int32 } const TypeId_GamedrawReplaceData = 1468145342 func (*GamedrawReplaceData) GetTypeId() int32 { return 1468145342 } func (_v *GamedrawReplaceData)Deserialize(_buf map[string]interface{}) (err error) { { 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; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pool"].(float64); !_ok_ { err = errors.New("pool error"); return }; _v.Pool = int32(_tempNum_) } { var _ok_ bool; if _v.HeroInitial, _ok_ = _buf["hero_initial"].(string); !_ok_ { err = errors.New("hero_initial error"); return } } { var _ok_ bool; if _v.HeroReplace, _ok_ = _buf["hero_replace"].(string); !_ok_ { err = errors.New("hero_replace error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["replace_cd"].(float64); !_ok_ { err = errors.New("replace_cd error"); return }; _v.ReplaceCd = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["replace_num"].(float64); !_ok_ { err = errors.New("replace_num error"); return }; _v.ReplaceNum = int32(_tempNum_) } return } func DeserializeGamedrawReplaceData(_buf map[string]interface{}) (*GamedrawReplaceData, error) { v := &GamedrawReplaceData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { return nil, err } }