go_dreamfactory/sys/configure/structs/Game.StroneRoomData.go
2023-07-21 20:41:18 +08:00

56 lines
3.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 GameStroneRoomData struct {
BuffId int32
BuffGroupId int32
Type int32
BuffLevel int32
Quality int32
BuffIcon string
BuffName string
BuffDescription string
BuffStory string
BuffUpgradeCost *Gameatn
BuffSell *Gameatn
}
const TypeId_GameStroneRoomData = -1133628842
func (*GameStroneRoomData) GetTypeId() int32 {
return -1133628842
}
func (_v *GameStroneRoomData)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["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["buffName"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.BuffName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.BuffName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["BuffDescription"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.BuffDescription error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.BuffDescription, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text 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 DeserializeGameStroneRoomData(_buf map[string]interface{}) (*GameStroneRoomData, error) {
v := &GameStroneRoomData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}