merge
This commit is contained in:
parent
fa0acb2647
commit
cc436054d4
@ -11,139 +11,56 @@ package cfg
|
|||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
type GameStoneBattleData struct {
|
type GameStoneBattleData struct {
|
||||||
BattleStageId int32
|
BattleStageId int32
|
||||||
EnemyShowIcon int32
|
EnemyShowIcon int32
|
||||||
Atk int32
|
Atk int32
|
||||||
Hp int32
|
Hp int32
|
||||||
Def int32
|
Def int32
|
||||||
SpeedValue int32
|
SpeedValue int32
|
||||||
EffreValue int32
|
EffreValue int32
|
||||||
BattleReadyID int32
|
BattleReadyID int32
|
||||||
FormatList []int32
|
FormatList []int32
|
||||||
RewardLottery int32
|
RewardLottery int32
|
||||||
}
|
}
|
||||||
|
|
||||||
const TypeId_GameStoneBattleData = 469689547
|
const TypeId_GameStoneBattleData = 469689547
|
||||||
|
|
||||||
func (*GameStoneBattleData) GetTypeId() int32 {
|
func (*GameStoneBattleData) GetTypeId() int32 {
|
||||||
return 469689547
|
return 469689547
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_v *GameStoneBattleData) Deserialize(_buf map[string]interface{}) (err error) {
|
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 _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EnemyShowIcon"].(float64); !_ok_ { err = errors.New("EnemyShowIcon error"); return }; _v.EnemyShowIcon = int32(_tempNum_) }
|
||||||
var _tempNum_ float64
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Atk"].(float64); !_ok_ { err = errors.New("Atk error"); return }; _v.Atk = int32(_tempNum_) }
|
||||||
if _tempNum_, _ok_ = _buf["BattleStageId"].(float64); !_ok_ {
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Hp"].(float64); !_ok_ { err = errors.New("Hp error"); return }; _v.Hp = int32(_tempNum_) }
|
||||||
err = errors.New("BattleStageId error")
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Def"].(float64); !_ok_ { err = errors.New("Def error"); return }; _v.Def = int32(_tempNum_) }
|
||||||
return
|
{ 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_) }
|
||||||
_v.BattleStageId = 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
|
var _ok_ bool
|
||||||
var _tempNum_ float64
|
if _arr_, _ok_ = _buf["FormatList"].([]interface{}); !_ok_ { err = errors.New("FormatList error"); return }
|
||||||
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_))
|
_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_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for _, _e_ := range _arr_ {
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["RewardLottery"].(float64); !_ok_ { err = errors.New("RewardLottery error"); return }; _v.RewardLottery = int32(_tempNum_) }
|
||||||
var _list_v_ int32
|
return
|
||||||
{
|
|
||||||
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) {
|
func DeserializeGameStoneBattleData(_buf map[string]interface{}) (*GameStoneBattleData, error) {
|
||||||
v := &GameStoneBattleData{}
|
v := &GameStoneBattleData{}
|
||||||
if err := v.Deserialize(_buf); err == nil {
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
return v, nil
|
return v, nil
|
||||||
} else {
|
} else {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,128 +11,41 @@ package cfg
|
|||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
type GameStoneBuffData struct {
|
type GameStoneBuffData struct {
|
||||||
BuffId int32
|
BuffId int32
|
||||||
Type int32
|
Type int32
|
||||||
SkillId int32
|
SkillId int32
|
||||||
BuffLevel int32
|
BuffLevel int32
|
||||||
Quality int32
|
Quality int32
|
||||||
BuffIcon string
|
BuffIcon string
|
||||||
BuffStory string
|
BuffStory string
|
||||||
BuffUpgradeCost *Gameatn
|
BuffUpgradeCost *Gameatn
|
||||||
BuffSell *Gameatn
|
BuffSell *Gameatn
|
||||||
}
|
}
|
||||||
|
|
||||||
const TypeId_GameStoneBuffData = -1457644250
|
const TypeId_GameStoneBuffData = -1457644250
|
||||||
|
|
||||||
func (*GameStoneBuffData) GetTypeId() int32 {
|
func (*GameStoneBuffData) GetTypeId() int32 {
|
||||||
return -1457644250
|
return -1457644250
|
||||||
}
|
}
|
||||||
|
|
||||||
func (_v *GameStoneBuffData) Deserialize(_buf map[string]interface{}) (err error) {
|
func (_v *GameStoneBuffData)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 _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) }
|
||||||
var _tempNum_ float64
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["SkillId"].(float64); !_ok_ { err = errors.New("SkillId error"); return }; _v.SkillId = int32(_tempNum_) }
|
||||||
if _tempNum_, _ok_ = _buf["BuffId"].(float64); !_ok_ {
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffLevel"].(float64); !_ok_ { err = errors.New("BuffLevel error"); return }; _v.BuffLevel = int32(_tempNum_) }
|
||||||
err = errors.New("BuffId error")
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Quality"].(float64); !_ok_ { err = errors.New("Quality error"); return }; _v.Quality = int32(_tempNum_) }
|
||||||
return
|
{ 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["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 } } }
|
||||||
_v.BuffId = int32(_tempNum_)
|
{ 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
|
||||||
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["SkillId"].(float64); !_ok_ {
|
|
||||||
err = errors.New("SkillId error")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
_v.SkillId = 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["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 DeserializeGameStoneBuffData(_buf map[string]interface{}) (*GameStoneBuffData, error) {
|
func DeserializeGameStoneBuffData(_buf map[string]interface{}) (*GameStoneBuffData, error) {
|
||||||
v := &GameStoneBuffData{}
|
v := &GameStoneBuffData{}
|
||||||
if err := v.Deserialize(_buf); err == nil {
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
return v, nil
|
return v, nil
|
||||||
} else {
|
} else {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user