package enchant import ( "go_dreamfactory/comm" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" ) //参数校验 func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.EnchantBuyReq) (code pb.ErrorCode) { if req.Count <= 0 { code = pb.ErrorCode_ReqParameterError return } return } // 协议废除 走通用购买逻辑 func (this *apiComp) Buy(session comm.IUserSession, req *pb.EnchantBuyReq) (code pb.ErrorCode, data proto.Message) { session.SendMsg(string(this.module.GetType()), EnchantBuyResp, &pb.EnchantBuyResp{}) return }