go_dreamfactory/modules/practice/api_getgymbuff.go
2023-05-29 17:16:52 +08:00

35 lines
988 B
Go

package practice
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
//参数校验
func (this *apiComp) GetGymBuffCheck(session comm.IUserSession, req *pb.PracticeGetGymBuffReq) (code pb.ErrorCode) {
return
}
///练功请求
func (this *apiComp) GetGymBuff(session comm.IUserSession, req *pb.PracticeGetGymBuffReq) (code pb.ErrorCode, data *pb.ErrorData) {
var (
mryl *cfg.GamePandamasMrylData
buff *cfg.GamePandamasBuffData
err error
)
if mryl, err = this.module.configure.getPandamasMryl(req.Posture); err != nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if buff, err = this.module.configure.getGamePandamasBuff(mryl.BuffGroup); err != nil {
code = pb.ErrorCode_ConfigNoFound
return
}
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype185, 1))
session.SendMsg(string(this.module.GetType()), "getgymbuff", &pb.PracticeGetGymBuffResp{Buffid: buff.Id})
return
}