From de8ca6e90a7f3d8bcbacaf5b53d80347678d24ce Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Thu, 10 Nov 2022 21:15:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=96=E7=95=8C=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_worldtask.json | 555 ++++++++++---------- cmd/v2/ui/views/worldtask_mine.go | 36 +- comm/const.go | 3 +- comm/imodule.go | 4 +- modules/rtask/module.go | 4 +- modules/worldtask/api_battlefinish.go | 4 +- modules/worldtask/api_finish.go | 34 +- modules/worldtask/model_worldtask.go | 28 +- modules/worldtask/module.go | 65 ++- pb/worldtask_msg.pb.go | 193 ++++++- sys/configure/structs/Game.WorldTaskData.go | 8 +- 11 files changed, 593 insertions(+), 341 deletions(-) diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index afa8f3ce4..596a157e8 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -7,16 +7,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10100", + "task_display": "新剧情文本10100", "npc": [ "scenes_ boundary_02", - "阿宝组件名", + "阿宝", "600" ], "getafter_event": [ - "2", - "10001" + 2, + 10001 ], "completetask": 0, "auto_accept": 0, @@ -26,6 +26,11 @@ "a": "attr", "t": "diamond", "n": 100 + }, + { + "a": "hero", + "t": "25001", + "n": 1 } ] }, @@ -37,16 +42,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10101", + "task_display": "新剧情文本10101", "npc": [ "dreamwork_restaurant_01", "邦尼兔组件名", "601" ], "getafter_event": [ - "2", - "10002" + 2, + 10002 ], "completetask": 0, "auto_accept": 1, @@ -67,16 +72,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10102", + "task_display": "新剧情文本10102", "npc": [ "dreamwork_restaurant_01", "波比组件名", "602" ], "getafter_event": [ - "2", - "10003" + 2, + 10003 ], "completetask": 171, "auto_accept": 1, @@ -97,16 +102,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10103", + "task_display": "新剧情文本10103", "npc": [ "dreamwork_restaurant_01", "阿宝组件名", "603" ], "getafter_event": [ - "2", - "10004" + 2, + 10004 ], "completetask": 173, "auto_accept": 1, @@ -127,16 +132,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10104", + "task_display": "新剧情文本10104", "npc": [ "dreamwork_restaurant_01", "波比组件名", "604" ], "getafter_event": [ - "2", - "10004" + 2, + 10004 ], "completetask": 0, "auto_accept": 1, @@ -157,18 +162,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10105", + "task_display": "新剧情文本10105", "npc": [ "scenes_ boundary_02", "阿宝组件名", "605" ], "getafter_event": [ - "2", - "10006" + 2, + 10006 ], - "completetask": 110, + "completetask": 118, "auto_accept": 1, "overtips": 1, "reword": [ @@ -187,18 +192,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10106", + "task_display": "新剧情文本10106", "npc": [ "scenes_ boundary_02", "邦尼兔组件名", "606" ], "getafter_event": [ - "2", - "10007" + 2, + 10007 ], - "completetask": 171, + "completetask": 174, "auto_accept": 1, "overtips": 1, "reword": [ @@ -217,16 +222,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10107", + "task_display": "新剧情文本10107", "npc": [ "scenes_ boundary_02", "邦尼兔组件名", "607" ], "getafter_event": [ - "2", - "10008" + 2, + 10008 ], "completetask": 0, "auto_accept": 1, @@ -247,16 +252,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10108", + "task_display": "新剧情文本10108", "npc": [ "scenes_ boundary_02", "邦尼兔组件名", "608" ], "getafter_event": [ - "2", - "10009" + 2, + 10009 ], "completetask": 0, "auto_accept": 1, @@ -277,16 +282,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10109", + "task_display": "新剧情文本10109", "npc": [ "scenes_ boundary_02", "戈伯组件名", "609" ], "getafter_event": [ - "2", - "10010" + 2, + 10010 ], "completetask": 0, "auto_accept": 1, @@ -307,16 +312,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10110", + "task_display": "新剧情文本10110", "npc": [ "scenes_smithy_01", "戈伯铁匠铺组件名", "610" ], "getafter_event": [ - "2", - "10011" + 2, + 10011 ], "completetask": 0, "auto_accept": 1, @@ -337,18 +342,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10111", + "task_display": "新剧情文本10111", "npc": [ "scenes_ boundary_02", "阿宝右屏组件名", "611" ], "getafter_event": [ - "2", - "10012" + 2, + 10012 ], - "completetask": 171, + "completetask": 175, "auto_accept": 1, "overtips": 1, "reword": [ @@ -367,16 +372,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10112", + "task_display": "新剧情文本10112", "npc": [ "scenes_ boundary_02", "瓜哥组件名", "612" ], "getafter_event": [ - "2", - "10013" + 2, + 10013 ], "completetask": 0, "auto_accept": 1, @@ -397,16 +402,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10113", + "task_display": "新剧情文本10113", "npc": [ "test_library", "贫嘴驴组件名", "613" ], "getafter_event": [ - "2", - "10014" + 2, + 10014 ], "completetask": 0, "auto_accept": 1, @@ -427,16 +432,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10114", + "task_display": "新剧情文本10114", "npc": [ "test_library", "贫嘴驴组件名", "614" ], "getafter_event": [ - "2", - "10015" + 2, + 10015 ], "completetask": 0, "auto_accept": 1, @@ -457,16 +462,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10115", + "task_display": "新剧情文本10115", "npc": [ "scenes_boundary_02night", "阿宝组件名", "615" ], "getafter_event": [ - "2", - "10016" + 2, + 10016 ], "completetask": 0, "auto_accept": 1, @@ -487,16 +492,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10116", + "task_display": "新剧情文本10116", "npc": [ "scenes_boundary_02night", "阿宝组件名", "616" ], "getafter_event": [ - "2", - "10017" + 2, + 10017 ], "completetask": 0, "auto_accept": 1, @@ -517,16 +522,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10117", + "task_display": "新剧情文本10117", "npc": [ "scenes_ boundary_02", "瓜哥组件名", "617" ], "getafter_event": [ - "2", - "10018" + 2, + 10018 ], "completetask": 0, "auto_accept": 1, @@ -547,16 +552,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10118", + "task_display": "新剧情文本10118", "npc": [ "scenes_ boundary_02", "瓜哥组件名", "618" ], "getafter_event": [ - "2", - "10019" + 2, + 10019 ], "completetask": 0, "auto_accept": 1, @@ -577,16 +582,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10119", + "task_display": "新剧情文本10119", "npc": [ "scenes_ boundary_02", "阿宝组件名", "619" ], "getafter_event": [ - "2", - "10020" + 2, + 10020 ], "completetask": 0, "auto_accept": 1, @@ -607,16 +612,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10120", + "task_display": "新剧情文本10120", "npc": [ "scenes_ boundary_02", "阿宝组件名", "620" ], "getafter_event": [ - "2", - "10021" + 2, + 10021 ], "completetask": 0, "auto_accept": 1, @@ -637,16 +642,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10121", + "task_display": "新剧情文本10121", "npc": [ "scenes_ boundary_02", "阿宝组件名", "621" ], "getafter_event": [ - "2", - "10022" + 2, + 10022 ], "completetask": 0, "auto_accept": 1, @@ -667,16 +672,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10122", + "task_display": "新剧情文本10122", "npc": [ "scenes_ boundary_02", "阿宝组件名", "622" ], "getafter_event": [ - "2", - "10023" + 2, + 10023 ], "completetask": 0, "auto_accept": 1, @@ -697,16 +702,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10123", + "task_display": "新剧情文本10123", "npc": [ "scenes_ boundary_02", "阿宝组件名", "623" ], "getafter_event": [ - "2", - "10024" + 2, + 10024 ], "completetask": 0, "auto_accept": 1, @@ -727,18 +732,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10124", + "task_display": "新剧情文本10124", "npc": [ "scenes_martialarts_01", "阿宝组件名", "624" ], "getafter_event": [ - "2", - "10025" + 2, + 10025 ], - "completetask": 171, + "completetask": 176, "auto_accept": 1, "overtips": 1, "reword": [ @@ -757,16 +762,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10125", + "task_display": "新剧情文本10125", "npc": [ "scenes_martialarts_01", "阿宝组件名", "625" ], "getafter_event": [ - "2", - "10026" + 2, + 10026 ], "completetask": 0, "auto_accept": 1, @@ -787,18 +792,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10126", + "task_display": "新剧情文本10126", "npc": [ "scenes_martialarts_01", "阿宝组件名", "626" ], "getafter_event": [ - "2", - "10027" + 2, + 10027 ], - "completetask": 171, + "completetask": 177, "auto_accept": 1, "overtips": 1, "reword": [ @@ -817,18 +822,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10127", + "task_display": "新剧情文本10127", "npc": [ "scenes_martialarts_01", "阿宝组件名", "627" ], "getafter_event": [ - "2", - "10028" + 2, + 10028 ], - "completetask": 171, + "completetask": 178, "auto_accept": 1, "overtips": 1, "reword": [ @@ -847,16 +852,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10128", + "task_display": "新剧情文本10128", "npc": [ "scenes_martialarts_01", "阿宝组件名", "628" ], "getafter_event": [ - "2", - "10029" + 2, + 10029 ], "completetask": 0, "auto_accept": 1, @@ -877,16 +882,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10129", + "task_display": "新剧情文本10129", "npc": [ "scenes_martialarts_01", "阿宝组件名", "629" ], "getafter_event": [ - "2", - "10030" + 2, + 10030 ], "completetask": 0, "auto_accept": 1, @@ -907,16 +912,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10130", + "task_display": "新剧情文本10130", "npc": [ "scenes_martialarts_01", "阿宝组件名", "630" ], "getafter_event": [ - "2", - "10031" + 2, + 10031 ], "completetask": 158, "auto_accept": 1, @@ -937,16 +942,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10131", + "task_display": "新剧情文本10131", "npc": [ "scenes_ boundary_02", "阿宝组件名", "631" ], "getafter_event": [ - "2", - "10033" + 2, + 10033 ], "completetask": 0, "auto_accept": 1, @@ -967,16 +972,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10132", + "task_display": "新剧情文本10132", "npc": [ "scenes_ boundary_02", "阿宝组件名", "632" ], "getafter_event": [ - "2", - "10034" + 2, + 10034 ], "completetask": 0, "auto_accept": 1, @@ -997,16 +1002,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10133", + "task_display": "新剧情文本10133", "npc": [ "scenes_ boundary_02", "阿宝组件名", "633" ], "getafter_event": [ - "2", - "10035" + 2, + 10035 ], "completetask": 0, "auto_accept": 1, @@ -1027,16 +1032,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10134", + "task_display": "新剧情文本10134", "npc": [ "scenes_ boundary_02", "阿宝组件名", "634" ], "getafter_event": [ - "2", - "10036" + 2, + 10036 ], "completetask": 0, "auto_accept": 1, @@ -1057,16 +1062,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10135", + "task_display": "新剧情文本10135", "npc": [ "scenes_ boundary_02", "阿宝组件名", "635" ], "getafter_event": [ - "2", - "10037" + 2, + 10037 ], "completetask": 0, "auto_accept": 1, @@ -1087,16 +1092,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10136", + "task_display": "新剧情文本10136", "npc": [ "scenes_ boundary_02", "阿宝组件名", "636" ], "getafter_event": [ - "2", - "10038" + 2, + 10038 ], "completetask": 0, "auto_accept": 1, @@ -1117,18 +1122,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10137", + "task_display": "新剧情文本10137", "npc": [ "scenes_martialarts_01", "阿宝组件名", "637" ], "getafter_event": [ - "2", - "10039" + 2, + 10039 ], - "completetask": 171, + "completetask": 179, "auto_accept": 1, "overtips": 1, "reword": [ @@ -1147,16 +1152,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10138", + "task_display": "新剧情文本10138", "npc": [ "scenes_martialarts_01", "阿宝组件名", "638" ], "getafter_event": [ - "2", - "10040" + 2, + 10040 ], "completetask": 0, "auto_accept": 1, @@ -1177,16 +1182,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10139", + "task_display": "新剧情文本10139", "npc": [ "scenes_ boundary_02", "阿宝组件名", "639" ], "getafter_event": [ - "2", - "10041" + 2, + 10041 ], "completetask": 0, "auto_accept": 1, @@ -1207,16 +1212,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10140", + "task_display": "新剧情文本10140", "npc": [ "scenes_ boundary_02", "阿宝组件名", "640" ], "getafter_event": [ - "2", - "10042" + 2, + 10042 ], "completetask": 0, "auto_accept": 1, @@ -1237,18 +1242,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10141", + "task_display": "新剧情文本10141", "npc": [ "scenes_ boundary_02", "阿宝组件名", "641" ], "getafter_event": [ - "2", - "10043" + 2, + 10043 ], - "completetask": 171, + "completetask": 180, "auto_accept": 1, "overtips": 1, "reword": [ @@ -1267,18 +1272,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10142", + "task_display": "新剧情文本10142", "npc": [ "scenes_ boundary_02", "阿宝组件名", "642" ], "getafter_event": [ - "2", - "10044" + 2, + 10044 ], - "completetask": 171, + "completetask": 181, "auto_accept": 1, "overtips": 1, "reword": [ @@ -1297,18 +1302,18 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10143", + "task_display": "新剧情文本10143", "npc": [ "scenes_ boundary_02", "阿宝组件名", "643" ], "getafter_event": [ - "2", - "10045" + 2, + 10045 ], - "completetask": 171, + "completetask": 182, "auto_accept": 1, "overtips": 1, "reword": [ @@ -1327,16 +1332,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10144", + "task_display": "新剧情文本10144", "npc": [ "scenes_ boundary_02", "阿宝组件名", "644" ], "getafter_event": [ - "2", - "10046" + 2, + 10046 ], "completetask": 0, "auto_accept": 1, @@ -1357,16 +1362,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10145", + "task_display": "新剧情文本10145", "npc": [ "scenes_ boundary_02", "阿宝组件名", "645" ], "getafter_event": [ - "2", - "10047" + 2, + 10047 ], "completetask": 0, "auto_accept": 1, @@ -1387,16 +1392,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10146", + "task_display": "新剧情文本10146", "npc": [ "scenes_ boundary_02", "阿宝组件名", "646" ], "getafter_event": [ - "2", - "10048" + 2, + 10048 ], "completetask": 0, "auto_accept": 1, @@ -1417,16 +1422,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10147", + "task_display": "新剧情文本10147", "npc": [ "scenes_ boundary_02", "阿宝组件名", "647" ], "getafter_event": [ - "2", - "10049" + 2, + 10049 ], "completetask": 0, "auto_accept": 1, @@ -1447,16 +1452,16 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10148", + "task_display": "新剧情文本10148", "npc": [ "scenes_ boundary_02", "阿宝组件名", "648" ], "getafter_event": [ - "2", - "10050" + 2, + 10050 ], "completetask": 0, "auto_accept": 1, @@ -1477,15 +1482,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10149", + "task_display": "新剧情文本10149", "npc": [ "scenes_ boundary_02", "波比组件名" ], "getafter_event": [ - "2", - "10051" + 2, + 10051 ], "completetask": 0, "auto_accept": 1, @@ -1506,15 +1511,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10150", + "task_display": "新剧情文本10150", "npc": [ "scenes_ boundary_02", "波比组件名" ], "getafter_event": [ - "2", - "10052" + 2, + 10052 ], "completetask": 0, "auto_accept": 1, @@ -1535,15 +1540,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10151", + "task_display": "新剧情文本10151", "npc": [ "scenes_ boundary_02", "杰克组件名" ], "getafter_event": [ - "2", - "10053" + 2, + 10053 ], "completetask": 0, "auto_accept": 1, @@ -1564,15 +1569,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10152", + "task_display": "新剧情文本10152", "npc": [ "scenes_ boundary_02", "杰克组件名" ], "getafter_event": [ - "2", - "10054" + 2, + 10054 ], "completetask": 0, "auto_accept": 1, @@ -1593,15 +1598,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10153", + "task_display": "新剧情文本10153", "npc": [ "scenes_ boundary_02", "冰霜杰克组件名" ], "getafter_event": [ - "2", - "10055" + 2, + 10055 ], "completetask": 0, "auto_accept": 1, @@ -1622,15 +1627,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10154", + "task_display": "新剧情文本10154", "npc": [ "scenes_ boundary_02", "原始人岛地图组件名" ], "getafter_event": [ - "2", - "10056" + 2, + 10056 ], "completetask": 0, "auto_accept": 1, @@ -1651,15 +1656,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10155", + "task_display": "新剧情文本10155", "npc": [ "scenes_ boundary_02", "原始人岛地图组件名" ], "getafter_event": [ - "2", - "10057" + 2, + 10057 ], "completetask": 0, "auto_accept": 1, @@ -1680,15 +1685,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10156", + "task_display": "新剧情文本10156", "npc": [ "scenes_ boundary_02", "杰克地图组件名" ], "getafter_event": [ - "2", - "10058" + 2, + 10058 ], "completetask": 0, "auto_accept": 1, @@ -1709,15 +1714,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10157", + "task_display": "新剧情文本10157", "npc": [ "scenes_ boundary_02", "杰克组件名" ], "getafter_event": [ - "2", - "10059" + 2, + 10059 ], "completetask": 0, "auto_accept": 1, @@ -1738,15 +1743,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10158", + "task_display": "新剧情文本10158", "npc": [ "scenes_ boundary_02", "原始人岛地图组件名" ], "getafter_event": [ - "2", - "10060" + 2, + 10060 ], "completetask": 0, "auto_accept": 1, @@ -1767,15 +1772,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10159", + "task_display": "新剧情文本10159", "npc": [ "scenes_ boundary_02", "瓜哥组件名" ], "getafter_event": [ - "2", - "10061" + 2, + 10061 ], "completetask": 0, "auto_accept": 1, @@ -1796,15 +1801,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10160", + "task_display": "新剧情文本10160", "npc": [ "scenes_ boundary_02", "瓜哥组件名" ], "getafter_event": [ - "2", - "10062" + 2, + 10062 ], "completetask": 0, "auto_accept": 1, @@ -1825,15 +1830,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10161", + "task_display": "新剧情文本10161", "npc": [ "scenes_ boundary_02", "原始人岛地图组件名" ], "getafter_event": [ - "2", - "10063" + 2, + 10063 ], "completetask": 0, "auto_accept": 1, @@ -1854,15 +1859,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10162", + "task_display": "新剧情文本10162", "npc": [ "scenes_ boundary_02", "原始人岛地图组件名" ], "getafter_event": [ - "2", - "10064" + 2, + 10064 ], "completetask": 0, "auto_accept": 1, @@ -1883,15 +1888,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10163", + "task_display": "新剧情文本10163", "npc": [ "scenes_ boundary_02", "原始人岛地图组件名" ], "getafter_event": [ - "2", - "10065" + 2, + 10065 ], "completetask": 0, "auto_accept": 1, @@ -1912,15 +1917,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10164", + "task_display": "新剧情文本10164", "npc": [ "scenes_ boundary_02", "作战部地图组件名" ], "getafter_event": [ - "2", - "10066" + 2, + 10066 ], "completetask": 0, "auto_accept": 1, @@ -1941,15 +1946,15 @@ "group": 1, "des": 2, "icon": "", - "task_name": "新剧情", - "task_display": "新剧情文本", + "task_name": "新剧情10165", + "task_display": "新剧情文本10165", "npc": [ "scenes_ boundary_03", "布兰奇组件名" ], "getafter_event": [ - "2", - "10067" + 2, + 10067 ], "completetask": 0, "auto_accept": 1, diff --git a/cmd/v2/ui/views/worldtask_mine.go b/cmd/v2/ui/views/worldtask_mine.go index e3fb6c3bb..105c5fde9 100644 --- a/cmd/v2/ui/views/worldtask_mine.go +++ b/cmd/v2/ui/views/worldtask_mine.go @@ -32,6 +32,7 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject { this.itemList.ItemList = this.itemList.CreateList() this.mineReq = func() { + this.itemList.Reset() if err := service.GetPttService().SendToClient( t.MainType, worldtask.WorldtaskSubtypeMine, @@ -71,14 +72,45 @@ func (this *WorldtaskMineView) CreateView(t *model.TestCase) fyne.CanvasObject { logrus.Error(err) } dconf.Hide() - this.mineReq() + // this.mineReq() } form.SubmitText = "确定" dconf.Resize(fyne.NewSize(400, 200)) dconf.Show() }) - barBtn := container.NewHBox(refreshBtn, this.juqingBtn) + // 战斗完成 + battleBtn := widget.NewButton("战斗完成", func() { + confId := widget.NewEntry() + confId.PlaceHolder = "战斗配置ID" + taskIdEntry := widget.NewEntry() + taskIdEntry.PlaceHolder = "任务ID" + form := widget.NewForm( + widget.NewFormItem("战斗配置ID", confId), + widget.NewFormItem("任务ID", taskIdEntry), + ) + + dconf := dialog.NewCustom("接取任务", "关闭", form, this.w) + + form.OnSubmit = func() { + if err := service.GetPttService().SendToClient( + t.MainType, + worldtask.WorldtaskBattleFinish, + &pb.WorldtaskBattleFinishReq{ + BattleConfId: cast.ToInt32(confId.Text), + TaskId: cast.ToInt32(taskIdEntry.Text), + Report: &pb.BattleReport{}, + }); err != nil { + logrus.Error(err) + } + dconf.Hide() + this.mineReq() + } + form.SubmitText = "确定" + dconf.Resize(fyne.NewSize(400, 200)) + dconf.Show() + }) + barBtn := container.NewHBox(refreshBtn, this.juqingBtn, battleBtn) c := container.NewBorder(barBtn, nil, nil, nil, this.itemList.ItemList) this.mineData() diff --git a/comm/const.go b/comm/const.go index 5e310ee75..e8e448768 100644 --- a/comm/const.go +++ b/comm/const.go @@ -397,8 +397,7 @@ const ( Rtype68 TaskType = 68 //任意渠道消耗xx金币 Rtype69 TaskType = 69 //与其他玩家切磋xx次 Rtype70 TaskType = 70 //通关世界任务XX关卡 - Rtype71 TaskType = 71 //主角等级达到X级 - Rtype72 TaskType = 72 //完成一次捏人 + Rtype71 TaskType = 71 //完成一次捏人 ) const ( diff --git a/comm/imodule.go b/comm/imodule.go index c2e7cdea3..24be2b0da 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -253,6 +253,8 @@ type ( // 世界任务 IWorldtask interface { // 任务条件达成通知 - TaskcondNotify(uid string, condId int32) error + TaskcondNotify(session IUserSession, condId int32) error + // bingo任务 + BingoJumpTask(session IUserSession, groupId, rtaskId int32) error } ) diff --git a/modules/rtask/module.go b/modules/rtask/module.go index aac1c875f..2af1d3a5b 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -165,7 +165,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() { comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38, comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53, comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60, - comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72: + comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype71: this.registerVerifyHandle(v.Id, &rtaskCondi{ cfg: typeCfg, find: this.modelRtaskRecord.lessEqualFirstParam, @@ -286,7 +286,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T module, err := this.service.GetModule(comm.ModuleWorldtask) if err == nil { if worldtask, ok := module.(comm.IWorldtask); ok { - if err := worldtask.TaskcondNotify(uid, v.cfg.Id); err != nil { + if err := worldtask.TaskcondNotify(session, v.cfg.Id); err != nil { log.Errorf("任务条件达成通知 失败 err:%v", err) } } diff --git a/modules/worldtask/api_battlefinish.go b/modules/worldtask/api_battlefinish.go index 87b118b9f..b89413ace 100644 --- a/modules/worldtask/api_battlefinish.go +++ b/modules/worldtask/api_battlefinish.go @@ -9,7 +9,7 @@ import ( // 战斗结束的请求 func (this *apiComp) BattlefinishCheck(session comm.IUserSession, req *pb.WorldtaskBattleFinishReq) (code pb.ErrorCode) { - if req.TaskId == 0 || req.Report == nil { + if req.BattleConfId == 0 || req.TaskId == 0 || req.Report == nil { code = pb.ErrorCode_ReqParameterError } return @@ -40,7 +40,7 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa // var isWin bool if code, _ = ibattle.CheckBattleReport(session, req.Report); code == pb.ErrorCode_Success { //触发任务 - this.module.ModuleRtask.SendToRtask(session, comm.Rtype70, 1, taskConf.Completetask) + go this.module.ModuleRtask.SendToRtask(session, comm.Rtype70, 1, req.BattleConfId) } } diff --git a/modules/worldtask/api_finish.go b/modules/worldtask/api_finish.go index d24729e23..7d4ca7947 100644 --- a/modules/worldtask/api_finish.go +++ b/modules/worldtask/api_finish.go @@ -36,7 +36,11 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe code = pb.ErrorCode_ConfigNoFound return } - rsp := &pb.WorldtaskFinishResp{} + + if curTaskConf.Group != req.GroupId { + code = pb.ErrorCode_ReqParameterError + return + } // 判断玩家等级要求 if user.Lv < curTaskConf.Lock { @@ -54,9 +58,14 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe userTask.Uid = uid } + // 前置任务ID + if !this.module.modelWorldtask.IsPreFinished(userTask, curTaskConf) { + code = pb.ErrorCode_WorldtaskLastUnFinished + return + } + //判断任务是否已完成 for _, t := range userTask.TaskList { - // TODO 上个任务是否完成 if t.TaskId == req.TaskId && t.Status == 1 { code = pb.ErrorCode_WorldtaskFinihed return @@ -66,6 +75,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe if curTaskConf.Completetask != 0 { if code = this.module.ModuleRtask.CheckCondi(uid, curTaskConf.Completetask); code != pb.ErrorCode_Success { code = pb.ErrorCode_WorldtaskNoComplete + this.module.Debugf("任务条件:%v 未完成", curTaskConf.Completetask) return } } @@ -76,20 +86,26 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe return } - // 任务完成推送 - if err := this.module.SendMsgToUser(string(this.module.GetType()), WorldtaskNexttaskPush, &pb.WorldtaskNexttaskPush{ - NextTaskId: curTaskConf.IdAfter, - }, uid); err != nil { - this.module.Errorf("WorldtaskNexttaskPush err:%v", err) - } - // 发奖 if code = this.module.DispenseRes(session, curTaskConf.Reword, true); code != pb.ErrorCode_Success { this.module.Errorf("资源发放失败 err:%v", err) } + rsp := &pb.WorldtaskFinishResp{ + GroupId: req.GroupId, + TaskId: req.TaskId, + } + if err := session.SendMsg(string(this.module.GetType()), WorldtaskSubtypeFinish, rsp); err != nil { code = pb.ErrorCode_SystemError } + + // 任务完成推送 + if err := session.SendMsg(string(this.module.GetType()), WorldtaskNexttaskPush, &pb.WorldtaskNexttaskPush{ + NextTaskId: curTaskConf.IdAfter, + }); err != nil { + code = pb.ErrorCode_SystemError + } + return } diff --git a/modules/worldtask/model_worldtask.go b/modules/worldtask/model_worldtask.go index 5f5e6f81b..1cdda316c 100644 --- a/modules/worldtask/model_worldtask.go +++ b/modules/worldtask/model_worldtask.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "go.mongodb.org/mongo-driver/mongo" ) @@ -13,15 +14,18 @@ import ( type ModelWorldtask struct { modules.MCompModel moduleWorldtask *Worldtask + service core.IService } func (this *ModelWorldtask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { err = this.MCompModel.Init(service, module, comp, options) this.TableName = comm.TableWorldtask this.moduleWorldtask = module.(*Worldtask) + this.service = service return } +// 获取玩家世界任务 func (this *ModelWorldtask) getWorldtask(uid string) (*pb.DBWorldtask, error) { d := &pb.DBWorldtask{} if err := this.Get(uid, d); err != nil { @@ -32,13 +36,25 @@ func (this *ModelWorldtask) getWorldtask(uid string) (*pb.DBWorldtask, error) { return d, nil } -// 接取任务 -func (this *ModelWorldtask) acceptTask(groupId, taskId int32, task *pb.DBWorldtask) error { - if task == nil { - return errors.New("worldtask is nil") +//判断前置任务是否完成 +func(this *ModelWorldtask) IsPreFinished(userTask *pb.DBWorldtask, curTaskConf *cfg.GameWorldTaskData)bool{ + var ( + lastTaskId int32 + preTaskFinished bool + ) + if curTaskConf.Ontxe == 0 { + preTaskFinished = true + } else { + lastTaskId = curTaskConf.Ontxe } - return nil + for _, t := range userTask.TaskList { + if lastTaskId == t.TaskId && t.Status == 1 { + preTaskFinished = true + } + } + + return preTaskFinished } // 完成任务 @@ -57,7 +73,7 @@ func (this *ModelWorldtask) finishTask(groupId, taskId int32, task *pb.DBWorldta Status: 1, //完成 }) task.LastTaskIds[groupId] = taskId - + update["taskList"] = task.TaskList update["lastTaskIds"] = task.LastTaskIds return this.Change(task.Uid, update) diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index fe3b131a4..240f56b24 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -25,6 +25,7 @@ func NewModule() core.IModule { } func (this *Worldtask) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) + this.service = service.(base.IRPCXService) return } @@ -40,7 +41,8 @@ func (this *Worldtask) GetType() core.M_Modules { } // 任务条件达成通知 -func (this *Worldtask) TaskcondNotify(uid string, condId int32) error { +func (this *Worldtask) TaskcondNotify(session comm.IUserSession, condId int32) error { + uid := session.GetUserId() //下一个任务ID var nextTaskId int32 // 获取用户信息 @@ -49,38 +51,65 @@ func (this *Worldtask) TaskcondNotify(uid string, condId int32) error { return fmt.Errorf("玩家uid:%v not found", uid) } + // 玩家世界任务 userTask, err := this.modelWorldtask.getWorldtask(uid) if err != nil { return err } if userTask.Uid != "" { - for _, id := range userTask.LastTaskIds { + //查找任务ID根据condId 可能会找出不同的任务 + // 遍历配置表 + conf, err := this.configure.getWorldtaskCfg() + if err != nil || conf == nil { + return err + } + + finishedTaskIds := make(map[int32]int32) //达成的任务条件 + for _, c := range conf.GetDataList() { + if c.Completetask == condId && c.Completetask != 0 { + finishedTaskIds[c.Group] = c.Key + } + } + + for k, id := range finishedTaskIds { taskConf, err := this.configure.getWorldtaskById(id) if err != nil { return err } if taskConf != nil { + if !this.modelWorldtask.IsPreFinished(userTask, taskConf) { + return nil + } if taskConf.AutoAccept == 1 { //自动截取,返回下一个任务 nextTaskId = taskConf.IdAfter - if nextTaskId == 0 { - this.Debug("已经是最后一个任务了") - return nil + + // 判断玩家等级要求 + if user.Lv < taskConf.Lock { + return fmt.Errorf("等级不满足 uid:%v 要求lv:%v", uid, taskConf.Lock) } - nexttaskConf, err := this.configure.getWorldtaskById(nextTaskId) - if err != nil { + + //完成任务 + if err := this.modelWorldtask.finishTask(k, id, userTask); err != nil { + this.Errorf("世界任务完成失败 err:%v", err) return err } - // 判断玩家等级要求 - if user.Lv < nexttaskConf.Lock { - return fmt.Errorf("等级不满足 uid:%v 要求lv:%v", uid, nexttaskConf.Lock) + + //发奖 + if code := this.DispenseRes(session, taskConf.Reword, true); code != pb.ErrorCode_Success { + this.Errorf("资源发放失败 err:%v", err) } - //推送 - if err := this.SendMsgToUser(string(this.GetType()), "nexttask", &pb.WorldtaskNexttaskPush{ - NextTaskId: nextTaskId, - }, uid); err != nil { - log.Errorf("任务条件达成推送失败 err:%v", err) + + if nextTaskId != 0 { + if err := session.SendMsg(string(this.GetType()), "nexttask", &pb.WorldtaskNexttaskPush{ + NextTaskId: nextTaskId, + }); err != nil { + log.Errorf("任务条件达成推送失败 err:%v", err) + } + } else { + this.Debugf("已经是最后一个任务了 taskId:%v", taskConf.Key) } + } } } @@ -89,3 +118,9 @@ func (this *Worldtask) TaskcondNotify(uid string, condId int32) error { return nil } + +// bingo世界任务跳跃 支持回退 +func (this *Worldtask) BingoJumpTask(session comm.IUserSession, groupId, rtaskId int32) error { + // d, err := this.modelWorldtask.getWorldtask(session.GetUserId()) + return nil +} diff --git a/pb/worldtask_msg.pb.go b/pb/worldtask_msg.pb.go index fdb5b228c..ce40485c2 100644 --- a/pb/worldtask_msg.pb.go +++ b/pb/worldtask_msg.pb.go @@ -382,8 +382,9 @@ type WorldtaskBattleFinishReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"` //任务ID - Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报 + TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"` //任务ID + BattleConfId int32 `protobuf:"varint,2,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID + Report *BattleReport `protobuf:"bytes,3,opt,name=report,proto3" json:"report"` //战报 } func (x *WorldtaskBattleFinishReq) Reset() { @@ -425,6 +426,13 @@ func (x *WorldtaskBattleFinishReq) GetTaskId() int32 { return 0 } +func (x *WorldtaskBattleFinishReq) GetBattleConfId() int32 { + if x != nil { + return x.BattleConfId + } + return 0 +} + func (x *WorldtaskBattleFinishReq) GetReport() *BattleReport { if x != nil { return x.Report @@ -479,6 +487,101 @@ func (x *WorldtaskBattleFinishResp) GetTaskId() int32 { return 0 } +// 当前完成的任务列表推送 +type WorldtaskList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskId []int32 `protobuf:"varint,1,rep,packed,name=taskId,proto3" json:"taskId"` //任务ID +} + +func (x *WorldtaskList) Reset() { + *x = WorldtaskList{} + if protoimpl.UnsafeEnabled { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldtaskList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldtaskList) ProtoMessage() {} + +func (x *WorldtaskList) ProtoReflect() protoreflect.Message { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorldtaskList.ProtoReflect.Descriptor instead. +func (*WorldtaskList) Descriptor() ([]byte, []int) { + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{9} +} + +func (x *WorldtaskList) GetTaskId() []int32 { + if x != nil { + return x.TaskId + } + return nil +} + +type WorldtaskFinishIdsPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tasks map[int32]*WorldtaskList `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //完成的任务 key:groupId val:任务ID +} + +func (x *WorldtaskFinishIdsPush) Reset() { + *x = WorldtaskFinishIdsPush{} + if protoimpl.UnsafeEnabled { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorldtaskFinishIdsPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorldtaskFinishIdsPush) ProtoMessage() {} + +func (x *WorldtaskFinishIdsPush) ProtoReflect() protoreflect.Message { + mi := &file_worldtask_worldtask_msg_proto_msgTypes[10] + 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 WorldtaskFinishIdsPush.ProtoReflect.Descriptor instead. +func (*WorldtaskFinishIdsPush) Descriptor() ([]byte, []int) { + return file_worldtask_worldtask_msg_proto_rawDescGZIP(), []int{10} +} + +func (x *WorldtaskFinishIdsPush) GetTasks() map[int32]*WorldtaskList { + if x != nil { + return x.Tasks + } + return nil +} + var File_worldtask_worldtask_msg_proto protoreflect.FileDescriptor var file_worldtask_worldtask_msg_proto_rawDesc = []byte{ @@ -515,17 +618,32 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{ 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x59, 0x0a, 0x18, 0x57, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x7d, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, - 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x33, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, - 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x33, 0x0a, 0x19, 0x57, 0x6f, + 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, + 0x27, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, + 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x9c, 0x01, 0x0a, 0x16, 0x57, 0x6f, 0x72, + 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, + 0x75, 0x73, 0x68, 0x12, 0x38, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x48, 0x0a, + 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x57, + 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -540,7 +658,7 @@ func file_worldtask_worldtask_msg_proto_rawDescGZIP() []byte { return file_worldtask_worldtask_msg_proto_rawDescData } -var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_worldtask_worldtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{ (*WorldtaskMineReq)(nil), // 0: WorldtaskMineReq (*WorldtaskMineResp)(nil), // 1: WorldtaskMineResp @@ -551,19 +669,24 @@ var file_worldtask_worldtask_msg_proto_goTypes = []interface{}{ (*WorldtaskBattleStartResp)(nil), // 6: WorldtaskBattleStartResp (*WorldtaskBattleFinishReq)(nil), // 7: WorldtaskBattleFinishReq (*WorldtaskBattleFinishResp)(nil), // 8: WorldtaskBattleFinishResp - (*DBWorldtask)(nil), // 9: DBWorldtask - (*BattleInfo)(nil), // 10: BattleInfo - (*BattleReport)(nil), // 11: BattleReport + (*WorldtaskList)(nil), // 9: WorldtaskList + (*WorldtaskFinishIdsPush)(nil), // 10: WorldtaskFinishIdsPush + nil, // 11: WorldtaskFinishIdsPush.TasksEntry + (*DBWorldtask)(nil), // 12: DBWorldtask + (*BattleInfo)(nil), // 13: BattleInfo + (*BattleReport)(nil), // 14: BattleReport } var file_worldtask_worldtask_msg_proto_depIdxs = []int32{ - 9, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask - 10, // 1: WorldtaskBattleStartResp.info:type_name -> BattleInfo - 11, // 2: WorldtaskBattleFinishReq.report:type_name -> BattleReport - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 12, // 0: WorldtaskMineResp.task:type_name -> DBWorldtask + 13, // 1: WorldtaskBattleStartResp.info:type_name -> BattleInfo + 14, // 2: WorldtaskBattleFinishReq.report:type_name -> BattleReport + 11, // 3: WorldtaskFinishIdsPush.tasks:type_name -> WorldtaskFinishIdsPush.TasksEntry + 9, // 4: WorldtaskFinishIdsPush.TasksEntry.value:type_name -> WorldtaskList + 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 } func init() { file_worldtask_worldtask_msg_proto_init() } @@ -682,6 +805,30 @@ func file_worldtask_worldtask_msg_proto_init() { return nil } } + file_worldtask_worldtask_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorldtaskList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_worldtask_worldtask_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorldtaskFinishIdsPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -689,7 +836,7 @@ func file_worldtask_worldtask_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_worldtask_worldtask_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.WorldTaskData.go b/sys/configure/structs/Game.WorldTaskData.go index 330bc4e8f..e92b469cb 100644 --- a/sys/configure/structs/Game.WorldTaskData.go +++ b/sys/configure/structs/Game.WorldTaskData.go @@ -21,7 +21,7 @@ type GameWorldTaskData struct { TaskName string TaskDisplay string Npc []string - GetafterEvent []string + GetafterEvent []int32 Completetask int32 AutoAccept int32 Overtips int32 @@ -63,11 +63,11 @@ func (_v *GameWorldTaskData)Deserialize(_buf map[string]interface{}) (err error) var _ok_ bool if _arr_, _ok_ = _buf["getafter_event"].([]interface{}); !_ok_ { err = errors.New("getafter_event error"); return } - _v.GetafterEvent = make([]string, 0, len(_arr_)) + _v.GetafterEvent = make([]int32, 0, len(_arr_)) for _, _e_ := range _arr_ { - var _list_v_ string - { if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } } + 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.GetafterEvent = append(_v.GetafterEvent, _list_v_) } }