This commit is contained in:
meixiongfeng 2023-06-21 19:09:36 +08:00
parent f56be5e9d3
commit d223ccb513

View File

@ -88,9 +88,8 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
hero = this.module.QueryHeroByConfId(session.GetUserId(), talent.HeroId) hero = this.module.QueryHeroByConfId(session.GetUserId(), talent.HeroId)
if hero == nil { if hero == nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_HeroNoExist, Code: pb.ErrorCode_HeroNoExist,
Title: pb.ErrorCode_HeroNoExist.ToString(), Title: pb.ErrorCode_HeroNoExist.ToString(),
Message: err.Error(),
} }
return return
} }
@ -113,9 +112,8 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
} }
if _, ok := talent.Talent[req.TalentID]; ok { if _, ok := talent.Talent[req.TalentID]; ok {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_TalentRepeatLearn, // 重复激活 Code: pb.ErrorCode_TalentRepeatLearn, // 重复激活
Title: pb.ErrorCode_TalentRepeatLearn.ToString(), Title: pb.ErrorCode_TalentRepeatLearn.ToString(),
Message: err.Error(),
} }
return return
} }
@ -123,9 +121,8 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
for _, v := range talentConf.Before { for _, v := range talentConf.Before {
if _, ok := talent.Talent[v]; !ok { if _, ok := talent.Talent[v]; !ok {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_TalentUnLockerBefore, // 前置技能不满足 Code: pb.ErrorCode_TalentUnLockerBefore, // 前置技能不满足
Title: pb.ErrorCode_TalentUnLockerBefore.ToString(), Title: pb.ErrorCode_TalentUnLockerBefore.ToString(),
Message: err.Error(),
} }
return return
} }