上传装备属性
This commit is contained in:
parent
5a4830abd3
commit
6c70287868
@ -129,15 +129,15 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
||||
return
|
||||
}
|
||||
}
|
||||
equipments = make([]*pb.DB_Equipment, 6)
|
||||
confs = make([]*cfg.GameEquipData, 6)
|
||||
equipments = make([]*pb.DB_Equipment, 8)
|
||||
confs = make([]*cfg.GameEquipData, 8)
|
||||
//已装备 重新计算属性
|
||||
if equipment.HeroId != "" {
|
||||
if hero, code = this.module.ModuleHero.GetHeroByObjID(session.GetUserId(), equipment.HeroId); code != pb.ErrorCode_Success {
|
||||
this.module.Errorf("Upgrade code:%d", code)
|
||||
return
|
||||
}
|
||||
if conf.Pos >= 6 {
|
||||
if conf.Pos >= 8 {
|
||||
code = pb.ErrorCode_ConfigurationException
|
||||
this.module.Errorf("Upgrade equipment Pos:%d", conf.Pos)
|
||||
return
|
||||
|
@ -98,5 +98,13 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
switch conf.RechargeType {
|
||||
case 1:
|
||||
break
|
||||
case 2:
|
||||
break
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -29,22 +29,67 @@ func (*GameRechargeData) GetTypeId() int32 {
|
||||
return -1686494355
|
||||
}
|
||||
|
||||
func (_v *GameRechargeData)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; if _v.Editionid, _ok_ = _buf["editionid"].(string); !_ok_ { err = errors.New("editionid error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["recharge_type"].(float64); !_ok_ { err = errors.New("recharge_type error"); return }; _v.RechargeType = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Monetaryunit, _ok_ = _buf["monetaryunit"].(string); !_ok_ { err = errors.New("monetaryunit error"); return } }
|
||||
{ var _ok_ bool; if _v.Amount, _ok_ = _buf["amount"].(string); !_ok_ { err = errors.New("amount error"); return } }
|
||||
func (_v *GameRechargeData) 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
|
||||
if _v.Editionid, _ok_ = _buf["editionid"].(string); !_ok_ {
|
||||
err = errors.New("editionid error")
|
||||
return
|
||||
}
|
||||
}
|
||||
{
|
||||
var _ok_ bool
|
||||
var _tempNum_ float64
|
||||
if _tempNum_, _ok_ = _buf["recharge_type"].(float64); !_ok_ {
|
||||
err = errors.New("recharge_type error")
|
||||
return
|
||||
}
|
||||
_v.RechargeType = int32(_tempNum_)
|
||||
}
|
||||
{
|
||||
var _ok_ bool
|
||||
if _v.Monetaryunit, _ok_ = _buf["monetaryunit"].(string); !_ok_ {
|
||||
err = errors.New("monetaryunit error")
|
||||
return
|
||||
}
|
||||
}
|
||||
{
|
||||
var _ok_ bool
|
||||
if _v.Amount, _ok_ = _buf["amount"].(string); !_ok_ {
|
||||
err = errors.New("amount error")
|
||||
return
|
||||
}
|
||||
}
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["vipexp"].([]interface{}); !_ok_ { err = errors.New("vipexp error"); return }
|
||||
if _arr_, _ok_ = _buf["vipexp"].([]interface{}); !_ok_ {
|
||||
err = errors.New("vipexp error")
|
||||
return
|
||||
}
|
||||
|
||||
_v.Vipexp = make([]*Gameatn, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Gameatn
|
||||
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
|
||||
{
|
||||
var _ok_ bool
|
||||
var _x_ map[string]interface{}
|
||||
if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ {
|
||||
err = errors.New("_list_v_ error")
|
||||
return
|
||||
}
|
||||
if _list_v_, err = DeserializeGameatn(_x_); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
_v.Vipexp = append(_v.Vipexp, _list_v_)
|
||||
}
|
||||
}
|
||||
@ -52,20 +97,51 @@ func (_v *GameRechargeData)Deserialize(_buf map[string]interface{}) (err error)
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["diamond_num_double"].([]interface{}); !_ok_ { err = errors.New("diamond_num_double error"); return }
|
||||
if _arr_, _ok_ = _buf["diamond_num_double"].([]interface{}); !_ok_ {
|
||||
err = errors.New("diamond_num_double error")
|
||||
return
|
||||
}
|
||||
|
||||
_v.DiamondNumDouble = make([]*Gameatn, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Gameatn
|
||||
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
|
||||
{
|
||||
var _ok_ bool
|
||||
var _x_ map[string]interface{}
|
||||
if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ {
|
||||
err = errors.New("_list_v_ error")
|
||||
return
|
||||
}
|
||||
if _list_v_, err = DeserializeGameatn(_x_); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
_v.DiamondNumDouble = append(_v.DiamondNumDouble, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; if _v.Channel, _ok_ = _buf["channel"].(string); !_ok_ { err = errors.New("channel error"); return } }
|
||||
{ var _ok_ bool; if _v.Text, _ok_ = _buf["text"].(string); !_ok_ { err = errors.New("text error"); return } }
|
||||
{ var _ok_ bool; if _v.Image, _ok_ = _buf["image"].(string); !_ok_ { err = errors.New("image error"); return } }
|
||||
{
|
||||
var _ok_ bool
|
||||
if _v.Channel, _ok_ = _buf["channel"].(string); !_ok_ {
|
||||
err = errors.New("channel error")
|
||||
return
|
||||
}
|
||||
}
|
||||
{
|
||||
var _ok_ bool
|
||||
if _v.Text, _ok_ = _buf["text"].(string); !_ok_ {
|
||||
err = errors.New("text error")
|
||||
return
|
||||
}
|
||||
}
|
||||
{
|
||||
var _ok_ bool
|
||||
if _v.Image, _ok_ = _buf["image"].(string); !_ok_ {
|
||||
err = errors.New("image error")
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user