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