32 lines
713 B
Go
32 lines
713 B
Go
package rtask
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
func (this *apiComp) listCheck(session comm.IUserSession, req *pb.RtasklistReq) (code pb.ErrorCode) {
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) list(session comm.IUserSession, req *pb.RtasklistReq) (code pb.ErrorCode, data proto.Message) {
|
|
|
|
// 获取当前玩家
|
|
rtask := this.moduleRtask.modelRtask.GetRtask(session.GetUserId())
|
|
if rtask == nil {
|
|
code = pb.ErrorCode_RtaskNoRtask
|
|
return
|
|
}
|
|
|
|
rsp := &pb.RtasklistResp{
|
|
RtaskId: rtask.FrtaskIds,
|
|
}
|
|
if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeList, rsp); err != nil {
|
|
code = pb.ErrorCode_SystemError
|
|
return
|
|
}
|
|
return
|
|
}
|