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