diff --git a/bin/json/game_smithy.json b/bin/json/game_smithy.json index 0a070eda6..df730af29 100644 --- a/bin/json/game_smithy.json +++ b/bin/json/game_smithy.json @@ -20,7 +20,7 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "dropshow": [ { @@ -44,6 +44,7 @@ "n": 1 } ], + "using": 1, "drop": 1001, "orderneed": [ { @@ -81,7 +82,7 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "dropshow": [ { @@ -105,6 +106,7 @@ "n": 1 } ], + "using": 1, "drop": 1002, "orderneed": [ { @@ -142,7 +144,7 @@ "n": 1 } ], - "sucess": "1", + "probability": 80, "floors": 1, "dropshow": [ { @@ -166,6 +168,7 @@ "n": 1 } ], + "using": 1, "drop": 1003, "orderneed": [ { @@ -203,7 +206,7 @@ "n": 1 } ], - "sucess": "0.8", + "probability": 80, "floors": 2, "dropshow": [ { @@ -227,6 +230,7 @@ "n": 1 } ], + "using": 1, "drop": 1004, "orderneed": [ { @@ -264,7 +268,7 @@ "n": 1 } ], - "sucess": "0.7", + "probability": 80, "floors": 3, "dropshow": [ { @@ -288,6 +292,7 @@ "n": 1 } ], + "using": 1, "drop": 1005, "orderneed": [ { @@ -325,7 +330,7 @@ "n": 1 } ], - "sucess": "0.6", + "probability": 80, "floors": 4, "dropshow": [ { @@ -349,6 +354,7 @@ "n": 1 } ], + "using": 1, "drop": 1006, "orderneed": [ { @@ -386,7 +392,7 @@ "n": 1 } ], - "sucess": "0.5", + "probability": 80, "floors": 5, "dropshow": [ { @@ -410,6 +416,7 @@ "n": 1 } ], + "using": 1, "drop": 1007, "orderneed": [ { @@ -447,7 +454,7 @@ "n": 1 } ], - "sucess": "0.4", + "probability": 80, "floors": 5, "dropshow": [ { @@ -471,6 +478,7 @@ "n": 1 } ], + "using": 1, "drop": 1008, "orderneed": [ { @@ -508,7 +516,7 @@ "n": 1 } ], - "sucess": "0.3", + "probability": 80, "floors": 5, "dropshow": [ { @@ -532,6 +540,7 @@ "n": 1 } ], + "using": 1, "drop": 1009, "orderneed": [ { @@ -558,8 +567,8 @@ }, "before": 9, "starupneed": [], - "sucess": "-1", - "floors": -1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -582,6 +591,7 @@ "n": 1 } ], + "using": 1, "drop": 1010, "orderneed": [ { @@ -619,8 +629,8 @@ "n": 1 } ], - "sucess": "1", - "floors": 1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -643,6 +653,7 @@ "n": 1 } ], + "using": 1, "drop": 1011, "orderneed": [ { @@ -680,8 +691,8 @@ "n": 1 } ], - "sucess": "1", - "floors": 1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -704,6 +715,7 @@ "n": 1 } ], + "using": 1, "drop": 1012, "orderneed": [ { @@ -741,8 +753,8 @@ "n": 1 } ], - "sucess": "1", - "floors": 1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -765,6 +777,7 @@ "n": 1 } ], + "using": 1, "drop": 1013, "orderneed": [ { @@ -802,8 +815,8 @@ "n": 1 } ], - "sucess": "0.8", - "floors": 2, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -826,6 +839,7 @@ "n": 1 } ], + "using": 1, "drop": 1014, "orderneed": [ { @@ -863,8 +877,8 @@ "n": 1 } ], - "sucess": "0.7", - "floors": 3, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -887,6 +901,7 @@ "n": 1 } ], + "using": 1, "drop": 1015, "orderneed": [ { @@ -924,8 +939,8 @@ "n": 1 } ], - "sucess": "0.6", - "floors": 4, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -948,6 +963,7 @@ "n": 1 } ], + "using": 1, "drop": 1016, "orderneed": [ { @@ -985,7 +1001,7 @@ "n": 1 } ], - "sucess": "0.5", + "probability": 80, "floors": 5, "dropshow": [ { @@ -1009,6 +1025,7 @@ "n": 1 } ], + "using": 1, "drop": 1017, "orderneed": [ { @@ -1046,7 +1063,7 @@ "n": 1 } ], - "sucess": "0.4", + "probability": 80, "floors": 5, "dropshow": [ { @@ -1070,6 +1087,7 @@ "n": 1 } ], + "using": 1, "drop": 1018, "orderneed": [ { @@ -1107,7 +1125,7 @@ "n": 1 } ], - "sucess": "0.3", + "probability": 80, "floors": 5, "dropshow": [ { @@ -1131,6 +1149,7 @@ "n": 1 } ], + "using": 1, "drop": 1019, "orderneed": [ { @@ -1157,8 +1176,8 @@ }, "before": 9, "starupneed": [], - "sucess": "-1", - "floors": -1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -1181,6 +1200,7 @@ "n": 1 } ], + "using": 1, "drop": 1020, "orderneed": [ { @@ -1218,8 +1238,8 @@ "n": 1 } ], - "sucess": "1", - "floors": 1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -1242,6 +1262,7 @@ "n": 1 } ], + "using": 1, "drop": 1021, "orderneed": [ { @@ -1279,8 +1300,8 @@ "n": 1 } ], - "sucess": "1", - "floors": 1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -1303,6 +1324,7 @@ "n": 1 } ], + "using": 1, "drop": 1022, "orderneed": [ { @@ -1340,8 +1362,8 @@ "n": 1 } ], - "sucess": "1", - "floors": 1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -1364,6 +1386,7 @@ "n": 1 } ], + "using": 1, "drop": 1023, "orderneed": [ { @@ -1401,8 +1424,8 @@ "n": 1 } ], - "sucess": "0.8", - "floors": 2, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -1425,6 +1448,7 @@ "n": 1 } ], + "using": 1, "drop": 1024, "orderneed": [ { @@ -1462,8 +1486,8 @@ "n": 1 } ], - "sucess": "0.7", - "floors": 3, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -1486,6 +1510,7 @@ "n": 1 } ], + "using": 1, "drop": 1025, "orderneed": [ { @@ -1523,8 +1548,8 @@ "n": 1 } ], - "sucess": "0.6", - "floors": 4, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -1547,6 +1572,7 @@ "n": 1 } ], + "using": 1, "drop": 1026, "orderneed": [ { @@ -1584,7 +1610,7 @@ "n": 1 } ], - "sucess": "0.5", + "probability": 80, "floors": 5, "dropshow": [ { @@ -1608,6 +1634,7 @@ "n": 1 } ], + "using": 1, "drop": 1027, "orderneed": [ { @@ -1645,7 +1672,7 @@ "n": 1 } ], - "sucess": "0.4", + "probability": 80, "floors": 5, "dropshow": [ { @@ -1669,6 +1696,7 @@ "n": 1 } ], + "using": 1, "drop": 1028, "orderneed": [ { @@ -1706,7 +1734,7 @@ "n": 1 } ], - "sucess": "0.3", + "probability": 80, "floors": 5, "dropshow": [ { @@ -1730,6 +1758,7 @@ "n": 1 } ], + "using": 1, "drop": 1029, "orderneed": [ { @@ -1756,8 +1785,8 @@ }, "before": 9, "starupneed": [], - "sucess": "-1", - "floors": -1, + "probability": 80, + "floors": 5, "dropshow": [ { "a": "item", @@ -1780,6 +1809,7 @@ "n": 1 } ], + "using": 1, "drop": 1030, "orderneed": [ { diff --git a/bin/json/game_smithystove.json b/bin/json/game_smithystove.json index adbf9a946..dfb91fd95 100644 --- a/bin/json/game_smithystove.json +++ b/bin/json/game_smithystove.json @@ -1,6 +1,6 @@ [ { - "id": 1001, + "id": 1, "star": 1, "starshow": { "key": "smithy_name_1001", @@ -19,13 +19,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 300, "desk": "" }, { - "id": 1002, + "id": 2, "star": 2, "starshow": { "key": "smithy_name_1002", @@ -44,13 +44,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 300, "desk": "" }, { - "id": 1003, + "id": 3, "star": 3, "starshow": { "key": "smithy_name_1003", @@ -69,13 +69,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 300, "desk": "" }, { - "id": 1004, + "id": 4, "star": 4, "starshow": { "key": "smithy_name_1004", @@ -94,13 +94,13 @@ "n": 1 } ], - "sucess": "0.8", + "probability": 100, "floors": 2, "time": 300, "desk": "" }, { - "id": 1005, + "id": 5, "star": 5, "starshow": { "key": "smithy_name_1005", @@ -119,13 +119,13 @@ "n": 1 } ], - "sucess": "0.7", + "probability": 100, "floors": 3, "time": 300, "desk": "" }, { - "id": 1006, + "id": 6, "star": 6, "starshow": { "key": "smithy_name_1006", @@ -144,13 +144,13 @@ "n": 1 } ], - "sucess": "0.6", + "probability": 100, "floors": 4, "time": 300, "desk": "" }, { - "id": 1007, + "id": 7, "star": 7, "starshow": { "key": "smithy_name_1007", @@ -169,13 +169,13 @@ "n": 1 } ], - "sucess": "0.5", + "probability": 100, "floors": 5, "time": 300, "desk": "" }, { - "id": 1008, + "id": 8, "star": 8, "starshow": { "key": "smithy_name_1008", @@ -194,13 +194,13 @@ "n": 1 } ], - "sucess": "0.4", + "probability": 100, "floors": 5, "time": 300, "desk": "" }, { - "id": 1009, + "id": 9, "star": 9, "starshow": { "key": "smithy_name_1009", @@ -219,13 +219,13 @@ "n": 1 } ], - "sucess": "0.3", + "probability": 100, "floors": 5, "time": 300, "desk": "" }, { - "id": 1010, + "id": 10, "star": 10, "starshow": { "key": "smithy_name_1010", @@ -233,13 +233,13 @@ }, "before": 9, "starupneed": [], - "sucess": "-1", + "probability": 100, "floors": -1, "time": 300, "desk": "" }, { - "id": 1011, + "id": 11, "star": 11, "starshow": { "key": "smithy_name_1001", @@ -258,13 +258,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 500, "desk": "" }, { - "id": 1012, + "id": 12, "star": 12, "starshow": { "key": "smithy_name_1002", @@ -283,13 +283,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 500, "desk": "" }, { - "id": 1013, + "id": 13, "star": 13, "starshow": { "key": "smithy_name_1003", @@ -308,13 +308,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 500, "desk": "" }, { - "id": 1014, + "id": 14, "star": 14, "starshow": { "key": "smithy_name_1004", @@ -333,13 +333,13 @@ "n": 1 } ], - "sucess": "0.8", + "probability": 100, "floors": 2, "time": 500, "desk": "" }, { - "id": 1015, + "id": 15, "star": 15, "starshow": { "key": "smithy_name_1005", @@ -358,13 +358,13 @@ "n": 1 } ], - "sucess": "0.7", + "probability": 100, "floors": 3, "time": 500, "desk": "" }, { - "id": 1016, + "id": 16, "star": 16, "starshow": { "key": "smithy_name_1006", @@ -383,13 +383,13 @@ "n": 1 } ], - "sucess": "0.6", + "probability": 100, "floors": 4, "time": 500, "desk": "" }, { - "id": 1017, + "id": 17, "star": 17, "starshow": { "key": "smithy_name_1007", @@ -408,13 +408,13 @@ "n": 1 } ], - "sucess": "0.5", + "probability": 100, "floors": 5, "time": 500, "desk": "" }, { - "id": 1018, + "id": 18, "star": 18, "starshow": { "key": "smithy_name_1008", @@ -433,13 +433,13 @@ "n": 1 } ], - "sucess": "0.4", + "probability": 100, "floors": 5, "time": 500, "desk": "" }, { - "id": 1019, + "id": 19, "star": 19, "starshow": { "key": "smithy_name_1009", @@ -458,13 +458,13 @@ "n": 1 } ], - "sucess": "0.3", + "probability": 100, "floors": 5, "time": 500, "desk": "" }, { - "id": 1020, + "id": 20, "star": 20, "starshow": { "key": "smithy_name_1010", @@ -472,13 +472,13 @@ }, "before": 19, "starupneed": [], - "sucess": "-1", + "probability": 100, "floors": -1, "time": 500, "desk": "" }, { - "id": 1021, + "id": 21, "star": 21, "starshow": { "key": "smithy_name_1001", @@ -497,13 +497,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 1000, "desk": "" }, { - "id": 1022, + "id": 22, "star": 22, "starshow": { "key": "smithy_name_1002", @@ -522,13 +522,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 1000, "desk": "" }, { - "id": 1023, + "id": 23, "star": 23, "starshow": { "key": "smithy_name_1003", @@ -547,13 +547,13 @@ "n": 1 } ], - "sucess": "1", + "probability": 100, "floors": 1, "time": 1000, "desk": "" }, { - "id": 1024, + "id": 24, "star": 24, "starshow": { "key": "smithy_name_1004", @@ -572,13 +572,13 @@ "n": 1 } ], - "sucess": "0.8", + "probability": 100, "floors": 2, "time": 1000, "desk": "" }, { - "id": 1025, + "id": 25, "star": 25, "starshow": { "key": "smithy_name_1005", @@ -597,13 +597,13 @@ "n": 1 } ], - "sucess": "0.7", + "probability": 100, "floors": 3, "time": 1000, "desk": "" }, { - "id": 1026, + "id": 26, "star": 26, "starshow": { "key": "smithy_name_1006", @@ -622,13 +622,13 @@ "n": 1 } ], - "sucess": "0.6", + "probability": 100, "floors": 4, "time": 1000, "desk": "" }, { - "id": 1027, + "id": 27, "star": 27, "starshow": { "key": "smithy_name_1007", @@ -647,13 +647,13 @@ "n": 1 } ], - "sucess": "0.5", + "probability": 100, "floors": 5, "time": 1000, "desk": "" }, { - "id": 1028, + "id": 28, "star": 28, "starshow": { "key": "smithy_name_1008", @@ -672,13 +672,13 @@ "n": 1 } ], - "sucess": "0.4", + "probability": 100, "floors": 5, "time": 1000, "desk": "" }, { - "id": 1029, + "id": 29, "star": 29, "starshow": { "key": "smithy_name_1009", @@ -697,13 +697,13 @@ "n": 1 } ], - "sucess": "0.3", + "probability": 100, "floors": 5, "time": 1000, "desk": "" }, { - "id": 1030, + "id": 30, "star": 30, "starshow": { "key": "smithy_name_1010", @@ -711,7 +711,7 @@ }, "before": 29, "starupneed": [], - "sucess": "-1", + "probability": 100, "floors": -1, "time": 1000, "desk": "" diff --git a/modules/smithy/api.go b/modules/smithy/api.go index b0c22ed61..384255605 100644 --- a/modules/smithy/api.go +++ b/modules/smithy/api.go @@ -6,10 +6,11 @@ import ( ) const ( - SmithyGetListResp = "getlist" - SmithyCreateOrderResp = "createorder" - SmithySkillLvResp = "skilllv" - SmithyGetRewardResp = "getreward" + SmithyGetListResp = "getlist" + SmithyCreateOrderResp = "createorder" + SmithyDeskSkillLvResp = "deskskilllv" + SmithyStoveSkillLvResp = "stovekilllv" + SmithyGetRewardResp = "getreward" ) type apiComp struct { diff --git a/modules/smithy/api_deskskilllv.go b/modules/smithy/api_deskskilllv.go new file mode 100644 index 000000000..509c116eb --- /dev/null +++ b/modules/smithy/api_deskskilllv.go @@ -0,0 +1,76 @@ +package smithy + +import ( + "crypto/rand" + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + "math/big" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) DeskSkillLvCkeck(session comm.IUserSession, req *pb.SmithyDeskSkillLvReq) (code pb.ErrorCode) { + if req.DeskType == 0 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +func (this *apiComp) DeskSkillLv(session comm.IUserSession, req *pb.SmithyDeskSkillLvReq) (code pb.ErrorCode, dat proto.Message) { + var ( + bFindSkill bool + curSkillCfg *cfg.GameSmithyData + ) + code = this.DeskSkillLvCkeck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + + for k, v := range _smithy.Skill { + if k == req.DeskType { + bFindSkill = true + // 查询配置文件 + curSkillCfg = this.configure.GetSmithyConfigData(k, v) + if curSkillCfg != nil && curSkillCfg.Starupneed != nil { + //获取下一级 + NextSkillCfg := this.configure.GetSmithyConfigData(k, v+1) + if NextSkillCfg == nil { + code = pb.ErrorCode_GourmetSkillMaxLv + return + } + // 升级 + code = this.module.ConsumeRes(session, curSkillCfg.Starupneed, true) // 消耗检测 + if code != pb.ErrorCode_Success { + return + } + // 概率升级 + n, _ := rand.Int(rand.Reader, big.NewInt(100)) + + if n.Int64() < int64(curSkillCfg.Probability) { // 可以升级 + // 技能升级成功 + _smithy.Skill[req.DeskType] += 1 + this.module.modelSmithy.CalculationDeskSkillLv(session.GetUserId(), _smithy, req.DeskType, _smithy.Skill[req.DeskType]) + + } + } else { + code = pb.ErrorCode_GourmetSkillMaxLv + return + } + break + } + } + if !bFindSkill { + code = pb.ErrorCode_ReqParameterError + return + } + + session.SendMsg(string(this.module.GetType()), SmithyDeskSkillLvResp, &pb.SmithyDeskSkillLvResp{Data: _smithy}) + return +} diff --git a/modules/smithy/api_foodskilllv.go b/modules/smithy/api_foodskilllv.go deleted file mode 100644 index 8eb4bb2c5..000000000 --- a/modules/smithy/api_foodskilllv.go +++ /dev/null @@ -1,62 +0,0 @@ -package smithy - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" - - "google.golang.org/protobuf/proto" -) - -//参数校验 -func (this *apiComp) SkillLVCheck(session comm.IUserSession, req *pb.SmithySkillLvReq) (code pb.ErrorCode) { - if req.SkillType == 0 { - code = pb.ErrorCode_ReqParameterError - } - return -} - -///美食城厨师技能升级 -func (this *apiComp) SkillLV(session comm.IUserSession, req *pb.SmithySkillLvReq) (code pb.ErrorCode, dat proto.Message) { - - code = this.SkillLVCheck(session, req) - if code != pb.ErrorCode_Success { - return // 参数校验失败直接返回 - } - _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) - if err != nil { - code = pb.ErrorCode_DBError - return - } - - // skilllv, ok := _smithy.Skill[req.SkillType] - // if !ok { // 校验技能存不存在 - // skilllv, ok = _smithy.Skill[req.SkillType] - // if !ok { - // code = pb.ErrorCode_ReqParameterError - // return - // } - // bSpecial = true - // } - - // _skillCfg := this.module.configure.GetSmithyStoveConfigData(skilllv) // 获取技能配置 - - // code = this.module.ConsumeRes(session, _skillCfg.Starupneed, true) // 消耗检测 - // if code != pb.ErrorCode_Success { - // return - // } - // // 概率升级 - // n, _ := rand.Int(rand.Reader, big.NewInt(1000)) - - // if n.Int64() < int64(_skillCfg.Star) { // 可以升级 - // // 技能升级成功 - // if bSpecial { // 通用技能升级 - // _smithy.Skill[req.SkillType] += 1 - // this.module.modelSmithy.CalculationSpecialSkillLv(session.GetUserId(), _smithy, req.SkillType, _smithy.Skill[req.SkillType]) - // } else { // 某一类型技能升级 - // _smithy.Skill[req.SkillType] += 1 - // this.module.modelSmithy.CalculationSmithybySkiiLv(session.GetUserId(), _smithy, req.SkillType, _smithy.Skill[req.SkillType]) - // } - // } - session.SendMsg(string(this.module.GetType()), SmithySkillLvResp, &pb.SmithySkillLvResp{Data: _smithy}) - return -} diff --git a/modules/smithy/model_gourmet.go b/modules/smithy/model_gourmet.go index e65729216..9580c6d0d 100644 --- a/modules/smithy/model_gourmet.go +++ b/modules/smithy/model_gourmet.go @@ -178,8 +178,8 @@ func (this *modelSmithy) CalculationSmithybySkiiLv(uid string, Smithy *pb.DBSmit this.module.ModifySmithyData(uid, mapData) } -// 升级高效制作技能重计算时间消耗 -func (this *modelSmithy) CalculationSpecialSkillLv(uid string, Smithy *pb.DBSmithy, skillType int32, skilllv int32) { +// 技能升级 重计算时间消耗 +func (this *modelSmithy) CalculationDeskSkillLv(uid string, Smithy *pb.DBSmithy, skillType int32, skilllv int32) { mapData := make(map[string]interface{}, 0) for _, v := range Smithy.Orders { if v.Count > 0 { diff --git a/pb/hero_db.pb.go b/pb/hero_db.pb.go index 372b05636..1dd0f7d25 100644 --- a/pb/hero_db.pb.go +++ b/pb/hero_db.pb.go @@ -151,7 +151,7 @@ type DBHero struct { IsOverlying bool `protobuf:"varint,23,opt,name=isOverlying,proto3" json:"isOverlying"` // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true EnergyProperty map[string]int32 `protobuf:"bytes,24,rep,name=energyProperty,proto3" json:"energyProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"energyProperty"` // JuexProperty map[string]int32 `protobuf:"bytes,25,rep,name=juexProperty,proto3" json:"juexProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"juexProperty"` ////hp - Status HeroType `protobuf:"varint,26,opt,name=status,proto3,enum=HeroType" json:"status"` // 状态 (1 练功) + Status HeroType `protobuf:"varint,26,opt,name=status,proto3,enum=HeroType" json:"status" bson:"heroType"` //状态 (1 练功) } func (x *DBHero) Reset() { diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go index 6a705f1f3..1455dd75d 100644 --- a/pb/smithy_db.pb.go +++ b/pb/smithy_db.pb.go @@ -153,6 +153,8 @@ type DBSmithy struct { StoveLv int32 `protobuf:"varint,7,opt,name=stoveLv,proto3" json:"stoveLv" bson:"stoveLv"` //炉子等级 OrderCostTime int32 `protobuf:"varint,8,opt,name=orderCostTime,proto3" json:"orderCostTime" bson:"orderCostTime"` //订单消耗的时常 Ctime int64 `protobuf:"varint,9,opt,name=ctime,proto3" json:"ctime"` // 订单创建时间 + DeskFloor int32 `protobuf:"varint,10,opt,name=deskFloor,proto3" json:"deskFloor"` //@go_tags(`bson:"deskFloor"`)台子保底 + StoveFloor int32 `protobuf:"varint,11,opt,name=stoveFloor,proto3" json:"stoveFloor" bson:"stoveFloor"` //炉子保底 } func (x *DBSmithy) Reset() { @@ -250,6 +252,20 @@ func (x *DBSmithy) GetCtime() int64 { return 0 } +func (x *DBSmithy) GetDeskFloor() int32 { + if x != nil { + return x.DeskFloor + } + return 0 +} + +func (x *DBSmithy) GetStoveFloor() int32 { + if x != nil { + return x.StoveFloor + } + return 0 +} + var File_smithy_smithy_db_proto protoreflect.FileDescriptor var file_smithy_smithy_db_proto_rawDesc = []byte{ @@ -264,7 +280,7 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xce, 0x02, 0x0a, 0x08, + 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8c, 0x03, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 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, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x05, 0x63, 0x6c, @@ -282,11 +298,15 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, - 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 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, + 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, + 0x1a, 0x38, 0x0a, 0x0a, 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 ( diff --git a/pb/smithy_msg.pb.go b/pb/smithy_msg.pb.go index 8a10d4f61..ad169dce4 100644 --- a/pb/smithy_msg.pb.go +++ b/pb/smithy_msg.pb.go @@ -289,16 +289,16 @@ func (x *SmithyGetRewardResp) GetData() *DBSmithy { } // 技能升级 -type SmithySkillLvReq struct { +type SmithyDeskSkillLvReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SkillType int32 `protobuf:"varint,1,opt,name=skillType,proto3" json:"skillType"` // 技能id + DeskType int32 `protobuf:"varint,1,opt,name=deskType,proto3" json:"deskType"` // 台子类型 } -func (x *SmithySkillLvReq) Reset() { - *x = SmithySkillLvReq{} +func (x *SmithyDeskSkillLvReq) Reset() { + *x = SmithyDeskSkillLvReq{} if protoimpl.UnsafeEnabled { mi := &file_smithy_smithy_msg_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -306,13 +306,13 @@ func (x *SmithySkillLvReq) Reset() { } } -func (x *SmithySkillLvReq) String() string { +func (x *SmithyDeskSkillLvReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SmithySkillLvReq) ProtoMessage() {} +func (*SmithyDeskSkillLvReq) ProtoMessage() {} -func (x *SmithySkillLvReq) ProtoReflect() protoreflect.Message { +func (x *SmithyDeskSkillLvReq) ProtoReflect() protoreflect.Message { mi := &file_smithy_smithy_msg_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -324,19 +324,19 @@ func (x *SmithySkillLvReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SmithySkillLvReq.ProtoReflect.Descriptor instead. -func (*SmithySkillLvReq) Descriptor() ([]byte, []int) { +// Deprecated: Use SmithyDeskSkillLvReq.ProtoReflect.Descriptor instead. +func (*SmithyDeskSkillLvReq) Descriptor() ([]byte, []int) { return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{6} } -func (x *SmithySkillLvReq) GetSkillType() int32 { +func (x *SmithyDeskSkillLvReq) GetDeskType() int32 { if x != nil { - return x.SkillType + return x.DeskType } return 0 } -type SmithySkillLvResp struct { +type SmithyDeskSkillLvResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -344,8 +344,8 @@ type SmithySkillLvResp struct { Data *DBSmithy `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` } -func (x *SmithySkillLvResp) Reset() { - *x = SmithySkillLvResp{} +func (x *SmithyDeskSkillLvResp) Reset() { + *x = SmithyDeskSkillLvResp{} if protoimpl.UnsafeEnabled { mi := &file_smithy_smithy_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -353,13 +353,13 @@ func (x *SmithySkillLvResp) Reset() { } } -func (x *SmithySkillLvResp) String() string { +func (x *SmithyDeskSkillLvResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SmithySkillLvResp) ProtoMessage() {} +func (*SmithyDeskSkillLvResp) ProtoMessage() {} -func (x *SmithySkillLvResp) ProtoReflect() protoreflect.Message { +func (x *SmithyDeskSkillLvResp) ProtoReflect() protoreflect.Message { mi := &file_smithy_smithy_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -371,12 +371,98 @@ func (x *SmithySkillLvResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SmithySkillLvResp.ProtoReflect.Descriptor instead. -func (*SmithySkillLvResp) Descriptor() ([]byte, []int) { +// Deprecated: Use SmithyDeskSkillLvResp.ProtoReflect.Descriptor instead. +func (*SmithyDeskSkillLvResp) Descriptor() ([]byte, []int) { return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{7} } -func (x *SmithySkillLvResp) GetData() *DBSmithy { +func (x *SmithyDeskSkillLvResp) GetData() *DBSmithy { + if x != nil { + return x.Data + } + return nil +} + +// 炉子技能升级 +type SmithyStoveSkillLvReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SmithyStoveSkillLvReq) Reset() { + *x = SmithyStoveSkillLvReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyStoveSkillLvReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyStoveSkillLvReq) ProtoMessage() {} + +func (x *SmithyStoveSkillLvReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SmithyStoveSkillLvReq.ProtoReflect.Descriptor instead. +func (*SmithyStoveSkillLvReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{8} +} + +type SmithyStoveSkillLvResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBSmithy `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *SmithyStoveSkillLvResp) Reset() { + *x = SmithyStoveSkillLvResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyStoveSkillLvResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyStoveSkillLvResp) ProtoMessage() {} + +func (x *SmithyStoveSkillLvResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SmithyStoveSkillLvResp.ProtoReflect.Descriptor instead. +func (*SmithyStoveSkillLvResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{9} +} + +func (x *SmithyStoveSkillLvResp) GetData() *DBSmithy { if x != nil { return x.Data } @@ -405,14 +491,20 @@ var file_smithy_smithy_msg_proto_rawDesc = []byte{ 0x65, 0x71, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x30, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x22, 0x32, 0x0a, 0x11, 0x53, 0x6d, - 0x69, 0x74, 0x68, 0x79, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, - 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, + 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x15, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, + 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, + 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x22, 0x37, 0x0a, + 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, + 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -427,30 +519,33 @@ func file_smithy_smithy_msg_proto_rawDescGZIP() []byte { return file_smithy_smithy_msg_proto_rawDescData } -var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_smithy_smithy_msg_proto_goTypes = []interface{}{ - (*SmithyGetListReq)(nil), // 0: SmithyGetListReq - (*SmithyGetListResp)(nil), // 1: SmithyGetListResp - (*SmithyCreateOrderReq)(nil), // 2: SmithyCreateOrderReq - (*SmithyCreateOrderResp)(nil), // 3: SmithyCreateOrderResp - (*SmithyGetRewardReq)(nil), // 4: SmithyGetRewardReq - (*SmithyGetRewardResp)(nil), // 5: SmithyGetRewardResp - (*SmithySkillLvReq)(nil), // 6: SmithySkillLvReq - (*SmithySkillLvResp)(nil), // 7: SmithySkillLvResp - (*DBSmithy)(nil), // 8: DBSmithy - (*OrderClang)(nil), // 9: OrderClang + (*SmithyGetListReq)(nil), // 0: SmithyGetListReq + (*SmithyGetListResp)(nil), // 1: SmithyGetListResp + (*SmithyCreateOrderReq)(nil), // 2: SmithyCreateOrderReq + (*SmithyCreateOrderResp)(nil), // 3: SmithyCreateOrderResp + (*SmithyGetRewardReq)(nil), // 4: SmithyGetRewardReq + (*SmithyGetRewardResp)(nil), // 5: SmithyGetRewardResp + (*SmithyDeskSkillLvReq)(nil), // 6: SmithyDeskSkillLvReq + (*SmithyDeskSkillLvResp)(nil), // 7: SmithyDeskSkillLvResp + (*SmithyStoveSkillLvReq)(nil), // 8: SmithyStoveSkillLvReq + (*SmithyStoveSkillLvResp)(nil), // 9: SmithyStoveSkillLvResp + (*DBSmithy)(nil), // 10: DBSmithy + (*OrderClang)(nil), // 11: OrderClang } var file_smithy_smithy_msg_proto_depIdxs = []int32{ - 8, // 0: SmithyGetListResp.data:type_name -> DBSmithy - 9, // 1: SmithyCreateOrderReq.order:type_name -> OrderClang - 8, // 2: SmithyCreateOrderResp.data:type_name -> DBSmithy - 8, // 3: SmithyGetRewardResp.data:type_name -> DBSmithy - 8, // 4: SmithySkillLvResp.data:type_name -> DBSmithy - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 10, // 0: SmithyGetListResp.data:type_name -> DBSmithy + 11, // 1: SmithyCreateOrderReq.order:type_name -> OrderClang + 10, // 2: SmithyCreateOrderResp.data:type_name -> DBSmithy + 10, // 3: SmithyGetRewardResp.data:type_name -> DBSmithy + 10, // 4: SmithyDeskSkillLvResp.data:type_name -> DBSmithy + 10, // 5: SmithyStoveSkillLvResp.data:type_name -> DBSmithy + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_smithy_smithy_msg_proto_init() } @@ -533,7 +628,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithySkillLvReq); i { + switch v := v.(*SmithyDeskSkillLvReq); i { case 0: return &v.state case 1: @@ -545,7 +640,31 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithySkillLvResp); i { + switch v := v.(*SmithyDeskSkillLvResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyStoveSkillLvReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyStoveSkillLvResp); i { case 0: return &v.state case 1: @@ -563,7 +682,7 @@ func file_smithy_smithy_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.SmithyData.go b/sys/configure/structs/Game.SmithyData.go index 861d451f6..8e0cc0166 100644 --- a/sys/configure/structs/Game.SmithyData.go +++ b/sys/configure/structs/Game.SmithyData.go @@ -17,9 +17,10 @@ type GameSmithyData struct { Starshow string Before int32 Starupneed []*Gameatn - Sucess string + Probability int32 Floors int32 Dropshow []*Gameatn + Using int32 Drop int32 Orderneed []*Gameatn Desk string @@ -52,7 +53,7 @@ func (_v *GameSmithyData)Deserialize(_buf map[string]interface{}) (err error) { } } - { var _ok_ bool; if _v.Sucess, _ok_ = _buf["sucess"].(string); !_ok_ { err = errors.New("sucess error"); return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["probability"].(float64); !_ok_ { err = errors.New("probability error"); return }; _v.Probability = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["floors"].(float64); !_ok_ { err = errors.New("floors error"); return }; _v.Floors = int32(_tempNum_) } { var _arr_ []interface{} @@ -68,6 +69,7 @@ func (_v *GameSmithyData)Deserialize(_buf map[string]interface{}) (err error) { } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["using"].(float64); !_ok_ { err = errors.New("using error"); return }; _v.Using = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["drop"].(float64); !_ok_ { err = errors.New("drop error"); return }; _v.Drop = int32(_tempNum_) } { var _arr_ []interface{} diff --git a/sys/configure/structs/Game.SmithyStoveData.go b/sys/configure/structs/Game.SmithyStoveData.go index eb407b9f5..9cce4aecc 100644 --- a/sys/configure/structs/Game.SmithyStoveData.go +++ b/sys/configure/structs/Game.SmithyStoveData.go @@ -16,7 +16,7 @@ type GameSmithyStoveData struct { Starshow string Before int32 Starupneed []*Gameatn - Sucess string + Probability int32 Floors int32 Time int32 Desk string @@ -47,7 +47,7 @@ func (_v *GameSmithyStoveData)Deserialize(_buf map[string]interface{}) (err erro } } - { var _ok_ bool; if _v.Sucess, _ok_ = _buf["sucess"].(string); !_ok_ { err = errors.New("sucess error"); return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["probability"].(float64); !_ok_ { err = errors.New("probability error"); return }; _v.Probability = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["floors"].(float64); !_ok_ { err = errors.New("floors error"); return }; _v.Floors = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) } { var _ok_ bool; if _v.Desk, _ok_ = _buf["desk"].(string); !_ok_ { err = errors.New("desk error"); return } }