diff --git a/modules/equipment/api_upgrade.go b/modules/equipment/api_upgrade.go index 64953ab1d..d3f7bc00d 100644 --- a/modules/equipment/api_upgrade.go +++ b/modules/equipment/api_upgrade.go @@ -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 diff --git a/modules/pay/module.go b/modules/pay/module.go index 5ccb15900..9e09dd913 100644 --- a/modules/pay/module.go +++ b/modules/pay/module.go @@ -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 } diff --git a/sys/configure/structs/Game.RechargeData.go b/sys/configure/structs/Game.RechargeData.go index 94bc08426..38778b990 100644 --- a/sys/configure/structs/Game.RechargeData.go +++ b/sys/configure/structs/Game.RechargeData.go @@ -11,69 +11,145 @@ package cfg import "errors" type GameRechargeData struct { - Id string - Editionid string - RechargeType int32 - Monetaryunit string - Amount string - Vipexp []*Gameatn - DiamondNumDouble []*Gameatn - Channel string - Text string - Image string + Id string + Editionid string + RechargeType int32 + Monetaryunit string + Amount string + Vipexp []*Gameatn + DiamondNumDouble []*Gameatn + Channel string + Text string + Image string } const TypeId_GameRechargeData = -1686494355 func (*GameRechargeData) GetTypeId() int32 { - return -1686494355 + 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 } } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["vipexp"].([]interface{}); !_ok_ { err = errors.New("vipexp 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 + } - _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 } } - _v.Vipexp = append(_v.Vipexp, _list_v_) - } - } + _v.Vipexp = make([]*Gameatn, 0, len(_arr_)) - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["diamond_num_double"].([]interface{}); !_ok_ { err = errors.New("diamond_num_double error"); return } + 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 + } + } + _v.Vipexp = append(_v.Vipexp, _list_v_) + } + } - _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 } } - _v.DiamondNumDouble = append(_v.DiamondNumDouble, _list_v_) - } - } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["diamond_num_double"].([]interface{}); !_ok_ { + err = errors.New("diamond_num_double 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 + _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 + } + } + _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 + } + } + return } func DeserializeGameRechargeData(_buf map[string]interface{}) (*GameRechargeData, error) { - v := &GameRechargeData{} - if err := v.Deserialize(_buf); err == nil { - return v, nil - } else { - return nil, err - } + v := &GameRechargeData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } }