42 lines
1.5 KiB
Go
42 lines
1.5 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 GamePotionFly struct {
|
|
Id string
|
|
Weight int32
|
|
Score int32
|
|
EffectType int32
|
|
}
|
|
|
|
const TypeId_GamePotionFly = 836324
|
|
|
|
func (*GamePotionFly) GetTypeId() int32 {
|
|
return 836324
|
|
}
|
|
|
|
func (_v *GamePotionFly)Deserialize(_buf map[string]interface{}) (err error) {
|
|
{ var _ok_ bool; if _v.Id, _ok_ = _buf["Id"].(string); !_ok_ { err = errors.New("Id error"); return } }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score"].(float64); !_ok_ { err = errors.New("score error"); return }; _v.Score = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["effectType"].(float64); !_ok_ { err = errors.New("effectType error"); return }; _v.EffectType = int32(_tempNum_) }
|
|
return
|
|
}
|
|
|
|
func DeserializeGamePotionFly(_buf map[string]interface{}) (*GamePotionFly, error) {
|
|
v := &GamePotionFly{}
|
|
if err := v.Deserialize(_buf); err == nil {
|
|
return v, nil
|
|
} else {
|
|
return nil, err
|
|
}
|
|
}
|