go_dreamfactory/sys/configure/structs/Game.RedDotData.go
2024-01-26 19:13:05 +08:00

63 lines
2.6 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 GameRedDotData struct {
Id int32
MsgType int32
ShowType int32
CountType int32
OpencondId string
Opencond []int32
Path string
Header string
}
const TypeId_GameRedDotData = -60014018
func (*GameRedDotData) GetTypeId() int32 {
return -60014018
}
func (_v *GameRedDotData)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["msg_type"].(float64); !_ok_ { err = errors.New("msg_type error"); return }; _v.MsgType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["show_type"].(float64); !_ok_ { err = errors.New("show_type error"); return }; _v.ShowType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["count_type"].(float64); !_ok_ { err = errors.New("count_type error"); return }; _v.CountType = int32(_tempNum_) }
{ var _ok_ bool; if _v.OpencondId, _ok_ = _buf["opencond_id"].(string); !_ok_ { err = errors.New("opencond_id error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["opencond"].([]interface{}); !_ok_ { err = errors.New("opencond error"); return }
_v.Opencond = 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.Opencond = append(_v.Opencond, _list_v_)
}
}
{ var _ok_ bool; if _v.Path, _ok_ = _buf["path"].(string); !_ok_ { err = errors.New("path error"); return } }
{ var _ok_ bool; if _v.Header, _ok_ = _buf["header"].(string); !_ok_ { err = errors.New("header error"); return } }
return
}
func DeserializeGameRedDotData(_buf map[string]interface{}) (*GameRedDotData, error) {
v := &GameRedDotData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}