From 649432c30529a4916f0dcb498bfdc6469f3c6589 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 20 Dec 2022 20:33:12 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=BB=E7=BA=BF=20?= =?UTF-8?q?=E6=8B=9B=E5=8B=9F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/worldtask/api_finish.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/worldtask/api_finish.go b/modules/worldtask/api_finish.go index debb8ab60..d07ea6e7d 100644 --- a/modules/worldtask/api_finish.go +++ b/modules/worldtask/api_finish.go @@ -108,6 +108,21 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe ) }() + for _, v := range curTaskConf.Reword { + if v.A == comm.HeroType { + hero = append(hero, v.T) + } + } + if len(hero) > 0 { + ishave := this.module.ModuleUser.CheckTujianHero(session, hero) + for i, v := range ishave { + if v { + newhero = append(newhero, hero[i]) + } + } + } + rsp.Newheros = newhero + // 完成任务 if err := this.module.modelWorldtask.finishTask(req.GroupId, req.TaskId, userTask); err != nil { code = pb.ErrorCode_WorldtaskFinish @@ -131,21 +146,6 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe ) } - for _, v := range curTaskConf.Reword { - if v.A == comm.HeroType { - hero = append(hero, v.T) - } - } - if len(hero) > 0 { - ishave := this.module.ModuleUser.CheckTujianHero(session, hero) - for i, v := range ishave { - if v { - newhero = append(newhero, hero[i]) - } - } - } - rsp.Newheros = newhero - } //判断任务是否已完成 From 4a6f28918459d515cbd757204e4c7b5f6fc3a125 Mon Sep 17 00:00:00 2001 From: liwei Date: Tue, 20 Dec 2022 20:34:32 +0800 Subject: [PATCH 02/12] Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev --- bin/json/game_combatlevel.json | 71 -- bin/json/game_item.json | 38 + bin/json/game_libraryhero.json | 1160 ++++++++++++++++++++++++++++- bin/json/game_libraryhistory.json | 132 +++- bin/json/game_mainline.json | 48 +- 5 files changed, 1320 insertions(+), 129 deletions(-) diff --git a/bin/json/game_combatlevel.json b/bin/json/game_combatlevel.json index 0f95c75c4..ef0ca4987 100644 --- a/bin/json/game_combatlevel.json +++ b/bin/json/game_combatlevel.json @@ -3,12 +3,6 @@ "id": 10001, "scene": "LevelDemo_Fcamer_1_1", "levelname": "Look For Blast Air", - "formatList": [], - "droplist": [ - 10001, - 10002, - 10003 - ], "passformatList": [], "passdroplist": [ 10001, @@ -29,14 +23,6 @@ "id": 10002, "scene": "LevelDemo_Fcamer_1_2", "levelname": "Rescue Grug", - "formatList": [ - 101011, - 101021 - ], - "droplist": [ - 10301, - 10302 - ], "passformatList": [], "passdroplist": [ 10301, @@ -56,12 +42,6 @@ "id": 10003, "scene": "LevelDemo_Fcamer_1_3", "levelname": "Repair Broken Books", - "formatList": [], - "droplist": [ - 10101, - 10102, - 10103 - ], "passformatList": [], "passdroplist": [ 10101, @@ -82,15 +62,6 @@ "id": 10004, "scene": "LevelDemo_Fcamer_1_4", "levelname": "Restart The Windmill", - "formatList": [ - 101011, - 101021 - ], - "droplist": [ - 10401, - 10402, - 10403 - ], "passformatList": [], "passdroplist": [ 10401, @@ -111,12 +82,6 @@ "id": 10005, "scene": "LevelDemo_Fcamer_1_5", "levelname": "Tame The Rampage Flock", - "formatList": [ - 101011, - 101012, - 101013 - ], - "droplist": [], "passformatList": [ 101011, 101012, @@ -137,12 +102,6 @@ "id": 10006, "scene": "LevelDemo_Fcamer_1_6", "levelname": "Against Eret", - "formatList": [ - 101011, - 101012, - 101013 - ], - "droplist": [], "passformatList": [ 101013 ], @@ -161,12 +120,6 @@ "id": 10007, "scene": "LevelDemo_Fcamer_1_7", "levelname": "Repress Eret", - "formatList": [ - 101011, - 101012, - 101013 - ], - "droplist": [], "passformatList": [ 101011, 101012, @@ -187,14 +140,6 @@ "id": 10008, "scene": "LevelDemo_Fcamer_1_8", "levelname": "Moon Hill", - "formatList": [ - 101011, - 101021 - ], - "droplist": [ - 10301, - 10302 - ], "passformatList": [], "passdroplist": [ 10301, @@ -214,14 +159,6 @@ "id": 10009, "scene": "LevelDemo_Fcamer_1_9", "levelname": "Moon Hill", - "formatList": [ - 101011, - 101021 - ], - "droplist": [ - 10301, - 10302 - ], "passformatList": [], "passdroplist": [ 10301, @@ -241,14 +178,6 @@ "id": 10010, "scene": "LevelDemo_Fcamer_1_10", "levelname": "Moon Hill", - "formatList": [ - 101011, - 101021 - ], - "droplist": [ - 10301, - 10302 - ], "passformatList": [], "passdroplist": [ 10301, diff --git a/bin/json/game_item.json b/bin/json/game_item.json index 35ffb9aa1..56dca458e 100644 --- a/bin/json/game_item.json +++ b/bin/json/game_item.json @@ -2839,6 +2839,44 @@ "text": "竞技场挑战券不足" } }, + { + "id": "100005", + "name": { + "key": "itemname_100005", + "text": "阵营挑战券" + }, + "usetype": 10, + "color": 3, + "bagtype": 0, + "index": 1, + "special_type": 0, + "time": 0, + "effects": "", + "box_id": 0, + "synthetize_num": 0, + "access": [ + 107 + ], + "use_skip": 107, + "upper_limit": -1, + "uselv": 0, + "isani": 0, + "star": 0, + "race": 0, + "img": "wp_icon_jjcq", + "ico": "wp_icon_jjcq", + "intr": { + "key": "itemdesc_100005", + "text": "进入阵营BOSS的凭证" + }, + "sale": [], + "synthetize_deplete": [], + "decompose_deplete": [], + "tipstxt": { + "key": "itemtipstxt_100005", + "text": "阵营挑战券不足" + } + }, { "id": "110001", "name": { diff --git a/bin/json/game_libraryhero.json b/bin/json/game_libraryhero.json index 54c92aa28..1ef07733e 100644 --- a/bin/json/game_libraryhero.json +++ b/bin/json/game_libraryhero.json @@ -1,4 +1,150 @@ [ + { + "hid": "14002", + "name": { + "key": "hero_14002", + "text": "大龙" + }, + "star": 4, + "history": [ + "140021", + "140022", + "140023" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "14005", + "name": { + "key": "hero_14005", + "text": "鹤大师" + }, + "star": 4, + "history": [ + "140051", + "140052", + "140053" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 101, + 102 + ] + }, + { + "hid": "14006", + "name": { + "key": "hero_14006", + "text": "布兰奇" + }, + "star": 4, + "history": [ + "140061", + "140062", + "140063" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 101, + 102 + ] + }, { "hid": "15004", "name": { @@ -47,6 +193,246 @@ 102 ] }, + { + "hid": "24002", + "name": { + "key": "hero_24002", + "text": "牙仙" + }, + "star": 4, + "history": [ + "240021", + "240022", + "240023" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "24003", + "name": { + "key": "hero_24003", + "text": "睡神沙人" + }, + "star": 4, + "history": [ + "240031", + "240032", + "240033" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "24004", + "name": { + "key": "hero_24004", + "text": "邦尼兔" + }, + "star": 4, + "history": [ + "240041", + "240042", + "240043" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "24005", + "name": { + "key": "hero_24005", + "text": "金猴" + }, + "star": 4, + "history": [ + "240051", + "240052", + "240053" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "24008", + "name": { + "key": "hero_24008", + "text": "暴芙那特" + }, + "star": 4, + "history": [ + "240081", + "240082", + "240083" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, { "hid": "25001", "name": { @@ -92,7 +478,342 @@ 4 ], "fid": [ - 101, + 102 + ] + }, + { + "hid": "25003", + "name": { + "key": "hero_25003", + "text": "羊仙姑" + }, + "star": 5, + "history": [ + "250031", + "250032", + "250033" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "25004", + "name": { + "key": "hero_25004", + "text": "波比" + }, + "star": 5, + "history": [ + "250041", + "250042", + "250043" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "34001", + "name": { + "key": "hero_34001", + "text": "贫嘴驴" + }, + "star": 4, + "history": [ + "340011", + "340012", + "340013" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "34003", + "name": { + "key": "hero_34003", + "text": "圣诞老人" + }, + "star": 4, + "history": [ + "340031", + "340032", + "340033" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "34004", + "name": { + "key": "hero_34004", + "text": "瓜哥" + }, + "star": 4, + "history": [ + "340041", + "340042", + "340043" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "34006", + "name": { + "key": "hero_34006", + "text": "冰霜杰克" + }, + "star": 4, + "history": [ + "340061", + "340062", + "340063" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "34008", + "name": { + "key": "hero_34008", + "text": "悍夫那特" + }, + "star": 4, + "history": [ + "340081", + "340082", + "340083" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ 102 ] }, @@ -102,7 +823,7 @@ "key": "hero_35001", "text": "师父" }, - "star": 4, + "star": 5, "history": [ "350011", "350012", @@ -141,7 +862,6 @@ 4 ], "fid": [ - 101, 102 ] }, @@ -151,7 +871,7 @@ "key": "hero_35002", "text": "希卡普" }, - "star": 4, + "star": 5, "history": [ "350021", "350022", @@ -192,5 +912,437 @@ "fid": [ 102 ] + }, + { + "hid": "35003", + "name": { + "key": "hero_35003", + "text": "漆黑" + }, + "star": 5, + "history": [ + "350031", + "350032", + "350033" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "35004", + "name": { + "key": "hero_35004", + "text": "黛安·福克斯顿" + }, + "star": 5, + "history": [ + "350041", + "350042", + "350043" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "35006", + "name": { + "key": "hero_35006", + "text": "平先生" + }, + "star": 5, + "history": [ + "350061", + "350062", + "350063" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "43005", + "name": { + "key": "hero_43005", + "text": "瓦希尔指挥官" + }, + "star": 3, + "history": [ + "430051", + "430052", + "430053" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "43007", + "name": { + "key": "hero_43007", + "text": "戈伯" + }, + "star": 3, + "history": [ + "430071", + "430072", + "430073" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "44006", + "name": { + "key": "hero_44006", + "text": "悍娇虎" + }, + "star": 4, + "history": [ + "440061", + "440062", + "440063" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "45001", + "name": { + "key": "hero_45001", + "text": "乌龟大师" + }, + "star": 5, + "history": [ + "450011", + "450012", + "450013" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "53001", + "name": { + "key": "hero_53001", + "text": "埃雷特" + }, + "star": 3, + "history": [ + "530011", + "530012", + "530013" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] + }, + { + "hid": "54005", + "name": { + "key": "hero_54005", + "text": "无牙仔" + }, + "star": 2, + "history": [ + "540051", + "540052", + "540053" + ], + "favorlv": [ + 1, + 2, + 3 + ], + "startid": 300001, + "rightend": 3000014, + "special_stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ], + "endid": [ + 3000015, + 3000017, + 3000018 + ], + "stroyprize": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "plot_unlock": [ + 1, + 2, + 3, + 4 + ], + "fid": [ + 102 + ] } ] \ No newline at end of file diff --git a/bin/json/game_libraryhistory.json b/bin/json/game_libraryhistory.json index 5477cca7f..b93f311a3 100644 --- a/bin/json/game_libraryhistory.json +++ b/bin/json/game_libraryhistory.json @@ -1,8 +1,14 @@ [ { - "histroy": "150041", - "name": "故事一", - "txt": "library_story150041", + "histroy": "140021", + "name": { + "key": "library_name140021", + "text": "得意弟子" + }, + "txt": { + "key": "library_story140021", + "text": "小雪豹一出生就被扔到了翡翠宫门前,没有人知道他的父母是谁。浣熊师傅捡到小雪豹后,便把他当成亲生儿子一般抚养,取名“大龙”。
大龙身体里像是天生具有顽劣因子,喜欢到处搞破坏,焚烧房屋、打架……浣熊师傅拿他没办法,只好把他关到练功房闭门思过。然而大龙并没有悔过,情绪越发暴躁,练功房内时常传出捶打东西的声音。有一天,这些声音突然消失了……惴惴不安地打开大门,结果,大龙身姿矫健地立在他面前,而练功房里的器具因为长久的练习被磨得十分光滑。“大龙竟然有如此的武学天赋!”从此,师傅带着大龙练习功夫,大龙也不负师傅所望,练就千卷功夫书,成为了师傅最得意的弟子。" + }, "prize": [ { "a": "attr", @@ -12,9 +18,15 @@ ] }, { - "histroy": "150042", - "name": "故事二", - "txt": "library_story150042", + "histroy": "140022", + "name": { + "key": "library_name140022", + "text": "长岗越狱" + }, + "txt": { + "key": "library_story140022", + "text": "功夫武学上已无对手的大龙,骄傲地认为神龙秘笈就是自己的囊中之物。然而乌龟大师却看出大龙内心的阴暗面,拒绝授予其神龙秘笈。大龙无法接受,狂性大发。关键时刻大龙被乌龟大师降服,囚禁于长岗监狱。
时光荏苒,一晃二十年过去了。乌龟大师勘破天机,预言大龙将重返和平谷,浣熊师傅急忙派大鹅信使飞往监狱,通知加强看守。大龙在地下深处被重重铁链锁住,监狱里几千人看守他一人,机关重重,根本没有逃出生天的可能。然而大鹅信使身上飘落了一根羽毛,碰巧落到地下深处的大龙身旁。大龙眼中闪现出精光,悄悄利用这根羽毛打开了层层枷锁,不费吹灰之力便打败了监狱看守,冲出监狱,渐渐逼近和平谷。" + }, "prize": [ { "a": "attr", @@ -24,9 +36,15 @@ ] }, { - "histroy": "150043", - "name": "故事三", - "txt": "library_story150043", + "histroy": "140023", + "name": { + "key": "library_name140023", + "text": "最终败北" + }, + "txt": { + "key": "library_story140023", + "text": "复仇心切的大龙回到翡翠宫,熟悉的环境让他心生感叹:“我回家了!”师傅却皱眉告诉他这儿不是他的家。看着师傅如今严肃的面容,大龙不禁埋怨起当初乌龟大师拒绝将神龙秘笈交给他时,师傅没有替他做主。打斗之中,师傅因不忍下手而落入下风,倒在地上,大龙情绪激动地吼道:“我做的一切都是为了让你自豪!告诉我你有多自豪,师傅!告诉我!告诉我!”师傅眼中充满了痛苦和愧疚,“从一开始你就是我的骄傲,就因为这样,我的宠爱让你走上了歧途,我很抱歉。”大龙眼中闪过一抹挣扎,马上变为凌厉,一把扼住师傅的脖子,师傅奄奄一息……千钧一发之际,神龙大侠出现了,使出无须铁指扣打败了大龙,大龙最终也没有明白功夫的真谛在于相信自己。" + }, "prize": [ { "a": "attr", @@ -37,8 +55,14 @@ }, { "histroy": "250011", - "name": "故事一", - "txt": "library_story250011", + "name": { + "key": "library_name250011", + "text": "童年经历" + }, + "txt": { + "key": "library_story250011", + "text": "阿宝童年的时候,生活在熊猫村。年幼的阿宝惹人喜爱,憨态可掬,是李山夫妇的掌上明珠。
他本该无忧无虑地长大,不料某一日,年轻气盛的沈王爷听信了“熊猫将会打败自己”的传言,率领大军前来围攻熊猫村。
村口炮火声连天,阿宝妈妈急匆匆地跑回来,将阿宝放进一个萝卜筐里,眼含热泪摸了摸阿宝的头。而年幼的阿宝并不知道发生了什么,仍旧天真无邪地笑着,几口就将筐内的萝卜啃个精光。
蔬菜车一路运送到山下的面馆,年轻的平先生来到后院搬运蔬菜,一眼就看到了趴在筐里的阿宝。
那一刻的阿宝击中了平先生内心中最柔软的部分,从此,他便收养了阿宝。阿宝跟随平先生在面馆长大,日子一天天平静地过了下去,直到山顶武馆选拔“神龙大侠”的那天。" + }, "prize": [ { "a": "attr", @@ -49,8 +73,14 @@ }, { "histroy": "250012", - "name": "故事二", - "txt": "library_story250012", + "name": { + "key": "library_name250012", + "text": "打败太郎" + }, + "txt": { + "key": "library_story250012", + "text": "为了抵御太郎的威胁,乌龟大师选定阿宝来做神龙大侠。起初,浣熊师父与盖世五侠颇为不解,因为阿宝膘肥体壮,又完全没学过功夫,怎么看都不像是这块料。然而,在乌龟的鼓励下,阿宝跟随浣熊师傅勤学苦练,终于初见成效。
浣熊师傅在收到太郎越狱的消息后,马上带着阿宝去取神龙秘笈。可是,当阿宝满怀希望地翻开神龙秘笈的时候,竟发现里面什么都没有。
平先生看出了阿宝的沮丧,为了安慰儿子,便告诉了他一个秘密。“我的拿手汤其实并没有秘密配方,重要之处在于,你要相信它是特别的。”
这句话启发了阿宝,他前去迎战太郎,在最后时刻,无师自通地领悟了“无须铁指”——打败太郎以后,山谷再度恢复了平静;而阿宝,也成为了真正的神龙大侠。" + }, "prize": [ { "a": "attr", @@ -61,8 +91,14 @@ }, { "histroy": "250013", - "name": "故事三", - "txt": "library_story250013", + "name": { + "key": "library_name250013", + "text": "功夫传承" + }, + "txt": { + "key": "library_story250013", + "text": "阿宝当上神龙大侠没多久,浣熊师傅就让他来教盖世五侠功夫。可是由于阿宝没有教学经验,整个课堂一时间鸡飞狗跳。
阿宝沮丧地回到家,却意外在面馆遇见了一个和他长得一模一样的熊猫——那竟是他失散多年的父亲李山。
父子俩为这迟来的相逢感动得热泪盈眶,李山带阿宝回到熊猫村,那里有许许多多和他一样的亲人同类。与此同时,悍娇虎带回消息,灵界的天煞为非作歹,抓走了许多功夫高手。关键时刻,阿宝想到神龙秘笈中的含义:他让熊猫们充分发挥自己的长处,培养出一支独一无二的“熊猫军队”,成功击退了天煞。
经此一战,阿宝也从此前毫无经验的“师傅”,变成了真正功夫传承者。从此以后,每当路过武馆,都能看到阿宝认真教授功夫的身影呢。" + }, "prize": [ { "a": "attr", @@ -73,8 +109,14 @@ }, { "histroy": "350011", - "name": "故事一", - "txt": "library_story350011", + "name": { + "key": "library_name350011", + "text": "师者的摸索" + }, + "txt": { + "key": "library_story350011", + "text": "浣熊师傅12岁时被乌龟大师收养,经过多年潜心修炼,成为翡翠宫现任掌门。或许是因为身世的原因,浣熊师傅第一眼看到被遗弃在翡翠宫外的大龙,就决定收养他,甚至当儿子一样抚养。无论大龙多么顽皮,师傅都不忍重罚,还将毕生武学传授给大龙。
浣熊师傅认为大龙是神龙大侠的不二人选,然而乌龟大师却不赞同。师傅内心挣扎,张了张嘴,但想到乌龟大师从不会出错,最终还是一句话都没说。大龙怀恨在心,血洗和平谷,师傅出手阻止,正要下狠手时脑海中浮现出幼年大龙面带灿烂笑容奔向自己的温馨画面,心里一软,关键时刻乌龟大师制服了大龙。看着满目疮痍的和平谷,师傅痛苦地摇着头,喃喃自语:“我错了吗?”" + }, "prize": [ { "a": "attr", @@ -85,8 +127,14 @@ }, { "histroy": "350012", - "name": "故事二", - "txt": "library_story350012", + "name": { + "key": "library_name350012", + "text": "师者的成长" + }, + "txt": { + "key": "library_story350012", + "text": "因为大龙事件,浣熊师傅后来对盖世五侠几个徒弟要求便格外严格,威严冷漠,在阿宝被选上神龙大侠时更是极力否认,他等着阿宝受不了苦主动离开。乌龟大师羽化登仙前郑重地告诫师傅要相信阿宝,于是师傅带着怀疑的目光开始审视阿宝,偶然发现阿宝的习武天赋源自于对食物的热爱,于是便用包子馒头零食来诱导阿宝练功,一来一往中,这个最瞧不上的徒儿却让师父重新展露出笑容。
然而逃出监狱的大龙,再次揭开了浣熊师傅内心的伤疤。决战之时,师傅愧疚地对大龙说道:“我很抱歉,我的宠爱让你走上了歧途。”大龙扼住师傅咽喉欲致其死地,阿宝及时赶到,击败了大龙。至此,浣熊师傅终于认可了阿宝神龙大侠的身份,他的心结解开了,内心也获得了平静。" + }, "prize": [ { "a": "attr", @@ -97,8 +145,14 @@ }, { "histroy": "350013", - "name": "故事三", - "txt": "library_story350013", + "name": { + "key": "library_name350013", + "text": "亦师亦友的默契" + }, + "txt": { + "key": "library_story350013", + "text": "沈王爷将阿宝打得遍体鳞伤时,师傅传授的“静下心来,一切皆有可能”,帮助阿宝顿悟了太极。阿宝教授他人功夫时接连失败,师傅的“让你变成自己”的心决,让阿宝领悟了教授要义。看到阿宝的进步,师傅心中充满了骄傲与自豪。然而,天煞的出现,让师徒两人皆陷入困境……后来阿宝打败天煞回到凡界,师傅看到阿宝手中的太极禅杖,明白阿宝已经无师自通地学会了气功,他罕见地露出羡慕嫉妒的神情,抬起头,耸起肩,渴望地看着阿宝,“你可以教我吗?”两人相视一笑。" + }, "prize": [ { "a": "attr", @@ -108,9 +162,15 @@ ] }, { - "histroy": "350021", - "name": "故事一", - "txt": "library_story350021", + "histroy": "140051", + "name": { + "key": "library_name140051", + "text": "扫地僧灵鹤" + }, + "txt": { + "key": "library_story140051", + "text": "二十年前,灵鹤还只是大力武馆的一个清洁工,但他对武术心驰神往。朋友美玲看出了他的心思,鼓励他参加武馆新一届的学徒选拔赛。
选拔赛当天,看到选手一个个被担架抬下来,灵鹤害怕地吞了吞口水。围观者纷纷嘲笑灵鹤不自量力,有人直接丢给他一把扫帚,灵鹤开始泄气地打扫,却一不小心踏入比赛范围,触发了机关,一只巨大的流星锤向他呼啸而来。灵鹤呆住了,他抬头看向远处象征着胜利的红旗,回头看到美玲鼓励的眼神,瞬间浑身充满了自信和力量。他侧过身子躲过流星锤,辗转腾挪跃过旋转的钉桩,儒雅优美地飞到终点,一把拔起红旗。成功了!灵鹤终于成为武馆里名副其实的“扫地僧”。" + }, "prize": [ { "a": "attr", @@ -120,9 +180,15 @@ ] }, { - "histroy": "350022", - "name": "故事二", - "txt": "library_story350022", + "histroy": "140052", + "name": { + "key": "library_name140052", + "text": "盖世五侠鹤大师" + }, + "txt": { + "key": "library_story140052", + "text": "成为武馆学徒后,灵鹤仍然尽职尽责地打扫着卫生。一天,悍娇虎奉浣熊师傅之命来武馆寻找武士,看见了扫地的灵鹤,这不就是师傅在卷轴上写的“清洁工”吗?得知悍娇虎邀请他去翡翠宫共抗野猪,灵鹤幻想着能在翡翠宫跟着浣熊师傅学武,便欣然前往。
在与野猪对战中,悍娇虎一时不敌,被野猪一脚踹飞,灵鹤迅速飞起,精准地接住她,轻轻地放在地上。最终他与悍娇虎、俏小龙等人一起打败了野猪。灵鹤的表现赢得了师傅的认可:“你的双臂可以成为你的武器,你是悍娇虎盾一般最可靠的盟友。”就这样,灵鹤被师傅收留,成为盖世五侠之一,当之无愧的鹤大师。" + }, "prize": [ { "a": "attr", @@ -132,9 +198,15 @@ ] }, { - "histroy": "350023", - "name": "故事三", - "txt": "library_story350023", + "histroy": "140053", + "name": { + "key": "library_name140053", + "text": "善良冷静的伙伴" + }, + "txt": { + "key": "library_story140053", + "text": "鹤大师进入翡翠宫修行后,最喜欢的就是书法,长久的练习造就了他冷静克制的性格。当阿宝被选为神龙大侠后,大家都对他进行吐槽和不认可,只有鹤大师始终保持沉默,静静地观察着这位意外的闯入者。就算阿宝冒冒失失地闯进他的房间,他也只是简短地说道,“你不属于这里”。
而在阿宝低头呢喃,“我知道,只是我有一个梦想,关于功夫……”,看到阿宝很失落,鹤大师心生不忍,改口说:“我指的是这是我的房间。”
“寡言之人,也有温暖的心。”" + }, "prize": [ { "a": "attr", diff --git a/bin/json/game_mainline.json b/bin/json/game_mainline.json index 1d4bc6723..7ca848fce 100644 --- a/bin/json/game_mainline.json +++ b/bin/json/game_mainline.json @@ -56,8 +56,8 @@ }, { "a": "hero", - "t": "43901", - "n": 5 + "t": "14007", + "n": 1 } ], "exp": 400, @@ -91,7 +91,7 @@ "FormatList": [ 101021 ], - "captainId": "440051", + "captainId": "240025", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -100,9 +100,9 @@ "n": 2640 }, { - "a": "hero", - "t": "44911", - "n": 5 + "a": "item", + "t": "30001", + "n": 1 } ], "exp": 1040, @@ -144,7 +144,7 @@ }, { "a": "hero", - "t": "43902", + "t": "43901", "n": 5 } ], @@ -224,7 +224,7 @@ "FormatList": [ 101041 ], - "captainId": "440061", + "captainId": "240025", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -313,7 +313,7 @@ 101051, 101052 ], - "captainId": "140031", + "captainId": "530013", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -359,7 +359,7 @@ 101061, 101062 ], - "captainId": "", + "captainId": "440053", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -405,7 +405,7 @@ 101071, 101072 ], - "captainId": "350011", + "captainId": "440063", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -483,7 +483,7 @@ 101081, 101082 ], - "captainId": "250041", + "captainId": "250013", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -529,7 +529,7 @@ 101091, 101092 ], - "captainId": "250042", + "captainId": "450033", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -664,7 +664,7 @@ 102011, 102021 ], - "captainId": "340061", + "captainId": "240023", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -710,7 +710,7 @@ 102031, 102032 ], - "captainId": "440051", + "captainId": "530013", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -846,7 +846,7 @@ 102052, 102032 ], - "captainId": "350011", + "captainId": "530013", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -924,7 +924,7 @@ 102061, 102062 ], - "captainId": "340061", + "captainId": "450033", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -970,7 +970,7 @@ 102071, 102072 ], - "captainId": "350021", + "captainId": "250043", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -1059,7 +1059,7 @@ 102081, 102082 ], - "captainId": "350011", + "captainId": "140033", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -1105,7 +1105,7 @@ 102091, 102092 ], - "captainId": "440051", + "captainId": "450033", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -1151,7 +1151,7 @@ 102101, 102102 ], - "captainId": "250042", + "captainId": "350014", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -1197,7 +1197,7 @@ 103011, 103021 ], - "captainId": "240031", + "captainId": "240023", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -1243,7 +1243,7 @@ 103031, 103032 ], - "captainId": "250041", + "captainId": "530013", "battlescene": "bg_zhandoulmboss", "award": [ { @@ -1290,7 +1290,7 @@ 101102, 101103 ], - "captainId": "350011", + "captainId": "340064", "battlescene": "bg_zhandoulmboss", "award": [ { From 338f481ad615a2097eb83bcb63b03d4ff63ae401 Mon Sep 17 00:00:00 2001 From: liwei Date: Tue, 20 Dec 2022 20:34:55 +0800 Subject: [PATCH 03/12] Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev --- modules/enchant/api_getlist.go | 32 +++++++++++++++++++++++++++++++- modules/enchant/model_enchant.go | 14 ++------------ modules/worldtask/api_finish.go | 30 +++++++++++++++--------------- pb/battle_db.pb.go | 20 ++++++++++++-------- services/worker/main.go | 2 ++ 5 files changed, 62 insertions(+), 36 deletions(-) diff --git a/modules/enchant/api_getlist.go b/modules/enchant/api_getlist.go index 44dac3bdf..0aab71377 100644 --- a/modules/enchant/api_getlist.go +++ b/modules/enchant/api_getlist.go @@ -2,11 +2,13 @@ package enchant import ( "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/utils" + "go.mongodb.org/mongo-driver/bson/primitive" "google.golang.org/protobuf/proto" ) @@ -28,7 +30,35 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.EnchantGetListRe } list, err := this.module.modelEnchant.getEnchantList(session.GetUserId()) - if err != nil { + if mgo.MongodbNil == err { + + list.Id = primitive.NewObjectID().Hex() + list.Uid = session.GetUserId() + list.Boss = make(map[int32]int64) + list.BossTime = make(map[int32]int32) + + _cfg := this.module.configure.GetEnchantBossTypeConfigData() + for k := range _cfg { + list.BossTime[k] = 0 + } + + this.module.modelEnchant.Add(session.GetUserId(), list) + conf := this.module.configure.GetGlobalConf() + if conf == nil { + code = pb.ErrorCode_ConfigNoFound + return + } + iContt := conf.EnchantbossInitial + atn := conf.EnchantbossCos + if iContt > 0 { + + this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{ + A: atn.A, + T: atn.T, + N: iContt, + }}, true) + } + } else if err != nil { code = pb.ErrorCode_DBError return } diff --git a/modules/enchant/model_enchant.go b/modules/enchant/model_enchant.go index fd90439a3..5530710ac 100644 --- a/modules/enchant/model_enchant.go +++ b/modules/enchant/model_enchant.go @@ -3,7 +3,6 @@ package enchant import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -40,19 +39,10 @@ func (this *modelEnchant) getEnchantList(uid string) (result *pb.DBEnchant, err Boss: make(map[int32]int64), BossTime: make(map[int32]int32), } - if err = this.Get(uid, result); err != nil && mgo.MongodbNil != err { - + if err = this.Get(uid, result); err != nil { return } - if mgo.MongodbNil == err { - if len(result.Boss) == 0 { - _cfg := this.module.configure.GetEnchantBossTypeConfigData() - for k := range _cfg { - result.BossTime[k] = 0 - } - } - this.Add(uid, result) - } + err = nil return result, err } diff --git a/modules/worldtask/api_finish.go b/modules/worldtask/api_finish.go index debb8ab60..d07ea6e7d 100644 --- a/modules/worldtask/api_finish.go +++ b/modules/worldtask/api_finish.go @@ -108,6 +108,21 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe ) }() + for _, v := range curTaskConf.Reword { + if v.A == comm.HeroType { + hero = append(hero, v.T) + } + } + if len(hero) > 0 { + ishave := this.module.ModuleUser.CheckTujianHero(session, hero) + for i, v := range ishave { + if v { + newhero = append(newhero, hero[i]) + } + } + } + rsp.Newheros = newhero + // 完成任务 if err := this.module.modelWorldtask.finishTask(req.GroupId, req.TaskId, userTask); err != nil { code = pb.ErrorCode_WorldtaskFinish @@ -131,21 +146,6 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe ) } - for _, v := range curTaskConf.Reword { - if v.A == comm.HeroType { - hero = append(hero, v.T) - } - } - if len(hero) > 0 { - ishave := this.module.ModuleUser.CheckTujianHero(session, hero) - for i, v := range ishave { - if v { - newhero = append(newhero, hero[i]) - } - } - } - rsp.Newheros = newhero - } //判断任务是否已完成 diff --git a/pb/battle_db.pb.go b/pb/battle_db.pb.go index 71ae306ca..2b7a6f648 100644 --- a/pb/battle_db.pb.go +++ b/pb/battle_db.pb.go @@ -90,6 +90,7 @@ const ( PlayType_academy PlayType = 8 //联盟学院 PlayType_heroteaching PlayType = 9 //英雄教学 PlayType_combat PlayType = 10 //新关卡 + PlayType_enchant PlayType = 11 // 附魔副本 ) // Enum value maps for PlayType. @@ -106,6 +107,7 @@ var ( 8: "academy", 9: "heroteaching", 10: "combat", + 11: "enchant", } PlayType_value = map[string]int32{ "null": 0, @@ -119,6 +121,7 @@ var ( "academy": 8, "heroteaching": 9, "combat": 10, + "enchant": 11, } ) @@ -672,7 +675,7 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x2a, - 0x99, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, + 0xa6, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, @@ -681,13 +684,14 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x61, 0x73, 0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68, 0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, - 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, - 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, - 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, - 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, - 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x65, + 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x10, 0x0b, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, + 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, + 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/services/worker/main.go b/services/worker/main.go index 3da7874fd..9c4cd6aeb 100644 --- a/services/worker/main.go +++ b/services/worker/main.go @@ -8,6 +8,7 @@ import ( "go_dreamfactory/modules/battle" "go_dreamfactory/modules/chat" "go_dreamfactory/modules/combat" + "go_dreamfactory/modules/enchant" "go_dreamfactory/modules/equipment" "go_dreamfactory/modules/forum" "go_dreamfactory/modules/friend" @@ -106,6 +107,7 @@ func main() { academy.NewModule(), reddot.NewModule(), combat.NewModule(), + enchant.NewModule(), ) } From 7a7ab483cb8a334dd3ba4fd0eef9b9ead09b260f Mon Sep 17 00:00:00 2001 From: liwei Date: Tue, 20 Dec 2022 20:39:00 +0800 Subject: [PATCH 04/12] Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 858daa790..b4c813d05 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,8 @@ cmd/v2/my.db .idea/ bin/cross.json bin/gm.json +bin/cmd +bin/mainte +bin/gateway +bin/worker deployment/ \ No newline at end of file From 265d1e0cdcc107c14987a848c29952270ed51e4c Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 21 Dec 2022 10:31:51 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_global.json | 5 ++++- sys/configure/structs/game.globalData.go | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/json/game_global.json b/bin/json/game_global.json index 0299f4b7a..94a984ed0 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -153,6 +153,7 @@ "viking_num": 10, "viking_reset": 1, "kungfu_time": 30, + "kungfu_InitialPracticeStake": 2, "dreamland_fightnum": 30, "dreamland_recovery": 60, "dreamland_cos": { @@ -335,6 +336,8 @@ "First_plot2" ], "VIP_DaysSent": 7, - "MonthlyCard_DaysSent": 30 + "MonthlyCard_DaysSent": 30, + "opennewguide": 1, + "library_StoryUnlocking": 3 } ] \ No newline at end of file diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index a5f9bb921..59a3380fd 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -76,6 +76,7 @@ type GameGlobalData struct { VikingNum int32 VikingReset int32 KungfuTime int32 + KungfuInitialPracticeStake int32 DreamlandFightnum int32 DreamlandRecovery int32 DreamlandCos *Gameatn @@ -148,6 +149,8 @@ type GameGlobalData struct { CGPloatTxt []string VIPDaysSent int32 MonthlyCardDaysSent int32 + Opennewguide int32 + LibraryStoryUnlocking int32 } const TypeId_GameGlobalData = 477542761 @@ -287,6 +290,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["viking_num"].(float64); !_ok_ { err = errors.New("viking_num error"); return }; _v.VikingNum = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["viking_reset"].(float64); !_ok_ { err = errors.New("viking_reset error"); return }; _v.VikingReset = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["kungfu_time"].(float64); !_ok_ { err = errors.New("kungfu_time error"); return }; _v.KungfuTime = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["kungfu_InitialPracticeStake"].(float64); !_ok_ { err = errors.New("kungfu_InitialPracticeStake error"); return }; _v.KungfuInitialPracticeStake = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_fightnum"].(float64); !_ok_ { err = errors.New("dreamland_fightnum error"); return }; _v.DreamlandFightnum = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dreamland_recovery"].(float64); !_ok_ { err = errors.New("dreamland_recovery error"); return }; _v.DreamlandRecovery = int32(_tempNum_) } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["dreamland_cos"].(map[string]interface{}); !_ok_ { err = errors.New("dreamland_cos error"); return }; if _v.DreamlandCos, err = DeserializeGameatn(_x_); err != nil { return } } @@ -606,6 +610,8 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["VIP_DaysSent"].(float64); !_ok_ { err = errors.New("VIP_DaysSent error"); return }; _v.VIPDaysSent = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["MonthlyCard_DaysSent"].(float64); !_ok_ { err = errors.New("MonthlyCard_DaysSent error"); return }; _v.MonthlyCardDaysSent = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["opennewguide"].(float64); !_ok_ { err = errors.New("opennewguide error"); return }; _v.Opennewguide = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["library_StoryUnlocking"].(float64); !_ok_ { err = errors.New("library_StoryUnlocking error"); return }; _v.LibraryStoryUnlocking = int32(_tempNum_) } return } From ce400d00d3320fa4d921e6825eeffe48bc5c882d Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 21 Dec 2022 10:44:58 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E7=BE=8E=E9=A3=9F=E9=A6=86=20=E7=BA=A2?= =?UTF-8?q?=E7=82=B9=E8=A7=84=E5=88=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gourmet/module.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/gourmet/module.go b/modules/gourmet/module.go index 86418be02..96459e2da 100644 --- a/modules/gourmet/module.go +++ b/modules/gourmet/module.go @@ -70,15 +70,11 @@ func (this *Gourmet) Reddot(session comm.IUserSession, rid ...comm.ReddotType) ( } func (this *Gourmet) CheckPoint20(uid string) bool { - cfgCom := this.configure.GetGlobalConf() // 获取总的下单时长 - if cfgCom == nil { - return false - } _gourmet, err := this.modelGourmet.getGourmetList(uid) if err != nil { return false } - if cfgCom.Gourmet < _gourmet.OrderCostTime { // 大于总时长是不允许的 + if _gourmet.OrderCostTime > 0 { return false } return true From 4563606628cba806735ae8930f4a332cabdba892 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 21 Dec 2022 10:49:46 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=AD=A6=E9=A6=86=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/martialhall/modelMartialhall.go | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/modules/martialhall/modelMartialhall.go b/modules/martialhall/modelMartialhall.go index 37b0e44f6..098072917 100644 --- a/modules/martialhall/modelMartialhall.go +++ b/modules/martialhall/modelMartialhall.go @@ -38,16 +38,39 @@ func (this *modelMartialhall) queryUserMartialhall(uid string) (result *pb.DBMar this.module.Errorln(err) } if err == mgo.MongodbNil { + unlocknum := this.module.configure.GetGlobalConf().KungfuInitialPracticeStake result = &pb.DBMartialhall{ Id: primitive.NewObjectID().Hex(), Uid: uid, Lv: 1, - Pillar1: &pb.DBPillar{Index: 1, Isunlock: true}, + Pillar1: &pb.DBPillar{Index: 1}, Pillar2: &pb.DBPillar{Index: 2}, Pillar3: &pb.DBPillar{Index: 3}, Pillar4: &pb.DBPillar{Index: 4}, Pillar5: &pb.DBPillar{Index: 5}, } + switch unlocknum { + case 1: + result.Pillar1.Isunlock = true + case 2: + result.Pillar1.Isunlock = true + result.Pillar2.Isunlock = true + case 3: + result.Pillar1.Isunlock = true + result.Pillar2.Isunlock = true + result.Pillar3.Isunlock = true + case 4: + result.Pillar1.Isunlock = true + result.Pillar2.Isunlock = true + result.Pillar3.Isunlock = true + result.Pillar4.Isunlock = true + case 5: + result.Pillar1.Isunlock = true + result.Pillar2.Isunlock = true + result.Pillar3.Isunlock = true + result.Pillar4.Isunlock = true + result.Pillar5.Isunlock = true + } if err = this.Add(uid, result); err != nil { this.module.Errorln(err) return From 93b049704e598ceabb836d8a9a794b7b80d1ed2d Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 21 Dec 2022 15:01:25 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E7=8B=A9=E7=8C=8E=20=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hunting/api_buy.go | 4 ++-- modules/hunting/api_challenge.go | 5 +---- modules/hunting/api_getlist.go | 36 +++++++++++++++++++++++++++++++- modules/hunting/model_hunting.go | 22 ++----------------- modules/viking/api_buy.go | 2 +- modules/viking/api_getlist.go | 2 +- 6 files changed, 42 insertions(+), 29 deletions(-) diff --git a/modules/hunting/api_buy.go b/modules/hunting/api_buy.go index 24f4706d2..f1ec5e14e 100644 --- a/modules/hunting/api_buy.go +++ b/modules/hunting/api_buy.go @@ -88,8 +88,8 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HuntingBuyReq) (code list.RecoveryTime = 0 } addCount += req.Count - if amount+addCount > conf.VikingNum { - code = pb.ErrorCode_VikingBuyMaxCount + if amount+addCount > conf.HuntingNum { + code = pb.ErrorCode_HuntingBuyMaxCount return } mapData["recoveryTime"] = list.RecoveryTime diff --git a/modules/hunting/api_challenge.go b/modules/hunting/api_challenge.go index 27092fadf..cd959e961 100644 --- a/modules/hunting/api_challenge.go +++ b/modules/hunting/api_challenge.go @@ -44,10 +44,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen code = pb.ErrorCode_HuntingNoChallengeCount return } - // if hunting.ChallengeCount > this.module.configure.GetGlobalConf().HuntingNum+hunting.BuyCount { - // code = pb.ErrorCode_HuntingMaxChallengeCount - // return - // } + cfgData := this.module.configure.GetHuntingBossConfigData(req.BossType, req.Difficulty) if cfgData == nil { code = pb.ErrorCode_ConfigNoFound diff --git a/modules/hunting/api_getlist.go b/modules/hunting/api_getlist.go index b7b4b733d..394709ff5 100644 --- a/modules/hunting/api_getlist.go +++ b/modules/hunting/api_getlist.go @@ -2,11 +2,14 @@ package hunting import ( "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/utils" + "strconv" + "go.mongodb.org/mongo-driver/bson/primitive" "google.golang.org/protobuf/proto" ) @@ -28,7 +31,38 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListRe } list, err := this.module.modelHunting.getHuntingList(session.GetUserId()) - if err != nil { + if mgo.MongodbNil == err { + result := &pb.DBHunting{ + Id: primitive.NewObjectID().Hex(), + Uid: session.GetUserId(), + Boss: make(map[int32]int32), + BossTime: make(map[string]int32), + } + _cfg := this.module.configure.GetHuntingBossTypeConfigData() + for k := range _cfg { + result.Boss[k] = 0 + str := strconv.Itoa(int(k)) + "_1" + result.BossTime[str] = 0 + } + + this.module.modelHunting.Add(session.GetUserId(), result) + conf := this.module.configure.GetGlobalConf() + if conf == nil { + code = pb.ErrorCode_ConfigNoFound + return + } + iCont := conf.EnchantbossInitial + atn := conf.EnchantbossCos + if iCont > 0 { + + this.module.DispenseRes(session, []*cfg.Gameatn{&cfg.Gameatn{ + A: atn.A, + T: atn.T, + N: iCont, + }}, true) + } + } else if err != nil { + code = pb.ErrorCode_DBError return } diff --git a/modules/hunting/model_hunting.go b/modules/hunting/model_hunting.go index e4ff20e75..b25d35e93 100644 --- a/modules/hunting/model_hunting.go +++ b/modules/hunting/model_hunting.go @@ -6,9 +6,7 @@ import ( "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" - "strconv" - "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/x/bsonx" ) @@ -35,27 +33,11 @@ func (this *modelHunting) modifyHuntingDataByObjId(uid string, data map[string]i // 获取列表信息 func (this *modelHunting) getHuntingList(uid string) (result *pb.DBHunting, err error) { - result = &pb.DBHunting{ - Id: primitive.NewObjectID().Hex(), - Uid: uid, - Boss: make(map[int32]int32), - BossTime: make(map[string]int32), - } + result = &pb.DBHunting{} if err = this.Get(uid, result); err != nil && mgo.MongodbNil != err { - return } - if mgo.MongodbNil == err { - if len(result.Boss) == 0 { - _cfg := this.module.configure.GetHuntingBossTypeConfigData() - for k := range _cfg { - result.Boss[k] = 0 - str := strconv.Itoa(int(k)) + "_1" - result.BossTime[str] = 0 - } - } - this.Add(uid, result) - } + err = nil return result, err } diff --git a/modules/viking/api_buy.go b/modules/viking/api_buy.go index 560b8653f..0e591d915 100644 --- a/modules/viking/api_buy.go +++ b/modules/viking/api_buy.go @@ -69,7 +69,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.VikingBuyReq) (code if list.RecoveryTime+int64(conf.VikingExpeditionRecoveryTime*60) <= configure.Now().Unix() { curCount++ list.RecoveryTime += int64(conf.VikingExpeditionRecoveryTime * 60) - if curCount >= conf.HuntingNum { + if curCount >= conf.VikingNum { list.RecoveryTime = 0 break } diff --git a/modules/viking/api_getlist.go b/modules/viking/api_getlist.go index 3237ecc07..765cfed0c 100644 --- a/modules/viking/api_getlist.go +++ b/modules/viking/api_getlist.go @@ -63,7 +63,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.VikingGetListReq if list.RecoveryTime+int64(conf.VikingExpeditionRecoveryTime*60) <= configure.Now().Unix() { curCount++ list.RecoveryTime += int64(conf.VikingExpeditionRecoveryTime * 60) - if curCount >= conf.HuntingNum { + if curCount >= conf.VikingNum { list.RecoveryTime = 0 break } From aef8fb4152cfb0c4375c46327bb074ad5819040b Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 21 Dec 2022 15:45:49 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pb/battle_db.pb.go | 135 +++++++++++++++++++++++--------------------- pb/battle_msg.pb.go | 108 +++++++++++++++++++---------------- 2 files changed, 131 insertions(+), 112 deletions(-) diff --git a/pb/battle_db.pb.go b/pb/battle_db.pb.go index 2b7a6f648..02104d29e 100644 --- a/pb/battle_db.pb.go +++ b/pb/battle_db.pb.go @@ -267,6 +267,7 @@ type BattleRole struct { EquipSkill []*SkillData `protobuf:"bytes,11,rep,name=equipSkill,proto3" json:"equipSkill" bson:"normalSkill"` //普通技能 Property map[string]int32 `protobuf:"bytes,12,rep,name=property,proto3" json:"property" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 属性相关 Ishelp bool `protobuf:"varint,13,opt,name=ishelp,proto3" json:"ishelp"` //是否是助战英雄 + Isboos bool `protobuf:"varint,14,opt,name=isboos,proto3" json:"isboos"` //是否是boos } func (x *BattleRole) Reset() { @@ -392,6 +393,13 @@ func (x *BattleRole) GetIshelp() bool { return false } +func (x *BattleRole) GetIsboos() bool { + if x != nil { + return x.Isboos + } + return false +} + //战斗阵型信息 type DBBattleFormt struct { state protoimpl.MessageState @@ -605,7 +613,7 @@ var File_battle_battle_db_proto protoreflect.FileDescriptor var file_battle_battle_db_proto_rawDesc = []byte{ 0x0a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x03, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xea, 0x03, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x03, @@ -630,68 +638,69 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x19, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x68, 0x65, 0x6c, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x44, 0x42, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, - 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, - 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, - 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x25, 0x0a, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, - 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x2b, 0x0a, - 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0a, - 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x22, 0xa7, 0x03, 0x0a, 0x0e, 0x44, - 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x23, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, - 0x2e, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, - 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, - 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, - 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, - 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, - 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0b, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, - 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, - 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, - 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x2a, 0x39, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, - 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, - 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x2a, - 0xa6, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, - 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, - 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, - 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x69, 0x6b, 0x69, - 0x6e, 0x67, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, - 0x61, 0x73, 0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, - 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, - 0x0c, 0x68, 0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, - 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x65, - 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x10, 0x0b, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, - 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, - 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x16, 0x0a, 0x06, + 0x69, 0x73, 0x62, 0x6f, 0x6f, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, + 0x62, 0x6f, 0x6f, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 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, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, + 0x72, 0x6d, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, + 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x25, + 0x0a, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x2b, 0x0a, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, + 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, + 0x61, 0x6d, 0x22, 0xa7, 0x03, 0x0a, 0x0e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, + 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, + 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, + 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, + 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, + 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, + 0x6d, 0x70, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, + 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, + 0x6c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2a, 0x39, 0x0a, 0x0a, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, + 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, + 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12, 0x07, + 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x2a, 0xa6, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, + 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, + 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, + 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, + 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, + 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, + 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68, 0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, + 0x74, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x10, 0x0b, + 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, + 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, + 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, + 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/battle_msg.pb.go b/pb/battle_msg.pb.go index 81d043b86..09010e6d1 100644 --- a/pb/battle_msg.pb.go +++ b/pb/battle_msg.pb.go @@ -452,13 +452,14 @@ type BattleInfo struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗id Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题 - Btype BattleType `protobuf:"varint,3,opt,name=btype,proto3,enum=BattleType" json:"btype"` //战斗类型 - Ptype PlayType `protobuf:"varint,4,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型 - RedCompId string `protobuf:"bytes,5,opt,name=redCompId,proto3" json:"redCompId"` //红方阵营id - Redflist []*DBBattleFormt `protobuf:"bytes,6,rep,name=redflist,proto3" json:"redflist"` //红方阵型列表 - BlueCompId string `protobuf:"bytes,7,opt,name=blueCompId,proto3" json:"blueCompId"` //蓝方阵营id - Buleflist []*DBBattleFormt `protobuf:"bytes,8,rep,name=buleflist,proto3" json:"buleflist"` //红方阵型列表 - Tasks []int32 `protobuf:"varint,9,rep,packed,name=tasks,proto3" json:"tasks"` //任务列表 + Scene string `protobuf:"bytes,3,opt,name=scene,proto3" json:"scene"` //战斗场景 + Btype BattleType `protobuf:"varint,4,opt,name=btype,proto3,enum=BattleType" json:"btype"` //战斗类型 + Ptype PlayType `protobuf:"varint,5,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型 + RedCompId string `protobuf:"bytes,6,opt,name=redCompId,proto3" json:"redCompId"` //红方阵营id + Redflist []*DBBattleFormt `protobuf:"bytes,7,rep,name=redflist,proto3" json:"redflist"` //红方阵型列表 + BlueCompId string `protobuf:"bytes,8,opt,name=blueCompId,proto3" json:"blueCompId"` //蓝方阵营id + Buleflist []*DBBattleFormt `protobuf:"bytes,9,rep,name=buleflist,proto3" json:"buleflist"` //红方阵型列表 + Tasks []int32 `protobuf:"varint,10,rep,packed,name=tasks,proto3" json:"tasks"` //任务列表 } func (x *BattleInfo) Reset() { @@ -507,6 +508,13 @@ func (x *BattleInfo) GetTitle() string { return "" } +func (x *BattleInfo) GetScene() string { + if x != nil { + return x.Scene + } + return "" +} + func (x *BattleInfo) GetBtype() BattleType { if x != nil { return x.Btype @@ -860,51 +868,53 @@ var file_battle_battle_msg_proto_rawDesc = []byte{ 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, - 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x0a, 0x42, + 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xba, 0x02, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, - 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, - 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, - 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, - 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, - 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, - 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x61, 0x73, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, - 0x73, 0x22, 0x3b, 0x0a, 0x09, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6d, 0x64, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, - 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, - 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x05, - 0x69, 0x6e, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x05, 0x69, 0x6e, 0x63, 0x6d, 0x64, 0x12, 0x22, - 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x63, 0x6d, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x63, - 0x6d, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, - 0x73, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x66, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x52, 0x70, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, - 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x14, 0x0a, 0x05, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x73, 0x63, 0x65, 0x6e, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, + 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, + 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, + 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, + 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x05, + 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x3b, 0x0a, 0x09, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x43, 0x6d, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6d, 0x64, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x69, 0x6e, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x05, 0x69, + 0x6e, 0x63, 0x6d, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x63, 0x6d, 0x64, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, + 0x52, 0x06, 0x6f, 0x75, 0x74, 0x63, 0x6d, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, + 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x66, 0x0a, 0x10, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x70, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x72, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( From b39cef8fa0724f452d3c17dbcf22e18b5890c27c Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 21 Dec 2022 16:47:03 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=A1=A5=E5=85=85?= =?UTF-8?q?=EF=BC=8C=E9=80=9A=E8=BF=87=E7=89=B9=E6=9D=83=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=89=B9=E6=9D=83=E5=AF=B9=E5=BA=94=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=A2=9E=E5=8A=A0=E7=9A=84=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 2 ++ modules/privilege/configure.go | 34 +++++++++++++++++++++++++++++++++- modules/privilege/module.go | 15 +++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/comm/imodule.go b/comm/imodule.go index 63d636a6e..fabdb5fcb 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -290,6 +290,8 @@ type ( AddVipData(session IUserSession, oldVip, newVip int32) // 查询所有特权 key 对应comm.PrivilegeType1类型 CheckAllPrivilege(session IUserSession) map[int32]*pb.PrivilegeList + // 通过特权类型获取特权对应的增加数量 + GetCountByPrivilegeId(uid string, pId int32) (count int32) } //武馆 IMartialhall interface { diff --git a/modules/privilege/configure.go b/modules/privilege/configure.go index 1c3925791..9ffd4d210 100644 --- a/modules/privilege/configure.go +++ b/modules/privilege/configure.go @@ -3,8 +3,11 @@ package privilege import ( "fmt" "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" "go_dreamfactory/modules" + "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" + "sync" ) const ( @@ -15,7 +18,9 @@ const ( ///背包配置管理组件 type configureComp struct { modules.MCompConfigure - module *Privilege + module *Privilege + hlock sync.RWMutex + _privilegeMap map[int32]map[int32]int32 } //组件初始化接口 @@ -24,6 +29,25 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp this.module = module.(*Privilege) this.LoadConfigure(game_privilegecard, cfg.NewGamePrivilegeCard) this.LoadConfigure(game_privilege, cfg.NewGamePrivilege) + this._privilegeMap = make(map[int32]map[int32]int32, 0) + configure.RegisterConfigure(game_privilege, cfg.NewGamePrivilege, func() { + if v, err := this.GetConfigure(game_privilege); err == nil { + if configure, ok := v.(*cfg.GamePrivilege); ok { + this.hlock.Lock() + defer this.hlock.Unlock() + for k, v := range configure.GetDataMap() { + if v1, ok := this._privilegeMap[v.PrivilegeType]; ok { + v1[k] = v.PrivilegeParameter + } else { + this._privilegeMap[v.PrivilegeType] = make(map[int32]int32) + } + } + return + } + } + log.Errorf("get game_pagoda conf err:%v", err) + return + }) return } @@ -59,3 +83,11 @@ func (this *configureComp) GetPrivilegeData(id int32) (result *cfg.GamePrivilege this.module.Errorf("GetPrivilegeData err, id:%d", id) return nil } + +func (this *configureComp) GetPrivilegeByType(iType int32) (result map[int32]int32) { + result = make(map[int32]int32) + if v, ok := this._privilegeMap[iType]; ok { + result = v + } + return result +} diff --git a/modules/privilege/module.go b/modules/privilege/module.go index 41152e5a3..3e66edb1d 100644 --- a/modules/privilege/module.go +++ b/modules/privilege/module.go @@ -401,3 +401,18 @@ func (this *Privilege) SendDailyPrivilegeMail(session comm.IUserSession, cId []i this.mail.SendMailByCid(session, comm.VipDaily, res) } } +func (this *Privilege) GetCountByPrivilegeId(uid string, pId int32) (count int32) { + vip, err := this.modelVip.getVipList(uid) + if err != nil { + return + } + if v, ok := vip.Privilege[pId]; ok { + data := this.configure.GetPrivilegeByType(pId) + for _, v1 := range v.PrivilegeID { + if c, ok1 := data[v1]; ok1 { + count += c + } + } + } + return +} From c79d185619b63e452376000bec7ba9d0ebdf97a2 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 21 Dec 2022 17:47:12 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E7=BE=8E=E9=A3=9F=E9=A6=86=E6=9D=90?= =?UTF-8?q?=E6=96=99=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_gourmet.json | 158 ++++++++++++++++++------------------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/bin/json/game_gourmet.json b/bin/json/game_gourmet.json index 6dd598d28..2d393d017 100644 --- a/bin/json/game_gourmet.json +++ b/bin/json/game_gourmet.json @@ -50,14 +50,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 1 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 1 } ], @@ -119,14 +119,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 2 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 2 } ], @@ -188,14 +188,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 3 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 3 } ], @@ -257,14 +257,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 4 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 4 } ], @@ -326,14 +326,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 5 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 5 } ], @@ -395,14 +395,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 6 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 6 } ], @@ -464,14 +464,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 7 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 7 } ], @@ -533,14 +533,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 8 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 8 } ], @@ -602,14 +602,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 1 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 1 } ], @@ -671,14 +671,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 2 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 2 } ], @@ -740,14 +740,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 3 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 3 } ], @@ -809,14 +809,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 4 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 4 } ], @@ -878,14 +878,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 5 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 5 } ], @@ -947,14 +947,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 6 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 6 } ], @@ -1016,14 +1016,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 7 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 7 } ], @@ -1085,14 +1085,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 8 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 8 } ], @@ -1154,14 +1154,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 1 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 1 } ], @@ -1223,14 +1223,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 2 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 2 } ], @@ -1292,14 +1292,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 3 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 3 } ], @@ -1361,14 +1361,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 4 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 4 } ], @@ -1430,14 +1430,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 5 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 5 } ], @@ -1499,14 +1499,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 6 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 6 } ], @@ -1568,14 +1568,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 7 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 7 } ], @@ -1637,14 +1637,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 8 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 8 } ], @@ -1706,14 +1706,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 1 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 1 } ], @@ -1775,14 +1775,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 2 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 2 } ], @@ -1844,14 +1844,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 3 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 3 } ], @@ -1913,14 +1913,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 4 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 4 } ], @@ -1982,14 +1982,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 5 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 5 } ], @@ -2051,14 +2051,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 6 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 6 } ], @@ -2120,14 +2120,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 7 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 7 } ], @@ -2189,14 +2189,14 @@ "delicious_consume": [ { "a": "item", - "t": "10002", + "t": "110001", "n": 8 } ], "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 8 } ], @@ -2243,7 +2243,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 1 } ], @@ -2290,7 +2290,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 2 } ], @@ -2337,7 +2337,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 3 } ], @@ -2384,7 +2384,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 4 } ], @@ -2431,7 +2431,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 5 } ], @@ -2478,7 +2478,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 6 } ], @@ -2525,7 +2525,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 7 } ], @@ -2572,7 +2572,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 8 } ], @@ -2619,7 +2619,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 9 } ], @@ -2666,7 +2666,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 10 } ], @@ -2713,7 +2713,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 11 } ], @@ -2760,7 +2760,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 12 } ], @@ -2807,7 +2807,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 13 } ], @@ -2854,7 +2854,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 14 } ], @@ -2901,7 +2901,7 @@ "skill_consume": [ { "a": "item", - "t": "10002", + "t": "110002", "n": 15 } ], From 5b78f7550a452db6b6a9ae9106eaeb8427096d40 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 21 Dec 2022 19:39:58 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E7=89=B9=E6=9D=83ID=20=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_hero.json | 10 +- bin/json/game_herolevelgrow.json | 15 +++ bin/json/game_libraryhero.json | 3 +- bin/json/game_mail.json | 20 ++++ bin/json/game_vip.json | 164 ++++++++++++++++++------------- 5 files changed, 136 insertions(+), 76 deletions(-) diff --git a/bin/json/game_hero.json b/bin/json/game_hero.json index db365482d..067b1fe55 100644 --- a/bin/json/game_hero.json +++ b/bin/json/game_hero.json @@ -6422,7 +6422,7 @@ { "hid": "11021", "name": { - "key": "hero_55007", + "key": "hero_55008", "text": "莫甘娜巨怪" }, "star": 5, @@ -6452,10 +6452,10 @@ "y": 0, "z": 0 }, - "skill": 111021011, - "skill1": 111021111, - "skill2": 111021211, - "skill3": 111021311, + "skill": 155006011, + "skill1": 155006111, + "skill2": 155006211, + "skill3": 155006311, "txt": { "key": "atlas_11021", "text": "" diff --git a/bin/json/game_herolevelgrow.json b/bin/json/game_herolevelgrow.json index a89590ce8..f1e7cefac 100644 --- a/bin/json/game_herolevelgrow.json +++ b/bin/json/game_herolevelgrow.json @@ -1588,5 +1588,20 @@ "atkgrow": 1300, "defgrow": 1250, "speedgrow": 0 + }, + { + "id": "11021", + "hp": 0, + "atk": 0, + "def": 0, + "speed": 170, + "cri": 50, + "cridam": 1500, + "effhit": 0, + "effre": 200, + "hpgrow": 1900, + "atkgrow": 1700, + "defgrow": 1700, + "speedgrow": 0 } ] \ No newline at end of file diff --git a/bin/json/game_libraryhero.json b/bin/json/game_libraryhero.json index 1ef07733e..fe61a635e 100644 --- a/bin/json/game_libraryhero.json +++ b/bin/json/game_libraryhero.json @@ -1066,8 +1066,7 @@ "star": 3, "history": [ "430051", - "430052", - "430053" + "430052" ], "favorlv": [ 1, diff --git a/bin/json/game_mail.json b/bin/json/game_mail.json index ebb8d5204..ec4f70e0a 100644 --- a/bin/json/game_mail.json +++ b/bin/json/game_mail.json @@ -158,5 +158,25 @@ "text": "系统" }, "duration": 720 + }, + { + "id": "VipLvReward", + "title": { + "key": "MailTitle_VipLvReward", + "text": "商会等级奖励" + }, + "recipient": { + "key": "MailRecipient_VipLvReward", + "text": "亲爱的{0}:" + }, + "content": { + "key": "MailContent_VipLvReward", + "text": "我们已根据您在商会的职位发放每日分红,请查收" + }, + "sender": { + "key": "MailSender_VipLvReward", + "text": "商会管理员" + }, + "duration": 720 } ] \ No newline at end of file diff --git a/bin/json/game_vip.json b/bin/json/game_vip.json index 8a1ca90df..5c17542b6 100644 --- a/bin/json/game_vip.json +++ b/bin/json/game_vip.json @@ -6,7 +6,7 @@ "key": "vipname1", "text": "特邀会员" }, - "vip_lv_png": "icon_vip_dj00", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj00", "original_priceprice": { "a": "attr", @@ -38,7 +38,7 @@ } ], "vip_privilege": [ - 1 + 20101 ] }, { @@ -48,7 +48,7 @@ "key": "vipname2", "text": "高级会员" }, - "vip_lv_png": "icon_vip_dj01", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj01", "original_priceprice": { "a": "attr", @@ -80,8 +80,8 @@ } ], "vip_privilege": [ - 1, - 2 + 20102, + 20201 ] }, { @@ -91,7 +91,7 @@ "key": "vipname3", "text": "资深会员" }, - "vip_lv_png": "icon_vip_dj02", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj02", "original_priceprice": { "a": "attr", @@ -123,9 +123,8 @@ } ], "vip_privilege": [ - 1, - 2, - 3 + 20103, + 20202 ] }, { @@ -135,7 +134,7 @@ "key": "vipname4", "text": "理事" }, - "vip_lv_png": "icon_vip_dj03", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj03", "original_priceprice": { "a": "attr", @@ -167,10 +166,9 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20104, + 20203, + 20701 ] }, { @@ -180,7 +178,7 @@ "key": "vipname5", "text": "高级理事" }, - "vip_lv_png": "icon_vip_dj04", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj04", "original_priceprice": { "a": "attr", @@ -212,10 +210,9 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20105, + 20204, + 20702 ] }, { @@ -225,7 +222,7 @@ "key": "vipname6", "text": "理事长" }, - "vip_lv_png": "icon_vip_dj05", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj05", "original_priceprice": { "a": "attr", @@ -257,10 +254,9 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20106, + 20205, + 20703 ] }, { @@ -270,7 +266,7 @@ "key": "vipname7", "text": "监事" }, - "vip_lv_png": "icon_vip_dj06", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj06", "original_priceprice": { "a": "attr", @@ -302,10 +298,12 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20107, + 20206, + 20704, + 20801, + 20901, + 21001 ] }, { @@ -315,7 +313,7 @@ "key": "vipname8", "text": "高级监事" }, - "vip_lv_png": "icon_vip_dj07", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj07", "original_priceprice": { "a": "attr", @@ -347,10 +345,12 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20108, + 20207, + 20705, + 20802, + 20902, + 21002 ] }, { @@ -360,7 +360,7 @@ "key": "vipname9", "text": "监事长" }, - "vip_lv_png": "icon_vip_dj08", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj08", "original_priceprice": { "a": "attr", @@ -392,10 +392,12 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20109, + 20208, + 20706, + 20803, + 20903, + 21003 ] }, { @@ -405,7 +407,7 @@ "key": "vipname10", "text": "荣誉副会长" }, - "vip_lv_png": "icon_vip_dj09", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj09", "original_priceprice": { "a": "attr", @@ -437,10 +439,14 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20110, + 20209, + 20707, + 20804, + 20904, + 21004, + 20401, + 20501 ] }, { @@ -450,7 +456,7 @@ "key": "vipname11", "text": "执行副会长" }, - "vip_lv_png": "icon_vip_dj10", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj10", "original_priceprice": { "a": "attr", @@ -482,10 +488,14 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20111, + 20210, + 20708, + 20805, + 20905, + 21005, + 20402, + 20502 ] }, { @@ -495,7 +505,7 @@ "key": "vipname12", "text": "常务副会长" }, - "vip_lv_png": "icon_vip_dj11", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj11", "original_priceprice": { "a": "attr", @@ -527,10 +537,14 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20112, + 20211, + 20709, + 20806, + 20906, + 21006, + 20403, + 20503 ] }, { @@ -540,7 +554,7 @@ "key": "vipname13", "text": "秘书长" }, - "vip_lv_png": "icon_vip_dj12", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj12", "original_priceprice": { "a": "attr", @@ -572,10 +586,14 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20113, + 20212, + 20710, + 20807, + 20907, + 21007, + 20404, + 20504 ] }, { @@ -585,7 +603,7 @@ "key": "vipname14", "text": "执行会长" }, - "vip_lv_png": "icon_vip_dj13", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj13", "original_priceprice": { "a": "attr", @@ -617,10 +635,14 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20114, + 20213, + 20711, + 20808, + 20908, + 21008, + 20405, + 20505 ] }, { @@ -630,7 +652,7 @@ "key": "vipname15", "text": "商会主席" }, - "vip_lv_png": "icon_vip_dj14", + "vip_lv_png": "wp_icon_bydw02", "vip_lv_gift_png": "icon_vip_dj14", "original_priceprice": { "a": "attr", @@ -662,10 +684,14 @@ } ], "vip_privilege": [ - 1, - 2, - 3, - 4 + 20115, + 20214, + 20712, + 20809, + 20909, + 21009, + 20406, + 20506 ] } ] \ No newline at end of file