go_dreamfactory/modules/hero/api_talentlist.go
2023-04-14 12:21:58 +08:00

26 lines
658 B
Go

package hero
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//参数校验
func (this *apiComp) TalentListCheck(session comm.IUserSession, req *pb.HeroTalentListReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) TalentList(session comm.IUserSession, req *pb.HeroTalentListReq) (code pb.ErrorCode, data *pb.ErrorData) {
var (
err error
)
rsp := &pb.HeroTalentListResp{}
if rsp.Telnet, err = this.module.modelTalent.GetHerotalent(session.GetUserId()); err != nil {
fmt.Printf("GetHerotalenterr: %v\n", err)
//code = pb.ErrorCode_DBError
}
session.SendMsg(string(this.module.GetType()), HeroTalentListResp, rsp)
return
}