43 lines
1.2 KiB
Go
43 lines
1.2 KiB
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) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
///练功请求
|
|
func (this *apiComp) GetGymBuff(session comm.IUserSession, req *pb.PracticeGetGymBuffReq) (errdata *pb.ErrorData) {
|
|
var (
|
|
mryl *cfg.GamePandamasMrylData
|
|
buff *cfg.GamePandamasBuffData
|
|
err error
|
|
)
|
|
|
|
if mryl, err = this.module.configure.getPandamasMryl(req.Posture); err != nil {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_ConfigNoFound,
|
|
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
|
Message: err.Error(),
|
|
}
|
|
return
|
|
}
|
|
if buff, err = this.module.configure.getGamePandamasBuff(mryl.BuffGroup); err != nil {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_ConfigNoFound,
|
|
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
|
Message: err.Error(),
|
|
}
|
|
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
|
|
}
|