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

34 lines
885 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
}
session.SendMsg(string(this.module.GetType()), "getgymbuff", &pb.PracticeGetGymBuffResp{Buffid: buff.Id})
return
}