//------------------------------------------------------------------------------ // // 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 GameTDMonsterAppearData struct { Id int32 CopyId int32 Num int32 Time int32 Count int32 MonsterId int32 HpMultiple int32 } const TypeId_GameTDMonsterAppearData = 44623341 func (*GameTDMonsterAppearData) GetTypeId() int32 { return 44623341 } func (_v *GameTDMonsterAppearData)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["copy_id"].(float64); !_ok_ { err = errors.New("copy_id error"); return }; _v.CopyId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["num"].(float64); !_ok_ { err = errors.New("num error"); return }; _v.Num = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["count"].(float64); !_ok_ { err = errors.New("count error"); return }; _v.Count = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["monster_id"].(float64); !_ok_ { err = errors.New("monster_id error"); return }; _v.MonsterId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hp_multiple"].(float64); !_ok_ { err = errors.New("hp_multiple error"); return }; _v.HpMultiple = int32(_tempNum_) } return } func DeserializeGameTDMonsterAppearData(_buf map[string]interface{}) (*GameTDMonsterAppearData, error) { v := &GameTDMonsterAppearData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { return nil, err } }