上传装备确认洗练带错误提示
This commit is contained in:
parent
484f68039d
commit
6893ece693
@ -43,6 +43,7 @@ func (this *apiComp) Ench(session comm.IUserSession, req *pb.EquipmentEnchReq) (
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
need = make([]*cfg.Gameatn, 0)
|
||||
need = append(need, conf.Need...)
|
||||
need = append(need, &cfg.Gameatn{
|
||||
|
@ -35,8 +35,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
|
||||
if equip, err = this.module.modelEquipment.QueryUserEquipmentsById(session.GetUserId(), req.Eid); err != nil {
|
||||
this.module.Errorf("Equip reader uid:%s equipment:%s err:%v", session.GetUserId(), req.Eid, err)
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SystemError,
|
||||
Title: pb.ErrorCode_SystemError.ToString(),
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
@ -45,7 +44,6 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
|
||||
this.module.Errorf("Equip_Check err:%v", err)
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
|
@ -42,13 +42,7 @@ func (this *apiComp) WashConfirm(session comm.IUserSession, req *pb.EquipmentWas
|
||||
}
|
||||
return
|
||||
}
|
||||
if len(equip.AdverbEntry) != len(req.Pids) {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if conf, err = this.module.configure.GetEquipmentConfigureById(equip.CId); err != nil {
|
||||
this.module.Errorf("Equip_Check err:%v", err)
|
||||
errdata = &pb.ErrorData{
|
||||
@ -59,6 +53,13 @@ func (this *apiComp) WashConfirm(session comm.IUserSession, req *pb.EquipmentWas
|
||||
return
|
||||
}
|
||||
if conf.EquipId == 1 {
|
||||
if len(equip.AdverbEntry) != len(req.Pids) {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Message: "AdverbEntry.count != Pids.count",
|
||||
}
|
||||
return
|
||||
}
|
||||
for i, v := range equip.AdverbEntry {
|
||||
if attrlibrary, err = this.module.configure.GetEquipmentAttrlibraryConfigureByKey(req.Pids[i]); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -90,6 +91,13 @@ func (this *apiComp) WashConfirm(session comm.IUserSession, req *pb.EquipmentWas
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if len(equip.Adverbskill) != len(req.Pids) {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Message: "Adverbskill.count != Pids.count",
|
||||
}
|
||||
return
|
||||
}
|
||||
for i, v := range equip.Adverbskill {
|
||||
if attrlibrary, err = this.module.configure.GetEquipmentAttrlibraryConfigureByKey(req.Pids[i]); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
|
@ -56,5 +56,5 @@ func (this *MergeGroup) Start() (err error) {
|
||||
|
||||
//检查合并
|
||||
func (this *MergeGroup) CheckMerge() {
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user