go_dreamfactory/sys/configure/structs/game.monsterData.go
2022-07-25 18:40:01 +08:00

34 lines
1.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 Game_monsterData struct {
MonsterId int32
HeroId string
Name string
Star int32
Equip string
}
func (Game_monsterData) GetTypeId() int {
return -793127256
}
func NewGame_monsterData(_buf map[string]interface{}) (_v *Game_monsterData, err error) {
_v = &Game_monsterData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["monster_id"].(float64); !_ok_ { err = errors.New("monster_id error"); return }; _v.MonsterId = int32(_tempNum_) }
{ var _ok_ bool; if _v.HeroId, _ok_ = _buf["hero_id"].(string); !_ok_ { err = errors.New("hero_id 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["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
{ var _ok_ bool; if _v.Equip, _ok_ = _buf["equip"].(string); !_ok_ { err = errors.New("equip error"); return } }
return
}