package practice import ( "go_dreamfactory/comm" "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" "google.golang.org/protobuf/proto" ) //参数校验 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 proto.Message) { 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()), "buff", &pb.PracticeGetGymBuffResp{Buffid: buff.Id}) return }