This commit is contained in:
liwei1dao 2022-11-28 13:59:05 +08:00
commit 6d38ab1255
25 changed files with 2033 additions and 386 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10100",
"task_display": "新剧情文本10100",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -42,11 +40,9 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10101",
"task_display": "新剧情文本10101",
"npc": [
"scenes_ boundary_01",
"邦尼兔组件名入场",
"邦尼兔组件名",
"150"
],
"getafter_event": [
@ -66,8 +62,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10102",
"task_display": "新剧情文本10102",
"npc": [
"dreamwork_restaurant_01",
"波比组件名",
@ -90,8 +84,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10103",
"task_display": "新剧情文本10103",
"npc": [
"dreamwork_restaurant_01",
"波比组件名",
@ -114,8 +106,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10104",
"task_display": "新剧情文本10104",
"npc": [
"dreamwork_restaurant_01",
"波比组件名",
@ -149,8 +139,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10105",
"task_display": "新剧情文本10105",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -173,8 +161,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10106",
"task_display": "新剧情文本10106",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -197,8 +183,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10107",
"task_display": "新剧情文本10107",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -221,8 +205,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10108",
"task_display": "新剧情文本10108",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -245,8 +227,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10109",
"task_display": "新剧情文本10109",
"npc": [
"scenes_ boundary_01",
"戈伯组件名",
@ -269,8 +249,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10110",
"task_display": "新剧情文本10110",
"npc": [
"SmithyScene",
"戈伯铁匠铺组件名",
@ -293,8 +271,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10111",
"task_display": "新剧情文本10111",
"npc": [
"scenes_ boundary_01",
"阿宝铁匠铺出来模型",
@ -317,8 +293,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10112",
"task_display": "新剧情文本10112",
"npc": [
"scenes_ boundary_01",
"瓜哥组件名",
@ -341,8 +315,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10113",
"task_display": "新剧情文本10113",
"npc": [
"test_library",
"贫嘴驴组件名",
@ -365,8 +337,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10114",
"task_display": "新剧情文本10114",
"npc": [
"test_library",
"贫嘴驴组件名",
@ -389,8 +359,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10115",
"task_display": "新剧情文本10115",
"npc": [
"scenes_boundary_02night",
"瓜哥夜晚组件名",
@ -413,8 +381,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10116",
"task_display": "新剧情文本10116",
"npc": [
"scenes_boundary_02night",
"杰克",
@ -437,8 +403,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10117",
"task_display": "新剧情文本10117",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -461,8 +425,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10118",
"task_display": "新剧情文本10118",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -485,8 +447,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10119",
"task_display": "新剧情文本10119",
"npc": [
"scenes_ boundary_01",
"瓜哥维京区",
@ -509,8 +469,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10120",
"task_display": "新剧情文本10120",
"npc": [
"scenes_ boundary_01",
"瓜哥维京区",
@ -533,8 +491,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10121",
"task_display": "新剧情文本10121",
"npc": [
"scenes_ boundary_01",
"瓜哥维京区",
@ -557,8 +513,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10122",
"task_display": "新剧情文本10122",
"npc": [
"scenes_ boundary_01",
"瓜哥维京区",
@ -581,8 +535,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10123",
"task_display": "新剧情文本10123",
"npc": [
"scenes_ boundary_01",
"瓜哥维京区",
@ -605,8 +557,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10124",
"task_display": "新剧情文本10124",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -629,8 +579,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10125",
"task_display": "新剧情文本10125",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -653,8 +601,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10126",
"task_display": "新剧情文本10126",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -677,8 +623,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10127",
"task_display": "新剧情文本10127",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -701,8 +645,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10128",
"task_display": "新剧情文本10128",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -725,8 +667,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10129",
"task_display": "新剧情文本10129",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -749,8 +689,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10130",
"task_display": "新剧情文本10130",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -773,8 +711,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10131",
"task_display": "新剧情文本10131",
"npc": [
"scenes_ boundary_01",
"瓜哥维京区",
@ -797,8 +733,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10132",
"task_display": "新剧情文本10132",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -821,8 +755,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10133",
"task_display": "新剧情文本10133",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -845,8 +777,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10134",
"task_display": "新剧情文本10134",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -869,8 +799,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10135",
"task_display": "新剧情文本10135",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -893,8 +821,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10136",
"task_display": "新剧情文本10136",
"npc": [
"scenes_ boundary_01",
"瓜哥现代区",
@ -917,8 +843,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10137",
"task_display": "新剧情文本10137",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -941,8 +865,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10138",
"task_display": "新剧情文本10138",
"npc": [
"WuGuanScene",
"武馆瓜哥",
@ -965,8 +887,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10139",
"task_display": "新剧情文本10139",
"npc": [
"scenes_ boundary_01",
"瓜哥现代区",
@ -989,8 +909,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10140",
"task_display": "新剧情文本10140",
"npc": [
"scenes_ boundary_01",
"瓜哥现代区",
@ -1013,8 +931,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10141",
"task_display": "新剧情文本10141",
"npc": [
"scenes_ boundary_01",
"瓜哥现代区",
@ -1037,8 +953,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10142",
"task_display": "新剧情文本10142",
"npc": [
"scenes_ boundary_01",
"瓜哥现代区",
@ -1061,8 +975,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10143",
"task_display": "新剧情文本10143",
"npc": [
"scenes_ boundary_01",
"瓜哥现代区",
@ -1085,8 +997,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10144",
"task_display": "新剧情文本10144",
"npc": [
"scenes_ boundary_01",
"瓜哥现代区",
@ -1109,8 +1019,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10145",
"task_display": "新剧情文本10145",
"npc": [
"scenes_ boundary_01",
"瓜哥现代区",
@ -1133,8 +1041,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10146",
"task_display": "新剧情文本10146",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -1157,8 +1063,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10147",
"task_display": "新剧情文本10147",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -1181,8 +1085,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10148",
"task_display": "新剧情文本10148",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -1205,8 +1107,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10149",
"task_display": "新剧情文本10149",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -1229,8 +1129,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10150",
"task_display": "新剧情文本10150",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -1253,8 +1151,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10151",
"task_display": "新剧情文本10151",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -1277,8 +1173,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10152",
"task_display": "新剧情文本10152",
"npc": [
"scenes_ boundary_01",
"杰克",
@ -1301,8 +1195,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10153",
"task_display": "新剧情文本10153",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1325,8 +1217,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10154",
"task_display": "新剧情文本10154",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1349,8 +1239,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10155",
"task_display": "新剧情文本10155",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1373,8 +1261,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10156",
"task_display": "新剧情文本10156",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1397,8 +1283,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10157",
"task_display": "新剧情文本10157",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1421,8 +1305,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10158",
"task_display": "新剧情文本10158",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1445,8 +1327,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10159",
"task_display": "新剧情文本10159",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1469,8 +1349,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10160",
"task_display": "新剧情文本10160",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1493,8 +1371,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10161",
"task_display": "新剧情文本10161",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1517,8 +1393,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10162",
"task_display": "新剧情文本10162",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1541,8 +1415,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10163",
"task_display": "新剧情文本10163",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1565,8 +1437,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10164",
"task_display": "新剧情文本10164",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1589,8 +1459,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情10165",
"task_display": "新剧情文本10165",
"npc": [
"scenes_martialarts_01",
"武馆杰克 ",
@ -1613,8 +1481,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10100",
"task_display": "新剧情文本10100",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -1648,8 +1514,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10101",
"task_display": "新剧情文本10101",
"npc": [
"scenes_ boundary_01",
"邦尼兔组件名",
@ -1678,8 +1542,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10102",
"task_display": "新剧情文本10102",
"npc": [
"dreamwork_restaurant_01",
"波比组件名",
@ -1708,8 +1570,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10103",
"task_display": "新剧情文本10103",
"npc": [
"dreamwork_restaurant_01",
"阿宝组件名",
@ -1738,8 +1598,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10104",
"task_display": "新剧情文本10104",
"npc": [
"dreamwork_restaurant_01",
"波比组件名",
@ -1773,8 +1631,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10105",
"task_display": "新剧情文本10105",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -1803,8 +1659,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10106",
"task_display": "新剧情文本10106",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -1833,8 +1687,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10107",
"task_display": "新剧情文本10107",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -1863,8 +1715,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10108",
"task_display": "新剧情文本10108",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -1893,8 +1743,6 @@
"group": 10001,
"des": 3,
"icon": "",
"task_name": "新剧情10109",
"task_display": "新剧情文本10109",
"npc": [
"scenes_ boundary_01",
"戈伯组件名",
@ -1923,8 +1771,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10100",
"task_display": "新剧情文本10100",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -1958,8 +1804,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10101",
"task_display": "新剧情文本10101",
"npc": [
"scenes_ boundary_01",
"邦尼兔组件名",
@ -1988,8 +1832,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10102",
"task_display": "新剧情文本10102",
"npc": [
"dreamwork_restaurant_01",
"波比组件名",
@ -2018,8 +1860,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10103",
"task_display": "新剧情文本10103",
"npc": [
"dreamwork_restaurant_01",
"阿宝组件名",
@ -2048,8 +1888,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10104",
"task_display": "新剧情文本10104",
"npc": [
"dreamwork_restaurant_01",
"波比组件名",
@ -2083,8 +1921,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10105",
"task_display": "新剧情文本10105",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -2113,8 +1949,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10106",
"task_display": "新剧情文本10106",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -2143,8 +1977,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10107",
"task_display": "新剧情文本10107",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -2173,8 +2005,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10108",
"task_display": "新剧情文本10108",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -2203,8 +2033,6 @@
"group": 10002,
"des": 3,
"icon": "",
"task_name": "新剧情10109",
"task_display": "新剧情文本10109",
"npc": [
"scenes_ boundary_01",
"戈伯组件名",
@ -2233,8 +2061,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20100",
"task_display": "新剧情文本20100",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -2263,8 +2089,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20101",
"task_display": "新剧情文本20101",
"npc": [
"scenes_ boundary_01",
"邦尼兔组件名",
@ -2293,8 +2117,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20102",
"task_display": "新剧情文本20102",
"npc": [
"scenes_ boundary_01",
"阿宝右屏组件名",
@ -2323,8 +2145,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20103",
"task_display": "新剧情文本20103",
"npc": [
"scenes_ boundary_01",
"阿宝右屏组件名",
@ -2353,8 +2173,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20104",
"task_display": "新剧情文本20104",
"npc": [
"scenes_ boundary_01",
"阿宝右屏组件名",
@ -2383,8 +2201,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20105",
"task_display": "新剧情文本20105",
"npc": [
"scenes_ boundary_01",
"阿宝右屏组件名",
@ -2413,8 +2229,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20106",
"task_display": "新剧情文本20106",
"npc": [
"scenes_ boundary_01",
"邦尼兔组件名",
@ -2443,8 +2257,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20107",
"task_display": "新剧情文本20107",
"npc": [
"scenes_ boundary_01",
"阿宝维京区",
@ -2473,8 +2285,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20108",
"task_display": "新剧情文本20108",
"npc": [
"scenes_ boundary_01",
"阿宝维京区",
@ -2503,8 +2313,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20109",
"task_display": "新剧情文本20109",
"npc": [
"scenes_ boundary_01",
"邦尼兔组件名",
@ -2533,8 +2341,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20110",
"task_display": "新剧情文本20110",
"npc": [
"scenes_ boundary_01",
"阿宝组件名",
@ -2563,8 +2369,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20111",
"task_display": "新剧情文本20111",
"npc": [
"scenes_ boundary_01",
"阿宝右屏组件名",
@ -2593,8 +2397,6 @@
"group": 1,
"des": 2,
"icon": "",
"task_name": "新剧情20112",
"task_display": "新剧情文本20112",
"npc": [
"scenes_ boundary_01",
"阿宝右屏组件名",

View File

@ -1,22 +1,35 @@
package formview
import (
"fmt"
"go_dreamfactory/cmd/v2/lib/common"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/cmd/v2/service/observer"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"strings"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"
)
type ReddotView struct {
reddotList func()
BaseformView
itemList *common.ItemList
flag bool
}
func (this *ReddotView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.itemList = common.NewItemList()
this.itemList.ItemList = this.itemList.CreateList()
reddotTypeEntry := widget.NewEntry()
this.form.AppendItem(widget.NewFormItem("红点类型", reddotTypeEntry))
@ -33,5 +46,51 @@ func (this *ReddotView) CreateView(t *model.TestCase) fyne.CanvasObject {
logrus.Error(err)
}
}
return this.form
this.reddotList = func() {
if err := service.GetPttService().SendToClient(
string(comm.ModuleReddot),
"getall",
&pb.ReddotGetAllReq{}); err != nil {
logrus.Error(err)
}
}
defer this.reddotList()
refreshBtn := widget.NewButtonWithIcon("", theme.ViewRefreshIcon(), func() {
this.itemList.Reset()
this.reddotList()
})
this.dataListener()
buttonBar := container.NewHBox(refreshBtn)
c := container.NewBorder(buttonBar, this.form, nil, nil, this.itemList.ItemList)
return c
}
func (this *ReddotView) dataListener() {
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string(comm.ModuleReddot) &&
data.SubType == "getall") {
return
}
rsp := &pb.ReddotGetAllResp{}
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
}
for k, v := range rsp.Reddot {
item := common.Item{
Id: cast.ToString(k),
Text: fmt.Sprintf("%v - %v", k, v),
}
this.itemList.AddItem(item)
}
},
})
}

View File

@ -195,7 +195,7 @@ type (
//推送消息到用户
SendUserChat(msg *pb.DBChat) (code pb.ErrorCode)
//广播系统消息
SendSysChatToWorld(ctype ChatSystemType, appenddata interface{}, value int32, agrs ...interface{}) (code pb.ErrorCode)
SendSysChatToWorld(ctype ChatSystemType, appenddata interface{}, value int32, agrs ...string) (code pb.ErrorCode)
//广播系统消息
SendSysChatToUser(session IUserSession, ctype ChatSystemType, value int32, agrs ...interface{}) (code pb.ErrorCode)
}

View File

@ -217,19 +217,21 @@ func (this *Chat) SendUserChat(msg *pb.DBChat) (code pb.ErrorCode) {
}
//广播系统消息
func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata interface{}, value int32, agrs ...interface{}) (code pb.ErrorCode) {
func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata interface{}, value int32, agrs ...string) (code pb.ErrorCode) {
var (
jsonStr []byte
err error
)
if st, ok := this.configure.GetCheckChatSystem(int32(ctype), value); ok {
msg := &pb.DBChat{
Channel: pb.ChatChannel_System,
Ctype: pb.ChatType_Text,
Stag: this.service.GetTag(),
Ctime: configure.Now().Unix(),
Content: fmt.Sprintf(st.Text, agrs...),
Display: st.Display,
Channel: pb.ChatChannel_System,
Ctype: pb.ChatType_Text,
Stag: this.service.GetTag(),
Ctime: configure.Now().Unix(),
Content: "",
Display: st.Display,
AppendInt: int64(st.Key),
AppendStrs: agrs,
}
if ctype == comm.EquipmentUpgradeNotice { //装备分享
msg.Ctype = pb.ChatType_Share
@ -238,8 +240,8 @@ func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata inter
this.Errorf("err:%v", err)
} else {
data := map[string]interface{}{
agrs[1].(string): map[string]interface{}{
"key": agrs[1].(string),
agrs[1]: map[string]interface{}{
"key": agrs[1],
"appendStr": string(jsonStr),
"itemType": pb.ChatType_EquipmentShare,
},

View File

@ -2,7 +2,6 @@ package equipment
import (
"crypto/rand"
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
@ -190,7 +189,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
if user = this.module.ModuleUser.GetUser(session.GetUserId()); user != nil {
// var color *cfg.GameGameColorData
// if color, err = this.module.configure.GetColor(conf.Color); err == nil {
this.module.chat.SendSysChatToWorld(comm.EquipmentUpgradeNotice, equipment, equipment.Lv, user.Name, fmt.Sprintf("[%s]", conf.Name))
this.module.chat.SendSysChatToWorld(comm.EquipmentUpgradeNotice, equipment, equipment.Lv, user.Name, conf.Id)
// } else {
// this.module.Errorf("GetColor err:%s", err.Error())
// }

View File

@ -28,11 +28,31 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.LibraryGetRewa
code = pb.ErrorCode_LibraryNoData
return
}
// fetterlv check
var minLv int32
conf := this.module.configure.GetLibraryFetter(fetter.Fid, req.Fetterlv)
if conf == nil {
code = pb.ErrorCode_ConfigNoFound
}
for _, v := range conf.Hid { // 获取羁绊等级
_d := this.module.modelFetter.GetFetterByHeroId(session.GetUserId(), v)
if _d != nil {
if minLv == 0 {
minLv = _d.Favorlv
}
if _d.Favorlv > minLv {
minLv = _d.Favorlv
}
}
}
if minLv < req.Fetterlv {
code = pb.ErrorCode_LibraryLvReward
return
}
for k := range fetter.Prize {
if k == req.Fetterlv {
code = pb.ErrorCode_LibraryReward

View File

@ -60,3 +60,13 @@ func (this *modelFetter) getOneHeroFetter(uid, oid string) *pb.DBHeroFetter {
}
return fetter
}
func (this *modelFetter) GetFetterByHeroId(uid, cid string) *pb.DBHeroFetter {
list := this.getHeroFetterList(uid)
for _, v := range list {
if v.Heroid == cid { // 找到了直接返回
return v
}
}
return nil
}

View File

@ -122,18 +122,9 @@ func (this *Mainline) CheckPoint(uid string) bool {
if conf == nil {
continue
}
bFind := false
for _, v1 := range conf.Episode {
for _, banch := range v.BranchID {
if banch == v1 {
bFind = true
break
}
}
}
if !bFind { // 没找到 显示红点
return false
if len(conf.Episode) != len(v.BranchID) {
return true
}
}
return true
return false
}

View File

@ -21,7 +21,8 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
if code = this.GetAllCheck(session, req); code != pb.ErrorCode_Success {
return
}
for k, v := range this.module.ModuleTask.Reddot(session, comm.Reddot1, comm.Reddot2, comm.Reddot3, comm.Reddot4) {
for k, v := range this.module.ModuleTask.Reddot(session, comm.Reddot1, comm.Reddot2, comm.Reddot4, comm.Reddot27,
comm.Reddot28) {
reddot[int32(k)] = v
}
for k, v := range this.module.mainline.Reddot(session, comm.Reddot5) {
@ -42,6 +43,10 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
for k, v := range this.module.gourmet.Reddot(session, comm.Reddot20, comm.Reddot21, comm.Reddot22) {
reddot[int32(k)] = v
}
for k, v := range this.module.sociaty.Reddot(session, comm.Reddot3, comm.Reddot29) {
reddot[int32(k)] = v
}
// for k, v := range this.module.mail.Reddot(session, comm.Reddot26) {
// reddot[int32(k)] = v
// }

View File

@ -26,6 +26,7 @@ type Reddot struct {
horoscope comm.IHoroscope
arena comm.IArena
gourmet comm.IGourmet
sociaty comm.ISociaty
// mail comm.Imail
api_comp *apiComp
}
@ -68,6 +69,11 @@ func (this *Reddot) Start() (err error) {
return
}
this.gourmet = module.(comm.IGourmet)
if module, err = this.service.GetModule(comm.ModuleSociaty); err != nil {
return
}
this.sociaty = module.(comm.ISociaty)
// if module, err = this.service.GetModule(comm.ModuleMail); err != nil {
// return
// }

View File

@ -152,7 +152,6 @@ func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) {
mapData["clang"] = smithy.Clang // 正在做的
this.module.ModifySmithyData(uid, mapData) // 同步数据
}
func (this *modelSmithy) CalculationDeskSkillLv(uid string, Smithy *pb.DBSmithy) {

View File

@ -225,6 +225,7 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
sociaty); err != nil {
this.moduleSociaty.Errorln(err)
}
log.Debug("跨服获取公会信息", log.Fields{"uid": uid, "sociatyId": sociaty.Id})
}
}
@ -680,6 +681,7 @@ func (this *ModelSociaty) sign(uid string, sociaty *pb.DBSociaty) error {
}
// 是否已签到
// 已签到true 未签到false
func (this *ModelSociaty) IsSign(uid string, sociaty *pb.DBSociaty) bool {
if _, ok := utils.Findx(sociaty.SignIds, uid); ok {
return ok

View File

@ -124,30 +124,31 @@ func (this *Sociaty) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (
sociaty := this.modelSociaty.getUserSociaty(session.GetUserId())
if sociaty == nil || sociaty.Id == "" {
log.Warn("公会红点未获得公会信息", log.Fields{"uid": session.GetUserId()})
return
}
var applyReddot bool
if this.modelSociaty.isRight(session.GetUserId(), sociaty,
pb.SociatyJob_PRESIDENT,
pb.SociatyJob_VICEPRESIDENT,
pb.SociatyJob_ADMIN) {
if len(sociaty.ApplyRecord) > 0 {
applyReddot = true
for _, v := range rid {
reddot[v] = false
}
return
}
for _, v := range rid {
switch v {
case comm.Reddot3:
if ok := this.modelSociaty.IsSign(session.GetUserId(), sociaty); !ok {
reddot[comm.Reddot3] = true
} else {
var applyReddot bool
if this.modelSociaty.isRight(session.GetUserId(), sociaty,
pb.SociatyJob_PRESIDENT,
pb.SociatyJob_VICEPRESIDENT,
pb.SociatyJob_ADMIN) {
if len(sociaty.ApplyRecord) > 0 {
applyReddot = true
}
}
for _, v := range rid {
switch v {
case comm.Reddot3:
tf := this.modelSociaty.IsSign(session.GetUserId(), sociaty)
reddot[comm.Reddot3] = !tf
case comm.Reddot29:
reddot[comm.Reddot29] = applyReddot
}
case comm.Reddot29:
reddot[comm.Reddot29] = applyReddot
}
}
return
}

View File

@ -144,28 +144,21 @@ func (this *ModuleTask) Reddot(session comm.IUserSession, rid ...comm.ReddotType
for _, v := range rid {
switch v {
case comm.Reddot1:
if ok, _ := this.modelTask.noReceiveTask(session.GetUserId(), comm.TASK_DAILY); ok {
reddot[comm.Reddot1] = ok
break
}
tf, _ := this.modelTask.noReceiveTask(session.GetUserId(), comm.TASK_DAILY)
reddot[comm.Reddot1] = tf
case comm.Reddot2:
if ok, _ := this.modelTask.noReceiveTask(session.GetUserId(), comm.TASK_WEEKLY); ok {
reddot[comm.Reddot2] = ok
break
}
tf, _ := this.modelTask.noReceiveTask(session.GetUserId(), comm.TASK_WEEKLY)
reddot[comm.Reddot2] = tf
case comm.Reddot4:
if ok, _ := this.modelTask.noReceiveTask(session.GetUserId(), comm.TASK_ACHIEVE); ok {
reddot[comm.Reddot4] = ok
break
}
tf, _ := this.modelTask.noReceiveTask(session.GetUserId(), comm.TASK_ACHIEVE)
reddot[comm.Reddot4] = tf
case comm.Reddot27:
if ok,_:= this.modelTaskActive.noReceiveTaskActive(session.GetUserId(), comm.TASK_DAILY);ok{
reddot[comm.Reddot27] = ok
}
tf, _ := this.modelTaskActive.noReceiveTaskActive(session.GetUserId(), comm.TASK_DAILY)
reddot[comm.Reddot27] = tf
case comm.Reddot28:
if ok,_:= this.modelTaskActive.noReceiveTaskActive(session.GetUserId(), comm.TASK_WEEKLY);ok{
reddot[comm.Reddot28] = ok
}
tf, _ := this.modelTaskActive.noReceiveTaskActive(session.GetUserId(), comm.TASK_WEEKLY)
reddot[comm.Reddot28] = tf
}
}
return

View File

@ -68,7 +68,7 @@ func (this *ChatComp) Start() (err error) {
cronStr := fmt.Sprintf("0 %d %d ? * %s", v1.TimeM, v1.TimeH, weekStr)
this.module.Debug("注册Chat广播公告消息", log.Fields{"cronStr": cronStr, "text": v1.Text})
if id, err = cron.AddFunc(cronStr, this.chatNoticen(v1.Text)); err != nil {
if id, err = cron.AddFunc(cronStr, this.chatNoticen(v1)); err != nil {
this.module.Errorf("cron.AddFunc:%s err:%v", cronStr, err)
continue
}
@ -80,16 +80,18 @@ func (this *ChatComp) Start() (err error) {
return
}
func (this *ChatComp) chatNoticen(content string) func() {
func (this *ChatComp) chatNoticen(sys *cfg.GameChatSystemData) func() {
return func() {
msg := &pb.DBChat{
Channel: pb.ChatChannel_System,
Stag: this.service.GetTag(),
Ctime: configure.Now().Unix(),
Content: content,
Channel: pb.ChatChannel_System,
Stag: this.service.GetTag(),
Ctime: configure.Now().Unix(),
Content: "",
Display: sys.Display,
AppendInt: int64(sys.Key),
}
data, _ := anypb.New(&pb.ChatMessagePush{Chat: msg})
this.module.Debug("广播公告消息", log.Fields{"chat": content})
this.module.Debug("广播公告消息", log.Fields{"chat": sys.Text})
if err := this.module.service.RpcBroadcast(context.Background(), comm.Service_Gateway, string(comm.Rpc_GatewaySendRadioMsg), pb.UserMessage{
MainType: string(comm.ModuleChat),
SubType: "message",

View File

@ -25,8 +25,8 @@ func (this *apiComp) AfkSet(session comm.IUserSession, req *pb.TrollAfkSetReq) (
code = pb.ErrorCode_DBError
return
}
troll.Buy = req.Buy
troll.Sell = req.Sell
troll.Buy = this.configure.GetTrollRule(comm.TrollBuy)
troll.Sell = this.configure.GetTrollRule(comm.TrollSell)
troll.AiCount = req.Count
update["buy"] = troll.Buy
update["sell"] = troll.Sell

View File

@ -296,7 +296,7 @@ func (this *Troll) QueryRankList() (ranks []string, gold []int64, err error) {
)
tableName := "trollRank"
if result, err = this.modelTroll.Redis.ZRevRange(tableName, 0, 50).Result(); err != nil {
if result, err = this.modelTroll.Redis.ZRevRange(tableName, 0, comm.MaxRankList).Result(); err != nil {
this.Errorln(err)
return
}

View File

@ -4,6 +4,7 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"google.golang.org/protobuf/proto"
)
@ -74,6 +75,13 @@ func (this *apiComp) Battlefinish(session comm.IUserSession, req *pb.WorldtaskBa
if code, isWin = ibattle.CheckBattleReport(session, req.Report); code == pb.ErrorCode_Success {
//触发任务
this.module.ModuleRtask.SendToRtask(session, comm.Rtype70, 1, req.BattleConfId)
if isWin {
if battleConf, ok := this.module.worldBattleConf.GetDataMap()[req.BattleConfId]; ok {
if code := this.module.DispenseRes(session, []*cfg.Gameatn{battleConf.Playexp}, true); code != pb.ErrorCode_Success {
this.module.Error("世界任务战斗玩家经验结算", log.Fields{"uid": uid, "playerExp": battleConf.Playexp})
}
}
}
}
this.module.Debug("校验战报", log.Fields{"uid": session.GetUserId(), "taskId": req.TaskId, "战斗结果": isWin})
}

View File

@ -15,11 +15,12 @@ var _ comm.IWorldtask = (*Worldtask)(nil)
type Worldtask struct {
modules.ModuleBase
api *apiComp
service base.IRPCXService
configure *configureComp
modelWorldtask *ModelWorldtask
worldtaskConf *cfg.GameWorldTask
api *apiComp
service base.IRPCXService
configure *configureComp
modelWorldtask *ModelWorldtask
worldtaskConf *cfg.GameWorldTask
worldBattleConf *cfg.GameWorldBattle
}
func NewModule() core.IModule {
@ -47,6 +48,9 @@ func (this *Worldtask) Start() (err error) {
if this.worldtaskConf, err = this.configure.getWorldtaskCfg(); err != nil {
return err
}
if this.worldBattleConf, err = this.configure.getWorldtaskBattleCfg(); err != nil {
return err
}
return
}

View File

@ -1,40 +0,0 @@
package robot
type Options struct {
WsUrl string //客户端访问网关的ws接口地址
RegUrl string //账号注册接口地址
Account string //玩家账号
Create bool
Secretkey string //秘钥串
ServerId string //区服ID
Role bool //是否创角
}
func DefaultOpts() *Options {
return &Options{
WsUrl: "ws://10.0.0.9:7891/gateway",
RegUrl: "http://10.0.0.9:8000/register",
Create: false,
ServerId: "1",
}
}
type Option func(*Options)
func WithWsUrl(addr string) Option {
return func(o *Options) {
o.WsUrl = addr
}
}
func WithAccount(account string) Option {
return func(o *Options) {
o.Account = account
}
}
func WithCreate(create bool) Option {
return func(o *Options) {
o.Create = create
}
}

View File

@ -139,7 +139,7 @@ func traceFunc(module string, funcName string, uid string, funcArgs interface{})
//次方法在用户登录成功后调用
func (r *Robot) onUserLoaded() {
//user
r.RunUser()
//r.RunUser()
}
type RobotFormatter struct {

View File

@ -1,60 +0,0 @@
package robot
import (
"go_dreamfactory/comm"
"go_dreamfactory/modules/user"
"go_dreamfactory/pb"
)
//申明测试接口及请求和响应参数
var user_builders = []*TestCase{
{
desc: "修改名称",
mainType: string(comm.ModuleUser),
subType: user.UserSubTypeModifyName,
req: &pb.UserModifynameReq{ //设置请求参数
Name: "uuuuuu",
},
rsp: &pb.UserModifynameResp{},
// enabled: true,
},
{
desc: "查看图鉴",
mainType: string(comm.ModuleUser),
subType: "gettujian",
req: &pb.UserGetTujianReq{},
rsp: &pb.UserGetTujianResp{},
// enabled: true,
}, {
desc: "获取配置",
mainType: string(comm.ModuleUser),
subType: user.UserSubTypeGetSetting,
req: &pb.UserGetSettingReq{},
rsp: &pb.UserGetSettingResp{},
// enabled: true,
}, {
desc: "更新配置",
mainType: string(comm.ModuleUser),
subType: user.UserSubTypeUpdatesetting,
req: &pb.UserUpdateSettingReq{
Setting: &pb.DBUserSetting{
Huazhi: 2,
Kangjuchi: 1,
Gaoguang: true,
},
},
rsp: &pb.UserUpdateSettingResp{},
// enabled: true,
}, {
desc: "验证码",
mainType: string(comm.ModuleUser),
subType: user.UserSubTypeVeriCode,
req: &pb.UserVeriCodeReq{},
rsp: &pb.UserVeriCodeResp{},
},
}
//声明加入到构建器并发起请求
func (r *Robot) RunUser() {
//r.addBuilders(user_builders)
}

View File

@ -18,7 +18,7 @@ type GameWorldBattleData struct {
LockSlots []int32
AssistTeam int32
EventList []int32
Playexp int32
Playexp *Gameatn
}
const TypeId_GameWorldBattleData = 1096332216
@ -87,7 +87,7 @@ func (_v *GameWorldBattleData)Deserialize(_buf map[string]interface{}) (err erro
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["playexp"].(float64); !_ok_ { err = errors.New("playexp error"); return }; _v.Playexp = int32(_tempNum_) }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["playexp"].(map[string]interface{}); !_ok_ { err = errors.New("playexp error"); return }; if _v.Playexp, err = DeserializeGameatn(_x_); err != nil { return } }
return
}

View File

@ -18,8 +18,6 @@ type GameWorldTaskData struct {
Group int32
Des int32
Icon string
TaskName string
TaskDisplay string
Npc []string
GetafterEvent []int32
Completetask int32
@ -42,8 +40,6 @@ func (_v *GameWorldTaskData)Deserialize(_buf map[string]interface{}) (err error)
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["des"].(float64); !_ok_ { err = errors.New("des error"); return }; _v.Des = int32(_tempNum_) }
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
{ var _ok_ bool; if _v.TaskName, _ok_ = _buf["task_name"].(string); !_ok_ { err = errors.New("task_name error"); return } }
{ var _ok_ bool; if _v.TaskDisplay, _ok_ = _buf["task_display"].(string); !_ok_ { err = errors.New("task_display error"); return } }
{
var _arr_ []interface{}
var _ok_ bool