From 9abc06944c571c4db4b7c45f820cf38957c3b4b4 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Thu, 27 Jul 2023 18:08:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=85=91=E6=8D=A2?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_battleready.json | 2 +- bin/json/game_guildbossscore.json | 20 ++++---- bin/json/game_item.json | 80 +++++++++++++++++++++++++++++-- bin/json/game_lottery.json | 24 ++++++++++ bin/json/game_trendchose.json | 50 +++++++++++++++++++ modules/wtask/api_exchange.go | 17 +++++-- 6 files changed, 175 insertions(+), 18 deletions(-) diff --git a/bin/json/game_battleready.json b/bin/json/game_battleready.json index c7bdc72e2..71c555849 100644 --- a/bin/json/game_battleready.json +++ b/bin/json/game_battleready.json @@ -525,7 +525,7 @@ "DisableCamp": [], "DefaultHero": 0, "ChoseHero": [ - "44004" + "25001" ], "DisableHero": [], "LockSlots": [], diff --git a/bin/json/game_guildbossscore.json b/bin/json/game_guildbossscore.json index 27063d3f8..75a043958 100644 --- a/bin/json/game_guildbossscore.json +++ b/bin/json/game_guildbossscore.json @@ -8,7 +8,7 @@ "score": 1, "rank_low": 0, "rank_up": 1500000, - "hp": 1, + "hp": 20, "drop": 10001001, "grade": "gh_img_a" }, @@ -21,7 +21,7 @@ "score": 1, "rank_low": 1500001, "rank_up": 3000000, - "hp": 2, + "hp": 20, "drop": 10001002, "grade": "gh_img_b" }, @@ -34,7 +34,7 @@ "score": 1, "rank_low": 3000001, "rank_up": 4500000, - "hp": 3, + "hp": 20, "drop": 10001003, "grade": "gh_img_c" }, @@ -47,7 +47,7 @@ "score": 1, "rank_low": 4500001, "rank_up": 6000000, - "hp": 4, + "hp": 20, "drop": 10001003, "grade": "gh_img_d" }, @@ -60,7 +60,7 @@ "score": 1, "rank_low": 6000001, "rank_up": 9000000, - "hp": 5, + "hp": 20, "drop": 10001003, "grade": "gh_img_e" }, @@ -73,7 +73,7 @@ "score": 1, "rank_low": 9000001, "rank_up": 12000000, - "hp": 6, + "hp": 20, "drop": 10001003, "grade": "gh_img_ex3" }, @@ -86,7 +86,7 @@ "score": 1, "rank_low": 12000001, "rank_up": 15000000, - "hp": 7, + "hp": 20, "drop": 10001003, "grade": "gh_img_s" }, @@ -99,7 +99,7 @@ "score": 1, "rank_low": 15000001, "rank_up": 18000000, - "hp": 8, + "hp": 20, "drop": 10001003, "grade": "gh_img_ss" }, @@ -112,7 +112,7 @@ "score": 1, "rank_low": 18000001, "rank_up": 21000000, - "hp": 9, + "hp": 20, "drop": 10001003, "grade": "gh_img_sss" }, @@ -125,7 +125,7 @@ "score": 1, "rank_low": 21000001, "rank_up": -1, - "hp": 10, + "hp": 20, "drop": 10001003, "grade": "gh_img_sss1" } diff --git a/bin/json/game_item.json b/bin/json/game_item.json index 0cff22cd4..1c63d87ac 100644 --- a/bin/json/game_item.json +++ b/bin/json/game_item.json @@ -14683,7 +14683,7 @@ { "id": "10000036", "name": { - "key": "item_item_name_347", + "key": "item_item_name_369", "text": "石阵玩法货币" }, "usetype": 1, @@ -14702,8 +14702,8 @@ "decompose_deplete": [], "decompose_get": [], "access": [], - "use_skip": 0, - "upper_limit": 0, + "use_skip": 11001, + "upper_limit": 999, "img": "item_10000035", "intr": { "key": "item_item_intr_378", @@ -14716,5 +14716,79 @@ "n": 1000 } ] + }, + { + "id": "10000037", + "name": { + "key": "item_item_name_370", + "text": "石阵天赋树货币" + }, + "usetype": 1, + "color": 5, + "bagtype": 1, + "index": 1, + "special_type": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [], + "use_skip": 11001, + "upper_limit": 999, + "img": "item_10000035", + "intr": { + "key": "item_item_intr_379", + "text": "暂无包装" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ] + }, + { + "id": "10000038", + "name": { + "key": "item_item_name_371", + "text": "石阵周常积分" + }, + "usetype": 1, + "color": 5, + "bagtype": 1, + "index": 1, + "special_type": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [], + "use_skip": 11001, + "upper_limit": 999, + "img": "item_10000035", + "intr": { + "key": "item_item_intr_380", + "text": "暂无包装" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ] } ] \ No newline at end of file diff --git a/bin/json/game_lottery.json b/bin/json/game_lottery.json index d52b94838..f2830abf6 100644 --- a/bin/json/game_lottery.json +++ b/bin/json/game_lottery.json @@ -23494,5 +23494,29 @@ "playerlvmin": 0, "playerlvmax": 0, "notice": 0 + }, + { + "id": 980, + "lotteryid": 21141101, + "description": "石阵秘境战斗事件", + "type": 2, + "groupwt": 1000, + "groupid": 10001, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "10000037", + "n": 1 + }, + "itemdes": "石阵天赋树货币", + "itemwt": 1000, + "min": 5, + "max": 10, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 } ] \ No newline at end of file diff --git a/bin/json/game_trendchose.json b/bin/json/game_trendchose.json index f63602c5a..d34e84213 100644 --- a/bin/json/game_trendchose.json +++ b/bin/json/game_trendchose.json @@ -234,5 +234,55 @@ "lose": [], "jump": 0, "num": 0 + }, + { + "key": 11, + "taskstarID": 100110, + "lv": 1, + "taskendID": 20090, + "npc": [ + "GameMain", + "功能入口-烹饪" + ], + "chosetxt": { + "key": "chosetxt_11", + "text": "买乳猪4" + }, + "chosetype": 2, + "chosenum": 0, + "startstory": 50020010, + "constory": 50020030, + "get": [ + 1001 + ], + "aginstory": 12980, + "lose": [], + "jump": 0, + "num": 0 + }, + { + "key": 12, + "taskstarID": 100120, + "lv": 1, + "taskendID": 20090, + "npc": [ + "GameMain", + "功能入口-烹饪" + ], + "chosetxt": { + "key": "chosetxt_12", + "text": "买乳猪5" + }, + "chosetype": 2, + "chosenum": 0, + "startstory": 50020010, + "constory": 50020030, + "get": [ + 1001 + ], + "aginstory": 12980, + "lose": [], + "jump": 0, + "num": 0 } ] \ No newline at end of file diff --git a/modules/wtask/api_exchange.go b/modules/wtask/api_exchange.go index f6fbb0199..069055404 100644 --- a/modules/wtask/api_exchange.go +++ b/modules/wtask/api_exchange.go @@ -19,6 +19,7 @@ func (this *apiComp) Exchange(session comm.IUserSession, req *pb.WTaskExchangeRe confs []*cfg.GameWorldDealData need []*cfg.Gameatn money []*cfg.Gameatn + award []*pb.UserAssets err error ) if errdata = this.ExchangeCheck(session, req); errdata != nil { @@ -53,17 +54,25 @@ func (this *apiComp) Exchange(session comm.IUserSession, req *pb.WTaskExchangeRe return } need = append(need, confs[i].Item...) - money = append(need, confs[i].Money...) + money = append(money, confs[i].Money...) + info.Exchange[v]++ } - if errdata = this.module.ConsumeRes(session, need, true); errdata != nil { + if errdata = this.module.ConsumeRes(session, money, true); errdata != nil { return } - if errdata = this.module.DispenseRes(session, money, true); errdata != nil { + if errdata = this.module.DispenseRes(session, need, true); errdata != nil { return } + for _, v := range need { + award = append(award, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } if err = this.module.modelwtask.Change(session.GetUserId(), map[string]interface{}{ "exchange": info.Exchange, @@ -75,6 +84,6 @@ func (this *apiComp) Exchange(session comm.IUserSession, req *pb.WTaskExchangeRe } return } - session.SendMsg(string(this.module.GetType()), "exchange", &pb.WTaskExchangeReq{Eid: req.Eid}) + session.SendMsg(string(this.module.GetType()), "exchange", &pb.WTaskExchangeResp{Eid: req.Eid, Award: award}) return } From 9b4b54237f63b4aacafa90d07c9375c24086a603 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Thu, 27 Jul 2023 18:09:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_battleready.json | 6 +- bin/json/game_mainstage.json | 244 +++++++++++++++++++++++-------- bin/json/game_monsterformat.json | 100 +++++++++++++ 3 files changed, 284 insertions(+), 66 deletions(-) diff --git a/bin/json/game_battleready.json b/bin/json/game_battleready.json index 71c555849..0a17ddfee 100644 --- a/bin/json/game_battleready.json +++ b/bin/json/game_battleready.json @@ -523,10 +523,8 @@ "disableAiCamera": 0, "ChoseCamp": [], "DisableCamp": [], - "DefaultHero": 0, - "ChoseHero": [ - "25001" - ], + "DefaultHero": 720014, + "ChoseHero": [], "DisableHero": [], "LockSlots": [], "AssistTeam": 0, diff --git a/bin/json/game_mainstage.json b/bin/json/game_mainstage.json index f1e6e7ab3..d3d8a5ccd 100644 --- a/bin/json/game_mainstage.json +++ b/bin/json/game_mainstage.json @@ -4195,7 +4195,13 @@ "hero_exp": 0, "ps_consume": [], "ps_mg": [], - "firstaward": [], + "firstaward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + } + ], "lotteryward": 0, "commonaward": [], "BattleReadyID": 0, @@ -4268,7 +4274,9 @@ "chapterid": 11001, "group_id": 100125, "previous_group_id": [ - 100124 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 5, @@ -4324,7 +4332,9 @@ "chapterid": 11001, "group_id": 100126, "previous_group_id": [ - 100125 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -4380,7 +4390,9 @@ "chapterid": 11001, "group_id": 100127, "previous_group_id": [ - 100125 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 5, @@ -4436,7 +4448,9 @@ "chapterid": 11001, "group_id": 100128, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 4, @@ -4516,7 +4530,7 @@ ], "BattleReadyID": 118, "FormatList": [ - 101071 + 103021 ], "star": [ 1, @@ -4538,9 +4552,11 @@ { "id": 1100151, "chapterid": 11001, - "group_id": 100129, + "group_id": 100128, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 1100150, "Episodetype": 4, @@ -4619,7 +4635,9 @@ } ], "BattleReadyID": 119, - "FormatList": [], + "FormatList": [ + 103031 + ], "star": [ 1, 1, @@ -4640,9 +4658,11 @@ { "id": 1100152, "chapterid": 11001, - "group_id": 100130, + "group_id": 100128, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 1100151, "Episodetype": 4, @@ -4721,7 +4741,9 @@ } ], "BattleReadyID": 119, - "FormatList": [], + "FormatList": [ + 103041 + ], "star": [ 1, 1, @@ -4742,9 +4764,11 @@ { "id": 1100153, "chapterid": 11001, - "group_id": 100131, + "group_id": 100128, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 1100152, "Episodetype": 4, @@ -4823,7 +4847,9 @@ } ], "BattleReadyID": 119, - "FormatList": [], + "FormatList": [ + 103051 + ], "star": [ 1, 1, @@ -4844,9 +4870,11 @@ { "id": 1100154, "chapterid": 11001, - "group_id": 100132, + "group_id": 100128, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 1100153, "Episodetype": 4, @@ -4925,7 +4953,9 @@ } ], "BattleReadyID": 119, - "FormatList": [], + "FormatList": [ + 103061 + ], "star": [ 1, 1, @@ -4946,9 +4976,11 @@ { "id": 1100155, "chapterid": 11001, - "group_id": 100133, + "group_id": 100128, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 1100154, "Episodetype": 4, @@ -5027,7 +5059,9 @@ } ], "BattleReadyID": 119, - "FormatList": [], + "FormatList": [ + 103071 + ], "star": [ 1, 1, @@ -5048,9 +5082,11 @@ { "id": 1100156, "chapterid": 11001, - "group_id": 100134, + "group_id": 100128, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 1100155, "Episodetype": 4, @@ -5129,7 +5165,9 @@ } ], "BattleReadyID": 119, - "FormatList": [], + "FormatList": [ + 103081 + ], "star": [ 1, 1, @@ -5152,7 +5190,9 @@ "chapterid": 11001, "group_id": 100135, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5169,7 +5209,7 @@ }, "animation": "", "hide": 0, - "destroy": 0, + "destroy": 1, "progress": 0, "frontstoryid": 0, "afterstoryid": 0, @@ -5214,7 +5254,9 @@ "chapterid": 11001, "group_id": 100136, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5231,7 +5273,7 @@ }, "animation": "", "hide": 0, - "destroy": 0, + "destroy": 1, "progress": 0, "frontstoryid": 0, "afterstoryid": 0, @@ -5276,7 +5318,9 @@ "chapterid": 11001, "group_id": 100137, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5293,7 +5337,7 @@ }, "animation": "", "hide": 0, - "destroy": 0, + "destroy": 1, "progress": 0, "frontstoryid": 0, "afterstoryid": 0, @@ -5338,7 +5382,9 @@ "chapterid": 11001, "group_id": 100138, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5400,7 +5446,9 @@ "chapterid": 11001, "group_id": 100139, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5462,7 +5510,9 @@ "chapterid": 11001, "group_id": 100140, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5524,7 +5574,9 @@ "chapterid": 11001, "group_id": 100141, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5586,7 +5638,9 @@ "chapterid": 11001, "group_id": 100142, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5602,7 +5656,7 @@ "text": "测试节点25" }, "animation": "", - "hide": 0, + "hide": 1, "destroy": 0, "progress": 0, "frontstoryid": 0, @@ -5648,7 +5702,9 @@ "chapterid": 11001, "group_id": 100143, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5665,7 +5721,7 @@ }, "animation": "", "hide": 0, - "destroy": 0, + "destroy": 1, "progress": 0, "frontstoryid": 0, "afterstoryid": 0, @@ -5710,7 +5766,9 @@ "chapterid": 11001, "group_id": 100144, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5727,7 +5785,7 @@ }, "animation": "", "hide": 0, - "destroy": 0, + "destroy": 1, "progress": 0, "frontstoryid": 0, "afterstoryid": 0, @@ -5772,7 +5830,9 @@ "chapterid": 11001, "group_id": 100145, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -5789,7 +5849,7 @@ }, "animation": "", "hide": 0, - "destroy": 0, + "destroy": 1, "progress": 0, "frontstoryid": 0, "afterstoryid": 0, @@ -5834,7 +5894,9 @@ "chapterid": 11001, "group_id": 100146, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 2, @@ -5890,10 +5952,12 @@ "chapterid": 11001, "group_id": 100147, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, - "Episodetype": 3, + "Episodetype": 1, "openlevel": 1, "EditorStage": 0, "venturemodel": "", @@ -5928,17 +5992,65 @@ "text": "测试30" }, "exp": 0, - "hero_exp": 0, - "ps_consume": [], - "ps_mg": [], - "firstaward": [], - "lotteryward": 0, - "commonaward": [], - "BattleReadyID": 0, - "FormatList": [], - "star": [], - "star_type": [], - "star_value": [], + "hero_exp": 330, + "ps_consume": [ + { + "a": "attr", + "t": "ps", + "n": 10 + } + ], + "ps_mg": [ + { + "a": "attr", + "t": "ps", + "n": 1 + } + ], + "firstaward": [ + { + "a": "attr", + "t": "gold", + "n": 6600 + }, + { + "a": "equi", + "t": "11115", + "n": 1 + } + ], + "lotteryward": 17111110, + "commonaward": [ + { + "a": "attr", + "t": "gold", + "n": 6600 + }, + { + "a": "equi", + "t": "11125", + "n": 1 + } + ], + "BattleReadyID": 119, + "FormatList": [ + 102081 + ], + "star": [ + 1, + 1, + 1 + ], + "star_type": [ + 1, + 2, + 2 + ], + "star_value": [ + 0, + 2, + 1 + ], "challengeward": 0 }, { @@ -5946,7 +6058,9 @@ "chapterid": 11001, "group_id": 100148, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 5, @@ -6002,7 +6116,9 @@ "chapterid": 11001, "group_id": 100149, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -6018,7 +6134,7 @@ "text": "测试节点32" }, "animation": "", - "hide": 0, + "hide": 1, "destroy": 0, "progress": 0, "frontstoryid": 0, @@ -6064,7 +6180,9 @@ "chapterid": 11001, "group_id": 100150, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 7, @@ -6080,7 +6198,7 @@ "text": "测试节点33" }, "animation": "", - "hide": 0, + "hide": 1, "destroy": 0, "progress": 0, "frontstoryid": 0, @@ -6126,7 +6244,9 @@ "chapterid": 11001, "group_id": 100151, "previous_group_id": [ - 100127 + 100121, + 100122, + 100123 ], "previoustage": 0, "Episodetype": 1, diff --git a/bin/json/game_monsterformat.json b/bin/json/game_monsterformat.json index f0c1f2326..fef30bb01 100644 --- a/bin/json/game_monsterformat.json +++ b/bin/json/game_monsterformat.json @@ -238139,6 +238139,106 @@ "speed": 78, "modelsize": 1 }, + { + "Id": 720014, + "pos": 1, + "captainId": 0, + "IsBoss": 0, + "bossHpCnt": 0, + "heroid": 25001, + "star": 3, + "equip": [], + "newskill": [], + "lv": 10, + "hppro": 1, + "atkpro": 1, + "defpro": 1, + "skill1": 1, + "skill2": 1, + "skill3": 1, + "speed": 80, + "modelsize": 1 + }, + { + "Id": 720014, + "pos": 2, + "captainId": 0, + "IsBoss": 0, + "bossHpCnt": 0, + "heroid": -1, + "star": 3, + "equip": [], + "newskill": [], + "lv": 10, + "hppro": 1, + "atkpro": 1, + "defpro": 1, + "skill1": 1, + "skill2": 1, + "skill3": 1, + "speed": 80, + "modelsize": 1 + }, + { + "Id": 720014, + "pos": 3, + "captainId": 0, + "IsBoss": 0, + "bossHpCnt": 0, + "heroid": -1, + "star": 3, + "equip": [], + "newskill": [], + "lv": 10, + "hppro": 1, + "atkpro": 1, + "defpro": 1, + "skill1": 1, + "skill2": 1, + "skill3": 1, + "speed": 80, + "modelsize": 1 + }, + { + "Id": 720014, + "pos": 4, + "captainId": 0, + "IsBoss": 0, + "bossHpCnt": 0, + "heroid": -1, + "star": 3, + "equip": [], + "newskill": [], + "lv": 10, + "hppro": 1, + "atkpro": 1, + "defpro": 1, + "skill1": 1, + "skill2": 1, + "skill3": 1, + "speed": 80, + "modelsize": 1 + }, + { + "Id": 720014, + "pos": 5, + "captainId": 0, + "IsBoss": 0, + "bossHpCnt": 0, + "heroid": -1, + "star": 3, + "equip": [], + "newskill": [], + "lv": 10, + "hppro": 1, + "atkpro": 1, + "defpro": 1, + "skill1": 1, + "skill2": 1, + "skill3": 1, + "speed": 80, + "modelsize": 1 + }, { "Id": 800001, "pos": 1, From 6449aa7fdd44ad8b194bfb7d9ffcae86c2c8a6ac Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Thu, 27 Jul 2023 18:21:37 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/guildgve/api_challengefinish.go | 1 + modules/mainline/model_mainline.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/guildgve/api_challengefinish.go b/modules/guildgve/api_challengefinish.go index 9fa7bc074..af6db35a7 100644 --- a/modules/guildgve/api_challengefinish.go +++ b/modules/guildgve/api_challengefinish.go @@ -108,6 +108,7 @@ func (this *apiComp) ChallengeFinish(session comm.IUserSession, req *pb.GuildGve }, Formation: make([]*pb.DBSimpleHero, 0), Time: configure.Now().Unix(), + FightTime: req.Report.Costtime, Rating: score.Id, Harm: req.Report.Harm, } diff --git a/modules/mainline/model_mainline.go b/modules/mainline/model_mainline.go index 5cec03b94..f0bb91f02 100644 --- a/modules/mainline/model_mainline.go +++ b/modules/mainline/model_mainline.go @@ -56,7 +56,7 @@ func (this *ModelMline) getMainlineData(uid string) (results *pb.DBMainline, err func (this *ModelMline) updateMainlineData(uid string, data *pb.DBMainline) (err error) { if err = this.Change(uid, map[string]interface{}{ - "Level": data.Level, + "level": data.Level, "chapteraward": data.Chapteraward, "exploreaward": data.Exploreaward, "groupaward": data.Groupaward, From 32d328121b21f7153ded1f4dbf6146751ac9ff9e Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Thu, 27 Jul 2023 18:39:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=B8=BB=E7=BA=BF?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 2 ++ modules/gm/module.go | 8 +++---- modules/mainline/comp_configure.go | 12 ++++++++++ modules/mainline/module.go | 37 ++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 4 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index 1f8c71651..6950ce075 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -598,5 +598,7 @@ type ( IMainline interface { ///红点 IGetReddot + // bingo 关卡 + BingoJumpLevel(session IUserSession, level int32) (errdata *pb.ErrorData) } ) diff --git a/modules/gm/module.go b/modules/gm/module.go index 7f5d75189..aae37c0f1 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -215,7 +215,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "0", Value: datas[0]}) } else if len(datas) == 2 && (datas[0] == "mainline") { - module1, err := this.service.GetModule(comm.ModuleMline) + module1, err := this.service.GetModule(comm.ModuleMainline) if err != nil { return } @@ -228,7 +228,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er return } - errdata = module1.(comm.IMline).ModifyMlineDataByNanduID(session, int32(num1)) + errdata = module1.(comm.IMainline).BingoJumpLevel(session, int32(num1)) this.Debug("使用bingo命令", log.Field{Key: "uid", Value: session.GetUserId()}, @@ -523,12 +523,12 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er errdata = module1.(comm.IHero).GetAllMaxHero(session, true) - module1, err = this.service.GetModule(comm.ModuleMline) + module1, err = this.service.GetModule(comm.ModuleMainline) if err != nil { return } - errdata = module1.(comm.IMline).ModifyMlineDataByNanduID(session, 1101208) + errdata = module1.(comm.IMainline).BingoJumpLevel(session, 1101208) module1, err = this.service.GetModule(comm.ModuleEquipment) if err != nil { return diff --git a/modules/mainline/comp_configure.go b/modules/mainline/comp_configure.go index cf56718ef..278654e06 100644 --- a/modules/mainline/comp_configure.go +++ b/modules/mainline/comp_configure.go @@ -121,6 +121,18 @@ func (this *configureComp) GetMainChapterConf(id int32) (conf *cfg.GameMainChapt return } +func (this *configureComp) GetMainStageConfs() (data []*cfg.GameMainStageData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_mainstage); err != nil { + this.module.Errorln(err) + return + } + data = v.(*cfg.GameMainStage).GetDataList() + return +} + func (this *configureComp) GetMainStageConf(id int32) (data *cfg.GameMainStageData, err error) { var ( v interface{} diff --git a/modules/mainline/module.go b/modules/mainline/module.go index 20f71d6ae..36b23a438 100644 --- a/modules/mainline/module.go +++ b/modules/mainline/module.go @@ -5,6 +5,7 @@ import ( "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" ) type Mainline struct { @@ -89,3 +90,39 @@ func (this *Mainline) CheckPoint(uid string) bool { // } return false } + +// 跳转主线管卡 +func (this *Mainline) BingoJumpLevel(session comm.IUserSession, level int32) (errdata *pb.ErrorData) { + var ( + info *pb.DBMainline + confs []*cfg.GameMainStageData + err error + ) + + this.configure.GetMainStageConfs() + info, err = this.modelMline.getMainlineData(session.GetUserId()) + if err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + + for _, v := range confs { + if v.Id <= level { + info.Level[v.Id] = 7 + } + } + this.modelMline.updateprogress(info) + if err = this.modelMline.updateMainlineData(session.GetUserId(), info); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + return +}