Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2022-08-17 18:58:03 +08:00
commit c9e6dd018f
10 changed files with 222 additions and 92 deletions

View File

@ -8,6 +8,7 @@ import (
const ( const (
GourmetGetListResp = "getlist" GourmetGetListResp = "getlist"
GourmetCreateOrderResp = "createorder" GourmetCreateOrderResp = "createorder"
GourmetSkillLvResp = "skilllv"
PagodaGetRewardResp = "getreward" PagodaGetRewardResp = "getreward"
) )

View File

@ -24,6 +24,7 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
res []*cfg.Gameatn res []*cfg.Gameatn
costTime int32 costTime int32
) )
code = this.CreateOrderCheck(session, req) code = this.CreateOrderCheck(session, req)
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回 return // 参数校验失败直接返回
@ -38,10 +39,9 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
if order.FoodCount == 0 { if order.FoodCount == 0 {
continue continue
} }
foodtype := order.FoodType // foodtype := order.FoodType
// 获取技能等级 // 获取技能等级
skillLv := _gourmet.Skill[foodtype] skillLv := _gourmet.Skill[foodtype]
// 计算出需要的时间 // 计算出需要的时间
_skillCfg := this.module.configure.GetGourmetSkillConfigData(foodtype, skillLv) _skillCfg := this.module.configure.GetGourmetSkillConfigData(foodtype, skillLv)
costTime += _skillCfg.Needtime * order.FoodCount costTime += _skillCfg.Needtime * order.FoodCount
@ -49,15 +49,21 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
if _gourmet.Foods == nil { // 队列数据为nil 直接将订单数据给ta if _gourmet.Foods == nil { // 队列数据为nil 直接将订单数据给ta
_gourmet.Foods = req.Order _gourmet.Foods = req.Order
} else { } else {
for _, v := range _gourmet.Foods { for _, v := range req.Order {
for _, v1 := range req.Order { bFound := false
for _, v1 := range _gourmet.Foods {
if v.FoodType == v1.FoodType { if v.FoodType == v1.FoodType {
v.FoodCount += v1.FoodCount // 加对应的数量 v1.FoodCount += v.FoodCount // 加对应的数量
bFound = true
break break
} }
} }
if !bFound {
_gourmet.Foods = append(_gourmet.Foods, v)
} }
} }
}
if _gourmet.CookingFood == nil || (_gourmet.CookingFood != nil && _gourmet.CookingFood.ETime == 0) { if _gourmet.CookingFood == nil || (_gourmet.CookingFood != nil && _gourmet.CookingFood.ETime == 0) {
for _, v := range _gourmet.Foods { for _, v := range _gourmet.Foods {
if v.FoodCount > 0 { if v.FoodCount > 0 {
@ -71,6 +77,14 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat
break break
} }
} }
}
// 計算耗時
for _, v := range _gourmet.Foods {
if v.FoodCount > 0 {
_skillCfg := this.module.configure.GetGourmetSkillConfigData(v.FoodType, _gourmet.Skill[v.FoodType])
v.CookTime = _skillCfg.Needtime * v.FoodCount
}
} }
if _gourmet.CookingFood != nil && _gourmet.CookingFood.ETime == 0 { if _gourmet.CookingFood != nil && _gourmet.CookingFood.ETime == 0 {
_gourmet.CookingFood = nil _gourmet.CookingFood = nil

View File

@ -0,0 +1,74 @@
package gourmet
import (
"crypto/rand"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"math/big"
"google.golang.org/protobuf/proto"
)
//参数校验
func (this *apiComp) SkillLVCheck(session comm.IUserSession, req *pb.GourmetSkillLvReq) (code pb.ErrorCode) {
if req.SkillType == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
///美食城厨师技能升级
func (this *apiComp) SkillLV(session comm.IUserSession, req *pb.GourmetSkillLvReq) (code pb.ErrorCode, dat proto.Message) {
var (
bSpecial bool // 是不是特殊技能
)
code = this.SkillLVCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
_gourmet, err := this.module.modelGourmet.getGourmetList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
skilllv, ok := _gourmet.Skill[req.SkillType]
if !ok { // 校验技能存不存在
skilllv, ok = _gourmet.SpecialSkill[req.SkillType]
if !ok {
code = pb.ErrorCode_ReqParameterError
return
}
bSpecial = true
}
if this.module.configure.GetGourmetSkillConfigData(req.SkillType, skilllv+1) == nil { // 下一级是否存在
code = pb.ErrorCode_GourmetSkillMaxLv
return
}
_skillCfg := this.module.configure.GetGourmetSkillConfigData(req.SkillType, skilllv) // 获取技能配置
// code = this.module.CheckRes(session, _skillCfg.Consume) // 消耗检测
// if code != pb.ErrorCode_Success {
// return
// }
code = this.module.ConsumeRes(session, _skillCfg.Consume, true) // 消耗检测
if code != pb.ErrorCode_Success {
return
}
// 概率升级
n, _ := rand.Int(rand.Reader, big.NewInt(1000))
if n.Int64() < int64(_skillCfg.Probability) { // 可以升级
// 技能升级成功
if bSpecial { // 通用技能升级
_gourmet.SpecialSkill[req.SkillType] += 1
this.module.modelGourmet.CalculationSpecialSkillLv(session.GetUserId(), _gourmet, req.SkillType, _gourmet.SpecialSkill[req.SkillType])
} else { // 某一类型技能升级
_gourmet.Skill[req.SkillType] += 1
this.module.modelGourmet.CalculationGourmetbySkiiLv(session.GetUserId(), _gourmet, req.SkillType, _gourmet.Skill[req.SkillType])
}
}
session.SendMsg(string(this.module.GetType()), GourmetSkillLvResp, &pb.GourmetSkillLvResp{Data: _gourmet})
return
}

View File

@ -20,6 +20,6 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.GourmetGetRewa
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回 return // 参数校验失败直接返回
} }
code = pb.ErrorCode_AgentUidEmpty
return return
} }

View File

@ -26,7 +26,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.GourmetGetListRe
return return
} }
// 计算订单信息 // 计算订单信息
this.module.modelGourmet.CalculationGourmet(_gourmet) this.module.modelGourmet.CalculationGourmet(session.GetUserId(), _gourmet)
session.SendMsg(string(this.module.GetType()), GourmetGetListResp, &pb.GourmetGetListResp{Data: _gourmet}) session.SendMsg(string(this.module.GetType()), GourmetGetListResp, &pb.GourmetGetListResp{Data: _gourmet})
return return
} }

View File

@ -1,25 +0,0 @@
package gourmet
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
//参数校验
func (this *apiComp) SkillLvCheck(session comm.IUserSession, req *pb.GourmetSkillLvReq) (code pb.ErrorCode) {
return
}
///美食城领取奖励
func (this *apiComp) SkillLv(session comm.IUserSession, req *pb.GourmetSkillLvReq) (code pb.ErrorCode, data proto.Message) {
code = this.SkillLvCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
return
}

View File

@ -7,6 +7,8 @@ import (
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"time" "time"
"go.mongodb.org/mongo-driver/bson/primitive"
) )
type modelGourmet struct { type modelGourmet struct {
@ -26,13 +28,15 @@ func (this *modelGourmet) getGourmetList(uid string) (result *pb.DBGourmet, err
result = &pb.DBGourmet{} result = &pb.DBGourmet{}
if err = this.Get(uid, result); err != nil { if err = this.Get(uid, result); err != nil {
if redis.RedisNil != err { // 没有数据直接创建新的数据 if redis.RedisNil != err { // 没有数据直接创建新的数据
result.Id = primitive.NewObjectID().Hex()
result.Uid = uid result.Uid = uid
result.Skill = make(map[int32]int32, 0) result.Skill = make(map[int32]int32, 0)
result.Skill[10011] = 1 result.Skill[1001] = 1
result.Skill[10021] = 1 result.Skill[1002] = 1
result.Skill[10031] = 1 result.Skill[1003] = 1
result.Skill[10041] = 1 // 需要后续查询初始为1 的技能id 临时push result.Skill[1004] = 1 // 需要后续查询初始为1 的技能id 临时push
result.ProductionSkill = 10051 // 通用技能 result.SpecialSkill = make(map[int32]int32, 0)
result.SpecialSkill[1005] = 1 // 通用技能
if err = this.Add(uid, result); err != nil { if err = this.Add(uid, result); err != nil {
this.module.Errorf("err:%v", err) this.module.Errorf("err:%v", err)
err = nil err = nil
@ -54,18 +58,22 @@ func GetDropReward(count, dropId int32) (res []*pb.UserAssets) {
} }
// 计算订单信息 // 计算订单信息
func (this *modelGourmet) CalculationGourmet(gourmet *pb.DBGourmet) { func (this *modelGourmet) CalculationGourmet(uid string, gourmet *pb.DBGourmet) {
var ( var (
bCooking bool bCooking bool
costTime int32 costTime int32
curTime int32 curTime int32
) )
if gourmet.CookingFood != nil && gourmet.CookingFood.ETime == 0 { mapData := make(map[string]interface{}, 0)
if gourmet.CookingFood != nil && gourmet.CookingFood.ETime > 0 {
costTime = int32(time.Now().Unix() - gourmet.CookingFood.ETime) // 当前过去的时间 costTime = int32(time.Now().Unix() - gourmet.CookingFood.ETime) // 当前过去的时间
if costTime < 0 { // 没有完成 不做处理 if costTime < 0 { // 没有完成 不做处理
return return
} }
} }
if gourmet.CookingFood == nil {
gourmet.CookingFood = &pb.Cooking{}
}
for _, order := range gourmet.Foods { for _, order := range gourmet.Foods {
if order.FoodCount == 0 { if order.FoodCount == 0 {
continue continue
@ -77,8 +85,12 @@ func (this *modelGourmet) CalculationGourmet(gourmet *pb.DBGourmet) {
// 计算出需要的时间 // 计算出需要的时间
_skillCfg := this.module.configure.GetGourmetSkillConfigData(foodtype, skillLv) // 技能配置表 _skillCfg := this.module.configure.GetGourmetSkillConfigData(foodtype, skillLv) // 技能配置表
_gourmetcfg := this.module.configure.GetGourmetConfigData(foodtype, skillLv) // 美食家配置表 _gourmetcfg := this.module.configure.GetGourmetConfigData(foodtype, skillLv) // 美食家配置表
for i := 1; i < int(order.FoodCount+1); i++ { for i := 0; i < int(order.FoodCount); i++ {
curTime += _skillCfg.Needtime //* order.FoodCount curTime += _skillCfg.Needtime
order.FoodCount--
gourmet.Items = GetDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup)
// 累计时间也减少
if curTime > costTime { if curTime > costTime {
// 转时间戳 // 转时间戳
eTimd := time.Now().Unix() + int64(curTime-costTime) eTimd := time.Now().Unix() + int64(curTime-costTime)
@ -88,15 +100,58 @@ func (this *modelGourmet) CalculationGourmet(gourmet *pb.DBGourmet) {
// 记录下订单时间 // 记录下订单时间
gourmet.Ctime = time.Now().Unix() gourmet.Ctime = time.Now().Unix()
mapData["ctime"] = gourmet.Ctime
break break
} }
order.FoodCount--
gourmet.Items = GetDropReward(_gourmetcfg.Using, _gourmetcfg.Propsgroup)
// 累计时间也减少
gourmet.OrderCostTime += curTime gourmet.OrderCostTime += curTime
} }
if bCooking { // 分配了正在製作的食物
break
}
} }
if !bCooking { // 经过计算没有烹饪食物的时候 if !bCooking { // 经过计算没有烹饪食物的时候
gourmet.CookingFood = nil gourmet.CookingFood = nil
} }
// 保存信息
mapData["foods"] = gourmet.Foods
mapData["orderCostTime"] = gourmet.OrderCostTime
mapData["cookingFood"] = gourmet.CookingFood // 正在做的
this.module.ModifyGourmetData(uid, mapData)
}
// 技能等级提高了 重新计算订单时间(只对订单中数据有影响)
func (this *modelGourmet) CalculationGourmetbySkiiLv(uid string, gourmet *pb.DBGourmet, skillType int32, skilllv int32) {
mapData := make(map[string]interface{}, 0)
for _, v := range gourmet.Foods {
if v.FoodCount > 0 && v.FoodType == skillType {
_skillCfg := this.module.configure.GetGourmetSkillConfigData(skillType, skilllv)
if _skillCfg != nil {
v.CookTime = _skillCfg.Needtime * v.FoodCount
mapData["foods"] = gourmet.Foods
}
break
}
}
mapData["skill"] = gourmet.Skill
this.module.ModifyGourmetData(uid, mapData)
}
// 升级高效制作技能重计算时间消耗
func (this *modelGourmet) CalculationSpecialSkillLv(uid string, gourmet *pb.DBGourmet, skillType int32, skilllv int32) {
mapData := make(map[string]interface{}, 0)
for _, v := range gourmet.Foods {
if v.FoodCount > 0 {
_skillCfg := this.module.configure.GetGourmetSkillConfigData(skillType, skilllv)
if _skillCfg != nil {
v.CookTime += _skillCfg.Needtime * v.FoodCount
if v.CookTime < 0 { // 担心配置错误 为负数情况 所以这里做下判断
v.CookTime = 0
}
mapData["foods"] = gourmet.Foods
}
}
}
mapData["specialSkill"] = gourmet.SpecialSkill
this.module.ModifyGourmetData(uid, mapData)
} }

View File

@ -148,6 +148,7 @@ const (
ErrorCode_MartialhallUnlocked ErrorCode = 2002 //已解锁 ErrorCode_MartialhallUnlocked ErrorCode = 2002 //已解锁
// 美食馆 // 美食馆
ErrorCode_GourmetMoreOrderTime ErrorCode = 2101 // 超过订单时长 ErrorCode_GourmetMoreOrderTime ErrorCode = 2101 // 超过订单时长
ErrorCode_GourmetSkillMaxLv ErrorCode = 2102 // 技能已经达到满级
) )
// Enum value maps for ErrorCode. // Enum value maps for ErrorCode.
@ -266,6 +267,7 @@ var (
2001: "MartialhallInUse", 2001: "MartialhallInUse",
2002: "MartialhallUnlocked", 2002: "MartialhallUnlocked",
2101: "GourmetMoreOrderTime", 2101: "GourmetMoreOrderTime",
2102: "GourmetSkillMaxLv",
} }
ErrorCode_value = map[string]int32{ ErrorCode_value = map[string]int32{
"Success": 0, "Success": 0,
@ -381,6 +383,7 @@ var (
"MartialhallInUse": 2001, "MartialhallInUse": 2001,
"MartialhallUnlocked": 2002, "MartialhallUnlocked": 2002,
"GourmetMoreOrderTime": 2101, "GourmetMoreOrderTime": 2101,
"GourmetSkillMaxLv": 2102,
} }
) )
@ -415,7 +418,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{ var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xf4, 0x12, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x6f, 0x2a, 0x8c, 0x13, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -566,8 +569,9 @@ var file_errorcode_proto_rawDesc = []byte{
0x10, 0xd1, 0x0f, 0x12, 0x18, 0x0a, 0x13, 0x4d, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x68, 0x61, 0x10, 0xd1, 0x0f, 0x12, 0x18, 0x0a, 0x13, 0x4d, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x68, 0x61,
0x6c, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x10, 0xd2, 0x0f, 0x12, 0x19, 0x0a, 0x6c, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x10, 0xd2, 0x0f, 0x12, 0x19, 0x0a,
0x14, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x4d, 0x6f, 0x72, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x14, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x4d, 0x6f, 0x72, 0x65, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x54, 0x69, 0x6d, 0x65, 0x10, 0xb5, 0x10, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x10, 0xb5, 0x10, 0x12, 0x16, 0x0a, 0x11, 0x47, 0x6f, 0x75, 0x72,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6d, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0xb6, 0x10,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -151,7 +151,7 @@ type DBGourmet struct {
Foods []*OrderCook `protobuf:"bytes,4,rep,name=foods,proto3" json:"foods"` // 等待烹饪的食品 Foods []*OrderCook `protobuf:"bytes,4,rep,name=foods,proto3" json:"foods"` // 等待烹饪的食品
Items []*UserAssets `protobuf:"bytes,5,rep,name=items,proto3" json:"items"` // 已经做好的食品 Items []*UserAssets `protobuf:"bytes,5,rep,name=items,proto3" json:"items"` // 已经做好的食品
Skill map[int32]int32 `protobuf:"bytes,6,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"skill"` //技能ID Skill map[int32]int32 `protobuf:"bytes,6,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"skill"` //技能ID
ProductionSkill int32 `protobuf:"varint,7,opt,name=productionSkill,proto3" json:"productionSkill"` // 通用技能 SpecialSkill map[int32]int32 `protobuf:"bytes,7,rep,name=specialSkill,proto3" json:"specialSkill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"specialSkill"` //通用技能
OrderCostTime int32 `protobuf:"varint,8,opt,name=orderCostTime,proto3" json:"orderCostTime" bson:"orderCostTime"` //订单消耗的时常 OrderCostTime int32 `protobuf:"varint,8,opt,name=orderCostTime,proto3" json:"orderCostTime" bson:"orderCostTime"` //订单消耗的时常
Ctime int64 `protobuf:"varint,9,opt,name=ctime,proto3" json:"ctime"` // 订单创建时间 Ctime int64 `protobuf:"varint,9,opt,name=ctime,proto3" json:"ctime"` // 订单创建时间
} }
@ -230,11 +230,11 @@ func (x *DBGourmet) GetSkill() map[int32]int32 {
return nil return nil
} }
func (x *DBGourmet) GetProductionSkill() int32 { func (x *DBGourmet) GetSpecialSkill() map[int32]int32 {
if x != nil { if x != nil {
return x.ProductionSkill return x.SpecialSkill
} }
return 0 return nil
} }
func (x *DBGourmet) GetOrderCostTime() int32 { func (x *DBGourmet) GetOrderCostTime() int32 {
@ -266,7 +266,7 @@ var file_gourmet_gourmet_db_proto_rawDesc = []byte{
0x66, 0x6f, 0x6f, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x66, 0x6f, 0x6f, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x09, 0x66, 0x6f, 0x6f, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x09, 0x66, 0x6f, 0x6f, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f,
0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f,
0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xeb, 0x02, 0x0a, 0x09, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc4, 0x03, 0x0a, 0x09, 0x44, 0x42, 0x47, 0x6f, 0x75,
0x72, 0x6d, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x72, 0x6d, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x0b, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x0b, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
@ -279,18 +279,23 @@ var file_gourmet_gourmet_db_proto_rawDesc = []byte{
0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c,
0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d,
0x65, 0x74, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x65, 0x74, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73,
0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x53,
0x6f, 0x6e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x70, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, 0x42, 0x47,
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x24, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x53, 0x6b,
0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61,
0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x6c, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f,
0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x6f, 0x74, 0x6f, 0x33, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11,
0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -305,24 +310,26 @@ func file_gourmet_gourmet_db_proto_rawDescGZIP() []byte {
return file_gourmet_gourmet_db_proto_rawDescData return file_gourmet_gourmet_db_proto_rawDescData
} }
var file_gourmet_gourmet_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_gourmet_gourmet_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_gourmet_gourmet_db_proto_goTypes = []interface{}{ var file_gourmet_gourmet_db_proto_goTypes = []interface{}{
(*Cooking)(nil), // 0: Cooking (*Cooking)(nil), // 0: Cooking
(*OrderCook)(nil), // 1: OrderCook (*OrderCook)(nil), // 1: OrderCook
(*DBGourmet)(nil), // 2: DBGourmet (*DBGourmet)(nil), // 2: DBGourmet
nil, // 3: DBGourmet.SkillEntry nil, // 3: DBGourmet.SkillEntry
(*UserAssets)(nil), // 4: UserAssets nil, // 4: DBGourmet.SpecialSkillEntry
(*UserAssets)(nil), // 5: UserAssets
} }
var file_gourmet_gourmet_db_proto_depIdxs = []int32{ var file_gourmet_gourmet_db_proto_depIdxs = []int32{
0, // 0: DBGourmet.cookingFood:type_name -> Cooking 0, // 0: DBGourmet.cookingFood:type_name -> Cooking
1, // 1: DBGourmet.foods:type_name -> OrderCook 1, // 1: DBGourmet.foods:type_name -> OrderCook
4, // 2: DBGourmet.items:type_name -> UserAssets 5, // 2: DBGourmet.items:type_name -> UserAssets
3, // 3: DBGourmet.skill:type_name -> DBGourmet.SkillEntry 3, // 3: DBGourmet.skill:type_name -> DBGourmet.SkillEntry
4, // [4:4] is the sub-list for method output_type 4, // 4: DBGourmet.specialSkill:type_name -> DBGourmet.SpecialSkillEntry
4, // [4:4] is the sub-list for method input_type 5, // [5:5] is the sub-list for method output_type
4, // [4:4] is the sub-list for extension type_name 5, // [5:5] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension extendee 5, // [5:5] is the sub-list for extension type_name
0, // [0:4] is the sub-list for field type_name 5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
} }
func init() { file_gourmet_gourmet_db_proto_init() } func init() { file_gourmet_gourmet_db_proto_init() }
@ -375,7 +382,7 @@ func file_gourmet_gourmet_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_gourmet_gourmet_db_proto_rawDesc, RawDescriptor: file_gourmet_gourmet_db_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 4, NumMessages: 5,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@ -294,7 +294,7 @@ type GourmetSkillLvReq struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
SkillId int32 `protobuf:"varint,1,opt,name=skillId,proto3" json:"skillId"` // 技能id SkillType int32 `protobuf:"varint,1,opt,name=skillType,proto3" json:"skillType"` // 技能id
} }
func (x *GourmetSkillLvReq) Reset() { func (x *GourmetSkillLvReq) Reset() {
@ -329,9 +329,9 @@ func (*GourmetSkillLvReq) Descriptor() ([]byte, []int) {
return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{6} return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{6}
} }
func (x *GourmetSkillLvReq) GetSkillId() int32 { func (x *GourmetSkillLvReq) GetSkillType() int32 {
if x != nil { if x != nil {
return x.SkillId return x.SkillType
} }
return 0 return 0
} }
@ -406,14 +406,14 @@ var file_gourmet_gourmet_msg_proto_rawDesc = []byte{
0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04,
0x64, 0x61, 0x74, 0x61, 0x22, 0x2d, 0x0a, 0x11, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x53, 0x64, 0x61, 0x74, 0x61, 0x22, 0x31, 0x0a, 0x11, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x53,
0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6b, 0x69,
0x6c, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x6b,
0x6c, 0x49, 0x64, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x6f, 0x75, 0x72, 0x6d,
0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a,
0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42,
0x6d, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (