//------------------------------------------------------------------------------ // // 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 GameStoneBuffData struct { BuffId int32 BuffGroupId int32 Type int32 SkillId int32 BuffLevel int32 Quality int32 BuffIcon string BuffStory string BuffUpgradeCost *Gameatn BuffSell *Gameatn } const TypeId_GameStoneBuffData = -1457644250 func (*GameStoneBuffData) GetTypeId() int32 { return -1457644250 } func (_v *GameStoneBuffData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffId"].(float64); !_ok_ { err = errors.New("BuffId error"); return }; _v.BuffId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffGroupId"].(float64); !_ok_ { err = errors.New("BuffGroupId error"); return }; _v.BuffGroupId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["SkillId"].(float64); !_ok_ { err = errors.New("SkillId error"); return }; _v.SkillId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffLevel"].(float64); !_ok_ { err = errors.New("BuffLevel error"); return }; _v.BuffLevel = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Quality"].(float64); !_ok_ { err = errors.New("Quality error"); return }; _v.Quality = int32(_tempNum_) } { var _ok_ bool; if _v.BuffIcon, _ok_ = _buf["BuffIcon"].(string); !_ok_ { err = errors.New("BuffIcon error"); return } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["BuffStory"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.BuffStory error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.BuffStory, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["BuffUpgradeCost"].(map[string]interface{}); !_ok_ { err = errors.New("BuffUpgradeCost error"); return }; if _v.BuffUpgradeCost, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["BuffSell"].(map[string]interface{}); !_ok_ { err = errors.New("BuffSell error"); return }; if _v.BuffSell, err = DeserializeGameatn(_x_); err != nil { return } } return } func DeserializeGameStoneBuffData(_buf map[string]interface{}) (*GameStoneBuffData, error) { v := &GameStoneBuffData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { return nil, err } }