go_dreamfactory/sys/configure/structs/Game.StoneBattleData.go
2023-07-26 14:46:50 +08:00

67 lines
3.3 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 GameStoneBattleData struct {
BattleStageId int32
EnemyShowIcon int32
Atk int32
Hp int32
Def int32
SpeedValue int32
EffreValue int32
BattleReadyID int32
FormatList []int32
RewardLottery int32
}
const TypeId_GameStoneBattleData = 469689547
func (*GameStoneBattleData) GetTypeId() int32 {
return 469689547
}
func (_v *GameStoneBattleData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleStageId"].(float64); !_ok_ { err = errors.New("BattleStageId error"); return }; _v.BattleStageId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EnemyShowIcon"].(float64); !_ok_ { err = errors.New("EnemyShowIcon error"); return }; _v.EnemyShowIcon = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Atk"].(float64); !_ok_ { err = errors.New("Atk error"); return }; _v.Atk = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Hp"].(float64); !_ok_ { err = errors.New("Hp error"); return }; _v.Hp = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Def"].(float64); !_ok_ { err = errors.New("Def error"); return }; _v.Def = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["SpeedValue"].(float64); !_ok_ { err = errors.New("SpeedValue error"); return }; _v.SpeedValue = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EffreValue"].(float64); !_ok_ { err = errors.New("EffreValue error"); return }; _v.EffreValue = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["FormatList"].([]interface{}); !_ok_ { err = errors.New("FormatList error"); return }
_v.FormatList = 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.FormatList = append(_v.FormatList, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["RewardLottery"].(float64); !_ok_ { err = errors.New("RewardLottery error"); return }; _v.RewardLottery = int32(_tempNum_) }
return
}
func DeserializeGameStoneBattleData(_buf map[string]interface{}) (*GameStoneBattleData, error) {
v := &GameStoneBattleData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}