//------------------------------------------------------------------------------
// <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 GameHeroLevelgrowData struct {
    Id string
    Hp int32
    Atk int32
    Def int32
    Speed int32
    Cri int32
    Cridam int32
    Effhit int32
    Effre int32
    Losthold int32
    Understand int32
    Damre int32
    Causedam int32
    Treadd int32
    Betreadd int32
    Suckblood int32
    Hpgrow float32
    Atkgrow float32
    Defgrow float32
    Speedgrow int32
}

const TypeId_GameHeroLevelgrowData = 1376496907

func (*GameHeroLevelgrowData) GetTypeId() int32 {
    return 1376496907
}

func (_v *GameHeroLevelgrowData)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["hp"].(float64); !_ok_ { err = errors.New("hp error"); return }; _v.Hp = 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["def"].(float64); !_ok_ { err = errors.New("def error"); return }; _v.Def = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["speed"].(float64); !_ok_ { err = errors.New("speed error"); return }; _v.Speed = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cri"].(float64); !_ok_ { err = errors.New("cri error"); return }; _v.Cri = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cridam"].(float64); !_ok_ { err = errors.New("cridam error"); return }; _v.Cridam = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["effhit"].(float64); !_ok_ { err = errors.New("effhit error"); return }; _v.Effhit = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["effre"].(float64); !_ok_ { err = errors.New("effre error"); return }; _v.Effre = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["losthold"].(float64); !_ok_ { err = errors.New("losthold error"); return }; _v.Losthold = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["understand"].(float64); !_ok_ { err = errors.New("understand error"); return }; _v.Understand = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["damre"].(float64); !_ok_ { err = errors.New("damre error"); return }; _v.Damre = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["causedam"].(float64); !_ok_ { err = errors.New("causedam error"); return }; _v.Causedam = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["treadd"].(float64); !_ok_ { err = errors.New("treadd error"); return }; _v.Treadd = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["betreadd"].(float64); !_ok_ { err = errors.New("betreadd error"); return }; _v.Betreadd = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["suckblood"].(float64); !_ok_ { err = errors.New("suckblood error"); return }; _v.Suckblood = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hpgrow"].(float64); !_ok_ { err = errors.New("hpgrow error"); return }; _v.Hpgrow = float32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["atkgrow"].(float64); !_ok_ { err = errors.New("atkgrow error"); return }; _v.Atkgrow = float32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["defgrow"].(float64); !_ok_ { err = errors.New("defgrow error"); return }; _v.Defgrow = float32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["speedgrow"].(float64); !_ok_ { err = errors.New("speedgrow error"); return }; _v.Speedgrow = int32(_tempNum_) }
    return
}

func DeserializeGameHeroLevelgrowData(_buf map[string]interface{}) (*GameHeroLevelgrowData, error) {
    v := &GameHeroLevelgrowData{}
    if err := v.Deserialize(_buf); err == nil {
        return v, nil
    } else {
        return nil, err
    }
}
