上传专武脱装备bug
This commit is contained in:
parent
62afe85de8
commit
c31dcd3a23
@ -34,6 +34,13 @@ func (this *apiComp) StarUp(session comm.IUserSession, req *pb.ExclusiveStarUpRe
|
||||
if v.Id == req.Oid {
|
||||
info = v
|
||||
} else {
|
||||
if v.Islock {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Message: fmt.Sprintf("Exclusives:%s is lock", v.Id),
|
||||
}
|
||||
return
|
||||
}
|
||||
stars += v.Star
|
||||
}
|
||||
}
|
||||
|
@ -34,24 +34,26 @@ func (this *apiComp) Wear(session comm.IUserSession, req *pb.ExclusiveWearReq) (
|
||||
info.Hero = ""
|
||||
change = append(change, info)
|
||||
}
|
||||
if info, err = this.module.model.getExclusivesById(session.GetUserId(), req.Oid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Message: err.Error(),
|
||||
if req.Oid != "" {
|
||||
if info, err = this.module.model.getExclusivesById(session.GetUserId(), req.Oid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
info.Hero = hero.Id
|
||||
change = append(change, info)
|
||||
if err = this.module.model.updateExclusive(session.GetUserId(), change...); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Message: err.Error(),
|
||||
info.Hero = hero.Id
|
||||
change = append(change, info)
|
||||
if err = this.module.model.updateExclusive(session.GetUserId(), change...); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if errdata = this.module.ModuleHero.UpdateExclusive(session, hero, info); errdata != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
if errdata = this.module.ModuleHero.UpdateExclusive(session, hero, info); errdata != nil {
|
||||
return
|
||||
}
|
||||
this.module.equipmentsChangePush(session, change)
|
||||
session.SendMsg(string(this.module.GetType()), "wear", &pb.ExclusiveWearResp{Exclusives: info})
|
||||
|
Loading…
Reference in New Issue
Block a user