go_dreamfactory/sys/configure/structs/Game.FavorabilityData.go
2023-04-18 16:04:28 +08:00

257 lines
14 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 GameFavorabilityData struct {
Id int32
Hid string
Name string
FavorLv int32
FavorExp int32
LvName string
PrivilegeType int32
PrivilegeValue int32
ReturnReward []*Gameatn
ReturnTxt string
LikesFood []int32
DislikingFood []int32
LikesTxt string
OrdinaryTxt string
DislikingTxt string
Favorlv []int32
BiographyName []string
BiographyTxt []string
BiographyReward1 []*Gameatn
BiographyReward2 []*Gameatn
BiographyReward3 []*Gameatn
PlotUnlock []int32
Startid int32
Endid []int32
Rightend int32
Stroyprize []*Gameatn
SpecialStroyprize []*Gameatn
}
const TypeId_GameFavorabilityData = -1618357902
func (*GameFavorabilityData) GetTypeId() int32 {
return -1618357902
}
func (_v *GameFavorabilityData)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; if _v.Hid, _ok_ = _buf["hid"].(string); !_ok_ { err = errors.New("hid error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["favor_lv"].(float64); !_ok_ { err = errors.New("favor_lv error"); return }; _v.FavorLv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["favor_exp"].(float64); !_ok_ { err = errors.New("favor_exp error"); return }; _v.FavorExp = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["lv_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.LvName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.LvName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["privilege_type"].(float64); !_ok_ { err = errors.New("privilege_type error"); return }; _v.PrivilegeType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["privilege_value"].(float64); !_ok_ { err = errors.New("privilege_value error"); return }; _v.PrivilegeValue = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["return_reward"].([]interface{}); !_ok_ { err = errors.New("return_reward error"); return }
_v.ReturnReward = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.ReturnReward = append(_v.ReturnReward, _list_v_)
}
}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["return_txt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.ReturnTxt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.ReturnTxt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["likes_food"].([]interface{}); !_ok_ { err = errors.New("likes_food error"); return }
_v.LikesFood = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.LikesFood = append(_v.LikesFood, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["disliking_food"].([]interface{}); !_ok_ { err = errors.New("disliking_food error"); return }
_v.DislikingFood = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.DislikingFood = append(_v.DislikingFood, _list_v_)
}
}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["likes_txt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.LikesTxt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.LikesTxt, _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["ordinary_txt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.OrdinaryTxt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.OrdinaryTxt, _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["disliking_txt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.DislikingTxt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.DislikingTxt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["favorlv"].([]interface{}); !_ok_ { err = errors.New("favorlv error"); return }
_v.Favorlv = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Favorlv = append(_v.Favorlv, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["biography_name"].([]interface{}); !_ok_ { err = errors.New("biography_name error"); return }
_v.BiographyName = make([]string, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
_v.BiographyName = append(_v.BiographyName, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["biography_txt"].([]interface{}); !_ok_ { err = errors.New("biography_txt error"); return }
_v.BiographyTxt = make([]string, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
_v.BiographyTxt = append(_v.BiographyTxt, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["biography_reward1"].([]interface{}); !_ok_ { err = errors.New("biography_reward1 error"); return }
_v.BiographyReward1 = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.BiographyReward1 = append(_v.BiographyReward1, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["biography_reward2"].([]interface{}); !_ok_ { err = errors.New("biography_reward2 error"); return }
_v.BiographyReward2 = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.BiographyReward2 = append(_v.BiographyReward2, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["biography_reward3"].([]interface{}); !_ok_ { err = errors.New("biography_reward3 error"); return }
_v.BiographyReward3 = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.BiographyReward3 = append(_v.BiographyReward3, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["plot_unlock"].([]interface{}); !_ok_ { err = errors.New("plot_unlock error"); return }
_v.PlotUnlock = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.PlotUnlock = append(_v.PlotUnlock, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["startid"].(float64); !_ok_ { err = errors.New("startid error"); return }; _v.Startid = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["endid"].([]interface{}); !_ok_ { err = errors.New("endid error"); return }
_v.Endid = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Endid = append(_v.Endid, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rightend"].(float64); !_ok_ { err = errors.New("rightend error"); return }; _v.Rightend = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["stroyprize"].([]interface{}); !_ok_ { err = errors.New("stroyprize error"); return }
_v.Stroyprize = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Stroyprize = append(_v.Stroyprize, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["special_stroyprize"].([]interface{}); !_ok_ { err = errors.New("special_stroyprize error"); return }
_v.SpecialStroyprize = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.SpecialStroyprize = append(_v.SpecialStroyprize, _list_v_)
}
}
return
}
func DeserializeGameFavorabilityData(_buf map[string]interface{}) (*GameFavorabilityData, error) {
v := &GameFavorabilityData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}