go_dreamfactory/sys/configure/structs/Game.StoneBuffData.go
2023-08-09 16:21:36 +08:00

60 lines
3.7 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 GameStoneBuffData struct {
BuffId int32
Type int32
SkillId int32
BuffLevel int32
Quality int32
BuffIcon string
TargetType int32
CampType int32
TakeDataType int32
BuffStory string
BuffUpgradeCost *Gameatn
BuffSell *Gameatn
DeleteWt int32
}
const TypeId_GameStoneBuffData = -1457644250
func (*GameStoneBuffData) GetTypeId() int32 {
return -1457644250
}
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 _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 _tempNum_ float64; if _tempNum_, _ok_ = _buf["TargetType"].(float64); !_ok_ { err = errors.New("TargetType error"); return }; _v.TargetType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["CampType"].(float64); !_ok_ { err = errors.New("CampType error"); return }; _v.CampType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["TakeDataType"].(float64); !_ok_ { err = errors.New("TakeDataType error"); return }; _v.TakeDataType = int32(_tempNum_) }
{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 } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["DeleteWt"].(float64); !_ok_ { err = errors.New("DeleteWt error"); return }; _v.DeleteWt = int32(_tempNum_) }
return
}
func DeserializeGameStoneBuffData(_buf map[string]interface{}) (*GameStoneBuffData, error) {
v := &GameStoneBuffData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}