From 510c8d12252f24ea2e5ac67e2e5bbf30ea28d81b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 12 Dec 2023 14:59:01 +0800 Subject: [PATCH 1/4] =?UTF-8?q?245=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_buriedtype.json | 7 + bin/json/game_initial.json | 26 ++- bin/json/game_mainstage.json | 163 ++++++++++---- bin/json/game_playerinfor_barrage.json | 92 ++++---- bin/json/game_playerinfor_overview.json | 146 ++++++++++--- bin/json/game_skillafteratk.json | 239 +++++++++++++-------- modules/buried/module.go | 1 + modules/hero/api_drawCard.go | 2 +- modules/hero/module.go | 8 +- sys/configure/structs/Game.OpencondType.go | 1 + 10 files changed, 476 insertions(+), 209 deletions(-) diff --git a/bin/json/game_buriedtype.json b/bin/json/game_buriedtype.json index 15960435d..3386b65cf 100644 --- a/bin/json/game_buriedtype.json +++ b/bin/json/game_buriedtype.json @@ -1412,5 +1412,12 @@ "id": 242, "insert": 1, "filter": [] + }, + { + "id": 243, + "insert": 3, + "filter": [ + "eq" + ] } ] \ No newline at end of file diff --git a/bin/json/game_initial.json b/bin/json/game_initial.json index 9e5819507..4ff2587db 100644 --- a/bin/json/game_initial.json +++ b/bin/json/game_initial.json @@ -14,7 +14,7 @@ "var": [ { "a": "per", - "t": "16010201", + "t": "16010102", "n": 1 } ] @@ -24,13 +24,33 @@ "var": [ { "a": "per", - "t": "16010301", + "t": "16010103", + "n": 1 + } + ] + }, + { + "index": "356", + "var": [ + { + "a": "per", + "t": "16010201", "n": 1 } ] }, { "index": "357", + "var": [ + { + "a": "per", + "t": "16010301", + "n": 1 + } + ] + }, + { + "index": "358", "var": [ { "a": "attr", @@ -40,7 +60,7 @@ ] }, { - "index": "358", + "index": "359", "var": [ { "a": "item", diff --git a/bin/json/game_mainstage.json b/bin/json/game_mainstage.json index 909185ad4..4432f6f72 100644 --- a/bin/json/game_mainstage.json +++ b/bin/json/game_mainstage.json @@ -4135,7 +4135,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 12001 }, { "id": 1101043, @@ -4262,7 +4262,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 12001 }, { "id": 1101044, @@ -4389,7 +4389,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 12001 }, { "id": 1101045, @@ -4516,7 +4516,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 12001 }, { "id": 1101046, @@ -4643,7 +4643,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 12001 }, { "id": 1101047, @@ -4770,7 +4770,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 12001 }, { "id": 1101048, @@ -4897,7 +4897,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 12001 }, { "id": 1101049, @@ -5024,7 +5024,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 12001 }, { "id": 1101050, @@ -5151,7 +5151,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 13001 }, { "id": 1101051, @@ -5278,7 +5278,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 13001 }, { "id": 1101052, @@ -5405,7 +5405,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 13001 }, { "id": 1101053, @@ -5532,7 +5532,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 13001 }, { "id": 1101054, @@ -5659,7 +5659,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 13001 }, { "id": 1101055, @@ -5786,7 +5786,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 13001 }, { "id": 1101056, @@ -5913,7 +5913,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 13001 }, { "id": 1101057, @@ -6040,7 +6040,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 13001 }, { "id": 1101058, @@ -7487,7 +7487,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 0 }, { "id": 1101074, @@ -7877,7 +7877,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 0 }, { "id": 1101078, @@ -8289,7 +8289,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 0 }, { "id": 1101082, @@ -9503,6 +9503,83 @@ "star_value": [], "challengeward": 0 }, + { + "id": 1101096, + "chapterid": 11001, + "group_id": 100133, + "previous_group_id": [], + "previoustage": 0, + "buried_type": 0, + "buried": 0, + "grouptype": [], + "Episodetype": 9, + "stage_param": 0, + "inherit": 0, + "battle_fail": 0, + "venturemodelspeed": 0, + "venturemodelscale": 0, + "move_type": 0, + "venturemodel": "", + "bubbletalk": { + "key": "", + "text": "" + }, + "venturetype": 0, + "ventureavatar": [], + "scene_effect": [], + "scene_effectfilter": "", + "is_near": 0, + "openlevel": 1, + "EditorStage": 0, + "herocolor": 2, + "heroimg": "zxgq_qp_icon_zd", + "bubbletext": { + "key": "", + "text": "" + }, + "animation": [], + "prewarbubbletext": { + "key": "", + "text": "" + }, + "hide": 0, + "destroy": 0, + "progress": 0, + "stroyshow": 0, + "frontstoryid": 0, + "afterstoryid": 0, + "maingroupName": { + "key": "", + "text": "" + }, + "mainlineName": { + "key": "", + "text": "" + }, + "title": { + "key": "", + "text": "" + }, + "desc": { + "key": "", + "text": "" + }, + "exp": 0, + "hero_exp": 0, + "ps_consume": [], + "ps_mg": [], + "firstaward": [], + "lotteryward": 0, + "commonaward": [], + "BattleReadyID": 0, + "FormatList": [], + "helphero": [], + "banhero": [], + "star": [], + "star_type": [], + "star_value": [], + "challengeward": 0 + }, { "id": 1102000, "chapterid": 11002, @@ -11907,7 +11984,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 12002 }, { "id": 1102026, @@ -12034,7 +12111,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 12002 }, { "id": 1102027, @@ -12161,7 +12238,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 12002 }, { "id": 1102028, @@ -12288,7 +12365,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 12002 }, { "id": 1102029, @@ -12415,7 +12492,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 12002 }, { "id": 1102030, @@ -12542,7 +12619,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 12002 }, { "id": 1102031, @@ -12669,7 +12746,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 12002 }, { "id": 1102032, @@ -12796,7 +12873,7 @@ 2, 1 ], - "challengeward": 12001 + "challengeward": 12002 }, { "id": 1102033, @@ -12923,7 +13000,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 13002 }, { "id": 1102034, @@ -13050,7 +13127,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 13002 }, { "id": 1102035, @@ -13177,7 +13254,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 13002 }, { "id": 1102036, @@ -13304,7 +13381,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 13002 }, { "id": 1102037, @@ -13431,7 +13508,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 13002 }, { "id": 1102038, @@ -13558,7 +13635,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 13002 }, { "id": 1102039, @@ -13685,7 +13762,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 13002 }, { "id": 1102040, @@ -13812,7 +13889,7 @@ 2, 1 ], - "challengeward": 13001 + "challengeward": 13002 }, { "id": 1102041, @@ -13939,7 +14016,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 14002 }, { "id": 1102042, @@ -14066,7 +14143,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 14002 }, { "id": 1102043, @@ -14193,7 +14270,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 14002 }, { "id": 1102044, @@ -14320,7 +14397,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 14002 }, { "id": 1102045, @@ -14447,7 +14524,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 14002 }, { "id": 1102046, @@ -14574,7 +14651,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 14002 }, { "id": 1102047, @@ -14701,7 +14778,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 14002 }, { "id": 1102048, @@ -14828,7 +14905,7 @@ 2, 1 ], - "challengeward": 14001 + "challengeward": 14002 }, { "id": 1102049, diff --git a/bin/json/game_playerinfor_barrage.json b/bin/json/game_playerinfor_barrage.json index 55ac97856..721c2e24c 100644 --- a/bin/json/game_playerinfor_barrage.json +++ b/bin/json/game_playerinfor_barrage.json @@ -9,7 +9,7 @@ "text": "这好像不是熊猫?" }, "time": 90, - "speed": 12278 + "speed": 12722 }, { "id": "2", @@ -20,8 +20,8 @@ "key": "playerinfor_barrage_2", "text": "看起来像个画家。" }, - "time": 209, - "speed": 9556 + "time": 190, + "speed": 12237 }, { "id": "3", @@ -32,8 +32,8 @@ "key": "playerinfor_barrage_3", "text": "为什么会觉得是熊猫啊?" }, - "time": 404, - "speed": 8152 + "time": 292, + "speed": 10498 }, { "id": "4", @@ -44,8 +44,8 @@ "key": "playerinfor_barrage_4", "text": "从石头里蹦出来的人?怎么感觉有点熟悉……" }, - "time": 519, - "speed": 11834 + "time": 529, + "speed": 12429 }, { "id": "5", @@ -56,8 +56,8 @@ "key": "playerinfor_barrage_5", "text": "你可能是听说过从石头里蹦出来的猴子。" }, - "time": 647, - "speed": 10668 + "time": 688, + "speed": 10088 }, { "id": "6", @@ -68,8 +68,8 @@ "key": "playerinfor_barrage_6", "text": "你是从石头里蹦出来的?!" }, - "time": 750, - "speed": 8239 + "time": 909, + "speed": 12947 }, { "id": "7", @@ -80,8 +80,8 @@ "key": "playerinfor_barrage_7", "text": "不!那不是我!" }, - "time": 925, - "speed": 9298 + "time": 1059, + "speed": 12696 }, { "id": "8", @@ -92,8 +92,8 @@ "key": "playerinfor_barrage_8", "text": "哦,传承之人……" }, - "time": 1139, - "speed": 7917 + "time": 1225, + "speed": 9592 }, { "id": "9", @@ -104,8 +104,8 @@ "key": "playerinfor_barrage_9", "text": "月光能量都汇集在他身上了!" }, - "time": 1257, - "speed": 9516 + "time": 1385, + "speed": 11311 }, { "id": "10", @@ -116,8 +116,8 @@ "key": "playerinfor_barrage_10", "text": "那应该不会爆炸吧?" }, - "time": 1383, - "speed": 11033 + "time": 1606, + "speed": 10931 }, { "id": "11", @@ -128,8 +128,8 @@ "key": "playerinfor_barrage_11", "text": "阿宝,你为什么站那么远?" }, - "time": 1608, - "speed": 8883 + "time": 1802, + "speed": 12145 }, { "id": "312", @@ -141,7 +141,7 @@ "text": "哦!那是什么?" }, "time": 90, - "speed": 10881 + "speed": 7982 }, { "id": "313", @@ -152,8 +152,8 @@ "key": "playerinfor_barrage_313", "text": "我有种被她注视的感觉……" }, - "time": 324, - "speed": 9563 + "time": 266, + "speed": 7864 }, { "id": "314", @@ -164,8 +164,8 @@ "key": "playerinfor_barrage_314", "text": "好像是一种叫做“照相”的魔法……" }, - "time": 467, - "speed": 10882 + "time": 468, + "speed": 9856 }, { "id": "315", @@ -176,8 +176,8 @@ "key": "playerinfor_barrage_315", "text": "我看这魔法不是很疼。" }, - "time": 695, - "speed": 7548 + "time": 652, + "speed": 11970 }, { "id": "316", @@ -188,8 +188,8 @@ "key": "playerinfor_barrage_316", "text": "据说它的作用是封印灵魂?" }, - "time": 803, - "speed": 10280 + "time": 816, + "speed": 8057 }, { "id": "317", @@ -200,8 +200,8 @@ "key": "playerinfor_barrage_317", "text": "月中人的传承居然这么可怕?!" }, - "time": 981, - "speed": 10986 + "time": 928, + "speed": 9966 }, { "id": "318", @@ -212,8 +212,8 @@ "key": "playerinfor_barrage_318", "text": "哦!你们真是够了!" }, - "time": 1083, - "speed": 10722 + "time": 1028, + "speed": 8227 }, { "id": "319", @@ -224,8 +224,8 @@ "key": "playerinfor_barrage_319", "text": "照相不是魔法!也不能封印灵魂!" }, - "time": 1257, - "speed": 10011 + "time": 1260, + "speed": 11801 }, { "id": "320", @@ -236,8 +236,8 @@ "key": "playerinfor_barrage_320", "text": "那她是在干什么?" }, - "time": 1496, - "speed": 10837 + "time": 1485, + "speed": 11645 }, { "id": "321", @@ -248,8 +248,8 @@ "key": "playerinfor_barrage_321", "text": "……别问。" }, - "time": 1620, - "speed": 7630 + "time": 1587, + "speed": 11333 }, { "id": "322", @@ -260,8 +260,8 @@ "key": "playerinfor_barrage_322", "text": "那可以教我吗?" }, - "time": 1738, - "speed": 12200 + "time": 1746, + "speed": 8330 }, { "id": "323", @@ -272,8 +272,8 @@ "key": "playerinfor_barrage_323", "text": "我也想学。" }, - "time": 1949, - "speed": 12536 + "time": 1970, + "speed": 12972 }, { "id": "324", @@ -284,7 +284,7 @@ "key": "playerinfor_barrage_324", "text": "要不你们问问这个传承者?" }, - "time": 2077, - "speed": 11522 + "time": 2136, + "speed": 12942 } ] \ No newline at end of file diff --git a/bin/json/game_playerinfor_overview.json b/bin/json/game_playerinfor_overview.json index edd9d7540..a032b0b92 100644 --- a/bin/json/game_playerinfor_overview.json +++ b/bin/json/game_playerinfor_overview.json @@ -8,7 +8,7 @@ "tujing": [ 107 ], - "url": "100001", + "url": "", "tips": 10000, "resources": "Person/10000/25001M.prefab", "pvpAnimator": "Person/10000/10000_MPvp.controller", @@ -31,17 +31,17 @@ "tujing": [ 107 ], - "url": "100001", + "url": "", "tips": 10000, "resources": "Person/10000/10000M.prefab", "pvpAnimator": "Person/10000/10000_MPvp.controller", "mainq": "Person/10000/10000M_q.prefab", "name": { - "key": "playerinfor_playerinfor_overview_name_1", + "key": "playerinfor_playerinfor_overview_name_2", "text": "陈旧服饰" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_1", + "key": "playerinfor_playerinfor_overview_txt_2", "text": "" } }, @@ -54,17 +54,109 @@ "tujing": [ 107 ], - "url": "200001", + "url": "", "tips": 10000, "resources": "Person/10000/10000W.prefab", "pvpAnimator": "Person/10000/10000_WPvp.controller", "mainq": "Person/10000/10000W_q.prefab", "name": { - "key": "playerinfor_playerinfor_overview_name_2", + "key": "playerinfor_playerinfor_overview_name_3", "text": "陈旧服饰" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_2", + "key": "playerinfor_playerinfor_overview_txt_3", + "text": "" + } + }, + { + "id": "16010102", + "sex": 1, + "type": 1, + "icon": "sbkp_js_nz", + "playerhead": "tx_js_nz", + "tujing": [ + 107 + ], + "url": "", + "tips": 10000, + "resources": "Person/10000/10000M.prefab", + "pvpAnimator": "Person/10000/10000_MPvp.controller", + "mainq": "Person/10000/10000M_q.prefab", + "name": { + "key": "playerinfor_playerinfor_overview_name_4", + "text": "陈旧服饰" + }, + "txt": { + "key": "playerinfor_playerinfor_overview_txt_4", + "text": "" + } + }, + { + "id": "16010102", + "sex": 2, + "type": 1, + "icon": "sbkp_js_nvz", + "playerhead": "tx_js_nvz", + "tujing": [ + 107 + ], + "url": "", + "tips": 10000, + "resources": "Person/10000/10000W.prefab", + "pvpAnimator": "Person/10000/10000_WPvp.controller", + "mainq": "Person/10000/10000W_q.prefab", + "name": { + "key": "playerinfor_playerinfor_overview_name_5", + "text": "陈旧服饰" + }, + "txt": { + "key": "playerinfor_playerinfor_overview_txt_5", + "text": "" + } + }, + { + "id": "16010103", + "sex": 1, + "type": 1, + "icon": "sbkp_js_nz", + "playerhead": "tx_js_nz", + "tujing": [ + 107 + ], + "url": "", + "tips": 10000, + "resources": "Person/10000/10000M.prefab", + "pvpAnimator": "Person/10000/10000_MPvp.controller", + "mainq": "Person/10000/10000M_q.prefab", + "name": { + "key": "playerinfor_playerinfor_overview_name_6", + "text": "陈旧服饰" + }, + "txt": { + "key": "playerinfor_playerinfor_overview_txt_6", + "text": "" + } + }, + { + "id": "16010103", + "sex": 2, + "type": 1, + "icon": "sbkp_js_nvz", + "playerhead": "tx_js_nvz", + "tujing": [ + 107 + ], + "url": "", + "tips": 10000, + "resources": "Person/10000/10000W.prefab", + "pvpAnimator": "Person/10000/10000_WPvp.controller", + "mainq": "Person/10000/10000W_q.prefab", + "name": { + "key": "playerinfor_playerinfor_overview_name_7", + "text": "陈旧服饰" + }, + "txt": { + "key": "playerinfor_playerinfor_overview_txt_7", "text": "" } }, @@ -77,17 +169,17 @@ "tujing": [ 107 ], - "url": "explore", + "url": "", "tips": 10000, "resources": "", "pvpAnimator": "", "mainq": "", "name": { - "key": "playerinfor_playerinfor_overview_name_3", + "key": "playerinfor_playerinfor_overview_name_8", "text": "陈述观念" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_3", + "key": "playerinfor_playerinfor_overview_txt_8", "text": "" } }, @@ -100,17 +192,17 @@ "tujing": [ 107 ], - "url": "explore", + "url": "", "tips": 10000, "resources": "", "pvpAnimator": "", "mainq": "", "name": { - "key": "playerinfor_playerinfor_overview_name_4", + "key": "playerinfor_playerinfor_overview_name_9", "text": "讲解原理" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_4", + "key": "playerinfor_playerinfor_overview_txt_9", "text": "" } }, @@ -123,17 +215,17 @@ "tujing": [ 107 ], - "url": "character_cardshow", + "url": "", "tips": 10000, "resources": "", "pvpAnimator": "", "mainq": "", "name": { - "key": "playerinfor_playerinfor_overview_name_5", + "key": "playerinfor_playerinfor_overview_name_10", "text": "虚无星空" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_5", + "key": "playerinfor_playerinfor_overview_txt_10", "text": "" } }, @@ -146,17 +238,17 @@ "tujing": [ 107 ], - "url": "character_cardshow", + "url": "", "tips": 10000, "resources": "", "pvpAnimator": "", "mainq": "", "name": { - "key": "playerinfor_playerinfor_overview_name_6", + "key": "playerinfor_playerinfor_overview_name_11", "text": "虚无星空" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_6", + "key": "playerinfor_playerinfor_overview_txt_11", "text": "" } }, @@ -175,11 +267,11 @@ "pvpAnimator": "", "mainq": "", "name": { - "key": "playerinfor_playerinfor_overview_name_7", + "key": "playerinfor_playerinfor_overview_name_12", "text": "头像框1" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_7", + "key": "playerinfor_playerinfor_overview_txt_12", "text": "头像框道具明细1" } }, @@ -198,11 +290,11 @@ "pvpAnimator": "", "mainq": "", "name": { - "key": "playerinfor_playerinfor_overview_name_8", + "key": "playerinfor_playerinfor_overview_name_13", "text": "头像框2" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_8", + "key": "playerinfor_playerinfor_overview_txt_13", "text": "头像框道具明细2" } }, @@ -221,11 +313,11 @@ "pvpAnimator": "", "mainq": "", "name": { - "key": "playerinfor_playerinfor_overview_name_9", + "key": "playerinfor_playerinfor_overview_name_14", "text": "头像框3" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_9", + "key": "playerinfor_playerinfor_overview_txt_14", "text": "头像框道具明细3" } }, @@ -244,11 +336,11 @@ "pvpAnimator": "", "mainq": "", "name": { - "key": "playerinfor_playerinfor_overview_name_10", + "key": "playerinfor_playerinfor_overview_name_15", "text": "头像框4" }, "txt": { - "key": "playerinfor_playerinfor_overview_txt_10", + "key": "playerinfor_playerinfor_overview_txt_15", "text": "头像框道具明细4" } } diff --git a/bin/json/game_skillafteratk.json b/bin/json/game_skillafteratk.json index bbc296b29..012c36075 100644 --- a/bin/json/game_skillafteratk.json +++ b/bin/json/game_skillafteratk.json @@ -2886,7 +2886,8 @@ 4, 700, 1, - 5 + 5, + 1200 ], "FollowSK": [], "SucFollowSK": [ @@ -2937,7 +2938,8 @@ 4, 700, 1, - 5 + 5, + 1350 ], "FollowSK": [], "SucFollowSK": [ @@ -2988,7 +2990,8 @@ 4, 700, 1, - 5 + 5, + 1350 ], "FollowSK": [], "SucFollowSK": [ @@ -3039,7 +3042,8 @@ 4, 700, 1, - 5 + 5, + 1500 ], "FollowSK": [], "SucFollowSK": [ @@ -3090,7 +3094,8 @@ 4, 700, 1, - 5 + 5, + 1500 ], "FollowSK": [], "SucFollowSK": [ @@ -3889,7 +3894,8 @@ 4, 800, 1, - 5 + 5, + 1000 ], "FollowSK": [], "SucFollowSK": [], @@ -3914,7 +3920,8 @@ 4, 800, 1, - 5 + 5, + 1100 ], "FollowSK": [], "SucFollowSK": [], @@ -3939,7 +3946,8 @@ 4, 800, 1, - 5 + 5, + 1200 ], "FollowSK": [], "SucFollowSK": [], @@ -3964,7 +3972,8 @@ 4, 800, 1, - 5 + 5, + 1400 ], "FollowSK": [], "SucFollowSK": [], @@ -4743,7 +4752,6 @@ 390001120, 300, 390001121, - 300, 400 ], "FollowSK": [], @@ -4851,7 +4859,8 @@ 4, 5000, 2, - 2 + 2, + 500 ], "FollowSK": [], "SucFollowSK": [], @@ -8357,7 +8366,8 @@ 4, 500, 1, - 5 + 5, + 2100 ], "FollowSK": [], "SucFollowSK": [ @@ -8408,7 +8418,8 @@ 4, 500, 1, - 5 + 5, + 2300 ], "FollowSK": [], "SucFollowSK": [ @@ -8459,7 +8470,8 @@ 4, 500, 1, - 5 + 5, + 2300 ], "FollowSK": [], "SucFollowSK": [ @@ -8510,7 +8522,8 @@ 4, 500, 1, - 5 + 5, + 2500 ], "FollowSK": [], "SucFollowSK": [ @@ -8561,7 +8574,8 @@ 4, 500, 1, - 5 + 5, + 2500 ], "FollowSK": [], "SucFollowSK": [ @@ -8612,7 +8626,8 @@ 4, 500, 1, - 5 + 5, + 2700 ], "FollowSK": [], "SucFollowSK": [ @@ -10093,7 +10108,8 @@ 4, 1500, 1, - 2 + 2, + 55 ], "FollowSK": [ 245003112 @@ -10141,7 +10157,8 @@ 4, 1800, 1, - 2 + 2, + 55 ], "FollowSK": [ 245003112 @@ -10168,7 +10185,8 @@ 4, 2100, 1, - 2 + 2, + 55 ], "FollowSK": [ 245003112 @@ -10195,7 +10213,8 @@ 4, 2400, 1, - 2 + 2, + 55 ], "FollowSK": [ 245003112 @@ -10222,7 +10241,8 @@ 4, 2700, 1, - 2 + 2, + 55 ], "FollowSK": [ 245003112 @@ -12125,7 +12145,8 @@ 4, 3000, 1, - 6 + 6, + 45 ], "FollowSK": [], "SucFollowSK": [], @@ -12150,7 +12171,8 @@ 4, 3200, 1, - 6 + 6, + 45 ], "FollowSK": [], "SucFollowSK": [], @@ -12175,7 +12197,8 @@ 4, 3400, 1, - 6 + 6, + 45 ], "FollowSK": [], "SucFollowSK": [], @@ -12200,7 +12223,8 @@ 4, 3600, 1, - 6 + 6, + 45 ], "FollowSK": [], "SucFollowSK": [], @@ -12225,7 +12249,8 @@ 4, 3800, 1, - 6 + 6, + 45 ], "FollowSK": [], "SucFollowSK": [], @@ -14106,7 +14131,8 @@ 4, 1000, 1, - 5 + 5, + 2700 ], "FollowSK": [ 214001317 @@ -14349,7 +14375,8 @@ 4, 1000, 1, - 5 + 5, + 3100 ], "FollowSK": [ 214001317 @@ -14376,7 +14403,8 @@ 4, 1000, 1, - 5 + 5, + 3400 ], "FollowSK": [ 214001317 @@ -14403,7 +14431,8 @@ 4, 1000, 1, - 5 + 5, + 3700 ], "FollowSK": [ 214001317 @@ -14430,7 +14459,8 @@ 4, 1000, 1, - 5 + 5, + 4000 ], "FollowSK": [ 214001317 @@ -14553,7 +14583,8 @@ 4, 6000, 2, - 2 + 2, + 500 ], "FollowSK": [], "SucFollowSK": [], @@ -16835,7 +16866,8 @@ 1, 2, 1, - 3 + 3, + 1 ], "FollowSK": [], "SucFollowSK": [], @@ -20796,7 +20828,8 @@ 4, 2500, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -20847,7 +20880,8 @@ 4, 2800, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -20874,7 +20908,8 @@ 4, 3100, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -20901,7 +20936,8 @@ 4, 3400, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -20928,7 +20964,8 @@ 4, 3800, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -20978,7 +21015,8 @@ 4, 3000, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -21028,7 +21066,8 @@ 4, 3300, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -21055,7 +21094,8 @@ 4, 3600, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -21082,7 +21122,8 @@ 4, 3900, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -21109,7 +21150,8 @@ 4, 4300, 1, - 2 + 2, + 50 ], "FollowSK": [], "SucFollowSK": [ @@ -25811,7 +25853,8 @@ -1, 2, -1, - 3 + 3, + -1 ], "FollowSK": [], "SucFollowSK": [], @@ -25883,7 +25926,8 @@ -1, 2, -1, - 3 + 3, + -1 ], "FollowSK": [], "SucFollowSK": [], @@ -26001,7 +26045,8 @@ -1, 2, -1, - 3 + 3, + -1 ], "FollowSK": [], "SucFollowSK": [], @@ -26073,7 +26118,8 @@ -1, 2, -1, - 3 + 3, + -1 ], "FollowSK": [], "SucFollowSK": [], @@ -30800,7 +30846,8 @@ 4, 2700, 1, - 1 + 1, + 60 ], "FollowSK": [ 214002112 @@ -30853,7 +30900,8 @@ 4, 2800, 1, - 1 + 1, + 45 ], "FollowSK": [ 214002112 @@ -30882,7 +30930,8 @@ 4, 2900, 1, - 1 + 1, + 45 ], "FollowSK": [ 214002112 @@ -30911,7 +30960,8 @@ 4, 3000, 1, - 1 + 1, + 45 ], "FollowSK": [ 214002112 @@ -30940,7 +30990,8 @@ 4, 3100, 1, - 1 + 1, + 45 ], "FollowSK": [ 214002112 @@ -31062,7 +31113,8 @@ 4, 600, 1, - 18 + 18, + 150 ], "FollowSK": [ 214002312 @@ -31115,7 +31167,8 @@ 4, 700, 1, - 18 + 18, + 150 ], "FollowSK": [ 214002312 @@ -31144,7 +31197,8 @@ 4, 800, 1, - 18 + 18, + 150 ], "FollowSK": [ 214002312 @@ -31173,7 +31227,8 @@ 4, 900, 1, - 18 + 18, + 150 ], "FollowSK": [ 214002312 @@ -31202,7 +31257,8 @@ 4, 1000, 1, - 18 + 18, + 150 ], "FollowSK": [ 214002312 @@ -31625,7 +31681,8 @@ 4, 1000, 2, - 3 + 3, + 100 ], "FollowSK": [], "SucFollowSK": [], @@ -31771,7 +31828,8 @@ 1, 150, 1, - 4 + 4, + 1500 ], "FollowSK": [], "SucFollowSK": [], @@ -31796,7 +31854,8 @@ 1, 150, 1, - 4 + 4, + 850 ], "FollowSK": [], "SucFollowSK": [], @@ -34101,7 +34160,8 @@ -10, 2, -10, - 3 + 3, + -10 ], "FollowSK": [], "SucFollowSK": [], @@ -34344,7 +34404,8 @@ 4, 8000, 2, - 2 + 2, + 600 ], "FollowSK": [], "SucFollowSK": [], @@ -34502,7 +34563,8 @@ 4, 8000, 2, - 2 + 2, + 600 ], "FollowSK": [], "SucFollowSK": [], @@ -34552,7 +34614,8 @@ 4, 8000, 2, - 2 + 2, + 600 ], "FollowSK": [], "SucFollowSK": [ @@ -37225,7 +37288,8 @@ -1, 1, -1, - 2 + 2, + -1 ], "FollowSK": [], "SucFollowSK": [], @@ -39303,7 +39367,8 @@ 1, 10, 1, - 4 + 4, + 800 ], "FollowSK": [ 244002212 @@ -47877,7 +47942,8 @@ -1, 1, -1, - 2 + 2, + -1 ], "FollowSK": [], "SucFollowSK": [], @@ -47925,7 +47991,8 @@ -1, 1, -1, - 2 + 2, + -1 ], "FollowSK": [], "SucFollowSK": [], @@ -47950,7 +48017,8 @@ 1, 1, 1, - 2 + 2, + 1 ], "FollowSK": [], "SucFollowSK": [], @@ -47975,7 +48043,8 @@ 1, 1, 1, - 2 + 2, + 1 ], "FollowSK": [], "SucFollowSK": [], @@ -50530,10 +50599,8 @@ "Argu": [ 1, 1, - 390001108, - 300, - 390001106, - 300 + 2, + 1000 ], "FollowSK": [], "SucFollowSK": [], @@ -50670,10 +50737,8 @@ "Argu": [ 1, 1, - 390001108, - 300, - 390001106, - 300 + 2, + 1000 ], "FollowSK": [], "SucFollowSK": [], @@ -53993,7 +54058,8 @@ 1, 2, 1, - 3 + 3, + 1 ], "FollowSK": [], "SucFollowSK": [], @@ -58222,13 +58288,9 @@ 1, 1, 390001007, - 1000, 390001006, - 1000, 390001008, - 1000, 391000041, - 1000, 391000042, 1000 ], @@ -59501,7 +59563,8 @@ 1, 2, 1, - 3 + 3, + 1 ], "FollowSK": [], "SucFollowSK": [], @@ -60048,7 +60111,8 @@ 2, 50, 1, - 4 + 4, + 4000 ], "FollowSK": [], "SucFollowSK": [], @@ -68447,7 +68511,8 @@ -10, 2, -10, - 3 + 3, + -10 ], "FollowSK": [], "SucFollowSK": [], diff --git a/modules/buried/module.go b/modules/buried/module.go index 0e83358b4..eb35ecc91 100644 --- a/modules/buried/module.go +++ b/modules/buried/module.go @@ -731,6 +731,7 @@ func (this *Buried) updateAndCheckBuried(bconf *cfg.GameBuriedTypeData, bdata *p if cond.Ctype == ctype_daily { //日常 if !utils.IsToday(bitem.Timestamp) { //不是同一天 可以重置数据 + bitem.State = pb.BuriedItemState_Activated bitem.Value = 0 bitem.Finish = pb.BuriedItemFinishState_buried_unfinish diff --git a/modules/hero/api_drawCard.go b/modules/hero/api_drawCard.go index c54d85afe..d0c1b64ec 100644 --- a/modules/hero/api_drawCard.go +++ b/modules/hero/api_drawCard.go @@ -328,7 +328,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq if req.DrawType != 1 { // 任务统计 - this.module.SendTaskMsg(session, szStar, req.DrawCount, req.DrawType) + this.module.SendTaskMsg(session, szStar, req.DrawCount, req.DrawType, szCards) go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroDrawCardReq", atno) this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroDrawCardReq", costRes) diff --git a/modules/hero/module.go b/modules/hero/module.go index 59858ed4c..58f1df067 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -506,7 +506,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat return } -func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCount int32, drawtype int32) { +func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCount int32, drawtype int32, szCards []string) { // 任务统计 var ( tasks []*pb.BuriedParam @@ -543,7 +543,11 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou if drawCount == 10 { tasks = append(tasks, comm.GetBuriedParam(comm.Rtype90, 1)) } - + for _, v := range szCards { + if conf, e := this.configure.GetHeroConfig(v); e != nil { + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype245, conf.Color, conf.Race, 1)) + } + } tasks = append(tasks, comm.GetBuriedParam(comm.Rtype89, drawCount)) go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { this.ModuleBuried.TriggerBuried(session, tasks...) diff --git a/sys/configure/structs/Game.OpencondType.go b/sys/configure/structs/Game.OpencondType.go index a7be337cb..c95fe8fc4 100644 --- a/sys/configure/structs/Game.OpencondType.go +++ b/sys/configure/structs/Game.OpencondType.go @@ -14,4 +14,5 @@ const ( GameOpencondType_Maxmapid = 2 GameOpencondType_Worldtaskid = 3 GameOpencondType_Friend = 4 + GameOpencondType_MoonLevel = 5 ) From dc3039dad939e2069270b4c1e3f0fe42a8242418 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 12 Dec 2023 15:44:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 2 +- comm/imodule.go | 1 + modules/activity/module.go | 15 ++++++++++++++- modules/integral/module.go | 3 +-- modules/uigame/api_getlattice.go | 7 ++++--- modules/uigame/api_getminer.go | 2 +- modules/uigame/api_getpuzzle.go | 2 +- modules/uigame/model_lattice.go | 1 + modules/uigame/module.go | 33 ++++++++++++++++++++++++++++++++ 9 files changed, 57 insertions(+), 9 deletions(-) diff --git a/comm/const.go b/comm/const.go index a89deefce..c91dfa54c 100644 --- a/comm/const.go +++ b/comm/const.go @@ -979,7 +979,7 @@ const ( Rtype242 TaskType = 242 //辉月等级达到x级 Rtype243 TaskType = 243 //指定英雄满级且共鸣和觉醒升至最高状态 - + Rtype245 TaskType = 245 //招募到X品质X阵营的守护者X个 ) const ( MailLineEasy int32 = 1 // 简单 diff --git a/comm/imodule.go b/comm/imodule.go index 5f79e2a25..5be723d7d 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -636,6 +636,7 @@ type ( } IUiGame interface { HDPSTodayConsum(uid string, ps int32) // 今日消耗的体力 + IActivityNotice } IStonehenge interface { diff --git a/modules/activity/module.go b/modules/activity/module.go index 2dc12bdd4..323915810 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -31,6 +31,7 @@ type Activity struct { shopcenter comm.IShopcenter // 活动中心 addrecharge comm.IAddrecharge // 活动中心 kftask comm.IActivityNotice // 开服任务 + uigame comm.IUiGame // ui小游戏 } func NewModule() core.IModule { @@ -91,7 +92,10 @@ func (this *Activity) Start() (err error) { return } this.kftask = module.(comm.IActivityNotice) - + if module, err = this.service.GetModule(comm.ModulePuzzle); err != nil { + return + } + this.uigame = module.(comm.IUiGame) if !db.IsCross() { this.modelhdList.LoadActivityData() for k, v := range this.modelhdList.activity { @@ -111,6 +115,9 @@ func (this *Activity) Start() (err error) { case pb.HdType_KFSevenTask: this.kftask.ActivityOpenNotice(v) break + case pb.HdType_HdPuzzle, pb.HdType_HdLattice, pb.HdType_HdMiner: + this.uigame.ActivityOpenNotice(v) + break } } } @@ -385,6 +392,9 @@ func (this *Activity) Rpc_ActivityOver(ctx context.Context, args *pb.RPCGeneralR case pb.HdType_KFSevenTask: this.kftask.ActivityCloseNotice(hd) break + case pb.HdType_HdPuzzle, pb.HdType_HdLattice, pb.HdType_HdMiner: + this.uigame.ActivityCloseNotice(hd) + break } } } @@ -423,6 +433,9 @@ func (this *Activity) Rpc_ActivityStar(ctx context.Context, args *pb.RPCGeneralR case pb.HdType_KFSevenTask: this.kftask.ActivityOpenNotice(hd) break + case pb.HdType_HdPuzzle, pb.HdType_HdLattice, pb.HdType_HdMiner: + this.uigame.ActivityOpenNotice(hd) + break } } } diff --git a/modules/integral/module.go b/modules/integral/module.go index e6899a24c..36116d445 100644 --- a/modules/integral/module.go +++ b/modules/integral/module.go @@ -58,7 +58,7 @@ func (this *Integral) OnInstallComp() { // 任务条件达成通知 func (this *Integral) BuriedsNotify(session comm.IUserSession, conds []*pb.ConIProgress) { var bChange bool - this.Debug("积分bossm条件达成通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "conds", Value: conds}) + this.Debug("积分boss条件达成通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "conds", Value: conds}) dt, err := this.modelIntegral.getIntegralList(session.GetUserId()) if dt.Itype != 2 { // 只有事件模式才有debuff @@ -95,7 +95,6 @@ func (this *Integral) BuriedsNotify(session comm.IUserSession, conds []*pb.ConIP if dt.Buff[k] != 1 && v.State == pb.BuriedItemFinishState_buried_finish { dt.Buff[k] = 1 bChange = true - } } if bChange { diff --git a/modules/uigame/api_getlattice.go b/modules/uigame/api_getlattice.go index 36e143ffc..e077b3a45 100644 --- a/modules/uigame/api_getlattice.go +++ b/modules/uigame/api_getlattice.go @@ -25,10 +25,11 @@ func (this *apiComp) GetLattice(session comm.IUserSession, req *pb.UiGameGetLatt ) update = make(map[string]interface{}) curTime := configure.Now().Unix() - if activity, err = this.module.ModuleActivity.GetHdInfoByHdId(req.Hdid); err != nil { // 活动不存在 + if activity, err = this.module.GetActivityData(pb.HdType_HdLattice); err != nil { // 活动不存在 errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ActivityInvalid, - Title: pb.ErrorCode_ActivityInvalid.ToString(), + Code: pb.ErrorCode_ActivityInvalid, + Title: pb.ErrorCode_ActivityInvalid.ToString(), + Message: err.Error(), } return } diff --git a/modules/uigame/api_getminer.go b/modules/uigame/api_getminer.go index 24b0554ba..e433ed9ab 100644 --- a/modules/uigame/api_getminer.go +++ b/modules/uigame/api_getminer.go @@ -25,7 +25,7 @@ func (this *apiComp) GetMiner(session comm.IUserSession, req *pb.UiGameGetMinerR ) update = make(map[string]interface{}) curTime := configure.Now().Unix() - if activity, err = this.module.ModuleActivity.GetHdInfoByHdId(req.Hdid); err != nil { // 活动不存在 + if activity, err = this.module.GetActivityData(pb.HdType_HdMiner); err != nil { // 活动不存在 errdata = &pb.ErrorData{ Code: pb.ErrorCode_ActivityInvalid, Title: pb.ErrorCode_ActivityInvalid.ToString(), diff --git a/modules/uigame/api_getpuzzle.go b/modules/uigame/api_getpuzzle.go index 34466a019..29c01de9c 100644 --- a/modules/uigame/api_getpuzzle.go +++ b/modules/uigame/api_getpuzzle.go @@ -25,7 +25,7 @@ func (this *apiComp) GetPuzzle(session comm.IUserSession, req *pb.UiGameGetPuzzl ) update = make(map[string]interface{}) curTime := configure.Now().Unix() - if activity, err = this.module.ModuleActivity.GetHdInfoByHdId(req.Hdid); err != nil { // 活动不存在 + if activity, err = this.module.GetActivityData(pb.HdType_HdPuzzle); err != nil { // 活动不存在 errdata = &pb.ErrorData{ Code: pb.ErrorCode_ActivityInvalid, Title: pb.ErrorCode_ActivityInvalid.ToString(), diff --git a/modules/uigame/model_lattice.go b/modules/uigame/model_lattice.go index e7386fa9e..34f51c254 100644 --- a/modules/uigame/model_lattice.go +++ b/modules/uigame/model_lattice.go @@ -15,6 +15,7 @@ import ( type modelLattice struct { modules.MCompModel module *UiGame + open bool // 游戏是否开启 } func (this *modelLattice) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { diff --git a/modules/uigame/module.go b/modules/uigame/module.go index 2ce3baa57..590526a7a 100644 --- a/modules/uigame/module.go +++ b/modules/uigame/module.go @@ -1,6 +1,7 @@ package uigame import ( + "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" @@ -8,6 +9,7 @@ import ( "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/utils" + "sync" "go_dreamfactory/modules" ) @@ -20,6 +22,8 @@ type UiGame struct { service base.IRPCXService modelLattice *modelLattice modelMiner *modelMiner + lock sync.RWMutex + hdlist map[pb.HdType]*pb.DBHuodong } func NewModule() core.IModule { @@ -212,3 +216,32 @@ func (this *UiGame) HDPSTodayConsum(uid string, ps int32) { } } } + +func (this *UiGame) ActivityOpenNotice(hd *pb.DBHuodong) { + this.lock.Lock() + defer this.lock.Unlock() + this.hdlist[hd.Itype] = hd +} + +// 活动关闭通知 +func (this *UiGame) ActivityCloseNotice(hd *pb.DBHuodong) { + this.lock.Lock() + defer this.lock.Unlock() + if _, ok := this.hdlist[hd.Itype]; ok { + delete(this.hdlist, hd.Itype) + } +} + +func (this *UiGame) GetActivityData(itype pb.HdType) (hd *pb.DBHuodong, err error) { + var ( + ok bool + ) + this.lock.RLock() + hd, ok = this.hdlist[itype] + this.lock.RUnlock() + if !ok { + err = fmt.Errorf("not found hditype:%d", itype) + return + } + return +} From 6828f035aa4fd4d1980dee9318b3b1b3a81c5a65 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 12 Dec 2023 18:21:24 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 4 +- comm/imodule.go | 2 - modules/activity/api_gethddata.go | 2 +- modules/activity/api_getreward.go | 1 + modules/activity/module.go | 81 +++++++++++--- modules/timer/activity.go | 178 +++++++++++++++++------------- modules/uigame/module.go | 1 + modules/web/api_activitynotify.go | 13 ++- 8 files changed, 180 insertions(+), 102 deletions(-) diff --git a/comm/const.go b/comm/const.go index c91dfa54c..08b982b5c 100644 --- a/comm/const.go +++ b/comm/const.go @@ -518,8 +518,8 @@ const ( //Rpc Rpc_Activity core.Rpc_Key = "Rpc_Activity" - Rpc_ActivityOver core.Rpc_Key = "Rpc_ActivityOver" //活动结束 - Rpc_ActivityStar core.Rpc_Key = "Rpc_ActivityStar" //活动开启 + Rpc_ActivityOver core.Rpc_Key = "Rpc_ActivityOver" //活动结束 + Rpc_ActivityStart core.Rpc_Key = "Rpc_ActivityStart" //活动开启 RPC_XXLOffLine core.Rpc_Key = "RPC_XXLOffLine" //三消离线 diff --git a/comm/imodule.go b/comm/imodule.go index 5be723d7d..8acd93581 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -586,10 +586,8 @@ type ( } IActivity interface { - GetHdInfoByHdId(oid string) (result *pb.DBHuodong, err error) // 通过活动id 获取活动信息 GetAllHdInfo() (hdList map[pb.HdType]*pb.DBHuodong) // 获取所有活动信息 GetHdInfoByItype(itype pb.HdType) (result *pb.DBHuodong, err error) // - // 庆典活动 HDCelebration(session IUserSession, systemtype int32, bosstype int32) bool } diff --git a/modules/activity/api_gethddata.go b/modules/activity/api_gethddata.go index 63a1c77ff..13ad6cd93 100644 --- a/modules/activity/api_gethddata.go +++ b/modules/activity/api_gethddata.go @@ -14,7 +14,7 @@ func (this *apiComp) GetHdDataCheck(session comm.IUserSession, req *pb.ActivityG // 活动活动 func (this *apiComp) GetHdData(session comm.IUserSession, req *pb.ActivityGetHdDataReq) (errdata *pb.ErrorData) { - result := this.module.GetHdData(session, req.Oid) + result := this.module.GetHdData(session, req.Oid) // 不用 session.SendMsg(string(this.module.GetType()), "gethddata", &pb.ActivityGetHdDataResp{ Data: result, }) diff --git a/modules/activity/api_getreward.go b/modules/activity/api_getreward.go index 1d3e62a86..c4d0a530a 100644 --- a/modules/activity/api_getreward.go +++ b/modules/activity/api_getreward.go @@ -38,6 +38,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.ActivityGetRew } return } + // 接口需要修改 if activity, err = this.module.modelhdList.getHdListByHdId(req.Oid); err == nil { curTime := configure.Now().Unix() if activity.Stime > curTime || curTime > activity.Etime { //不在活动时间范围内 diff --git a/modules/activity/module.go b/modules/activity/module.go index 323915810..7a77573d9 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -122,7 +122,7 @@ func (this *Activity) Start() (err error) { } } this.service.RegisterFunctionName(string(comm.Rpc_ActivityOver), this.Rpc_ActivityOver) - this.service.RegisterFunctionName(string(comm.Rpc_ActivityStar), this.Rpc_ActivityStar) + this.service.RegisterFunctionName(string(comm.Rpc_ActivityStart), this.Rpc_ActivityStart) return } @@ -197,12 +197,6 @@ func (this *Activity) GetHdInfoByItype(itype pb.HdType) (result *pb.DBHuodong, e return } -// 通过活动ID查找 -func (this *Activity) GetHdInfoByHdId(oid string) (result *pb.DBHuodong, err error) { - result, err = this.modelhdList.getHdListByHdId(oid) - return -} - // 统计庆典活动完成情况 func (this *Activity) HDCelebration(session comm.IUserSession, systemtype int32, bosstype int32) bool { bDouble := false // 是否开启双倍奖励 @@ -296,6 +290,7 @@ func (this *Activity) HDCelebration(session comm.IUserSession, systemtype int32, return bDouble } +// 接口废弃 func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (result []*pb.DBActivityData) { var ( activity *pb.DBHuodong @@ -355,9 +350,9 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul return } -func (this *Activity) Rpc_Activity(ctx context.Context, args string, reply *pb.EmptyResp) (err error) { - this.Debug("Rpc_ActivityOver", - log.Field{Key: "args", Value: args}, +func (this *Activity) Rpc_Activity(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.EmptyResp) (err error) { + this.Debug("Rpc_Activity", + log.Field{Key: "args", Value: req.Param1}, ) this.modelhdList.LoadActivityData() return @@ -405,8 +400,8 @@ func (this *Activity) Rpc_ActivityOver(ctx context.Context, args *pb.RPCGeneralR // 活动开启通知 -func (this *Activity) Rpc_ActivityStar(ctx context.Context, args *pb.RPCGeneralReqB1, reply *pb.EmptyResp) (err error) { - this.Debug("Rpc_ActivityStar", +func (this *Activity) Rpc_ActivityStart(ctx context.Context, args *pb.RPCGeneralReqB1, reply *pb.EmptyResp) (err error) { + this.Debug("Rpc_ActivityStart", log.Field{Key: "args", Value: args.String()}, ) var ( @@ -416,7 +411,7 @@ func (this *Activity) Rpc_ActivityStar(ctx context.Context, args *pb.RPCGeneralR for _, v := range szOverActivity { hd := &pb.DBHuodong{} - if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err != nil { + if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err == nil { switch hd.Itype { case pb.HdType_HdTypeWarorder, pb.HdType_SupplyWarOrder, pb.HdType_MoondreamWarOrder: this.warorder.ActivityOpenNotice(hd) @@ -443,3 +438,63 @@ func (this *Activity) Rpc_ActivityStar(ctx context.Context, args *pb.RPCGeneralR this.Debug("szOverActivity", log.Field{Key: "args", Value: szOverActivity}) return } + +// 通过活动类型获取活动信息 +func (this *Activity) GetHdDataByHdType(session comm.IUserSession, itype pb.HdType) (result []*pb.DBActivityData) { + var ( + activity *pb.DBHuodong + err error + list *pb.DBActivityData + ) + curTime := configure.Now().Unix() + + if activity, err = this.GetHdInfoByItype(itype); err != nil { + this.Errorln(err) + return + } + if activity.Stime > curTime || curTime > activity.Etime { // 不在活动范围内数据不给活动记录数据 + return + } + id := activity.Id + list, _ = this.modelhdData.getHddataByOid(session.GetUserId(), id) + // 获取开服庆典活动 + if activity.Itype == pb.HdType_HdCelebration { + if list, err = this.modelhdData.getHddataByOid(session.GetUserId(), id); err == nil { + if list.Lasttime < configure.Now().Unix() || list.Val == 0 { // 不是今天重置 + list.Gotarr = make(map[int32]int32) + update := make(map[string]interface{}) + + update["gotarr"] = list.Gotarr + var maxday int32 + _days := this.configure.GetHDCelebrationData() + for _, v := range _days { // 开启循环 + maxday += v + } + var pos int32 + _sub := int32((configure.Now().Unix() - activity.Stime) / (24 * 3600)) + + for index, v := range _days { + find := false + for i := 0; i < int(v); i++ { + pos++ + if _sub%maxday+1 == pos { + list.Val = int32(index) + 1 // 计算val 值 + update["val"] = list.Val + find = true + break + } + } + if find { // 找到剩余的天数 + list.Lasttime = activity.Stime + int64(_sub+pos%v+1)*24*3600 + update["lasttime"] = list.Lasttime + break + } + } + this.modelhdData.ModifyActivityList(session.GetUserId(), list.Id, update) + } + } + } + + result = append(result, list) + return +} diff --git a/modules/timer/activity.go b/modules/timer/activity.go index 4cfc6d78a..b50fffa9a 100644 --- a/modules/timer/activity.go +++ b/modules/timer/activity.go @@ -21,12 +21,14 @@ import ( type Activity struct { cbase.ModuleBase modules.MCompModel - service base.IRPCXService - module *Timer - cTimerObj *timewheel.Task - closeSignal chan struct{} - hlock sync.RWMutex - activity map[pb.HdType]*pb.DBHuodong + service base.IRPCXService + module *Timer + cTimerObj *timewheel.Task + closeSignal chan struct{} + hlock sync.RWMutex + curActivity map[pb.HdType]*pb.DBHuodong // 正在进行的活动 + delActivity map[pb.HdType]*pb.DBHuodong // 已经过期的活动 + futureActivity map[pb.HdType]*pb.DBHuodong // 即将要开启的活动过期的活动 } //组件初始化接口 @@ -71,105 +73,125 @@ func (this *Activity) Start() (err error) { func (this *Activity) LoadActivityData(id string) { if id == "" { // 查所有的 - if c, err := this.DB.Find(core.SqlTable(this.TableName), bson.M{}); err != nil { - return - } else { + if c, err := this.DB.Find(core.SqlTable(this.TableName), bson.M{}); err == nil { + var ( + szEnd []string // 活动结束 + szStart []string // 有活动开启 + ) this.hlock.Lock() + this.curActivity = make(map[pb.HdType]*pb.DBHuodong) + this.delActivity = make(map[pb.HdType]*pb.DBHuodong) + this.futureActivity = make(map[pb.HdType]*pb.DBHuodong) defer this.hlock.Unlock() - this.activity = make(map[pb.HdType]*pb.DBHuodong) for c.Next(context.Background()) { hd := &pb.DBHuodong{} if err = c.Decode(hd); err != nil { this.module.Errorf("err:%v", err) continue } - this.activity[hd.Itype] = hd + if hd.Etime <= configure.Now().Unix() { + this.delActivity[hd.Itype] = hd + szEnd = append(szEnd, hd.Id) + } else if hd.Etime > configure.Now().Unix() && hd.Stime < configure.Now().Unix() { + this.curActivity[hd.Itype] = hd + szStart = append(szStart, hd.Id) + } else { + this.futureActivity[hd.Itype] = hd + } + } + if len(szEnd) > 0 { + this.NotifyActivityOver(szEnd) + } + if len(szStart) > 0 { + this.NotifyActivityStart(szStart) } } } else { var hd *pb.DBHuodong - this.DB.FindOne(core.SqlTable(this.TableName), bson.M{"_id": id}).Decode(&hd) - + if err := this.DB.FindOne(core.SqlTable(this.TableName), bson.M{"_id": id}).Decode(&hd); err != nil { + return + } + if hd.Etime <= configure.Now().Unix() { // 活动结束 + this.NotifyActivityOver([]string{hd.Id}) + } else if hd.Etime > configure.Now().Unix() && hd.Stime < configure.Now().Unix() { + this.NotifyActivityStart([]string{hd.Id}) + } this.hlock.Lock() - if this.activity == nil { - this.activity = make(map[pb.HdType]*pb.DBHuodong) + // 删除内存中 + if _, ok := this.curActivity[hd.Itype]; ok { + delete(this.curActivity, hd.Itype) } - this.activity[hd.Itype] = hd - this.hlock.Unlock() - // rpc 通知 - if configure.Now().Unix() <= hd.Etime && configure.Now().Unix() >= hd.Stime { - if err := this.service.RpcCall( - context.Background(), - comm.Service_Worker, - string(comm.Rpc_ActivityStar), - pb.RPCGeneralReqB1{ - Param1: "starActivity", - Param2: []string{hd.Id}, - }, - nil, - ); err != nil { - this.module.Errorln(err) - } + if _, ok := this.delActivity[hd.Itype]; ok { + delete(this.delActivity, hd.Itype) } - if configure.Now().Unix() > hd.Etime { - if err := this.service.RpcCall( - context.Background(), - comm.Service_Worker, - string(comm.Rpc_ActivityOver), - pb.RPCGeneralReqB1{ - Param1: "endActivity", - Param2: []string{hd.Id}, - }, - nil, - ); err != nil { - this.module.Errorln(err) - } + if _, ok := this.futureActivity[hd.Itype]; ok { + delete(this.futureActivity, hd.Itype) } + if hd.Etime <= configure.Now().Unix() { // 活动结束 + this.delActivity[hd.Itype] = hd + } else if hd.Etime > configure.Now().Unix() && hd.Stime < configure.Now().Unix() { + this.curActivity[hd.Itype] = hd + } else { + this.futureActivity[hd.Itype] = hd + } + defer this.hlock.Unlock() } - } +func (this *Activity) NotifyActivityOver(szEnd []string) { + if err := this.service.RpcCall( + context.Background(), + comm.Service_Worker, + string(comm.Rpc_ActivityOver), + pb.RPCGeneralReqB1{ + Param1: "endActivity", + Param2: szEnd, + }, + nil, + ); err != nil { + this.module.Errorln(err) + } +} + +func (this *Activity) NotifyActivityStart(szStart []string) { + if err := this.service.RpcCall( + context.Background(), + comm.Service_Worker, + string(comm.Rpc_ActivityStart), + pb.RPCGeneralReqB1{ + Param1: "startActivity", + Param2: szStart, + }, + nil, + ); err != nil { + this.module.Errorln(err) + } +} func (this *Activity) CheckActivityData() { var ( - szEnd []string // 活动结束 - szStar []string // 有活动开启 + szEnd []string // 活动结束 + szStart []string // 有活动开启 ) - this.hlock.RLock() - for _, v := range this.activity { + this.hlock.Lock() + defer this.hlock.Unlock() + for _, v := range this.curActivity { if v.Etime == configure.Now().Unix() { // 有活动结束 szEnd = append(szEnd, v.Id) - } - if v.Stime == configure.Now().Unix() { // 有活动结束 - szStar = append(szStar, v.Id) + delete(this.curActivity, v.Itype) + this.delActivity[v.Itype] = v + } + } + for _, v := range this.futureActivity { + if v.Stime >= configure.Now().Unix() { // 有活动结束 + szStart = append(szStart, v.Id) + delete(this.futureActivity, v.Itype) + this.curActivity[v.Itype] = v } } - this.hlock.RUnlock() if len(szEnd) > 0 { - if err := this.service.RpcCall( - context.Background(), - comm.Service_Worker, - string(comm.Rpc_ActivityOver), - pb.RPCGeneralReqB1{ - Param1: "endActivity", - Param2: szEnd, - }, - nil, - ); err != nil { - this.module.Errorln(err) - } + this.NotifyActivityOver(szEnd) } - if len(szStar) > 0 { - if err := this.service.RpcCall( - context.Background(), - comm.Service_Worker, - string(comm.Rpc_ActivityStar), - pb.RPCGeneralReqB1{ - Param1: "starActivity", - Param2: szStar, - }, - nil, - ); err != nil { - this.module.Errorln(err) - } + if len(szStart) > 0 { + this.NotifyActivityStart(szStart) } } diff --git a/modules/uigame/module.go b/modules/uigame/module.go index 590526a7a..eaedc3573 100644 --- a/modules/uigame/module.go +++ b/modules/uigame/module.go @@ -39,6 +39,7 @@ func (this *UiGame) Init(service core.IService, module core.IModule, options cor return } this.service = service.(base.IRPCXService) + this.hdlist = make(map[pb.HdType]*pb.DBHuodong) return } diff --git a/modules/web/api_activitynotify.go b/modules/web/api_activitynotify.go index 6f0a4dbac..25f61827d 100644 --- a/modules/web/api_activitynotify.go +++ b/modules/web/api_activitynotify.go @@ -27,18 +27,19 @@ func (this *Api_Comp) ActivityNotify(c *engine.Context) { c.JSON(http.StatusOK, &Respond{Code: errdata.Code, Message: errdata.Message, Data: data}) }() - if _, err = this.module.service.RpcGo( + _, err = this.module.service.RpcGo( context.Background(), comm.Service_Worker, string(comm.Rpc_Activity), - req.Id, nil); err != nil { + pb.RPCGeneralReqA1{ + Param1: req.Id, + }, + nil) + if err != nil { this.module.Errorln(err) - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_RpcFuncExecutionError, - Title: pb.ErrorCode_RpcFuncExecutionError.ToString(), - } return } + errdata = &pb.ErrorData{ Code: pb.ErrorCode_Success, Title: pb.ErrorCode_Success.ToString(), From 7e1c0cdb51b0b179779164cc6afa596bd529fc46 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 12 Dec 2023 18:59:41 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9F=8B=E7=82=B9?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 2 ++ modules/activity/module.go | 18 +++++------------- modules/dispatch/api_do.go | 11 ++++++++++- modules/hero/module.go | 10 +++++++++- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/comm/const.go b/comm/const.go index 08b982b5c..94b0e5e8a 100644 --- a/comm/const.go +++ b/comm/const.go @@ -980,6 +980,8 @@ const ( Rtype243 TaskType = 243 //指定英雄满级且共鸣和觉醒升至最高状态 Rtype245 TaskType = 245 //招募到X品质X阵营的守护者X个 + Rtype246 TaskType = 246 //在一次十连内获得X个以上的Y品质的守护者 (紫色以上) + Rtype247 TaskType = 247 //完成X品质的武馆派遣Y个 ) const ( MailLineEasy int32 = 1 // 简单 diff --git a/modules/activity/module.go b/modules/activity/module.go index 7a77573d9..bd8e9f137 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -350,7 +350,7 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul return } -func (this *Activity) Rpc_Activity(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.EmptyResp) (err error) { +func (this *Activity) Rpc_Activity(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.RPCGeneralReqA1) (err error) { this.Debug("Rpc_Activity", log.Field{Key: "args", Value: req.Param1}, ) @@ -363,12 +363,8 @@ func (this *Activity) Rpc_ActivityOver(ctx context.Context, args *pb.RPCGeneralR this.Debug("Rpc_ActivityOver", log.Field{Key: "args", Value: args.String()}, ) - var ( - szOverActivity []string - ) - szOverActivity = args.Param2 - for _, v := range szOverActivity { + for _, v := range args.Param2 { hd := &pb.DBHuodong{} if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err != nil { switch hd.Itype { @@ -394,7 +390,7 @@ func (this *Activity) Rpc_ActivityOver(ctx context.Context, args *pb.RPCGeneralR } } - this.Debug("szOverActivity", log.Field{Key: "args", Value: szOverActivity}) + this.Debug("szOverActivity", log.Field{Key: "args", Value: args.Param2}) return } @@ -404,12 +400,8 @@ func (this *Activity) Rpc_ActivityStart(ctx context.Context, args *pb.RPCGeneral this.Debug("Rpc_ActivityStart", log.Field{Key: "args", Value: args.String()}, ) - var ( - szOverActivity []string - ) - szOverActivity = args.Param2 - for _, v := range szOverActivity { + for _, v := range args.Param2 { hd := &pb.DBHuodong{} if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err == nil { switch hd.Itype { @@ -435,7 +427,7 @@ func (this *Activity) Rpc_ActivityStart(ctx context.Context, args *pb.RPCGeneral } } - this.Debug("szOverActivity", log.Field{Key: "args", Value: szOverActivity}) + this.Debug("szOverActivity", log.Field{Key: "args", Value: args.Param2}) return } diff --git a/modules/dispatch/api_do.go b/modules/dispatch/api_do.go index 3686d02ed..319f69c61 100644 --- a/modules/dispatch/api_do.go +++ b/modules/dispatch/api_do.go @@ -32,6 +32,9 @@ func (a *apiComp) DoCheck(session comm.IUserSession, req *pb.DispatchDoReq) (err } func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errdata *pb.ErrorData) { + var ( + tasks []*pb.BuriedParam + ) if errdata = this.DoCheck(session, req); errdata != nil { return } @@ -112,7 +115,13 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda }) go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { - this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype186, 1)) + for _, v := range req.HeroIds { + if c, e := this.module.configure.GetHeroConfig(v); e == nil { + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype247, c.Color, 1)) + } + } + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype186, 1)) + this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "DispatchDoReq", ticketAtn) // 消耗资源 }) return diff --git a/modules/hero/module.go b/modules/hero/module.go index 58f1df067..0fecb1e95 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -509,7 +509,8 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCount int32, drawtype int32, szCards []string) { // 任务统计 var ( - tasks []*pb.BuriedParam + tasks []*pb.BuriedParam + colorCount int32 ) if drawtype == comm.DrawCardType0 { //普通招募 @@ -521,6 +522,7 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou for k := range sz { tasks = append(tasks, comm.GetBuriedParam(comm.Rtype17, 1, k)) } + } tasks = append(tasks, comm.GetBuriedParam(comm.Rtype14, drawCount)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype18, drawCount)) @@ -546,8 +548,14 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou for _, v := range szCards { if conf, e := this.configure.GetHeroConfig(v); e != nil { tasks = append(tasks, comm.GetBuriedParam(comm.Rtype245, conf.Color, conf.Race, 1)) + if conf.Color >= 3 { // 紫色以上 + colorCount++ + } } } + if colorCount > 0 { + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype246, colorCount)) + } tasks = append(tasks, comm.GetBuriedParam(comm.Rtype89, drawCount)) go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { this.ModuleBuried.TriggerBuried(session, tasks...)