From 9d057930ecc25d9b804f5da43bbe0315ec7af780 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 21 Feb 2024 18:20:08 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E4=B8=80=E7=BB=83buff=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_annulartaskall.json | 116 +++++- bin/json/game_buriedcondi.json | 35 +- bin/json/game_dispatch_task.json | 20 +- bin/json/game_global.json | 4 +- bin/json/game_horoscope.json | 104 ++--- bin/json/game_item.json | 186 ++++++--- bin/json/game_navigation.json | 2 +- bin/json/game_pandamasbuff.json | 8 +- bin/json/game_puggsyevent.json | 374 +++++++++++++----- bin/json/game_puggsyrecruit.json | 18 +- bin/json/game_puggsyscore.json | 289 ++------------ bin/json/game_puggsystar.json | 66 +++- bin/json/game_rdtasknpc.json | 6 +- bin/json/game_ruledesc.json | 46 ++- bin/json/game_worldrd.json | 90 +++++ modules/battle/modelBattle.go | 55 ++- .../structs/Game.PandamasBuffData.go | 17 +- sys/configure/structs/Game.WorldRdData.go | 4 + sys/configure/structs/TEnum.HoroscopeType.go | 14 + 19 files changed, 911 insertions(+), 543 deletions(-) create mode 100644 sys/configure/structs/TEnum.HoroscopeType.go diff --git a/bin/json/game_annulartaskall.json b/bin/json/game_annulartaskall.json index 31190b2a1..27ee5b504 100644 --- a/bin/json/game_annulartaskall.json +++ b/bin/json/game_annulartaskall.json @@ -2,11 +2,30 @@ { "taskgroup": 10010, "taskdetail": [ - 60000010, - 60000070, - 60000080, - 60000090, - 60000100 + 60000370, + 60000380, + 60000390, + 60000400, + 60000410, + 60000420, + 60000430, + 60000440, + 60000450, + 60000460, + 60000470, + 60000480, + 60000490, + 60000500, + 60000510, + 60000520, + 60000530, + 60000540, + 60000550, + 60000560, + 60000570, + 60000580, + 60000590, + 60000600 ], "weight": 2500, "reward": [ @@ -25,11 +44,30 @@ { "taskgroup": 10020, "taskdetail": [ - 60000110, - 60000120, - 60000130, - 60000140, - 60000150 + 60000370, + 60000380, + 60000390, + 60000400, + 60000410, + 60000420, + 60000430, + 60000440, + 60000450, + 60000460, + 60000470, + 60000480, + 60000490, + 60000500, + 60000510, + 60000520, + 60000530, + 60000540, + 60000550, + 60000560, + 60000570, + 60000580, + 60000590, + 60000600 ], "weight": 2500, "reward": [ @@ -48,11 +86,30 @@ { "taskgroup": 10030, "taskdetail": [ - 60000160, - 60000170, - 60000180, - 60000190, - 60000200 + 60000370, + 60000380, + 60000390, + 60000400, + 60000410, + 60000420, + 60000430, + 60000440, + 60000450, + 60000460, + 60000470, + 60000480, + 60000490, + 60000500, + 60000510, + 60000520, + 60000530, + 60000540, + 60000550, + 60000560, + 60000570, + 60000580, + 60000590, + 60000600 ], "weight": 2500, "reward": [ @@ -71,11 +128,30 @@ { "taskgroup": 10040, "taskdetail": [ - 60000240, - 60000250, - 60000260, - 60000270, - 60000280 + 60000370, + 60000380, + 60000390, + 60000400, + 60000410, + 60000420, + 60000430, + 60000440, + 60000450, + 60000460, + 60000470, + 60000480, + 60000490, + 60000500, + 60000510, + 60000520, + 60000530, + 60000540, + 60000550, + 60000560, + 60000570, + 60000580, + 60000590, + 60000600 ], "weight": 2500, "reward": [ diff --git a/bin/json/game_buriedcondi.json b/bin/json/game_buriedcondi.json index 81346c0df..72c11a79f 100644 --- a/bin/json/game_buriedcondi.json +++ b/bin/json/game_buriedcondi.json @@ -6076,7 +6076,7 @@ }, { "id": 12070430, - "refresh": 0, + "refresh": 12070431, "rtype": 1, "ctype": 1, "notify": [], @@ -6107,6 +6107,39 @@ "0" ] }, + { + "id": 12070431, + "refresh": 12070430, + "rtype": 1, + "ctype": 1, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_179", + "text": "退出或解散俱乐部" + }, + "type": 253, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "Npc_event_type": 0, + "NPC": 110360, + "tipstxt": { + "key": "", + "text": "" + }, + "value": 1, + "filter": [], + "filter2": [ + "等级", + "0", + "0", + "0" + ] + }, { "id": 12070440, "refresh": 0, diff --git a/bin/json/game_dispatch_task.json b/bin/json/game_dispatch_task.json index d23e5cd92..673c4dffd 100644 --- a/bin/json/game_dispatch_task.json +++ b/bin/json/game_dispatch_task.json @@ -2008,7 +2008,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20011", "n": 1 } @@ -2064,7 +2064,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20012", "n": 1 } @@ -2120,7 +2120,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20013", "n": 1 } @@ -2176,7 +2176,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20014", "n": 1 } @@ -2232,7 +2232,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20015", "n": 1 } @@ -2288,7 +2288,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20016", "n": 1 } @@ -2344,7 +2344,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20017", "n": 1 } @@ -2400,7 +2400,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20018", "n": 1 } @@ -2456,7 +2456,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20019", "n": 1 } @@ -2512,7 +2512,7 @@ ], "rewardex": [ { - "a": "pand", + "a": "panda", "t": "20020", "n": 1 } diff --git a/bin/json/game_global.json b/bin/json/game_global.json index 0b369063d..3282d3044 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -772,8 +772,8 @@ "catchbugturn": 6, "NewDrawcardAttempts_Nums": 30, "stonehenge_guideStage": 88, - "dialogueclickcd": 0.5, - "story_waittime": 0.1, + "dialogueclickcd": 0.3, + "story_waittime": 0.5, "story_waittime_gaptime": 1, "sx_ranknum": 200, "IntegralBoss_challenge_num": 9999, diff --git a/bin/json/game_horoscope.json b/bin/json/game_horoscope.json index 0460afb3b..bef26141d 100644 --- a/bin/json/game_horoscope.json +++ b/bin/json/game_horoscope.json @@ -2348,7 +2348,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2382,7 +2382,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2416,7 +2416,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2450,7 +2450,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2512,7 +2512,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2546,7 +2546,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2580,7 +2580,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2642,7 +2642,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2676,7 +2676,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2710,7 +2710,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2772,7 +2772,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2806,7 +2806,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2840,7 +2840,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2902,7 +2902,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2936,7 +2936,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -2998,7 +2998,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3032,7 +3032,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3094,7 +3094,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3128,7 +3128,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3190,7 +3190,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3224,7 +3224,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3258,7 +3258,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3320,7 +3320,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3354,7 +3354,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3388,7 +3388,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3450,7 +3450,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3484,7 +3484,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3518,7 +3518,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3580,7 +3580,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3614,7 +3614,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3676,7 +3676,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3710,7 +3710,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3772,7 +3772,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3806,7 +3806,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3868,7 +3868,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3902,7 +3902,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3936,7 +3936,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -3998,7 +3998,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4032,7 +4032,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4066,7 +4066,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4128,7 +4128,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4162,7 +4162,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4196,7 +4196,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4258,7 +4258,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4292,7 +4292,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4354,7 +4354,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4388,7 +4388,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4450,7 +4450,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4484,7 +4484,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4546,7 +4546,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4580,7 +4580,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], @@ -4614,7 +4614,7 @@ "cost_item": [ { "a": "attr", - "t": "starcoin", + "t": "puggsygm", "n": 1 } ], diff --git a/bin/json/game_item.json b/bin/json/game_item.json index 793624d15..e69fe98ec 100644 --- a/bin/json/game_item.json +++ b/bin/json/game_item.json @@ -1184,6 +1184,92 @@ "sale": [], "gm": 0 }, + { + "id": "10000042", + "name": { + "key": "item_item_name_10000042", + "text": "旅行币" + }, + "usetype": 1, + "color": 4, + "bagtype": 0, + "index": 9, + "special_type": 0, + "hold": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [ + 10036 + ], + "use_skip": 10036, + "upper_limit": 999, + "img": "wp_icon_10023", + "intr": { + "key": "item_item_intr_10000042", + "text": "与驴同行玩法中用于召唤和刷新守护者的道具" + }, + "describe": { + "key": "item_item_describe_10000042", + "text": "买买买!都可以买" + }, + "dialogue": { + "key": "item_item_dialogue_10000042", + "text": "【驴子旅行很奇怪吗?】" + }, + "sale": [], + "gm": 0 + }, + { + "id": "10000043", + "name": { + "key": "item_item_name_10000043", + "text": "旅行物资" + }, + "usetype": 1, + "color": 4, + "bagtype": 0, + "index": 99, + "special_type": 0, + "hold": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [ + 10036 + ], + "use_skip": 10036, + "upper_limit": 2000, + "img": "item_10000041", + "intr": { + "key": "item_item_intr_10000043", + "text": "与驴同行玩法中用于养成的道具" + }, + "describe": { + "key": "item_item_describe_10000043", + "text": "有点用,但不多" + }, + "dialogue": { + "key": "item_item_dialogue_10000043", + "text": "【一路走一路捡!】" + }, + "sale": [], + "gm": 0 + }, { "id": "11013001", "name": { @@ -15491,53 +15577,6 @@ "id": "17050003", "name": { "key": "item_item_name_17050003", - "text": "5星感观之林自选箱" - }, - "usetype": 4, - "color": 5, - "bagtype": 1, - "index": 2, - "special_type": 0, - "hold": 0, - "time": 0, - "reddottype": 0, - "effects": "effect_ui_bagwindow_2", - "modelName": "", - "box_id": 17050003, - "synthetize_num": 0, - "synthetize_deplete": [], - "synthetize_get": [], - "decompose_deplete": [], - "decompose_get": [], - "access": [], - "use_skip": 0, - "upper_limit": 0, - "img": "item_17050003", - "intr": { - "key": "item_item_intr_17050003", - "text": "开启后,可以从5星感观之林属性守护者中自选一名守护者。" - }, - "describe": { - "key": "item_item_describe_17050003", - "text": "5星感观之林自选宝箱。" - }, - "dialogue": { - "key": "item_item_dialogue_17050003", - "text": "" - }, - "sale": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "gm": 0 - }, - { - "id": "17050004", - "name": { - "key": "item_item_name_17050004", "text": "5星包容之水自选箱" }, "usetype": 4, @@ -15559,15 +15598,62 @@ "access": [], "use_skip": 0, "upper_limit": 0, - "img": "item_17050004", + "img": "item_17050003", "intr": { - "key": "item_item_intr_17050004", + "key": "item_item_intr_17050003", "text": "开启后,可以从5星包容之水属性守护者中自选一名守护者。" }, "describe": { - "key": "item_item_describe_17050004", + "key": "item_item_describe_17050003", "text": "5星包容之水自选宝箱。" }, + "dialogue": { + "key": "item_item_dialogue_17050003", + "text": "" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "gm": 0 + }, + { + "id": "17050004", + "name": { + "key": "item_item_name_17050004", + "text": "5星感观之林自选箱" + }, + "usetype": 4, + "color": 5, + "bagtype": 1, + "index": 2, + "special_type": 0, + "hold": 0, + "time": 0, + "reddottype": 0, + "effects": "effect_ui_bagwindow_2", + "modelName": "", + "box_id": 17050003, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [], + "use_skip": 0, + "upper_limit": 0, + "img": "item_17050004", + "intr": { + "key": "item_item_intr_17050004", + "text": "开启后,可以从5星感观之林属性守护者中自选一名守护者。" + }, + "describe": { + "key": "item_item_describe_17050004", + "text": "5星感观之林自选宝箱。" + }, "dialogue": { "key": "item_item_dialogue_17050004", "text": "" diff --git a/bin/json/game_navigation.json b/bin/json/game_navigation.json index 3fa34603b..0178ec57a 100644 --- a/bin/json/game_navigation.json +++ b/bin/json/game_navigation.json @@ -297,7 +297,7 @@ "sceneicon": "ty_qp_my01", "functionname": { "key": "navigation_Sheet1_functionname_18", - "text": "捉虫" + "text": "猎食大冒险" }, "npcName": [ "功能入口-捉虫" diff --git a/bin/json/game_pandamasbuff.json b/bin/json/game_pandamasbuff.json index 5f55154da..a9cbe760f 100644 --- a/bin/json/game_pandamasbuff.json +++ b/bin/json/game_pandamasbuff.json @@ -2,7 +2,7 @@ { "id": 1001, "buff_group": 1000001, - "duration": "", + "duration": [], "camp_restriction": 1, "occupational_restrictions": 1, "star_limit": 6, @@ -16,7 +16,7 @@ { "id": 1002, "buff_group": 1000001, - "duration": "", + "duration": [], "camp_restriction": 2, "occupational_restrictions": 2, "star_limit": 6, @@ -30,7 +30,7 @@ { "id": 1003, "buff_group": 1000001, - "duration": "", + "duration": [], "camp_restriction": 3, "occupational_restrictions": 3, "star_limit": 6, @@ -44,7 +44,7 @@ { "id": 1004, "buff_group": 1000001, - "duration": "", + "duration": [], "camp_restriction": 4, "occupational_restrictions": 4, "star_limit": 6, diff --git a/bin/json/game_puggsyevent.json b/bin/json/game_puggsyevent.json index fa5b0142c..ca8b942cc 100644 --- a/bin/json/game_puggsyevent.json +++ b/bin/json/game_puggsyevent.json @@ -6,8 +6,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -19,8 +24,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -32,8 +42,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -41,13 +56,18 @@ { "event": 1004, "node_id": 1, - "type": 3, - "value": 810301, + "type": 2, + "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -58,9 +78,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -71,9 +96,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -98,8 +128,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -111,8 +146,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -124,8 +164,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -133,13 +178,18 @@ { "event": 2004, "node_id": 2, - "type": 3, + "type": 2, "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -150,9 +200,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -163,9 +218,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -190,8 +250,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -203,8 +268,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -216,8 +286,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -225,13 +300,18 @@ { "event": 3004, "node_id": 3, - "type": 3, + "type": 2, "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -242,9 +322,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -255,9 +340,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -282,8 +372,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -295,8 +390,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -308,8 +408,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -317,13 +422,18 @@ { "event": 4004, "node_id": 4, - "type": 3, + "type": 2, "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -334,9 +444,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -347,9 +462,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -374,8 +494,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -387,8 +512,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -400,8 +530,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -409,13 +544,18 @@ { "event": 5004, "node_id": 5, - "type": 3, + "type": 2, "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -426,9 +566,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -439,9 +584,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -466,8 +616,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -479,8 +634,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -492,8 +652,13 @@ "value": 200520, "reward": [ { - "a": "attr", - "t": "starcoin", + "a": "item", + "t": "10000042", + "n": 1 + }, + { + "a": "item", + "t": "10000043", "n": 1 } ] @@ -501,13 +666,18 @@ { "event": 6004, "node_id": 6, - "type": 3, + "type": 2, "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -518,9 +688,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, @@ -531,9 +706,14 @@ "value": 0, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 2 + }, + { + "a": "item", + "t": "10000043", + "n": 2 } ] }, diff --git a/bin/json/game_puggsyrecruit.json b/bin/json/game_puggsyrecruit.json index 41603c72c..08ec11ad6 100644 --- a/bin/json/game_puggsyrecruit.json +++ b/bin/json/game_puggsyrecruit.json @@ -3,9 +3,9 @@ "star": 3, "need": [ { - "a": "attr", - "t": "diamond", - "n": 300 + "a": "item", + "t": "10000042", + "n": 1 } ] }, @@ -13,9 +13,9 @@ "star": 4, "need": [ { - "a": "attr", - "t": "diamond", - "n": 300 + "a": "item", + "t": "10000042", + "n": 2 } ] }, @@ -23,9 +23,9 @@ "star": 5, "need": [ { - "a": "attr", - "t": "diamond", - "n": 300 + "a": "item", + "t": "10000042", + "n": 3 } ] } diff --git a/bin/json/game_puggsyscore.json b/bin/json/game_puggsyscore.json index 97f2a9e46..59b1bc49b 100644 --- a/bin/json/game_puggsyscore.json +++ b/bin/json/game_puggsyscore.json @@ -13,9 +13,14 @@ "rank_up": 49999, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 5 + }, + { + "a": "item", + "t": "10000043", + "n": 5 } ] }, @@ -26,9 +31,14 @@ "rank_up": 79999, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 6 + }, + { + "a": "item", + "t": "10000043", + "n": 6 } ] }, @@ -39,9 +49,14 @@ "rank_up": 99999, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 7 + }, + { + "a": "item", + "t": "10000043", + "n": 7 } ] }, @@ -49,259 +64,17 @@ "id": 5, "boss_id": 810301, "rank_low": 100000, - "rank_up": 149999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 6, - "boss_id": 810301, - "rank_low": 150000, - "rank_up": 199999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 7, - "boss_id": 810301, - "rank_low": 200000, - "rank_up": 249999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 8, - "boss_id": 810301, - "rank_low": 250000, - "rank_up": 319999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 9, - "boss_id": 810301, - "rank_low": 320000, - "rank_up": 399999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 10, - "boss_id": 810301, - "rank_low": 400000, - "rank_up": 499999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 11, - "boss_id": 810301, - "rank_low": 500000, - "rank_up": 599999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 12, - "boss_id": 810301, - "rank_low": 600000, - "rank_up": 699999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 13, - "boss_id": 810301, - "rank_low": 700000, - "rank_up": 999999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 14, - "boss_id": 810301, - "rank_low": 1000000, - "rank_up": 1199999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 15, - "boss_id": 810301, - "rank_low": 1200000, - "rank_up": 1599999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 16, - "boss_id": 810301, - "rank_low": 1600000, - "rank_up": 3799999, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 17, - "boss_id": 810301, - "rank_low": 3800000, "rank_up": -1, "reward": [ { - "a": "attr", - "t": "starcoin", - "n": 1 - } - ] - }, - { - "id": 18, - "boss_id": 810302, - "rank_low": 0, - "rank_up": 0, - "reward": [ + "a": "item", + "t": "10000042", + "n": 10 + }, { - "a": "attr", - "t": "starcoin", - "n": 2 - } - ] - }, - { - "id": 19, - "boss_id": 810303, - "rank_low": 1, - "rank_up": 1, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 3 - } - ] - }, - { - "id": 20, - "boss_id": 810304, - "rank_low": 2, - "rank_up": 2, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 4 - } - ] - }, - { - "id": 21, - "boss_id": 810305, - "rank_low": 3, - "rank_up": 3, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 5 - } - ] - }, - { - "id": 22, - "boss_id": 810306, - "rank_low": 4, - "rank_up": 4, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 6 - } - ] - }, - { - "id": 23, - "boss_id": 810307, - "rank_low": 5, - "rank_up": 5, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 7 - } - ] - }, - { - "id": 24, - "boss_id": 810308, - "rank_low": 6, - "rank_up": 6, - "reward": [ - { - "a": "attr", - "t": "starcoin", - "n": 8 + "a": "item", + "t": "10000043", + "n": 10 } ] } diff --git a/bin/json/game_puggsystar.json b/bin/json/game_puggsystar.json index c00efedff..910c9532c 100644 --- a/bin/json/game_puggsystar.json +++ b/bin/json/game_puggsystar.json @@ -20,9 +20,14 @@ "value": 1000, "drop": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 5 + }, + { + "a": "item", + "t": "10000043", + "n": 5 } ] }, @@ -47,9 +52,14 @@ "value": 1000, "drop": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 6 + }, + { + "a": "item", + "t": "10000043", + "n": 6 } ] }, @@ -74,9 +84,14 @@ "value": 1000, "drop": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 8 + }, + { + "a": "item", + "t": "10000043", + "n": 8 } ] }, @@ -101,9 +116,14 @@ "value": 1000, "drop": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 8 + }, + { + "a": "item", + "t": "10000043", + "n": 8 } ] }, @@ -128,9 +148,14 @@ "value": 1000, "drop": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 8 + }, + { + "a": "item", + "t": "10000043", + "n": 8 } ] }, @@ -155,9 +180,14 @@ "value": 1000, "drop": [ { - "a": "attr", - "t": "starcoin", - "n": 1 + "a": "item", + "t": "10000042", + "n": 10 + }, + { + "a": "item", + "t": "10000043", + "n": 10 } ] } diff --git a/bin/json/game_rdtasknpc.json b/bin/json/game_rdtasknpc.json index 7cda86564..991ce43c5 100644 --- a/bin/json/game_rdtasknpc.json +++ b/bin/json/game_rdtasknpc.json @@ -10613,7 +10613,7 @@ "Levelid": 0, "datas": [ "GameMain", - "跑环-连环-匹诺曹", + "跑环-烹饪-匹诺曹", "901" ], "event": [ @@ -10823,7 +10823,7 @@ "Levelid": 0, "datas": [ "GameMain", - "跑环-烹饪-格里斯特王子", + "氛围npc-格里森王子", "901" ], "event": [ @@ -11387,7 +11387,7 @@ "Levelid": 0, "datas": [ "GameMain", - "跑环-烹饪-格里斯特王子", + "氛围npc-格里森王子", "901" ], "event": [ diff --git a/bin/json/game_ruledesc.json b/bin/json/game_ruledesc.json index 59ddf072f..05ee05ea6 100644 --- a/bin/json/game_ruledesc.json +++ b/bin/json/game_ruledesc.json @@ -532,15 +532,15 @@ "id": 10031, "title": { "key": "ruledesc_ruledesc_title_31", - "text": "炼金塔挑战说明" + "text": "修炼塔挑战说明" }, "titlecontent": { "key": "ruledesc_ruledesc_titlecontent_34", - "text": "炼金塔挑战说明" + "text": "修炼塔挑战说明" }, "content": { "key": "ruledesc_ruledesc_content_34", - "text": "这里可以挑战炼金塔,每次挑战胜利都可以获得奖励,每挑战胜利10层可以获得相应教习。(炼金塔挑战不需要消耗物品)。" + "text": "这里可以挑战修炼塔,每次挑战胜利都可以获得奖励,每挑战胜利10层可以获得相应教习。(修炼塔挑战不需要消耗物品)。" } }, { @@ -548,15 +548,15 @@ "id": 10032, "title": { "key": "ruledesc_ruledesc_title_32", - "text": "炼金塔挑战说明" + "text": "修炼塔挑战说明" }, "titlecontent": { "key": "ruledesc_ruledesc_titlecontent_35", - "text": "炼金塔挑战说明" + "text": "修炼塔挑战说明" }, "content": { "key": "ruledesc_ruledesc_content_35", - "text": "这里可以查看炼金塔每层挑战成功获得的奖励与敌人配置。" + "text": "这里可以查看修炼塔每层挑战成功获得的奖励与敌人配置。" } }, { @@ -904,11 +904,43 @@ }, "titlecontent": { "key": "ruledesc_ruledesc_titlecontent_57", - "text": "" + "text": "成就说明" }, "content": { "key": "ruledesc_ruledesc_content_57", "text": "这里能查看所有获得的成就。" } + }, + { + "key": 58, + "id": 10049, + "title": { + "key": "ruledesc_ruledesc_title_50", + "text": "塔岗监狱说明" + }, + "titlecontent": { + "key": "ruledesc_ruledesc_titlecontent_58", + "text": "塔岗监狱说明" + }, + "content": { + "key": "ruledesc_ruledesc_content_58", + "text": "这里可以挑战多波敌人获取经验成长材料。使用各种大范围伤害技能来快速消灭敌人吧。" + } + }, + { + "key": 59, + "id": 10050, + "title": { + "key": "ruledesc_ruledesc_title_51", + "text": "猎魂挑战说明" + }, + "titlecontent": { + "key": "ruledesc_ruledesc_titlecontent_59", + "text": "猎魂挑战说明" + }, + "content": { + "key": "ruledesc_ruledesc_content_59", + "text": "这里可以猎魂各种敌人获得回响材料。
猎魂挑战随时间开放不同的猎魂头目,掉落的回响材料可用于阵容也会有所不同。
挑战难度越高的猎魂头目,获得的材料数量与稀有度越高。" + } } ] \ No newline at end of file diff --git a/bin/json/game_worldrd.json b/bin/json/game_worldrd.json index bb39c5009..d8bb396a4 100644 --- a/bin/json/game_worldrd.json +++ b/bin/json/game_worldrd.json @@ -6,6 +6,11 @@ "key": "eventname_1", "text": "无事发生" }, + "txt": { + "key": "world_rd_txt_01", + "text": "无事发生" + }, + "img": "", "eventweight": 40000, "eventtype": 2, "battleready": 126, @@ -19,6 +24,11 @@ "key": "eventname_2", "text": "打怪" }, + "txt": { + "key": "world_rd_txt_02", + "text": "打怪" + }, + "img": "", "eventweight": 30000, "eventtype": 2, "battleready": 126, @@ -32,6 +42,11 @@ "key": "eventname_3", "text": "获取金币" }, + "txt": { + "key": "world_rd_txt_03", + "text": "获取金币" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -45,6 +60,11 @@ "key": "eventname_4", "text": "获取金币" }, + "txt": { + "key": "world_rd_txt_04", + "text": "获取金币" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -58,6 +78,11 @@ "key": "eventname_5", "text": "获取金币" }, + "txt": { + "key": "world_rd_txt_05", + "text": "获取金币" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -71,6 +96,11 @@ "key": "eventname_6", "text": "无事发生" }, + "txt": { + "key": "world_rd_txt_06", + "text": "无事发生" + }, + "img": "", "eventweight": 40000, "eventtype": 2, "battleready": 126, @@ -84,6 +114,11 @@ "key": "eventname_7", "text": "打怪" }, + "txt": { + "key": "world_rd_txt_07", + "text": "打怪" + }, + "img": "", "eventweight": 30000, "eventtype": 2, "battleready": 126, @@ -97,6 +132,11 @@ "key": "eventname_10", "text": "获取金币" }, + "txt": { + "key": "world_rd_txt_08", + "text": "获取金币" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -110,6 +150,11 @@ "key": "eventname_11", "text": "获取金币" }, + "txt": { + "key": "world_rd_txt_09", + "text": "获取金币" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -123,6 +168,11 @@ "key": "eventname_12", "text": "无事发生" }, + "txt": { + "key": "world_rd_txt_10", + "text": "无事发生" + }, + "img": "", "eventweight": 40000, "eventtype": 2, "battleready": 126, @@ -136,6 +186,11 @@ "key": "eventname_13", "text": "打怪" }, + "txt": { + "key": "world_rd_txt_11", + "text": "打怪" + }, + "img": "", "eventweight": 30000, "eventtype": 2, "battleready": 126, @@ -149,6 +204,11 @@ "key": "eventname_14", "text": "获取金币" }, + "txt": { + "key": "world_rd_txt_12", + "text": "获取金币" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -162,6 +222,11 @@ "key": "eventname_15", "text": "获取金币" }, + "txt": { + "key": "world_rd_txt_13", + "text": "获取金币" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -175,6 +240,11 @@ "key": "eventname_16", "text": "获取金币" }, + "txt": { + "key": "world_rd_txt_14", + "text": "获取金币" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -188,6 +258,11 @@ "key": "eventname_17", "text": "炸药碎片" }, + "txt": { + "key": "world_rd_txt_15", + "text": "炸药碎片" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -201,6 +276,11 @@ "key": "eventname_18", "text": "残余的臭屁" }, + "txt": { + "key": "world_rd_txt_16", + "text": "残余的臭屁" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -214,6 +294,11 @@ "key": "eventname_19", "text": "熊猫的脚印" }, + "txt": { + "key": "world_rd_txt_17", + "text": "熊猫的脚印" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, @@ -227,6 +312,11 @@ "key": "eventname_20", "text": "残余的冰魔法" }, + "txt": { + "key": "world_rd_txt_18", + "text": "残余的冰魔法" + }, + "img": "", "eventweight": 10000, "eventtype": 2, "battleready": 126, diff --git a/modules/battle/modelBattle.go b/modules/battle/modelBattle.go index b61965650..28e3b47e7 100644 --- a/modules/battle/modelBattle.go +++ b/modules/battle/modelBattle.go @@ -63,7 +63,6 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, stag string, c masters []*pb.BattleRole user *pb.DBUserExpand err error - // buff *cfg.GamePandamasBuffData ) if user, err = this.module.ModuleUser.GetUserExpand(session.GetUserId()); err != nil { errdata = &pb.ErrorData{ @@ -95,6 +94,7 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, stag string, c if record.Redflist[0].Team[i], errdata = this.createBattleRole(hero, user.Passonlv, tid, i); errdata != nil { return } + this.getGlobalBuff(req.Ptype, session, record.Redflist[0].Team[i]) } else { record.Redflist[0].Team[i] = nil } @@ -132,6 +132,7 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, stag string, c if record.Redflist[0].Team[i], errdata = this.createBattleRole(hero, 0, tid, i); errdata != nil { return } + this.getGlobalBuff(req.Ptype, session, record.Redflist[0].Team[i]) record.Redflist[0].Team[i].Ishelp = true // if buff != nil { // if conf, err := this.module.configure.GetHeroConfig(hero.HeroID); err == nil { @@ -241,6 +242,7 @@ func (this *modelBattleComp) createpve(session comm.IUserSession, stag string, c if record.Redflist[0].Team[i], errdata = this.createBattleRole(heros[i], user.Passonlv, tid, i); errdata != nil { return } + this.getGlobalBuff(req.Ptype, session, record.Redflist[0].Team[i]) } else { record.Redflist[0].Team[i] = nil } @@ -277,6 +279,7 @@ func (this *modelBattleComp) createpve(session comm.IUserSession, stag string, c if record.Redflist[0].Team[i], errdata = this.createBattleRole(heros[i], 0, tid, i); errdata != nil { return } + this.getGlobalBuff(req.Ptype, session, record.Redflist[0].Team[i]) record.Redflist[0].Team[i].Ishelp = true // if buff != nil { // if conf, err := this.module.configure.GetHeroConfig(heros[i].HeroID); err == nil { @@ -360,7 +363,6 @@ func (this *modelBattleComp) createpvb(session comm.IUserSession, stag string, c } return } - // buff, _ = this.getGlobalBuff(session.GetUserId()) for ii, v := range req.Format { heros := make([]*pb.DBHero, 5) record.Redflist[ii] = &pb.DBBattleFormt{ @@ -383,6 +385,7 @@ func (this *modelBattleComp) createpvb(session comm.IUserSession, stag string, c if record.Redflist[ii].Team[i], errdata = this.createBattleRole(heros[i], user.Passonlv, tid, i); errdata != nil { return } + this.getGlobalBuff(req.Ptype, session, record.Redflist[ii].Team[i]) // if buff != nil { // if conf, err := this.module.configure.GetHeroConfig(heros[i].HeroID); err == nil { // if buff.CampRestriction == conf.Race && buff.OccupationalRestrictions == conf.Job && conf.Star >= buff.StarLimit { @@ -426,6 +429,7 @@ func (this *modelBattleComp) createpvb(session comm.IUserSession, stag string, c if record.Redflist[ii].Team[i], errdata = this.createBattleRole(heros[i], 0, tid, i); errdata != nil { return } + this.getGlobalBuff(req.Ptype, session, record.Redflist[ii].Team[i]) record.Redflist[ii].Team[i].Ishelp = true // if buff != nil { // if conf, err := this.module.configure.GetHeroConfig(heros[i].HeroID); err == nil { @@ -804,6 +808,7 @@ func (this *modelBattleComp) createheropve(session comm.IUserSession, conn *db.D return } func (this *modelBattleComp) createBattleRole(hero *pb.DBHero, vlv int32, tid, pos int) (role *pb.BattleRole, errdata *pb.ErrorData) { + role = &pb.BattleRole{ Tid: int32(tid), Oid: hero.Id, @@ -838,7 +843,6 @@ func (this *modelBattleComp) createBattleRole(hero *pb.DBHero, vlv int32, tid, p } } for k, v := range hero.Property { - role.Property[k] += v if k == cfg.GamePropertyType_Base_MaxHp_Base { role.Currhp += v @@ -1138,21 +1142,54 @@ func (this *modelBattleComp) checkBattlereadyCapskill(leadpos int32, heros []*pb } // 获取熊猫buff -func (this *modelBattleComp) getGlobalBuff(uid string) (buff *cfg.GamePandamasBuffData, ok bool) { +func (this *modelBattleComp) getGlobalBuff(ptype pb.PlayType, session comm.IUserSession, role *pb.BattleRole) { var ( + conf *cfg.GameHeroData + bconf *cfg.GamePandamasBuffData userex *pb.DBUserExpand err error + ok bool ) - if userex, err = this.module.ModuleUser.GetUserExpand(uid); err != nil { - ok = false + + if userex, err = this.module.GetUserExpandForSession(session); err != nil { return } if userex.Globalbuff != 0 { - if buff, err = this.module.configure.getPandamasBuff(userex.Globalbuff); err != nil { - ok = false + if bconf, err = this.module.configure.getPandamasBuff(userex.Globalbuff); err != nil { + this.module.Errorln(err) return } - ok = true + if conf, err = this.module.ModuleTools.GetHeroConfig(role.HeroID); err != nil { + this.module.Errorln(err) + return + } + if len(bconf.Duration) > 0 { + for _, v := range bconf.Duration { + if v == int32(ptype) { + ok = true + break + } + } + } else { + ok = true + } + + if !ok { + return + } + if bconf.CampRestriction != 0 && conf.Race != bconf.CampRestriction { + return + } + if bconf.OccupationalRestrictions != 0 && conf.Job != bconf.OccupationalRestrictions { + return + } + if bconf.StarLimit != 0 && role.Star >= bconf.StarLimit { + return + } + role.EquipSkill = append(role.EquipSkill, &pb.SkillData{ + SkillID: bconf.Buffid, + SkillLv: 1, + }) } return } diff --git a/sys/configure/structs/Game.PandamasBuffData.go b/sys/configure/structs/Game.PandamasBuffData.go index c88e56d96..bff3df32a 100644 --- a/sys/configure/structs/Game.PandamasBuffData.go +++ b/sys/configure/structs/Game.PandamasBuffData.go @@ -13,7 +13,7 @@ import "errors" type GamePandamasBuffData struct { Id int32 BuffGroup int32 - Duration string + Duration []int32 CampRestriction int32 OccupationalRestrictions int32 StarLimit int32 @@ -31,7 +31,20 @@ func (*GamePandamasBuffData) GetTypeId() int32 { func (_v *GamePandamasBuffData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buff_group"].(float64); !_ok_ { err = errors.New("buff_group error"); return }; _v.BuffGroup = int32(_tempNum_) } - { var _ok_ bool; if _v.Duration, _ok_ = _buf["duration"].(string); !_ok_ { err = errors.New("duration error"); return } } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["duration"].([]interface{}); !_ok_ { err = errors.New("duration error"); return } + + _v.Duration = make([]int32, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ int32 + { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } + _v.Duration = append(_v.Duration, _list_v_) + } + } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["camp_restriction"].(float64); !_ok_ { err = errors.New("camp_restriction error"); return }; _v.CampRestriction = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["occupational_restrictions"].(float64); !_ok_ { err = errors.New("occupational_restrictions error"); return }; _v.OccupationalRestrictions = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star_limit"].(float64); !_ok_ { err = errors.New("star_limit error"); return }; _v.StarLimit = int32(_tempNum_) } diff --git a/sys/configure/structs/Game.WorldRdData.go b/sys/configure/structs/Game.WorldRdData.go index e95f5c0b8..7585d0ddd 100644 --- a/sys/configure/structs/Game.WorldRdData.go +++ b/sys/configure/structs/Game.WorldRdData.go @@ -14,6 +14,8 @@ type GameWorldRdData struct { Id int32 Group int32 Eventname string + Txt string + Img string Eventweight int32 Eventtype int32 Battleready int32 @@ -31,6 +33,8 @@ func (_v *GameWorldRdData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["eventname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Eventname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Eventname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["txt"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Txt error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Txt, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + { var _ok_ bool; if _v.Img, _ok_ = _buf["img"].(string); !_ok_ { err = errors.New("img error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["eventweight"].(float64); !_ok_ { err = errors.New("eventweight error"); return }; _v.Eventweight = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["eventtype"].(float64); !_ok_ { err = errors.New("eventtype error"); return }; _v.Eventtype = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["battleready"].(float64); !_ok_ { err = errors.New("battleready error"); return }; _v.Battleready = int32(_tempNum_) } diff --git a/sys/configure/structs/TEnum.HoroscopeType.go b/sys/configure/structs/TEnum.HoroscopeType.go new file mode 100644 index 000000000..4253d46c5 --- /dev/null +++ b/sys/configure/structs/TEnum.HoroscopeType.go @@ -0,0 +1,14 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +const ( + TEnumHoroscopeType_Horoscope = 1 + TEnumHoroscopeType_IslandHoroscope = 2 +) From aecb69307da90756517a72aa9b471556c4d70c6b Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 22 Feb 2024 17:05:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=95=86=E5=BA=97?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E8=B4=AD=E4=B9=B0=E6=B6=88=E8=80=97=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/shop/api_buy.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/shop/api_buy.go b/modules/shop/api_buy.go index 878f5e912..941e3aad6 100644 --- a/modules/shop/api_buy.go +++ b/modules/shop/api_buy.go @@ -115,12 +115,24 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata return } } - need = make([]*cfg.Gameatn, len(conf.Need)) - for i, v := range conf.Need { - need[i] = &cfg.Gameatn{ - A: v.A, - T: v.T, - N: int32(math.Ceil(float64(v.N)*float64(conf.Sale)/float64(1000))) * req.BuyNum, + + if egood, ok := record.Preview[good.Id]; ok { + need = make([]*cfg.Gameatn, len(conf.Need)) + for i, v := range egood.Need { + need[i] = &cfg.Gameatn{ + A: v.A, + T: v.T, + N: v.N, + } + } + } else { + need = make([]*cfg.Gameatn, len(conf.Need)) + for i, v := range conf.Need { + need[i] = &cfg.Gameatn{ + A: v.A, + T: v.T, + N: int32(math.Ceil(float64(v.N)*float64(conf.Sale)/float64(1000))) * req.BuyNum, + } } } From f4e011979b1d0f57f480dc98ce759c5b9f77e7c9 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 23 Feb 2024 13:44:42 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=BA=A2=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=8F=A3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 2 +- modules/arena/module.go | 76 +++--- modules/equipment/api_inscribe.go | 3 + modules/friend/module.go | 37 +-- modules/horoscope/module.go | 32 ++- modules/pagoda/module.go | 47 ++-- modules/parkour/api_sginover.go | 87 +++++++ modules/practice/module.go | 80 ++++--- modules/reddot/api_get.go | 213 ++++++++++------- modules/reddot/api_getall.go | 194 ++++++++-------- modules/smithy/module.go | 55 +++-- modules/sociaty/module.go | 84 ++++--- modules/user/module.go | 83 ++++--- pb/parkour_msg.pb.go | 375 ++++++++++++++++++++++-------- pb/reddot_msg.pb.go | 206 +++------------- 15 files changed, 921 insertions(+), 653 deletions(-) create mode 100644 modules/parkour/api_sginover.go diff --git a/comm/imodule.go b/comm/imodule.go index 5aff0efe3..ce0b10930 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -9,7 +9,7 @@ import ( type ( //红点获取接口 IGetReddot interface { - Reddot(session IUserSession, rid ...ReddotType) (reddot map[ReddotType]*pb.ReddotItem) + Reddot(session IUserSession, rid map[ReddotType]struct{}) (items map[ReddotType]*pb.ReddotItem) } //埋点中心更新通知 IBuriedUpdateNotify interface { diff --git a/modules/arena/module.go b/modules/arena/module.go index 9975a16a8..5c9adb828 100644 --- a/modules/arena/module.go +++ b/modules/arena/module.go @@ -120,60 +120,62 @@ func (this *Arena) Rpc_ModuleArenaModifyIntegral(ctx context.Context, args *pb.R } // 红点需求 -func (this *Arena) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (result map[comm.ReddotType]*pb.ReddotItem) { +func (this *Arena) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot22100, comm.Reddot22102, comm.Reddot22202} model *arenaModel info *pb.DBArenaUser = &pb.DBArenaUser{} activated bool ticket int32 + ok bool err error ) - result = make(map[comm.ReddotType]*pb.ReddotItem) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break + } + } + + if !ok { + return + } + if model, err = this.modelArena.getpandataModel(); err != nil { this.Errorln(err) - result[comm.Reddot22100] = &pb.ReddotItem{ - Rid: int32(comm.Reddot22100), - Activated: false, - } - result[comm.Reddot22102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot22102), - Activated: false, - } - result[comm.Reddot22202] = &pb.ReddotItem{ - Rid: int32(comm.Reddot22202), - Activated: false, - } return } if info, ticket, activated = model.reddot(session); info == nil { return } - result = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot22100: - result[comm.Reddot22100] = &pb.ReddotItem{ - Rid: int32(comm.Reddot22100), - } - if ticket == this.ModuleTools.GetGlobalConf().ArenaTicketCos.N { - result[comm.Reddot22100].Activated = true - } - break - case comm.Reddot22102: - result[comm.Reddot22102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot22102), - } - result[comm.Reddot22102].Activated = activated - break - case comm.Reddot22202: - result[comm.Reddot22202] = &pb.ReddotItem{ - Rid: int32(comm.Reddot22202), - Activated: true, - Progress: ticket, + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot22100: + items[comm.Reddot22100] = &pb.ReddotItem{ + Rid: int32(comm.Reddot22100), + } + if ticket == this.ModuleTools.GetGlobalConf().ArenaTicketCos.N { + items[comm.Reddot22100].Activated = true + } + break + case comm.Reddot22102: + items[comm.Reddot22102] = &pb.ReddotItem{ + Rid: int32(comm.Reddot22102), + } + items[comm.Reddot22102].Activated = activated + break + + case comm.Reddot22202: + items[comm.Reddot22202] = &pb.ReddotItem{ + Rid: int32(comm.Reddot22202), + Activated: true, + Progress: ticket, + } + break } - break } } return diff --git a/modules/equipment/api_inscribe.go b/modules/equipment/api_inscribe.go index 37d616d85..0cc829bc1 100644 --- a/modules/equipment/api_inscribe.go +++ b/modules/equipment/api_inscribe.go @@ -122,5 +122,8 @@ func (this *apiComp) Inscribe(session comm.IUserSession, req *pb.EquipmentInscri } session.SendMsg(string(this.module.GetType()), "inscribe", &pb.EquipmentInscribeResp{}) + go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { + this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EquipmentInscribeReq", conf.EngravingNeed) + }) return } diff --git a/modules/friend/module.go b/modules/friend/module.go index 13290fae9..d330b9e0d 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -228,23 +228,31 @@ func (this *Friend) QiecuoFinishNotify(redUid, matchId string) error { return nil } -func (this *Friend) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - friend, _ := this.modelFriend.GetFriend(session.GetUserId()) - if friend == nil { - for _, v := range rid { - reddot[v] = &pb.ReddotItem{ - Rid: int32(v), - Activated: false, - Nextchanagetime: 0, - } +func (this *Friend) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot21101} + info *pb.DBFriend + err error + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break } - } else { - for _, v := range rid { + } + if ok { + return + } + if info, err = this.modelFriend.GetFriend(session.GetUserId()); err != nil { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { switch v { case comm.Reddot21101: - if len(friend.ApplyIds) > 0 { - reddot[comm.Reddot15102] = &pb.ReddotItem{ + if len(info.ApplyIds) > 0 { + items[comm.Reddot15102] = &pb.ReddotItem{ Rid: int32(comm.Reddot15102), Activated: true, Nextchanagetime: 0, @@ -253,7 +261,6 @@ func (this *Friend) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (r } } } - return } diff --git a/modules/horoscope/module.go b/modules/horoscope/module.go index 4895e4e02..c5bede218 100644 --- a/modules/horoscope/module.go +++ b/modules/horoscope/module.go @@ -67,18 +67,32 @@ func (this *Horoscope) ComputeHeroNumeric(uid string, hero ...*pb.DBHero) { } // 红点需求 -func (this *Horoscope) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (result map[comm.ReddotType]*pb.ReddotItem) { - result = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot17: - result[comm.Reddot17] = &pb.ReddotItem{ - Rid: int32(comm.Reddot17), - Activated: this.modelHoroscope.reddot(session), - } +func (this *Horoscope) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot17} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { break } } + if ok { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot17: + items[comm.Reddot17] = &pb.ReddotItem{ + Rid: int32(comm.Reddot17), + Activated: this.modelHoroscope.reddot(session), + } + break + } + } + } return } diff --git a/modules/pagoda/module.go b/modules/pagoda/module.go index 0eb605067..f23a0fae2 100644 --- a/modules/pagoda/module.go +++ b/modules/pagoda/module.go @@ -159,24 +159,39 @@ func (this *Pagoda) SetPagodaRankList(tableName string, score int32, uid string) } //红点查询 -func (this *Pagoda) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot6: - reddot[comm.Reddot6] = &pb.ReddotItem{ - Rid: int32(comm.Reddot6), - Activated: this.CheckPoint6(session.GetUserId()), - } +func (this *Pagoda) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot6, comm.Reddot29101} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { break - case comm.Reddot29101: - activity, process := this.CheckPoint29101(session.GetUserId()) - reddot[comm.Reddot29101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot29101), - Activated: activity, - Progress: process, + } + } + if ok { + return + } + + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot6: + items[comm.Reddot6] = &pb.ReddotItem{ + Rid: int32(comm.Reddot6), + Activated: this.CheckPoint6(session.GetUserId()), + } + break + case comm.Reddot29101: + activity, process := this.CheckPoint29101(session.GetUserId()) + items[comm.Reddot29101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot29101), + Activated: activity, + Progress: process, + } + break } - break } } return diff --git a/modules/parkour/api_sginover.go b/modules/parkour/api_sginover.go new file mode 100644 index 000000000..3ac6a1914 --- /dev/null +++ b/modules/parkour/api_sginover.go @@ -0,0 +1,87 @@ +package parkour + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +// 参数校验 +func (this *apiComp) SginOverCheck(session comm.IUserSession, req *pb.ParkourSginOverReq) (errdata *pb.ErrorData) { + + return +} + +// /获取自己的排行榜信息 +func (this *apiComp) SginOver(session comm.IUserSession, req *pb.ParkourSginOverReq) (errdata *pb.ErrorData) { + var ( + info *pb.DBParkour + conf *cfg.GameQualifyingData + lvconf *cfg.GameBuzkashiLvData + rating int32 + atno []*pb.UserAtno + err error + ) + + if errdata = this.SginOverCheck(session, req); errdata != nil { + return + } + if info, err = this.module.parkourComp.queryinfo(session.GetUserId()); err != nil && err != mgo.MongodbNil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + if conf, err = this.module.configure.getActiveRewardById(info.Dan); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + if lvconf, err = this.module.configure.getGameBuzkashiLv(req.Scores); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + info.Integral += conf.WinValue + if errdata, atno = this.module.DispenseAtno(session, conf.MatewinReward, true); err != nil { + return + } + rating = lvconf.Num + info.Weekintegral += lvconf.Point + if err = this.module.parkourComp.Change(info.User.Uid, map[string]interface{}{ + "integral": info.Integral, + "weekintegral": info.Weekintegral, + "dan": info.Dan, + "state": 0, + "roomid": "", + "roompath": "", + }); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + session.SendMsg(string(this.module.GetType()), "sginover", &pb.ParkourSginOverResp{ + Maxlcoins: req.Maxlcoins, + Integral: info.Integral, + Weekintegral: info.Weekintegral, + Rating: rating, + Award: atno, + }) + + go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { + this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ParkourSginOverReq", atno) + }) + return +} diff --git a/modules/practice/module.go b/modules/practice/module.go index 927b39518..04f654525 100644 --- a/modules/practice/module.go +++ b/modules/practice/module.go @@ -423,8 +423,9 @@ func (this *Practice) GetAllJxRes() (res []string, err error) { } // 红点 -func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { +func (this *Practice) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot18106, comm.Reddot18111} model *pandataModel room *pb.DBPracticeRoom pconf *cfg.GamePandamasMzData @@ -432,8 +433,19 @@ func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType) usenum int32 totalusenum int32 err error + ok bool ) - reddot = make(map[comm.ReddotType]*pb.ReddotItem) + + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break + } + } + if ok { + return + } + if model, err = this.modelPandata.getpandataModel(); err != nil { this.Errorln(err) return @@ -461,41 +473,43 @@ func (this *Practice) Reddot(session comm.IUserSession, rid ...comm.ReddotType) totalusenum += pconf.Limitation } } - for _, v := range rid { - switch v { - case comm.Reddot18106: - if userex, err = this.ModuleUser.GetUserExpand(session.GetUserId()); err != nil { - this.Errorln(err) - return - } - reddot[comm.Reddot18106] = &pb.ReddotItem{ - Rid: int32(comm.Reddot18106), - Activated: true, - Progress: room.Gymrefresh, - Total: 1, - } - if userex.Globalbuff == 0 { - reddot[comm.Reddot18106].Progress = 0 - } else { - reddot[comm.Reddot18106].Progress = 1 - } - - break - case comm.Reddot18111: - if totalusenum > 0 { - reddot[comm.Reddot18111] = &pb.ReddotItem{ - Rid: int32(comm.Reddot18111), + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot18106: + if userex, err = this.ModuleUser.GetUserExpand(session.GetUserId()); err != nil { + this.Errorln(err) + return + } + items[comm.Reddot18106] = &pb.ReddotItem{ + Rid: int32(comm.Reddot18106), Activated: true, - Progress: usenum, - Total: totalusenum, + Progress: room.Gymrefresh, + Total: 1, } - } else { - reddot[comm.Reddot18111] = &pb.ReddotItem{ - Rid: int32(comm.Reddot18111), - Activated: false, + if userex.Globalbuff == 0 { + items[comm.Reddot18106].Progress = 0 + } else { + items[comm.Reddot18106].Progress = 1 } + + break + case comm.Reddot18111: + if totalusenum > 0 { + items[comm.Reddot18111] = &pb.ReddotItem{ + Rid: int32(comm.Reddot18111), + Activated: true, + Progress: usenum, + Total: totalusenum, + } + } else { + items[comm.Reddot18111] = &pb.ReddotItem{ + Rid: int32(comm.Reddot18111), + Activated: false, + } + } + break } - break } } diff --git a/modules/reddot/api_get.go b/modules/reddot/api_get.go index 05254179c..0d8e33890 100644 --- a/modules/reddot/api_get.go +++ b/modules/reddot/api_get.go @@ -14,90 +14,143 @@ func (this *apiComp) GetCheck(session comm.IUserSession, req *pb.ReddotGetReq) ( // 红点数据 func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errdata *pb.ErrorData) { var ( - reddot map[int32]*pb.ReddotItem = make(map[int32]*pb.ReddotItem) + reds map[comm.ReddotType]struct{} = make(map[comm.ReddotType]struct{}) ) if errdata = this.GetCheck(session, req); errdata != nil { return } - for _, rid := range req.Rids { - _rid := comm.ReddotType(rid) - switch _rid { - //任务 - // case comm.Reddot10101, comm.Reddot10102, comm.Reddot10103, comm.Reddot10201, comm.Reddot10301: - // for k, v := range this.module.ModuleTask.Reddot(session, _rid) { - // reddot[int32(k)] = v - // } - //主线 - case comm.Reddot24101: - for k, v := range this.module.mainline.Reddot(session, _rid) { - reddot[int32(k)] = v - } - //铁匠铺 - case comm.Reddot17102, comm.Reddot17106, comm.Reddot17107: - for k, v := range this.module.smithy.Reddot(session, _rid) { - reddot[int32(k)] = v - } - //工会 - case comm.Reddot15102, comm.Reddot15201, comm.Reddot15401: - for k, v := range this.module.ModuleSociaty.Reddot(session, _rid) { - reddot[int32(k)] = v - } - //竞技场 - case comm.Reddot22102: - for k, v := range this.module.arena.Reddot(session, _rid) { - reddot[int32(k)] = v - } - //好友 - case comm.Reddot21101: - for k, v := range this.module.friend.Reddot(session, _rid) { - reddot[int32(k)] = v - } - //羁绊 - case comm.Reddot19103, comm.Reddot19105, comm.Reddot19109, comm.Reddot19110: - for k, v := range this.module.library.Reddot(session, _rid) { - reddot[int32(k)] = v - } - //每日任务 - case comm.Reddot25101: - for k, v := range this.module.library.Reddot(session, _rid) { - reddot[int32(k)] = v - } - //工会boos战 - case comm.Reddot15301: - for k, v := range this.module.guildgve.Reddot(session, _rid) { - reddot[int32(k)] = v - } - case comm.Reddot17: - for k, v := range this.module.horoscope.Reddot(session, _rid) { - reddot[int32(k)] = v - } - case comm.Reddot20, comm.Reddot21, comm.Reddot22: - for k, v := range this.module.gourmet.Reddot(session, _rid) { - reddot[int32(k)] = v - } - case comm.Reddot12101, comm.Reddot12102: - for k, v := range this.module.mail.Reddot(session, _rid) { - reddot[int32(k)] = v - } - case comm.Reddot13102: - for k, v := range this.module.viking.Reddot(session, _rid) { - reddot[int32(k)] = v - } - - case comm.Reddot14102: - for k, v := range this.module.hunting.Reddot(session, _rid) { - reddot[int32(k)] = v - } - case comm.Reddot23101: - for k, v := range this.module.gourmet.Reddot(session, _rid) { - reddot[int32(k)] = v - } - case comm.Reddot27101, comm.Reddot30100: - for k, v := range this.module.ModuleUser.Reddot(session, _rid) { - reddot[int32(k)] = v - } - } + for _, v := range req.Rids { + reds[comm.ReddotType(v)] = struct{}{} } - session.SendMsg(string(this.module.GetType()), "get", &pb.ReddotGetAllResp{Reddot: reddot}) + + session.SendMsg(string(this.module.GetType()), "get", &pb.ReddotGetResp{}) + + go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { + var ( + reddotItem []*pb.ReddotItem = make([]*pb.ReddotItem, 0) + ) + for _, v := range this.module.mainline.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.smithy.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.ModuleSociaty.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.arena.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.friend.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.library.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.guildgve.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.horoscope.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.gourmet.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.mail.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.viking.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.hunting.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.gourmet.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + for _, v := range this.module.ModuleUser.Reddot(session, reds) { + reddotItem = append(reddotItem, v) + } + }) + + // for _, rid := range req.Rids { + // _rid := comm.ReddotType(rid) + // switch _rid { + // //任务 + // // case comm.Reddot10101, comm.Reddot10102, comm.Reddot10103, comm.Reddot10201, comm.Reddot10301: + // // for k, v := range this.module.ModuleTask.Reddot(session, _rid) { + // // reddot[int32(k)] = v + // // } + // //主线 + // case comm.Reddot24101: + // for k, v := range this.module.mainline.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // //铁匠铺 + // case comm.Reddot17102, comm.Reddot17106, comm.Reddot17107: + // for k, v := range this.module.smithy.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // //工会 + // case comm.Reddot15102, comm.Reddot15201, comm.Reddot15401: + // for k, v := range this.module.ModuleSociaty.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // //竞技场 + // case comm.Reddot22102: + // for k, v := range this.module.arena.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // //好友 + // case comm.Reddot21101: + // for k, v := range this.module.friend.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // //羁绊 + // case comm.Reddot19103, comm.Reddot19105, comm.Reddot19109, comm.Reddot19110: + // for k, v := range this.module.library.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // //每日任务 + // case comm.Reddot25101: + // for k, v := range this.module.library.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // //工会boos战 + // case comm.Reddot15301: + // for k, v := range this.module.guildgve.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // case comm.Reddot17: + // for k, v := range this.module.horoscope.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // case comm.Reddot20, comm.Reddot21, comm.Reddot22: + // for k, v := range this.module.gourmet.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // case comm.Reddot12101, comm.Reddot12102: + // for k, v := range this.module.mail.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // case comm.Reddot13102: + // for k, v := range this.module.viking.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + + // case comm.Reddot14102: + // for k, v := range this.module.hunting.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // case comm.Reddot23101: + // for k, v := range this.module.gourmet.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // case comm.Reddot27101, comm.Reddot30100: + // for k, v := range this.module.ModuleUser.Reddot(session, _rid) { + // reddot[int32(k)] = v + // } + // } + // } return } diff --git a/modules/reddot/api_getall.go b/modules/reddot/api_getall.go index 5fb9b3cca..6c91cde4e 100644 --- a/modules/reddot/api_getall.go +++ b/modules/reddot/api_getall.go @@ -1,110 +1,110 @@ package reddot -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" -) +// import ( +// "go_dreamfactory/comm" +// "go_dreamfactory/pb" +// ) -// 参数校验 -func (this *apiComp) GetAllCheck(session comm.IUserSession, req *pb.ReddotGetAllReq) (errdata *pb.ErrorData) { +// // 参数校验 +// func (this *apiComp) GetAllCheck(session comm.IUserSession, req *pb.ReddotGetAllReq) (errdata *pb.ErrorData) { - return -} +// return +// } -// /获取系统公告 -func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq) (errdata *pb.ErrorData) { - var ( - reddot map[int32]*pb.ReddotItem = make(map[int32]*pb.ReddotItem) - ) - if errdata = this.GetAllCheck(session, req); errdata != nil { - return - } - //任务系统 - // for k, v := range this.module.ModuleTask.Reddot(session, - // comm.Reddot10101, - // comm.Reddot10102, - // comm.Reddot10103, - // comm.Reddot10201, - // comm.Reddot10301) { - // reddot[int32(k)] = v - // } +// // /获取系统公告 +// func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq) (errdata *pb.ErrorData) { +// var ( +// reddot map[int32]*pb.ReddotItem = make(map[int32]*pb.ReddotItem) +// ) +// if errdata = this.GetAllCheck(session, req); errdata != nil { +// return +// } +// //任务系统 +// // for k, v := range this.module.ModuleTask.Reddot(session, +// // comm.Reddot10101, +// // comm.Reddot10102, +// // comm.Reddot10103, +// // comm.Reddot10201, +// // comm.Reddot10301) { +// // reddot[int32(k)] = v +// // } - //每日任务 - for k, v := range this.module.dailytask.Reddot(session, - comm.Reddot25101) { - reddot[int32(k)] = v - } +// //每日任务 +// for k, v := range this.module.dailytask.Reddot(session, +// comm.Reddot25101) { +// reddot[int32(k)] = v +// } - //主线 - for k, v := range this.module.mainline.Reddot(session, comm.Reddot24101) { - reddot[int32(k)] = v - } - //铁匠铺 - for k, v := range this.module.smithy.Reddot(session, - comm.Reddot17102, - comm.Reddot17106, - comm.Reddot17107, - ) { - reddot[int32(k)] = v - } +// //主线 +// for k, v := range this.module.mainline.Reddot(session, comm.Reddot24101) { +// reddot[int32(k)] = v +// } +// //铁匠铺 +// for k, v := range this.module.smithy.Reddot(session, +// comm.Reddot17102, +// comm.Reddot17106, +// comm.Reddot17107, +// ) { +// reddot[int32(k)] = v +// } - //武馆 - for k, v := range this.module.practice.Reddot(session, - comm.Reddot18106, - comm.Reddot18111, - ) { - reddot[int32(k)] = v - } +// //武馆 +// for k, v := range this.module.practice.Reddot(session, +// comm.Reddot18106, +// comm.Reddot18111, +// ) { +// reddot[int32(k)] = v +// } - //竞技场 - for k, v := range this.module.arena.Reddot(session, comm.Reddot22100, comm.Reddot22102, comm.Reddot22202) { - reddot[int32(k)] = v - } - //用户 - for k, v := range this.module.ModuleUser.Reddot(session, comm.Reddot27101, comm.Reddot30100) { - reddot[int32(k)] = v - } +// //竞技场 +// for k, v := range this.module.arena.Reddot(session, comm.Reddot22100, comm.Reddot22102, comm.Reddot22202) { +// reddot[int32(k)] = v +// } +// //用户 +// for k, v := range this.module.ModuleUser.Reddot(session, comm.Reddot27101, comm.Reddot30100) { +// reddot[int32(k)] = v +// } - for k, v := range this.module.friend.Reddot(session, comm.Reddot21101) { - reddot[int32(k)] = v - } - for k, v := range this.module.gourmet.Reddot(session, comm.Reddot23101) { - reddot[int32(k)] = v - } - for k, v := range this.module.pagoda.Reddot(session, - comm.Reddot6, - comm.Reddot29101, - ) { - reddot[int32(k)] = v - } - for k, v := range this.module.horoscope.Reddot(session, comm.Reddot17) { - reddot[int32(k)] = v - } +// for k, v := range this.module.friend.Reddot(session, comm.Reddot21101) { +// reddot[int32(k)] = v +// } +// for k, v := range this.module.gourmet.Reddot(session, comm.Reddot23101) { +// reddot[int32(k)] = v +// } +// for k, v := range this.module.pagoda.Reddot(session, +// comm.Reddot6, +// comm.Reddot29101, +// ) { +// reddot[int32(k)] = v +// } +// for k, v := range this.module.horoscope.Reddot(session, comm.Reddot17) { +// reddot[int32(k)] = v +// } - for k, v := range this.module.gourmet.Reddot(session, comm.Reddot20, comm.Reddot21, comm.Reddot22) { - reddot[int32(k)] = v - } - for k, v := range this.module.sociaty.Reddot(session, comm.Reddot15102, comm.Reddot15201) { - reddot[int32(k)] = v - } - for k, v := range this.module.mail.Reddot(session, comm.Reddot12101, comm.Reddot12102) { - reddot[int32(k)] = v - } - for k, v := range this.module.viking.Reddot(session, comm.Reddot13102) { - reddot[int32(k)] = v - } +// for k, v := range this.module.gourmet.Reddot(session, comm.Reddot20, comm.Reddot21, comm.Reddot22) { +// reddot[int32(k)] = v +// } +// for k, v := range this.module.sociaty.Reddot(session, comm.Reddot15102, comm.Reddot15201) { +// reddot[int32(k)] = v +// } +// for k, v := range this.module.mail.Reddot(session, comm.Reddot12101, comm.Reddot12102) { +// reddot[int32(k)] = v +// } +// for k, v := range this.module.viking.Reddot(session, comm.Reddot13102) { +// reddot[int32(k)] = v +// } - for k, v := range this.module.hunting.Reddot(session, comm.Reddot14102) { - reddot[int32(k)] = v - } - for k, v := range this.module.library.Reddot(session, - comm.Reddot19103, - comm.Reddot19105, - comm.Reddot19109, - comm.Reddot19110) { - reddot[int32(k)] = v - } +// for k, v := range this.module.hunting.Reddot(session, comm.Reddot14102) { +// reddot[int32(k)] = v +// } +// for k, v := range this.module.library.Reddot(session, +// comm.Reddot19103, +// comm.Reddot19105, +// comm.Reddot19109, +// comm.Reddot19110) { +// reddot[int32(k)] = v +// } - session.SendMsg(string(this.module.GetType()), "getall", &pb.ReddotGetAllResp{Reddot: reddot}) - return -} +// session.SendMsg(string(this.module.GetType()), "getall", &pb.ReddotGetAllResp{Reddot: reddot}) +// return +// } diff --git a/modules/smithy/module.go b/modules/smithy/module.go index 676a6ca61..4e8219703 100644 --- a/modules/smithy/module.go +++ b/modules/smithy/module.go @@ -131,28 +131,43 @@ func (this *Smithy) CheckActivateAtlasCollect(uid string, id string) { return } -func (this *Smithy) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot17102: // 铁匠铺手册台 - reddot[comm.Reddot17102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot17102), - Activated: this.modelAtlas.checkReddot17102(session.GetUserId()), - } +func (this *Smithy) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot6, comm.Reddot29101} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { break - case comm.Reddot17107: // 铁匠铺手册台收藏家奖励按钮上 - reddot[comm.Reddot17107] = &pb.ReddotItem{ - Rid: int32(comm.Reddot17107), - Activated: this.modelTask.checkReddot17107(session.GetUserId()), + } + } + if ok { + return + } + + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot17102: // 铁匠铺手册台 + items[comm.Reddot17102] = &pb.ReddotItem{ + Rid: int32(comm.Reddot17102), + Activated: this.modelAtlas.checkReddot17102(session.GetUserId()), + } + break + case comm.Reddot17107: // 铁匠铺手册台收藏家奖励按钮上 + items[comm.Reddot17107] = &pb.ReddotItem{ + Rid: int32(comm.Reddot17107), + Activated: this.modelTask.checkReddot17107(session.GetUserId()), + } + break + case comm.Reddot17108: // 铁匠铺炉温恢复 + items[comm.Reddot17108] = &pb.ReddotItem{ + Rid: int32(comm.Reddot17108), + Nextchanagetime: this.modelStove.checkReddot17108(session.GetUserId()), + } + break } - break - case comm.Reddot17108: // 铁匠铺炉温恢复 - reddot[comm.Reddot17108] = &pb.ReddotItem{ - Rid: int32(comm.Reddot17108), - Nextchanagetime: this.modelStove.checkReddot17108(session.GetUserId()), - } - break } } diff --git a/modules/sociaty/module.go b/modules/sociaty/module.go index 0ffce6de6..2135e110a 100644 --- a/modules/sociaty/module.go +++ b/modules/sociaty/module.go @@ -179,15 +179,25 @@ func (this *Sociaty) GetSociatys(sociatyIds []string) (result []*pb.DBSociaty, e } // 公会 -func (this *Sociaty) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { +func (this *Sociaty) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot15102, comm.Reddot15201, comm.Reddot15401} applyReddot bool tasks *pb.DBSociatyTask nocomplete int32 err error + ok bool ) - reddot = make(map[comm.ReddotType]*pb.ReddotItem) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break + } + } + if ok { + return + } sociaty := this.modelSociaty.getUserSociaty(session.GetUserId()) if sociaty == nil || sociaty.Id == "" { return @@ -201,43 +211,45 @@ func (this *Sociaty) Reddot(session comm.IUserSession, rid ...comm.ReddotType) ( applyReddot = true } } - for _, v := range rid { - switch v { - case comm.Reddot15102: - progress := int32(0) - tf := this.modelSociaty.IsSign(session.GetUserId(), sociaty) - if tf { - progress = 1 - } - reddot[comm.Reddot15102] = - &pb.ReddotItem{ - Rid: int32(comm.Reddot15102), - Activated: !tf, + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot15102: + progress := int32(0) + tf := this.modelSociaty.IsSign(session.GetUserId(), sociaty) + if tf { + progress = 1 + } + items[comm.Reddot15102] = + &pb.ReddotItem{ + Rid: int32(comm.Reddot15102), + Activated: !tf, + Nextchanagetime: 0, + Progress: progress, + Total: 1, + } + case comm.Reddot15201: + items[comm.Reddot15201] = &pb.ReddotItem{ + Rid: int32(comm.Reddot15201), + Activated: applyReddot, Nextchanagetime: 0, - Progress: progress, - Total: 1, } - case comm.Reddot15201: - reddot[comm.Reddot15201] = &pb.ReddotItem{ - Rid: int32(comm.Reddot15201), - Activated: applyReddot, - Nextchanagetime: 0, - } - case comm.Reddot15401: - if tasks, err = this.modelSociatyTask.getUserTask(session.GetUserId(), sociaty.Id); err != nil { - continue - } - for _, v := range tasks.TaskList { - if v != 1 { - nocomplete++ + case comm.Reddot15401: + if tasks, err = this.modelSociatyTask.getUserTask(session.GetUserId(), sociaty.Id); err != nil { + continue + } + for _, v := range tasks.TaskList { + if v != 1 { + nocomplete++ + } + } + items[comm.Reddot15401] = &pb.ReddotItem{ + Rid: int32(comm.Reddot15401), + Activated: true, + Nextchanagetime: 0, + Progress: nocomplete, + Total: int32(len(tasks.TaskList)), } - } - reddot[comm.Reddot15401] = &pb.ReddotItem{ - Rid: int32(comm.Reddot15401), - Activated: true, - Nextchanagetime: 0, - Progress: nocomplete, - Total: int32(len(tasks.TaskList)), } } } diff --git a/modules/user/module.go b/modules/user/module.go index 021c9f902..684690044 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -1296,52 +1296,65 @@ func (this *User) RemainingPS(uid string) (ps int32) { } // 查询每日红点信息 -func (this *User) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { +func (this *User) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot27101, comm.Reddot30100} user *pb.DBUser info *pb.DBSign progress int32 err error + ok bool ) - reddot = make(map[comm.ReddotType]*pb.ReddotItem) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break + } + } + if ok { + return + } + if info, err = this.modelSign.GetUserSign(session.GetUserId()); err != nil { this.Errorln(err) return } - for _, v := range rid { - switch v { - case comm.Reddot27101: - if info.Puzzle[info.Day] == 1 { - progress = 1 + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot27101: + if info.Puzzle[info.Day] == 1 { + progress = 1 + } + items[comm.Reddot27101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot27101), + Activated: true, + Progress: progress, + Total: 1, + } + break + case comm.Reddot30100: // 体力恢复 + user, err = this.GetUser(session.GetUserId()) + if err != nil { + this.Errorln(err) + return + } + change, total, t := this.recoverUserPs(user) + items[comm.Reddot30100] = &pb.ReddotItem{ + Rid: int32(comm.Reddot30100), + Activated: true, + Nextchanagetime: t, + Progress: user.Ps, + Total: total, + } + if change { + this.modelUser.Change(session.GetUserId(), map[string]interface{}{ + "ps": user.Ps, + "lastRecoverPsSec": user.LastRecoverPsSec, + }) + } + break } - reddot[comm.Reddot27101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot27101), - Activated: true, - Progress: progress, - Total: 1, - } - break - case comm.Reddot30100: // 体力恢复 - user, err = this.GetUser(session.GetUserId()) - if err != nil { - this.Errorln(err) - return - } - change, total, t := this.recoverUserPs(user) - reddot[comm.Reddot30100] = &pb.ReddotItem{ - Rid: int32(comm.Reddot30100), - Activated: true, - Nextchanagetime: t, - Progress: user.Ps, - Total: total, - } - if change { - this.modelUser.Change(session.GetUserId(), map[string]interface{}{ - "ps": user.Ps, - "lastRecoverPsSec": user.LastRecoverPsSec, - }) - } - break } } diff --git a/pb/parkour_msg.pb.go b/pb/parkour_msg.pb.go index dd50dc0a3..ea970ce38 100644 --- a/pb/parkour_msg.pb.go +++ b/pb/parkour_msg.pb.go @@ -1969,6 +1969,142 @@ func (x *ParkourReconnectRoomResp) GetRace() *DBRace { return nil } +//补羊单机游戏结算 +type ParkourSginOverReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Maxlcoins int32 `protobuf:"varint,1,opt,name=maxlcoins,proto3" json:"maxlcoins"` //最大吃金币数 + Scores int32 `protobuf:"varint,2,opt,name=scores,proto3" json:"scores"` //获得分数 +} + +func (x *ParkourSginOverReq) Reset() { + *x = ParkourSginOverReq{} + if protoimpl.UnsafeEnabled { + mi := &file_parkour_parkour_msg_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParkourSginOverReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParkourSginOverReq) ProtoMessage() {} + +func (x *ParkourSginOverReq) ProtoReflect() protoreflect.Message { + mi := &file_parkour_parkour_msg_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParkourSginOverReq.ProtoReflect.Descriptor instead. +func (*ParkourSginOverReq) Descriptor() ([]byte, []int) { + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{37} +} + +func (x *ParkourSginOverReq) GetMaxlcoins() int32 { + if x != nil { + return x.Maxlcoins + } + return 0 +} + +func (x *ParkourSginOverReq) GetScores() int32 { + if x != nil { + return x.Scores + } + return 0 +} + +//补羊单机游戏结算 +type ParkourSginOverResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Maxlcoins int32 `protobuf:"varint,1,opt,name=maxlcoins,proto3" json:"maxlcoins"` //最大吃金币数 + Integral int32 `protobuf:"varint,2,opt,name=integral,proto3" json:"integral"` //获得积分 + Weekintegral int32 `protobuf:"varint,3,opt,name=weekintegral,proto3" json:"weekintegral"` //周积分 + Rating int32 `protobuf:"varint,4,opt,name=rating,proto3" json:"rating"` //评级 + Award []*UserAtno `protobuf:"bytes,5,rep,name=award,proto3" json:"award"` //奖励 +} + +func (x *ParkourSginOverResp) Reset() { + *x = ParkourSginOverResp{} + if protoimpl.UnsafeEnabled { + mi := &file_parkour_parkour_msg_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParkourSginOverResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParkourSginOverResp) ProtoMessage() {} + +func (x *ParkourSginOverResp) ProtoReflect() protoreflect.Message { + mi := &file_parkour_parkour_msg_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParkourSginOverResp.ProtoReflect.Descriptor instead. +func (*ParkourSginOverResp) Descriptor() ([]byte, []int) { + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{38} +} + +func (x *ParkourSginOverResp) GetMaxlcoins() int32 { + if x != nil { + return x.Maxlcoins + } + return 0 +} + +func (x *ParkourSginOverResp) GetIntegral() int32 { + if x != nil { + return x.Integral + } + return 0 +} + +func (x *ParkourSginOverResp) GetWeekintegral() int32 { + if x != nil { + return x.Weekintegral + } + return 0 +} + +func (x *ParkourSginOverResp) GetRating() int32 { + if x != nil { + return x.Rating + } + return 0 +} + +func (x *ParkourSginOverResp) GetAward() []*UserAtno { + if x != nil { + return x.Award + } + return nil +} + //服务端协议-------------------------------------------------------------------------------------------------------------------------- ///匹配请求 RPC消息定义 服务器自用 客户端不用理会 type RPCParkourJoinMatchReq struct { @@ -1984,7 +2120,7 @@ type RPCParkourJoinMatchReq struct { func (x *RPCParkourJoinMatchReq) Reset() { *x = RPCParkourJoinMatchReq{} if protoimpl.UnsafeEnabled { - mi := &file_parkour_parkour_msg_proto_msgTypes[37] + mi := &file_parkour_parkour_msg_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1997,7 +2133,7 @@ func (x *RPCParkourJoinMatchReq) String() string { func (*RPCParkourJoinMatchReq) ProtoMessage() {} func (x *RPCParkourJoinMatchReq) ProtoReflect() protoreflect.Message { - mi := &file_parkour_parkour_msg_proto_msgTypes[37] + mi := &file_parkour_parkour_msg_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2010,7 +2146,7 @@ func (x *RPCParkourJoinMatchReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCParkourJoinMatchReq.ProtoReflect.Descriptor instead. func (*RPCParkourJoinMatchReq) Descriptor() ([]byte, []int) { - return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{37} + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{39} } func (x *RPCParkourJoinMatchReq) GetCaptainid() string { @@ -2044,7 +2180,7 @@ type RPCParkourJoinMatchResp struct { func (x *RPCParkourJoinMatchResp) Reset() { *x = RPCParkourJoinMatchResp{} if protoimpl.UnsafeEnabled { - mi := &file_parkour_parkour_msg_proto_msgTypes[38] + mi := &file_parkour_parkour_msg_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2057,7 +2193,7 @@ func (x *RPCParkourJoinMatchResp) String() string { func (*RPCParkourJoinMatchResp) ProtoMessage() {} func (x *RPCParkourJoinMatchResp) ProtoReflect() protoreflect.Message { - mi := &file_parkour_parkour_msg_proto_msgTypes[38] + mi := &file_parkour_parkour_msg_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2070,7 +2206,7 @@ func (x *RPCParkourJoinMatchResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCParkourJoinMatchResp.ProtoReflect.Descriptor instead. func (*RPCParkourJoinMatchResp) Descriptor() ([]byte, []int) { - return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{38} + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{40} } //取消匹配 @@ -2085,7 +2221,7 @@ type RPCParkourCancelMatchReq struct { func (x *RPCParkourCancelMatchReq) Reset() { *x = RPCParkourCancelMatchReq{} if protoimpl.UnsafeEnabled { - mi := &file_parkour_parkour_msg_proto_msgTypes[39] + mi := &file_parkour_parkour_msg_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2098,7 +2234,7 @@ func (x *RPCParkourCancelMatchReq) String() string { func (*RPCParkourCancelMatchReq) ProtoMessage() {} func (x *RPCParkourCancelMatchReq) ProtoReflect() protoreflect.Message { - mi := &file_parkour_parkour_msg_proto_msgTypes[39] + mi := &file_parkour_parkour_msg_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2111,7 +2247,7 @@ func (x *RPCParkourCancelMatchReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCParkourCancelMatchReq.ProtoReflect.Descriptor instead. func (*RPCParkourCancelMatchReq) Descriptor() ([]byte, []int) { - return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{39} + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{41} } func (x *RPCParkourCancelMatchReq) GetCaptainid() string { @@ -2130,7 +2266,7 @@ type RPCParkourCancelMatchResp struct { func (x *RPCParkourCancelMatchResp) Reset() { *x = RPCParkourCancelMatchResp{} if protoimpl.UnsafeEnabled { - mi := &file_parkour_parkour_msg_proto_msgTypes[40] + mi := &file_parkour_parkour_msg_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2143,7 +2279,7 @@ func (x *RPCParkourCancelMatchResp) String() string { func (*RPCParkourCancelMatchResp) ProtoMessage() {} func (x *RPCParkourCancelMatchResp) ProtoReflect() protoreflect.Message { - mi := &file_parkour_parkour_msg_proto_msgTypes[40] + mi := &file_parkour_parkour_msg_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2156,7 +2292,7 @@ func (x *RPCParkourCancelMatchResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCParkourCancelMatchResp.ProtoReflect.Descriptor instead. func (*RPCParkourCancelMatchResp) Descriptor() ([]byte, []int) { - return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{40} + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{42} } ///匹配成功通知请求 @@ -2172,7 +2308,7 @@ type RPCParkourMatchSuccReq struct { func (x *RPCParkourMatchSuccReq) Reset() { *x = RPCParkourMatchSuccReq{} if protoimpl.UnsafeEnabled { - mi := &file_parkour_parkour_msg_proto_msgTypes[41] + mi := &file_parkour_parkour_msg_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2185,7 +2321,7 @@ func (x *RPCParkourMatchSuccReq) String() string { func (*RPCParkourMatchSuccReq) ProtoMessage() {} func (x *RPCParkourMatchSuccReq) ProtoReflect() protoreflect.Message { - mi := &file_parkour_parkour_msg_proto_msgTypes[41] + mi := &file_parkour_parkour_msg_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2198,7 +2334,7 @@ func (x *RPCParkourMatchSuccReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCParkourMatchSuccReq.ProtoReflect.Descriptor instead. func (*RPCParkourMatchSuccReq) Descriptor() ([]byte, []int) { - return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{41} + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{43} } func (x *RPCParkourMatchSuccReq) GetRed() []*DBRaceMember { @@ -2225,7 +2361,7 @@ type RPCParkourMatchSuccResp struct { func (x *RPCParkourMatchSuccResp) Reset() { *x = RPCParkourMatchSuccResp{} if protoimpl.UnsafeEnabled { - mi := &file_parkour_parkour_msg_proto_msgTypes[42] + mi := &file_parkour_parkour_msg_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2238,7 +2374,7 @@ func (x *RPCParkourMatchSuccResp) String() string { func (*RPCParkourMatchSuccResp) ProtoMessage() {} func (x *RPCParkourMatchSuccResp) ProtoReflect() protoreflect.Message { - mi := &file_parkour_parkour_msg_proto_msgTypes[42] + mi := &file_parkour_parkour_msg_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2251,7 +2387,7 @@ func (x *RPCParkourMatchSuccResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RPCParkourMatchSuccResp.ProtoReflect.Descriptor instead. func (*RPCParkourMatchSuccResp) Descriptor() ([]byte, []int) { - return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{42} + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{44} } //托管求情 @@ -2267,7 +2403,7 @@ type RPC_ParkourTrusteeshipReq struct { func (x *RPC_ParkourTrusteeshipReq) Reset() { *x = RPC_ParkourTrusteeshipReq{} if protoimpl.UnsafeEnabled { - mi := &file_parkour_parkour_msg_proto_msgTypes[43] + mi := &file_parkour_parkour_msg_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2280,7 +2416,7 @@ func (x *RPC_ParkourTrusteeshipReq) String() string { func (*RPC_ParkourTrusteeshipReq) ProtoMessage() {} func (x *RPC_ParkourTrusteeshipReq) ProtoReflect() protoreflect.Message { - mi := &file_parkour_parkour_msg_proto_msgTypes[43] + mi := &file_parkour_parkour_msg_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2293,7 +2429,7 @@ func (x *RPC_ParkourTrusteeshipReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RPC_ParkourTrusteeshipReq.ProtoReflect.Descriptor instead. func (*RPC_ParkourTrusteeshipReq) Descriptor() ([]byte, []int) { - return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{43} + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{45} } func (x *RPC_ParkourTrusteeshipReq) GetBattleid() string { @@ -2319,7 +2455,7 @@ type RPC_ParkourTrusteeshipResp struct { func (x *RPC_ParkourTrusteeshipResp) Reset() { *x = RPC_ParkourTrusteeshipResp{} if protoimpl.UnsafeEnabled { - mi := &file_parkour_parkour_msg_proto_msgTypes[44] + mi := &file_parkour_parkour_msg_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2332,7 +2468,7 @@ func (x *RPC_ParkourTrusteeshipResp) String() string { func (*RPC_ParkourTrusteeshipResp) ProtoMessage() {} func (x *RPC_ParkourTrusteeshipResp) ProtoReflect() protoreflect.Message { - mi := &file_parkour_parkour_msg_proto_msgTypes[44] + mi := &file_parkour_parkour_msg_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2345,7 +2481,7 @@ func (x *RPC_ParkourTrusteeshipResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RPC_ParkourTrusteeshipResp.ProtoReflect.Descriptor instead. func (*RPC_ParkourTrusteeshipResp) Descriptor() ([]byte, []int) { - return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{44} + return file_parkour_parkour_msg_proto_rawDescGZIP(), []int{46} } var File_parkour_parkour_msg_proto protoreflect.FileDescriptor @@ -2511,37 +2647,53 @@ var file_parkour_parkour_msg_proto_rawDesc = []byte{ 0x0a, 0x18, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, - 0x65, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x22, 0x7e, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x50, 0x61, - 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, - 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, - 0x25, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x06, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x03, 0x61, 0x69, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x03, 0x61, 0x69, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, 0x61, - 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x38, 0x0a, 0x18, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, - 0x0a, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x22, 0x1b, 0x0a, 0x19, - 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, 0x16, 0x52, 0x50, 0x43, - 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, - 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x03, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x52, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, 0x61, - 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x49, 0x0a, 0x19, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, - 0x72, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x65, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, - 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x1c, 0x0a, - 0x1a, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x72, 0x75, 0x73, - 0x74, 0x65, 0x65, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x22, 0x4a, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x6b, 0x6f, + 0x75, 0x72, 0x53, 0x67, 0x69, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, + 0x09, 0x6d, 0x61, 0x78, 0x6c, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x6d, 0x61, 0x78, 0x6c, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x53, + 0x67, 0x69, 0x6e, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6d, + 0x61, 0x78, 0x6c, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x6d, 0x61, 0x78, 0x6c, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x77, 0x65, 0x65, + 0x6b, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, + 0x72, 0x64, 0x22, 0x7e, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, + 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, + 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x52, + 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x1f, 0x0a, 0x03, 0x61, 0x69, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x03, 0x61, + 0x69, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, + 0x4a, 0x6f, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x38, 0x0a, + 0x18, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x70, + 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, + 0x70, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x50, 0x43, 0x50, 0x61, + 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, 0x16, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, + 0x75, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52, 0x65, 0x71, 0x12, 0x1f, + 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, + 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, + 0x21, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x04, 0x62, 0x75, + 0x6c, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x50, 0x43, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x63, 0x63, 0x52, 0x65, 0x73, 0x70, 0x22, 0x49, 0x0a, + 0x19, 0x52, 0x50, 0x43, 0x5f, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x72, 0x75, 0x73, + 0x74, 0x65, 0x65, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x50, 0x43, 0x5f, + 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x65, 0x73, 0x68, + 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2556,7 +2708,7 @@ func file_parkour_parkour_msg_proto_rawDescGZIP() []byte { return file_parkour_parkour_msg_proto_rawDescData } -var file_parkour_parkour_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 46) +var file_parkour_parkour_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 48) var file_parkour_parkour_msg_proto_goTypes = []interface{}{ (*ParkourInfoReq)(nil), // 0: ParkourInfoReq (*ParkourInfoResp)(nil), // 1: ParkourInfoResp @@ -2595,42 +2747,45 @@ var file_parkour_parkour_msg_proto_goTypes = []interface{}{ (*ParkourAllWeekRewardResp)(nil), // 34: ParkourAllWeekRewardResp (*ParkourReconnectRoomReq)(nil), // 35: ParkourReconnectRoomReq (*ParkourReconnectRoomResp)(nil), // 36: ParkourReconnectRoomResp - (*RPCParkourJoinMatchReq)(nil), // 37: RPCParkourJoinMatchReq - (*RPCParkourJoinMatchResp)(nil), // 38: RPCParkourJoinMatchResp - (*RPCParkourCancelMatchReq)(nil), // 39: RPCParkourCancelMatchReq - (*RPCParkourCancelMatchResp)(nil), // 40: RPCParkourCancelMatchResp - (*RPCParkourMatchSuccReq)(nil), // 41: RPCParkourMatchSuccReq - (*RPCParkourMatchSuccResp)(nil), // 42: RPCParkourMatchSuccResp - (*RPC_ParkourTrusteeshipReq)(nil), // 43: RPC_ParkourTrusteeshipReq - (*RPC_ParkourTrusteeshipResp)(nil), // 44: RPC_ParkourTrusteeshipResp - nil, // 45: ParkourAllWeekRewardResp.WeekrewardEntry - (*DBParkour)(nil), // 46: DBParkour - (RaceType)(0), // 47: RaceType - (*DBRace)(nil), // 48: DBRace - (*UserAtno)(nil), // 49: UserAtno - (*DBRaceMember)(nil), // 50: DBRaceMember + (*ParkourSginOverReq)(nil), // 37: ParkourSginOverReq + (*ParkourSginOverResp)(nil), // 38: ParkourSginOverResp + (*RPCParkourJoinMatchReq)(nil), // 39: RPCParkourJoinMatchReq + (*RPCParkourJoinMatchResp)(nil), // 40: RPCParkourJoinMatchResp + (*RPCParkourCancelMatchReq)(nil), // 41: RPCParkourCancelMatchReq + (*RPCParkourCancelMatchResp)(nil), // 42: RPCParkourCancelMatchResp + (*RPCParkourMatchSuccReq)(nil), // 43: RPCParkourMatchSuccReq + (*RPCParkourMatchSuccResp)(nil), // 44: RPCParkourMatchSuccResp + (*RPC_ParkourTrusteeshipReq)(nil), // 45: RPC_ParkourTrusteeshipReq + (*RPC_ParkourTrusteeshipResp)(nil), // 46: RPC_ParkourTrusteeshipResp + nil, // 47: ParkourAllWeekRewardResp.WeekrewardEntry + (*DBParkour)(nil), // 48: DBParkour + (RaceType)(0), // 49: RaceType + (*DBRace)(nil), // 50: DBRace + (*UserAtno)(nil), // 51: UserAtno + (*DBRaceMember)(nil), // 52: DBRaceMember } var file_parkour_parkour_msg_proto_depIdxs = []int32{ - 46, // 0: ParkourInfoResp.info:type_name -> DBParkour - 47, // 1: ParkourRaceMatchReq.rtype:type_name -> RaceType - 47, // 2: ParkourRaceMatchCancelReq.rtype:type_name -> RaceType - 48, // 3: ParkourRaceMatchSuccPush.race:type_name -> DBRace - 46, // 4: ParkourInfoChangePush.Info:type_name -> DBParkour - 48, // 5: ParkourRaceOverPush.race:type_name -> DBRace - 49, // 6: ParkourRaceOverPush.award:type_name -> UserAtno - 49, // 7: ParkourWeekRewardResp.award:type_name -> UserAtno - 45, // 8: ParkourAllWeekRewardResp.weekreward:type_name -> ParkourAllWeekRewardResp.WeekrewardEntry - 49, // 9: ParkourAllWeekRewardResp.award:type_name -> UserAtno - 48, // 10: ParkourReconnectRoomResp.race:type_name -> DBRace - 50, // 11: RPCParkourJoinMatchReq.member:type_name -> DBRaceMember - 50, // 12: RPCParkourJoinMatchReq.ais:type_name -> DBRaceMember - 50, // 13: RPCParkourMatchSuccReq.red:type_name -> DBRaceMember - 50, // 14: RPCParkourMatchSuccReq.bule:type_name -> DBRaceMember - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 48, // 0: ParkourInfoResp.info:type_name -> DBParkour + 49, // 1: ParkourRaceMatchReq.rtype:type_name -> RaceType + 49, // 2: ParkourRaceMatchCancelReq.rtype:type_name -> RaceType + 50, // 3: ParkourRaceMatchSuccPush.race:type_name -> DBRace + 48, // 4: ParkourInfoChangePush.Info:type_name -> DBParkour + 50, // 5: ParkourRaceOverPush.race:type_name -> DBRace + 51, // 6: ParkourRaceOverPush.award:type_name -> UserAtno + 51, // 7: ParkourWeekRewardResp.award:type_name -> UserAtno + 47, // 8: ParkourAllWeekRewardResp.weekreward:type_name -> ParkourAllWeekRewardResp.WeekrewardEntry + 51, // 9: ParkourAllWeekRewardResp.award:type_name -> UserAtno + 50, // 10: ParkourReconnectRoomResp.race:type_name -> DBRace + 51, // 11: ParkourSginOverResp.award:type_name -> UserAtno + 52, // 12: RPCParkourJoinMatchReq.member:type_name -> DBRaceMember + 52, // 13: RPCParkourJoinMatchReq.ais:type_name -> DBRaceMember + 52, // 14: RPCParkourMatchSuccReq.red:type_name -> DBRaceMember + 52, // 15: RPCParkourMatchSuccReq.bule:type_name -> DBRaceMember + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_parkour_parkour_msg_proto_init() } @@ -3086,7 +3241,7 @@ func file_parkour_parkour_msg_proto_init() { } } file_parkour_parkour_msg_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCParkourJoinMatchReq); i { + switch v := v.(*ParkourSginOverReq); i { case 0: return &v.state case 1: @@ -3098,7 +3253,7 @@ func file_parkour_parkour_msg_proto_init() { } } file_parkour_parkour_msg_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCParkourJoinMatchResp); i { + switch v := v.(*ParkourSginOverResp); i { case 0: return &v.state case 1: @@ -3110,7 +3265,7 @@ func file_parkour_parkour_msg_proto_init() { } } file_parkour_parkour_msg_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCParkourCancelMatchReq); i { + switch v := v.(*RPCParkourJoinMatchReq); i { case 0: return &v.state case 1: @@ -3122,7 +3277,7 @@ func file_parkour_parkour_msg_proto_init() { } } file_parkour_parkour_msg_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCParkourCancelMatchResp); i { + switch v := v.(*RPCParkourJoinMatchResp); i { case 0: return &v.state case 1: @@ -3134,7 +3289,7 @@ func file_parkour_parkour_msg_proto_init() { } } file_parkour_parkour_msg_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCParkourMatchSuccReq); i { + switch v := v.(*RPCParkourCancelMatchReq); i { case 0: return &v.state case 1: @@ -3146,7 +3301,7 @@ func file_parkour_parkour_msg_proto_init() { } } file_parkour_parkour_msg_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPCParkourMatchSuccResp); i { + switch v := v.(*RPCParkourCancelMatchResp); i { case 0: return &v.state case 1: @@ -3158,7 +3313,7 @@ func file_parkour_parkour_msg_proto_init() { } } file_parkour_parkour_msg_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RPC_ParkourTrusteeshipReq); i { + switch v := v.(*RPCParkourMatchSuccReq); i { case 0: return &v.state case 1: @@ -3170,6 +3325,30 @@ func file_parkour_parkour_msg_proto_init() { } } file_parkour_parkour_msg_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPCParkourMatchSuccResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_parkour_parkour_msg_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RPC_ParkourTrusteeshipReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_parkour_parkour_msg_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RPC_ParkourTrusteeshipResp); i { case 0: return &v.state @@ -3188,7 +3367,7 @@ func file_parkour_parkour_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_parkour_parkour_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 46, + NumMessages: 48, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/reddot_msg.pb.go b/pb/reddot_msg.pb.go index 771a50ae2..93e22e8a1 100644 --- a/pb/reddot_msg.pb.go +++ b/pb/reddot_msg.pb.go @@ -99,92 +99,6 @@ func (x *ReddotItem) GetTotal() int32 { return 0 } -//红点信息请求 -type ReddotGetAllReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ReddotGetAllReq) Reset() { - *x = ReddotGetAllReq{} - if protoimpl.UnsafeEnabled { - mi := &file_reddot_reddot_msg_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReddotGetAllReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReddotGetAllReq) ProtoMessage() {} - -func (x *ReddotGetAllReq) ProtoReflect() protoreflect.Message { - mi := &file_reddot_reddot_msg_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReddotGetAllReq.ProtoReflect.Descriptor instead. -func (*ReddotGetAllReq) Descriptor() ([]byte, []int) { - return file_reddot_reddot_msg_proto_rawDescGZIP(), []int{1} -} - -type ReddotGetAllResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Reddot map[int32]*ReddotItem `protobuf:"bytes,1,rep,name=reddot,proto3" json:"reddot" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //红点信息 -} - -func (x *ReddotGetAllResp) Reset() { - *x = ReddotGetAllResp{} - if protoimpl.UnsafeEnabled { - mi := &file_reddot_reddot_msg_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReddotGetAllResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReddotGetAllResp) ProtoMessage() {} - -func (x *ReddotGetAllResp) ProtoReflect() protoreflect.Message { - mi := &file_reddot_reddot_msg_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReddotGetAllResp.ProtoReflect.Descriptor instead. -func (*ReddotGetAllResp) Descriptor() ([]byte, []int) { - return file_reddot_reddot_msg_proto_rawDescGZIP(), []int{2} -} - -func (x *ReddotGetAllResp) GetReddot() map[int32]*ReddotItem { - if x != nil { - return x.Reddot - } - return nil -} - //红点信息请求 type ReddotGetReq struct { state protoimpl.MessageState @@ -197,7 +111,7 @@ type ReddotGetReq struct { func (x *ReddotGetReq) Reset() { *x = ReddotGetReq{} if protoimpl.UnsafeEnabled { - mi := &file_reddot_reddot_msg_proto_msgTypes[3] + mi := &file_reddot_reddot_msg_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -210,7 +124,7 @@ func (x *ReddotGetReq) String() string { func (*ReddotGetReq) ProtoMessage() {} func (x *ReddotGetReq) ProtoReflect() protoreflect.Message { - mi := &file_reddot_reddot_msg_proto_msgTypes[3] + mi := &file_reddot_reddot_msg_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -223,7 +137,7 @@ func (x *ReddotGetReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ReddotGetReq.ProtoReflect.Descriptor instead. func (*ReddotGetReq) Descriptor() ([]byte, []int) { - return file_reddot_reddot_msg_proto_rawDescGZIP(), []int{3} + return file_reddot_reddot_msg_proto_rawDescGZIP(), []int{1} } func (x *ReddotGetReq) GetRids() []int32 { @@ -237,14 +151,12 @@ type ReddotGetResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Reddot map[int32]*ReddotItem `protobuf:"bytes,1,rep,name=reddot,proto3" json:"reddot" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //红点信息 } func (x *ReddotGetResp) Reset() { *x = ReddotGetResp{} if protoimpl.UnsafeEnabled { - mi := &file_reddot_reddot_msg_proto_msgTypes[4] + mi := &file_reddot_reddot_msg_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -257,7 +169,7 @@ func (x *ReddotGetResp) String() string { func (*ReddotGetResp) ProtoMessage() {} func (x *ReddotGetResp) ProtoReflect() protoreflect.Message { - mi := &file_reddot_reddot_msg_proto_msgTypes[4] + mi := &file_reddot_reddot_msg_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -270,14 +182,7 @@ func (x *ReddotGetResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ReddotGetResp.ProtoReflect.Descriptor instead. func (*ReddotGetResp) Descriptor() ([]byte, []int) { - return file_reddot_reddot_msg_proto_rawDescGZIP(), []int{4} -} - -func (x *ReddotGetResp) GetReddot() map[int32]*ReddotItem { - if x != nil { - return x.Reddot - } - return nil + return file_reddot_reddot_msg_proto_rawDescGZIP(), []int{2} } //推送红点改变 @@ -292,7 +197,7 @@ type ReddotChangePush struct { func (x *ReddotChangePush) Reset() { *x = ReddotChangePush{} if protoimpl.UnsafeEnabled { - mi := &file_reddot_reddot_msg_proto_msgTypes[5] + mi := &file_reddot_reddot_msg_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -305,7 +210,7 @@ func (x *ReddotChangePush) String() string { func (*ReddotChangePush) ProtoMessage() {} func (x *ReddotChangePush) ProtoReflect() protoreflect.Message { - mi := &file_reddot_reddot_msg_proto_msgTypes[5] + mi := &file_reddot_reddot_msg_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -318,7 +223,7 @@ func (x *ReddotChangePush) ProtoReflect() protoreflect.Message { // Deprecated: Use ReddotChangePush.ProtoReflect.Descriptor instead. func (*ReddotChangePush) Descriptor() ([]byte, []int) { - return file_reddot_reddot_msg_proto_rawDescGZIP(), []int{5} + return file_reddot_reddot_msg_proto_rawDescGZIP(), []int{3} } func (x *ReddotChangePush) GetRids() []*ReddotItem { @@ -342,33 +247,14 @@ var file_reddot_reddot_msg_proto_rawDesc = []byte{ 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x47, 0x65, - 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x22, 0x91, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x64, 0x64, - 0x6f, 0x74, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x06, - 0x72, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x52, - 0x65, 0x64, 0x64, 0x6f, 0x74, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x2e, - 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, 0x65, 0x64, - 0x64, 0x6f, 0x74, 0x1a, 0x46, 0x0a, 0x0b, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x49, 0x74, 0x65, 0x6d, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x22, 0x0a, 0x0c, 0x52, - 0x65, 0x64, 0x64, 0x6f, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x72, - 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x72, 0x69, 0x64, 0x73, 0x22, - 0x8b, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x2e, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x72, - 0x65, 0x64, 0x64, 0x6f, 0x74, 0x1a, 0x46, 0x0a, 0x0b, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x49, 0x74, - 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x33, 0x0a, - 0x10, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, - 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x72, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x72, 0x69, - 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x64, 0x64, 0x6f, 0x74, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x04, 0x72, 0x69, 0x64, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x64, 0x64, + 0x6f, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x33, 0x0a, 0x10, 0x52, 0x65, 0x64, + 0x64, 0x6f, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, + 0x04, 0x72, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x52, 0x65, + 0x64, 0x64, 0x6f, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x72, 0x69, 0x64, 0x73, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -383,28 +269,20 @@ func file_reddot_reddot_msg_proto_rawDescGZIP() []byte { return file_reddot_reddot_msg_proto_rawDescData } -var file_reddot_reddot_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_reddot_reddot_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_reddot_reddot_msg_proto_goTypes = []interface{}{ (*ReddotItem)(nil), // 0: ReddotItem - (*ReddotGetAllReq)(nil), // 1: ReddotGetAllReq - (*ReddotGetAllResp)(nil), // 2: ReddotGetAllResp - (*ReddotGetReq)(nil), // 3: ReddotGetReq - (*ReddotGetResp)(nil), // 4: ReddotGetResp - (*ReddotChangePush)(nil), // 5: ReddotChangePush - nil, // 6: ReddotGetAllResp.ReddotEntry - nil, // 7: ReddotGetResp.ReddotEntry + (*ReddotGetReq)(nil), // 1: ReddotGetReq + (*ReddotGetResp)(nil), // 2: ReddotGetResp + (*ReddotChangePush)(nil), // 3: ReddotChangePush } var file_reddot_reddot_msg_proto_depIdxs = []int32{ - 6, // 0: ReddotGetAllResp.reddot:type_name -> ReddotGetAllResp.ReddotEntry - 7, // 1: ReddotGetResp.reddot:type_name -> ReddotGetResp.ReddotEntry - 0, // 2: ReddotChangePush.rids:type_name -> ReddotItem - 0, // 3: ReddotGetAllResp.ReddotEntry.value:type_name -> ReddotItem - 0, // 4: ReddotGetResp.ReddotEntry.value:type_name -> ReddotItem - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 0, // 0: ReddotChangePush.rids:type_name -> ReddotItem + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_reddot_reddot_msg_proto_init() } @@ -426,30 +304,6 @@ func file_reddot_reddot_msg_proto_init() { } } file_reddot_reddot_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReddotGetAllReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_reddot_reddot_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReddotGetAllResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_reddot_reddot_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReddotGetReq); i { case 0: return &v.state @@ -461,7 +315,7 @@ func file_reddot_reddot_msg_proto_init() { return nil } } - file_reddot_reddot_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_reddot_reddot_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReddotGetResp); i { case 0: return &v.state @@ -473,7 +327,7 @@ func file_reddot_reddot_msg_proto_init() { return nil } } - file_reddot_reddot_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_reddot_reddot_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReddotChangePush); i { case 0: return &v.state @@ -492,7 +346,7 @@ func file_reddot_reddot_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_reddot_reddot_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, From ca40bc579cf4311ff025af2564bcaaaa73a2ea4f Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 23 Feb 2024 13:58:45 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=BA=A2=E7=82=B9?= =?UTF-8?q?=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/dailytask/module.go | 48 ++++++++++++++++---------- modules/gourmet/module.go | 32 +++++++++++++----- modules/guildgve/module.go | 36 +++++++++++++------- modules/hunting/module.go | 32 +++++++++++++----- modules/library/module.go | 66 ++++++++++++++++++++++-------------- modules/mail/module.go | 67 +++++++++++++++++++++++-------------- modules/mainline/module.go | 30 ++++++++++++----- modules/viking/module.go | 35 +++++++++++++------ 8 files changed, 228 insertions(+), 118 deletions(-) diff --git a/modules/dailytask/module.go b/modules/dailytask/module.go index 1872497a0..9e6a0cd08 100644 --- a/modules/dailytask/module.go +++ b/modules/dailytask/module.go @@ -113,36 +113,48 @@ func (this *Dailytask) OpenCmdNotice(session comm.IUserSession, keys ...string) } // 查询每日红点信息 -func (this *Dailytask) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { +func (this *Dailytask) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot25101} + ok bool dtask *pb.DBDailytask progress int32 err error ) - reddot = make(map[comm.ReddotType]*pb.ReddotItem) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break + } + } + if ok { + return + } if dtask, err = this.modelDailytask.getUserDTasks(session.GetUserId()); err != nil { this.Errorln(err) return } - for _, v := range rid { - switch v { - case comm.Reddot25101: + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot25101: - for _, v := range dtask.Groups { - if v.Complete { - progress++ + for _, v := range dtask.Groups { + if v.Complete { + progress++ + } } + items[comm.Reddot25101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot25101), + Activated: true, + Progress: progress, + Total: int32(len(dtask.Groups)), + } + if len(dtask.Groups) == 0 { + items[comm.Reddot25101].Activated = false + } + break } - reddot[comm.Reddot25101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot25101), - Activated: true, - Progress: progress, - Total: int32(len(dtask.Groups)), - } - if len(dtask.Groups) == 0 { - reddot[comm.Reddot25101].Activated = false - } - break } } return diff --git a/modules/gourmet/module.go b/modules/gourmet/module.go index 5467c6b23..8dcc4e71e 100644 --- a/modules/gourmet/module.go +++ b/modules/gourmet/module.go @@ -45,18 +45,32 @@ func (this *Gourmet) OnInstallComp() { } //红点查询 -func (this *Gourmet) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot23101: // 铁匠铺手册台 - reddot[comm.Reddot23101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot23101), - Activated: this.modelAtlas.checkReddot2301(session.GetUserId()), - } +func (this *Gourmet) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot23101} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { break } } + if ok { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot23101: // 铁匠铺手册台 + items[comm.Reddot23101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot23101), + Activated: this.modelAtlas.checkReddot2301(session.GetUserId()), + } + break + } + } + } return } diff --git a/modules/guildgve/module.go b/modules/guildgve/module.go index 845f4abe1..79d0104d7 100644 --- a/modules/guildgve/module.go +++ b/modules/guildgve/module.go @@ -89,24 +89,36 @@ func (this *GuildGve) Rpc_ModuleGuildBossSettlement(ctx context.Context, req *pb } // 红点 -func (this *GuildGve) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { +func (this *GuildGve) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { var ( - member *pb.DBGuildMember - err error + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot15301} + ok bool + member *pb.DBGuildMember + err error ) - reddot = make(map[comm.ReddotType]*pb.ReddotItem) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break + } + } + if ok { + return + } if member, err = this.modelGuildMember.inquireGuildMember(session.GetUserId()); err != nil { return } - for _, v := range rid { - switch v { - case comm.Reddot15301: - reddot[comm.Reddot15301] = &pb.ReddotItem{ - Rid: int32(comm.Reddot15301), - Activated: true, - Progress: member.Boosticket, + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot15301: + items[comm.Reddot15301] = &pb.ReddotItem{ + Rid: int32(comm.Reddot15301), + Activated: true, + Progress: member.Boosticket, + } + break } - break } } return diff --git a/modules/hunting/module.go b/modules/hunting/module.go index 60ec8d28b..d2c509996 100644 --- a/modules/hunting/module.go +++ b/modules/hunting/module.go @@ -89,18 +89,32 @@ func (this *Hunting) CheckUserBaseHuntingInfo(uid string) (data []*pb.DBHuntingR } //红点查询 -func (this *Hunting) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot14102: - reddot[comm.Reddot14102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot14102), - Activated: this.modelHunting.checkReddot32(session), - } +func (this *Hunting) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot17} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { break } } + if ok { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot14102: + items[comm.Reddot14102] = &pb.ReddotItem{ + Rid: int32(comm.Reddot14102), + Activated: this.modelHunting.checkReddot32(session), + } + break + } + } + } return } diff --git a/modules/library/module.go b/modules/library/module.go index 1ef89596f..3578462ba 100644 --- a/modules/library/module.go +++ b/modules/library/module.go @@ -282,34 +282,48 @@ func (this *Library) TaskFinishNotify(uid string, taskId, fetterId int32) error } // 红点 -func (this *Library) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot19105: - reddot[comm.Reddot19105] = &pb.ReddotItem{ - Rid: int32(comm.Reddot19105), - Activated: this.modelLibrary.checkReddot19105(session.GetUserId()), - } +func (this *Library) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot19105, comm.Reddot19103, comm.Reddot19109, comm.Reddot19110} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { break - case comm.Reddot19103: - reddot[comm.Reddot19103] = &pb.ReddotItem{ - Rid: int32(comm.Reddot19103), - Activated: this.modelFetter.checkReddot19103(session.GetUserId()), + } + } + if ok { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot19105: + items[comm.Reddot19105] = &pb.ReddotItem{ + Rid: int32(comm.Reddot19105), + Activated: this.modelLibrary.checkReddot19105(session.GetUserId()), + } + break + case comm.Reddot19103: + items[comm.Reddot19103] = &pb.ReddotItem{ + Rid: int32(comm.Reddot19103), + Activated: this.modelFetter.checkReddot19103(session.GetUserId()), + } + break + case comm.Reddot19109: + items[comm.Reddot19109] = &pb.ReddotItem{ + Rid: int32(comm.Reddot19109), + Activated: this.modelLibrary.checkReddot19109(session.GetUserId()), + } + break + case comm.Reddot19110: + items[comm.Reddot19110] = &pb.ReddotItem{ + Rid: int32(comm.Reddot19110), + Activated: this.modelLibrary.checkReddot19110(session.GetUserId()), + } + break } - break - case comm.Reddot19109: - reddot[comm.Reddot19109] = &pb.ReddotItem{ - Rid: int32(comm.Reddot19109), - Activated: this.modelLibrary.checkReddot19109(session.GetUserId()), - } - break - case comm.Reddot19110: - reddot[comm.Reddot19110] = &pb.ReddotItem{ - Rid: int32(comm.Reddot19110), - Activated: this.modelLibrary.checkReddot19110(session.GetUserId()), - } - break } } return diff --git a/modules/mail/module.go b/modules/mail/module.go index 8ebd5c0d7..43f87ccac 100644 --- a/modules/mail/module.go +++ b/modules/mail/module.go @@ -107,36 +107,51 @@ func (this *Mail) SendNewMail(mail *pb.DBMailData, uid ...string) bool { } //红点查询 -func (this *Mail) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot12101: - if isredot := this.modelMail.checkReddot26(session.GetUserId()); isredot { - reddot[comm.Reddot12101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot12101), - Activated: true, - } - } else { - reddot[comm.Reddot12101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot12101), - Activated: false, - } - } +func (this *Mail) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot12101, comm.Reddot12102} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { break - case comm.Reddot12102: - if isredot := this.modelMail.checkReddot30(session.GetUserId()); isredot { - reddot[comm.Reddot12102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot12101), - Activated: true, + } + } + if ok { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot12101: + if isredot := this.modelMail.checkReddot26(session.GetUserId()); isredot { + items[comm.Reddot12101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot12101), + Activated: true, + } + } else { + items[comm.Reddot12101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot12101), + Activated: false, + } } - } else { - reddot[comm.Reddot12102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot12101), - Activated: false, + break + case comm.Reddot12102: + if isredot := this.modelMail.checkReddot30(session.GetUserId()); isredot { + items[comm.Reddot12102] = &pb.ReddotItem{ + Rid: int32(comm.Reddot12101), + Activated: true, + } + } else { + items[comm.Reddot12102] = &pb.ReddotItem{ + Rid: int32(comm.Reddot12101), + Activated: false, + } } + break } - break } } return diff --git a/modules/mainline/module.go b/modules/mainline/module.go index 2dd6b82bc..bd0e52737 100644 --- a/modules/mainline/module.go +++ b/modules/mainline/module.go @@ -58,17 +58,31 @@ func (this *Mainline) Start() (err error) { } // 红点查询 -func (this *Mainline) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - if v == comm.Reddot24101 { - reddot[comm.Reddot24101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot24101), - Activated: this.CheckPoint(session.GetUserId()), - } +func (this *Mainline) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot24101} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { break } } + if ok { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { + if v == comm.Reddot24101 { + items[comm.Reddot24101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot24101), + Activated: this.CheckPoint(session.GetUserId()), + } + break + } + } + } return } diff --git a/modules/viking/module.go b/modules/viking/module.go index 84ca6c31d..7db21dfc0 100644 --- a/modules/viking/module.go +++ b/modules/viking/module.go @@ -122,17 +122,32 @@ func (this *Viking) CheckUserBaseVikingInfo(uid string) (data []*pb.DBVikingRank } //红点查询 -func (this *Viking) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) { - reddot = make(map[comm.ReddotType]*pb.ReddotItem) - for _, v := range rid { - switch v { - case comm.Reddot13102: - reddot[comm.Reddot13102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot13102), - Activated: this.modelViking.checkReddot31(session), - } - break +func (this *Viking) Reddot(session comm.IUserSession, rid map[comm.ReddotType]struct{}) (items map[comm.ReddotType]*pb.ReddotItem) { + var ( + selfrid []comm.ReddotType = []comm.ReddotType{comm.Reddot13102} + ok bool + ) + items = make(map[comm.ReddotType]*pb.ReddotItem) + for _, v := range selfrid { + if _, ok = rid[v]; ok { + break + } + } + if ok { + return + } + for _, v := range selfrid { + if _, ok = rid[v]; ok { + switch v { + case comm.Reddot13102: + items[comm.Reddot13102] = &pb.ReddotItem{ + Rid: int32(comm.Reddot13102), + Activated: this.modelViking.checkReddot31(session), + } + break + + } } } return From 424ee73fb5ddee52e8d3e647ba0a8477eda8794b Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 23 Feb 2024 14:00:03 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=BA=A2=E7=82=B9?= =?UTF-8?q?=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/reddot/api_get.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/reddot/api_get.go b/modules/reddot/api_get.go index 0d8e33890..38ed89079 100644 --- a/modules/reddot/api_get.go +++ b/modules/reddot/api_get.go @@ -71,6 +71,10 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda for _, v := range this.module.ModuleUser.Reddot(session, reds) { reddotItem = append(reddotItem, v) } + if len(reddotItem) > 0 { + session.SendMsg(string(this.module.GetType()), "change", &pb.ReddotChangePush{Rids: reddotItem}) + } + }) // for _, rid := range req.Rids {