This commit is contained in:
meixiongfeng 2022-11-07 21:55:11 +08:00
commit 13ff38d514
39 changed files with 2331 additions and 119 deletions

View File

@ -1,6 +1,7 @@
[
{
"key": 10001,
"display": false,
"type": 1,
"text": {
"key": "chat_text_10001",
@ -21,6 +22,7 @@
},
{
"key": 10002,
"display": false,
"type": 1,
"text": {
"key": "chat_text_10002",
@ -39,6 +41,7 @@
},
{
"key": 10003,
"display": false,
"type": 1,
"text": {
"key": "chat_text_10003",
@ -57,6 +60,7 @@
},
{
"key": 20001,
"display": false,
"type": 2,
"text": {
"key": "chat_text_20001",
@ -69,6 +73,7 @@
},
{
"key": 30002,
"display": true,
"type": 3,
"text": {
"key": "chat_text_30002",
@ -81,6 +86,7 @@
},
{
"key": 30003,
"display": true,
"type": 3,
"text": {
"key": "chat_text_30003",
@ -93,6 +99,7 @@
},
{
"key": 30004,
"display": true,
"type": 3,
"text": {
"key": "chat_text_30004",
@ -105,6 +112,7 @@
},
{
"key": 40001,
"display": false,
"type": 4,
"text": {
"key": "chat_text_40001",

View File

@ -201,11 +201,12 @@
"guild_AcceptApplyMax": 100,
"guild_ViceAllianceLeader_MaxNum": 3,
"guild_administrators_MaxNum": 5,
"guild_InitiateImpeachmentTime": 72,
"guild_ImpeachmentCountDown": 48,
"guild_DissolutionCountDown_cd": 24,
"guild_dissolution_cd": 72,
"guild_BuildCd": 72,
"guild_InitiateImpeachmentTime": 1,
"guild_TaskNum": 4,
"guild_ImpeachmentCountDown": 1,
"guild_DissolutionCountDown_cd": 1,
"guild_dissolution_cd": 1,
"guild_BuildCd": 1,
"ArenaTicket_max": 10,
"ArenaTicket_RecoveryTime": 144,
"VikingExpedition_RecoveryTime": 144,
@ -225,7 +226,7 @@
],
"horoscope_reset_cost": {
"a": "attr",
"t": "starcoin",
"t": "diamond",
"n": 500
},
"horoscope_reset_cd": 86400

View File

@ -6,8 +6,17 @@
"a": "attr",
"t": "gold",
"n": 9999
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
],
"title": {
"key": "Primary_Reward_Progress",
"text": "初级-奖励进度"
}
},
{
"type": 2,
@ -16,8 +25,17 @@
"a": "attr",
"t": "gold",
"n": 9999
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
],
"title": {
"key": "Middle_Reward_Progress",
"text": "中级-奖励进度"
}
},
{
"type": 3,
@ -26,7 +44,16 @@
"a": "attr",
"t": "gold",
"n": 9999
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
],
"title": {
"key": "High_Reward_Progress",
"text": "高级-奖励进度"
}
}
]

View File

@ -3,6 +3,7 @@
"id": 1,
"type": 1,
"title": "通关1-1",
"onetask": 0,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31253",
"fstask": 101,
@ -12,6 +13,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -19,6 +25,7 @@
"id": 2,
"type": 1,
"title": "通关1-2",
"onetask": 1,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31254",
"fstask": 101,
@ -28,6 +35,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -35,6 +47,7 @@
"id": 3,
"type": 1,
"title": "通关1-3",
"onetask": 2,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31255",
"fstask": 101,
@ -44,6 +57,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -51,6 +69,7 @@
"id": 4,
"type": 1,
"title": "通关1-4",
"onetask": 3,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31256",
"fstask": 101,
@ -60,6 +79,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -67,6 +91,7 @@
"id": 5,
"type": 1,
"title": "通关1-5",
"onetask": 4,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31257",
"fstask": 101,
@ -76,6 +101,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -83,6 +113,7 @@
"id": 6,
"type": 1,
"title": "通关1-6",
"onetask": 5,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31258",
"fstask": 101,
@ -92,6 +123,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -99,6 +135,7 @@
"id": 7,
"type": 1,
"title": "通关1-7",
"onetask": 6,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31259",
"fstask": 101,
@ -108,6 +145,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -115,6 +157,7 @@
"id": 8,
"type": 1,
"title": "通关1-8",
"onetask": 7,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31260",
"fstask": 101,
@ -124,6 +167,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -131,6 +179,7 @@
"id": 9,
"type": 1,
"title": "通关1-9",
"onetask": 8,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31261",
"fstask": 101,
@ -140,6 +189,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -147,6 +201,7 @@
"id": 10,
"type": 1,
"title": "通关1-10",
"onetask": 9,
"txt": "位置的丛林充满了危险,赶快带上你的小伙伴去探索一番吧~",
"portrait": "N6_0002_图层-31262",
"fstask": 101,
@ -156,6 +211,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -163,6 +223,7 @@
"id": 11,
"type": 2,
"title": "阿宝升1级",
"onetask": 10,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31263",
"fstask": 101,
@ -172,6 +233,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -179,6 +245,7 @@
"id": 12,
"type": 2,
"title": "阿宝升2级",
"onetask": 11,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31264",
"fstask": 101,
@ -188,6 +255,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -195,6 +267,7 @@
"id": 13,
"type": 2,
"title": "阿宝升3级",
"onetask": 12,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31265",
"fstask": 101,
@ -204,6 +277,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -211,6 +289,7 @@
"id": 14,
"type": 2,
"title": "阿宝升4级",
"onetask": 13,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31266",
"fstask": 101,
@ -220,6 +299,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -227,6 +311,7 @@
"id": 15,
"type": 2,
"title": "阿宝升5级",
"onetask": 14,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31267",
"fstask": 101,
@ -236,6 +321,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -243,6 +333,7 @@
"id": 16,
"type": 2,
"title": "阿宝升6级",
"onetask": 15,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31268",
"fstask": 101,
@ -252,6 +343,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -259,6 +355,7 @@
"id": 17,
"type": 2,
"title": "阿宝升7级",
"onetask": 16,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31269",
"fstask": 101,
@ -268,6 +365,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -275,6 +377,7 @@
"id": 18,
"type": 2,
"title": "阿宝升8级",
"onetask": 17,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31270",
"fstask": 101,
@ -284,6 +387,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -291,6 +399,7 @@
"id": 19,
"type": 2,
"title": "阿宝升9级",
"onetask": 18,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31271",
"fstask": 101,
@ -300,6 +409,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -307,6 +421,7 @@
"id": 20,
"type": 2,
"title": "阿宝升10级",
"onetask": 19,
"txt": "阿宝需要变强,快去帮助他把~",
"portrait": "N6_0002_图层-31272",
"fstask": 101,
@ -316,6 +431,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -323,6 +443,7 @@
"id": 21,
"type": 3,
"title": "波比升1级",
"onetask": 20,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31273",
"fstask": 101,
@ -332,6 +453,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -339,6 +465,7 @@
"id": 22,
"type": 3,
"title": "波比升2级",
"onetask": 21,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31274",
"fstask": 101,
@ -348,6 +475,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -355,6 +487,7 @@
"id": 23,
"type": 3,
"title": "波比升3级",
"onetask": 22,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31275",
"fstask": 101,
@ -364,6 +497,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -371,6 +509,7 @@
"id": 24,
"type": 3,
"title": "波比升4级",
"onetask": 23,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31276",
"fstask": 101,
@ -380,6 +519,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -387,6 +531,7 @@
"id": 25,
"type": 3,
"title": "波比升5级",
"onetask": 24,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31277",
"fstask": 101,
@ -396,6 +541,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -403,6 +553,7 @@
"id": 26,
"type": 3,
"title": "波比升6级",
"onetask": 25,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31278",
"fstask": 101,
@ -412,6 +563,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -419,6 +575,7 @@
"id": 27,
"type": 3,
"title": "波比升7级",
"onetask": 26,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31279",
"fstask": 101,
@ -428,6 +585,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -435,6 +597,7 @@
"id": 28,
"type": 3,
"title": "波比升8级",
"onetask": 27,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31280",
"fstask": 101,
@ -444,6 +607,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
},
@ -451,6 +619,7 @@
"id": 29,
"type": 3,
"title": "波比升9级",
"onetask": 28,
"txt": "你们都变强了,我也需要变强,请助我一臂之力~",
"portrait": "N6_0002_图层-31281",
"fstask": 101,
@ -460,6 +629,11 @@
"a": "attr",
"t": "gold",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1000
}
]
}

View File

@ -9,6 +9,7 @@
"n": 1
}
],
"preview": true,
"probability": 1000,
"need": [
{
@ -44,6 +45,7 @@
"n": 1
}
],
"preview": true,
"probability": 1000,
"need": [
{
@ -79,6 +81,7 @@
"n": 1
}
],
"preview": true,
"probability": 1000,
"need": [
{
@ -114,6 +117,7 @@
"n": 1
}
],
"preview": true,
"probability": 1000,
"need": [
{
@ -149,6 +153,7 @@
"n": 1
}
],
"preview": true,
"probability": 1000,
"need": [
{
@ -184,6 +189,7 @@
"n": 1
}
],
"preview": true,
"probability": 1000,
"need": [
{
@ -219,6 +225,7 @@
"n": 1
}
],
"preview": true,
"probability": 500,
"need": [
{
@ -254,6 +261,7 @@
"n": 1
}
],
"preview": true,
"probability": 500,
"need": [
{
@ -289,6 +297,7 @@
"n": 1
}
],
"preview": true,
"probability": 500,
"need": [
{
@ -324,6 +333,7 @@
"n": 1
}
],
"preview": true,
"probability": 500,
"need": [
{
@ -359,6 +369,7 @@
"n": 1
}
],
"preview": true,
"probability": 500,
"need": [
{
@ -394,6 +405,7 @@
"n": 1
}
],
"preview": true,
"probability": 500,
"need": [
{
@ -429,6 +441,7 @@
"n": 1
}
],
"preview": true,
"probability": 250,
"need": [
{
@ -464,6 +477,7 @@
"n": 1
}
],
"preview": true,
"probability": 250,
"need": [
{
@ -499,6 +513,7 @@
"n": 1
}
],
"preview": true,
"probability": 250,
"need": [
{
@ -534,6 +549,7 @@
"n": 1
}
],
"preview": true,
"probability": 250,
"need": [
{
@ -569,6 +585,7 @@
"n": 1
}
],
"preview": true,
"probability": 250,
"need": [
{
@ -604,6 +621,7 @@
"n": 1
}
],
"preview": true,
"probability": 250,
"need": [
{
@ -639,6 +657,7 @@
"n": 1
}
],
"preview": false,
"probability": 250,
"need": [
{
@ -674,6 +693,7 @@
"n": 1
}
],
"preview": false,
"probability": 250,
"need": [
{
@ -709,6 +729,7 @@
"n": 1
}
],
"preview": false,
"probability": 200,
"need": [
{
@ -744,6 +765,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -779,6 +801,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -814,6 +837,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -849,6 +873,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -884,6 +909,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -919,6 +945,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -954,6 +981,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -989,6 +1017,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -1024,6 +1053,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -1059,6 +1089,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -1094,6 +1125,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -1129,6 +1161,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -1164,6 +1197,7 @@
"n": 1
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -1182,7 +1216,7 @@
1000
],
"buyminnum": 999,
"buymaxnum": 10,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
@ -1199,6 +1233,7 @@
"n": 50000
}
],
"preview": false,
"probability": 1000,
"need": [
{
@ -1217,7 +1252,295 @@
1000
],
"buyminnum": 999,
"buymaxnum": 10,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 36,
"id": 40003,
"iteminfo": [
{
"a": "hero",
"t": "10009",
"n": 10
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 50
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 37,
"id": 40004,
"iteminfo": [
{
"a": "hero",
"t": "10010",
"n": 10
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 50
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 38,
"id": 40005,
"iteminfo": [
{
"a": "item",
"t": "10011",
"n": 10
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 50
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 39,
"id": 40006,
"iteminfo": [
{
"a": "item",
"t": "10012",
"n": 10
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 50
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 40,
"id": 40007,
"iteminfo": [
{
"a": "item",
"t": "10013",
"n": 10
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 50
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 41,
"id": 40008,
"iteminfo": [
{
"a": "item",
"t": "10014",
"n": 10
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 50
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 42,
"id": 40009,
"iteminfo": [
{
"a": "item",
"t": "10015",
"n": 10
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 50
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 43,
"id": 40010,
"iteminfo": [
{
"a": "item",
"t": "10016",
"n": 10
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 50
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,

View File

@ -10,6 +10,7 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules/friend"
"go_dreamfactory/modules/growtask"
"go_dreamfactory/modules/hero"
"go_dreamfactory/modules/linestory"
"go_dreamfactory/modules/mainline"
@ -118,8 +119,8 @@ var (
ff(comm.ModuleSociaty, sociaty.SociatySubTypeRank): &formview.SociatyRankView{},
// troll
ff(comm.ModuleTroll, "getlist"): &formview.TrollGetlistView{},
// alliance
// ff(comm.ModuleAlliance,"")
// growtask
ff(comm.ModuleGrowtask, growtask.GrowtaskSubTypeList): &formview.GrowtaskListView{},
}
)
@ -144,7 +145,7 @@ var (
string(comm.ModuleGourmet),
string(comm.ModuleSociaty),
string(comm.ModuleTroll),
string(comm.ModuleAlliance),
string(comm.ModuleGrowtask),
},
"gm": {ff(comm.ModuleGM, "cmd")},
"sys": {
@ -242,6 +243,9 @@ var (
"troll": {
ff(comm.ModuleTroll, "getlist"),
},
"growtask": {
ff(comm.ModuleGrowtask, growtask.GrowtaskSubTypeList),
},
}
)
@ -879,10 +883,17 @@ var (
SubType: "getlist",
Enabled: true,
},
// alliance
string(comm.ModuleAlliance): {
NavLabel: "联盟学院",
MainType: string(comm.ModuleAlliance),
// growtask
string(comm.ModuleGrowtask): {
NavLabel: "成长任务",
MainType: string(comm.ModuleGrowtask),
Enabled: true,
},
ff(comm.ModuleGrowtask, growtask.GrowtaskSubTypeList): {
NavLabel: "列表",
Desc: "成长任务列表",
MainType: string(comm.ModuleGrowtask),
SubType: growtask.GrowtaskSubTypeList,
Enabled: true,
},
}

View File

@ -65,13 +65,13 @@ func (this *toyUserInfo) Init(obs observer.Observer) error {
// 注销用户
this.logoutBtn = widget.NewButtonWithIcon("", theme.AccountIcon(), func() {
if err := service.GetPttService().SendToClient(
string(comm.ModuleUser),
user.UserSubTypeInfo,
&pb.UserInfoReq{}); err != nil {
logrus.Error(err)
return
}
// if err := service.GetPttService().SendToClient(
// string(comm.ModuleUser),
// user.UserSubTypeInfo,
// &pb.UserInfoReq{}); err != nil {
// logrus.Error(err)
// return
// }
})
// list

View File

@ -0,0 +1,129 @@
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/modules/growtask"
"go_dreamfactory/pb"
"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 GrowtaskListView struct {
BaseformView
taskList func(taskType int32)
itemList *common.ItemList
flag bool
}
func (this *GrowtaskListView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.itemList = common.NewItemList()
this.itemList.ItemList = this.itemList.CreateList()
this.taskList = func(taskType int32) {
if err := service.GetPttService().SendToClient(
string(comm.ModuleGrowtask),
growtask.GrowtaskSubTypeList,
&pb.GrowtaskListReq{
TaskType: taskType,
}); err != nil {
logrus.Error(err)
}
}
defer this.taskList(1)
refreshBtn := widget.NewButtonWithIcon("", theme.ViewRefreshIcon(), func() {
this.itemList.Reset()
this.taskList(1)
})
selTaskType := widget.NewSelect([]string{"初级", "中级", "高级"}, func(s string) {
switch s {
case "初级":
this.itemList.Reset()
this.taskList(1)
case "中级":
this.itemList.Reset()
this.taskList(2)
case "高级":
this.itemList.Reset()
this.taskList(3)
}
})
selTaskType.Selected = "初级"
//领取
receiveBtn := widget.NewButton("领取", func() {
sel := this.itemList.SelItemId
if this.itemList.SelItemId == "" {
common.ShowTip("请选择项目")
return
}
if err := service.GetPttService().SendToClient(
string(comm.ModuleGrowtask),
growtask.GrowtaskSubTypeReceive,
&pb.GrowtaskReceiveReq{
TaskId: cast.ToInt32(sel),
}); err != nil {
logrus.Error(err)
}
})
// 进阶领取
advReceiveBtn := widget.NewButton("进阶领奖", func() {
if err := service.GetPttService().SendToClient(
string(comm.ModuleGrowtask),
growtask.GrowtaskSubTypeAdvreceive,
&pb.GrowtaskAdvReceiveReq{
TaskType: 1,
}); err != nil {
logrus.Error(err)
}
})
buttonBar := container.NewHBox(refreshBtn, selTaskType, receiveBtn, advReceiveBtn)
c := container.NewBorder(buttonBar, nil, nil, nil, this.itemList.ItemList)
this.dataListener()
return c
}
func (this *GrowtaskListView) dataListener() {
if this.flag {
return
}
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string(comm.ModuleGrowtask) &&
data.SubType == growtask.GrowtaskSubTypeList) {
return
}
rsp := &pb.GrowtaskListResp{}
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
return
}
for _, v := range rsp.TaskList {
item := common.Item{
Id: cast.ToString(v.Id),
Text: fmt.Sprintf("taskId:%v status:%v", v.Id, v.Status),
}
this.itemList.AddItem(item)
}
},
})
this.flag = true
}

View File

@ -35,6 +35,7 @@ func (this *SociatyListView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.itemList.ItemList.OnSelected = func(id widget.ListItemID) {
item := this.itemList.CachedList.Items[id]
this.itemList.SelItemId = item.Id
logrus.Debug(item)
if s, ok := item.Data.(*pb.DBSociaty); ok {
this.res.Text, _ = jsoniter.MarshalToString(s)
@ -61,7 +62,7 @@ func (this *SociatyListView) CreateView(t *model.TestCase) fyne.CanvasObject {
applyBtn := widget.NewButton("申请", func() {
selId := this.itemList.SelItemId
if selId == "" {
common.ShowTip("请选择项目")
common.ShowTip("请选择要申请的公会")
return
}
logrus.Debugf("%s", selId)
@ -93,33 +94,6 @@ func (this *SociatyListView) CreateView(t *model.TestCase) fyne.CanvasObject {
}
})
// 明细
// item := &entryItem{
// sociatyName: widget.NewEntry(),
// notice: widget.NewMultiLineEntry(),
// icon: widget.NewEntry(),
// isApplyCheck: widget.NewCheck("审批", nil),
// applyLv: widget.NewEntry(),
// }
// this.form.AppendItem(widget.NewFormItem("公会名称", item.sociatyName))
// this.form.AppendItem(widget.NewFormItem("公告", item.notice))
// this.form.AppendItem(widget.NewFormItem("图标", item.icon))
// this.form.AppendItem(widget.NewFormItem("审批", item.isApplyCheck))
// this.form.AppendItem(widget.NewFormItem("入会等级", item.applyLv))
// this.formdataListen(item)
// detailBtn := widget.NewButton("明细", func() {
// if err := service.GetPttService().SendToClient(
// string(comm.ModuleSociaty),
// sociaty.SociatySubTypeMine,
// &pb.SociatyMineReq{}); err != nil {
// logrus.Error(err)
// }
// defer this.showSociatyDetailWin()
// })
//过滤
filter := widget.NewSelect([]string{"全部", "满足条件", "无需审批", "申请中"}, func(s string) {
this.itemList.Reset()
@ -163,7 +137,7 @@ func (this *SociatyListView) CreateView(t *model.TestCase) fyne.CanvasObject {
}
})
buttonBar := container.NewHBox(refreshBtn, applyBtn, cancalApplyBtn, filter)
buttonBar := container.NewHBox(refreshBtn, applyBtn, cancalApplyBtn, filter)
cBar := container.NewBorder(nil, nil, buttonBar, searchBtn, searchEntry)
// layout
c := container.NewBorder(cBar, nil, nil, nil, this.itemList.ItemList)

View File

@ -129,6 +129,27 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
}, this.w)
})
// 取消解散
cancelJiesanBtn := widget.NewButton("解散取消", func() {
dialog.ShowConfirm("提示", "确定取消解散公会?", func(b bool) {
if !b {
return
}
if err := service.GetPttService().SendToClient(
t.MainType,
sociaty.SociatySubTypeDismiss,
&pb.SociatyDismissReq{
Dismiss: 1, //取消
},
); err != nil {
logrus.Error(err)
return
}
item = &entryItem{}
}, this.w)
})
//申请列表
applyListBtn := widget.NewButton("申请审批", this.showSociatyApplyListWin)
@ -184,6 +205,7 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
if this.job == pb.SociatyJob_PRESIDENT {
btns.Add(applyListBtn)
btns.Add(jiesanBtn)
btns.Add(cancelJiesanBtn)
} else {
btns.Add(quitBtn)
}

View File

@ -72,6 +72,7 @@ const (
ModulePay core.M_Modules = "pay" //支付
ModuleAlliance core.M_Modules = "alliance" //联盟学院
ModulePrivilege core.M_Modules = "privilege" //特权
ModuleGrowtask core.M_Modules = "growtask" //成长任务
)
//数据表名定义处
@ -193,6 +194,8 @@ const (
// 签到
TableSign = "sign"
// 成长任务
TableGrowtask = "growtask"
)
//RPC服务接口定义处

View File

@ -53,7 +53,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
return
}
for i, v := range attrlibrarys { //移除主属性
if v.Key == equip.MainEntry.Id {
if v.Attrkey == equip.MainEntry.AttrName {
attrlibrarys = append(attrlibrarys[0:i], attrlibrarys[i+1:]...)
break
}

View File

@ -258,7 +258,7 @@ func (this *modelEquipmentComp) newEquipment(uid string, conf *cfg.GameEquipData
}
for i, v := range sattr { //移除主属性
if v.Key == equipment.MainEntry.Id {
if v.Attrkey == equipment.MainEntry.AttrName {
sattr = append(sattr[0:i], sattr[i+1:]...)
break
}
@ -329,11 +329,11 @@ func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equ
for _, v := range temp {
iskeep := false
for _, v1 := range equipment.AdverbEntry {
if v.Key == v1.Id {
if v.Attrkey == v1.AttrName {
iskeep = true
}
}
if v.Key == equipment.MainEntry.Id {
if v.Attrkey == equipment.MainEntry.AttrName {
iskeep = true
}
if !iskeep {

View File

@ -6,8 +6,6 @@ import (
"go_dreamfactory/utils"
"google.golang.org/protobuf/proto"
cfg "go_dreamfactory/sys/configure/structs"
)
func (this *apiComp) RandlistCheck(session comm.IUserSession, req *pb.FriendRandlistReq) (code pb.ErrorCode) {
@ -43,6 +41,16 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR
continue
}
//检查目标v中的申请列表中是否有自己
target := this.moduleFriend.modelFriend.GetFriend(v.Uid)
if self == nil {
code = pb.ErrorCode_FriendSelfNoData
return
}
if _, ok := utils.Findx(target.ApplyIds, self.Uid); ok {
continue
}
//将黑名单中的玩家过滤
if _, ok := utils.Findx(self.BlackIds, v.Uid); ok {
continue
@ -89,14 +97,6 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR
}
this.moduleFriend.DispenseRes(session, []*cfg.Gameatn{
{
A: "attr",
T: "gold",
N: 10,
},
}, true)
rsp := &pb.FriendRandlistResp{
List: userList,
}

25
modules/growtask/api.go Normal file
View File

@ -0,0 +1,25 @@
package growtask
import (
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
const (
GrowtaskSubTypeList = "list" //任务列表
GrowtaskSubTypeReceive = "receive" //子任务奖励领取
GrowtaskSubTypeAdvreceive = "advreceive" //进阶奖励领取
)
type apiComp struct {
modules.MCompGate
service base.IRPCXService
module *Growtask
}
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
_ = this.MCompGate.Init(service, module, comp, options)
this.module = module.(*Growtask)
return
}

View File

@ -0,0 +1,85 @@
package growtask
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
//进阶奖励领取
func (this *apiComp) AdvreceiveCheck(session comm.IUserSession, req *pb.GrowtaskAdvReceiveReq) (code pb.ErrorCode) {
if req.TaskType == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) Advreceive(session comm.IUserSession, req *pb.GrowtaskAdvReceiveReq) (code pb.ErrorCode, data proto.Message) {
if code = this.AdvreceiveCheck(session, req); code != pb.ErrorCode_Success {
return
}
uid := session.GetUserId()
gt, err := this.module.modelGrowtask.getUserGrowtask(uid)
if err != nil {
code = pb.ErrorCode_DBError
return
}
if gt.Uid == "" {
return
}
// 当前进阶奖励是否已领取
if gt.AdvReceive == req.TaskType {
code = pb.ErrorCode_GrowtaskAdvReceive
return
}
// 当前进阶任务是否都完成
ok := this.module.modelGrowtask.isAllFinish(gt, req.TaskType)
if !ok {
code = pb.ErrorCode_GrowtaskAdvReceive
return
}
// 初始下一级任务数据
lv := gt.CurTaskType + 1
this.module.modelGrowtask.initGrowtask(uid, lv)
//发奖
rewardCnf, err := this.module.configure.getGrowrewardCfg()
if err != nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if rewardCnf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
//更新领奖状态
update := map[string]interface{}{
"advReceive": req.TaskType,
}
if err := this.module.modelGrowtask.Change(uid, update); err != nil {
code = pb.ErrorCode_DBError
return
}
if conf, ok := rewardCnf.GetDataMap()[req.TaskType]; ok {
if code := this.module.DispenseRes(session, conf.Allreward, true); code != pb.ErrorCode_Success {
this.module.Errorf("进阶奖励发放失败 taskType:%v uid:%v", req.TaskType, uid)
}
}
rsp := &pb.GrowtaskAdvReceiveResp{
TaskType: req.TaskType,
}
if err := session.SendMsg(string(this.module.GetType()), GrowtaskSubTypeAdvreceive, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -0,0 +1,57 @@
package growtask
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 子任务奖励领取
func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.GrowtaskReceiveReq) (code pb.ErrorCode) {
if req.TaskId == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) Receive(session comm.IUserSession, req *pb.GrowtaskReceiveReq) (code pb.ErrorCode, data proto.Message) {
if code = this.ReceiveCheck(session, req); code != pb.ErrorCode_Success {
return
}
uid := session.GetUserId()
// 领取
if err := this.module.modelGrowtask.receive(uid, req.TaskId); err != nil {
code = pb.ErrorCode_GrowtaskReceive
return
}
//发奖
ggt, err := this.module.configure.getGrowtaskCfg()
if err != nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if ggt == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if conf, ok := ggt.GetDataMap()[req.TaskId]; ok {
if code := this.module.DispenseRes(session, conf.Reward, true); code != pb.ErrorCode_Success {
this.module.Errorf("子任务奖励发放失败 taskId:%v uid:%v", req.TaskId, uid)
}
}
rsp := &pb.GrowtaskReceiveResp{
TaskId: req.TaskId,
}
if err := session.SendMsg(string(this.module.GetType()), GrowtaskSubTypeReceive, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -0,0 +1,41 @@
package growtask
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 成长任务列表
func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.GrowtaskListReq) (code pb.ErrorCode) {
if req.TaskType == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) List(session comm.IUserSession, req *pb.GrowtaskListReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId()
gt, err := this.module.modelGrowtask.getUserGrowtask(uid)
if err != nil {
code = pb.ErrorCode_DBError
return
}
if gt.Uid == "" {
return
}
g, curTaskId := this.module.modelGrowtask.list(uid, req.TaskType, gt)
rsp := &pb.GrowtaskListResp{
TaskList: g,
CurTaskType: gt.CurTaskType,
AdvReceive: gt.AdvReceive,
CurTaskId: curTaskId,
}
session.SendMsg(string(this.module.GetType()), GrowtaskSubTypeList, rsp)
return
}

View File

@ -0,0 +1,60 @@
package growtask
import (
"fmt"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
cfg "go_dreamfactory/sys/configure/structs"
)
const (
gameGrowreward = "game_growreward.json"
gameGrowTask = "game_growtask.json"
)
type configureComp struct {
modules.MCompConfigure
}
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
err = this.LoadMultiConfigure(map[string]interface{}{
gameGrowreward: cfg.NewGameGrowReward,
gameGrowTask: cfg.NewGameGrowTask,
})
return
}
// 成长任务配置
func (this *configureComp) getGrowtaskCfg() (data *cfg.GameGrowTask, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameGrowTask); err != nil {
return
} else {
if data, ok = v.(*cfg.GameGrowTask); !ok {
err = fmt.Errorf("%T no is *cfg.GameGrowTask", v)
return
}
}
return
}
// 奖励配置
func (this *configureComp) getGrowrewardCfg() (data *cfg.GameGrowReward, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameGrowreward); err != nil {
return
} else {
if data, ok = v.(*cfg.GameGrowReward); !ok {
err = fmt.Errorf("%T no is *cfg.GameGrowReward", v)
return
}
}
return
}

View File

@ -0,0 +1,308 @@
package growtask
import (
"errors"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go.mongodb.org/mongo-driver/mongo"
)
type ModelGrowtask struct {
modules.MCompModel
moduleGrowtask *Growtask
}
func (this *ModelGrowtask) 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.TableGrowtask
this.moduleGrowtask = module.(*Growtask)
return
}
// 初始化成长任务
func (this *ModelGrowtask) initGrowtask(uid string, taskType int32) (*pb.DBGrowtask, error) {
gtConf, err := this.moduleGrowtask.configure.getGrowtaskCfg()
if err != nil {
return nil, err
}
if gtConf == nil {
return nil, errors.New("growtask config is nil")
}
data := &pb.DBGrowtask{
Uid: uid,
}
update := map[string]interface{}{}
for _, v := range gtConf.GetDataList() {
if taskType == v.Type {
task := &pb.Growtask{
Id: v.Id,
TaskType: v.Type,
Fstask: v.Fstask,
PreTask: v.Onetask,
}
if v.Type == taskType && taskType == 1 { //默认状态:锁定
data.InitTaskList = append(data.InitTaskList, task)
} else if v.Type == taskType && taskType == 2 {
data.MidTaskList = append(data.MidTaskList, task)
} else if v.Type == taskType && taskType == 3 {
data.HighTaskList = append(data.HighTaskList, task)
}
}
}
update["uid"] = data.Uid
update["curTaskType"] = taskType
if taskType == 1 {
update["initTaskList"] = data.InitTaskList
} else if taskType == 2 {
update["midTaskList"] = data.MidTaskList
} else if taskType == 3 {
update["highTaskList"] = data.HighTaskList
}
if err = this.Change(uid, update); err != nil {
return nil, err
}
return data, nil
}
// 获取玩家成长任务
func (this *ModelGrowtask) getUserGrowtask(uid string) (*pb.DBGrowtask, error) {
gt := &pb.DBGrowtask{}
if err := this.Get(uid, gt); err != nil {
if err == mongo.ErrNoDocuments {
return this.initGrowtask(uid, 1) //从初级任务开始初始
}
return nil, err
}
return gt, nil
}
// 任务列表
func (this *ModelGrowtask) list(uid string, taskType int32, gt *pb.DBGrowtask) ([]*pb.Growtask, int32) {
var (
curList []*pb.Growtask
curTaskId int32
)
getList := func(list []*pb.Growtask) []*pb.Growtask {
taskStatusMap := make(map[int32]pb.GrowtaskStatus) //任务状态
for _, v := range list {
//已完成
if v.Status == pb.GrowtaskStatus_Finish {
taskStatusMap[v.Id] = pb.GrowtaskStatus_Finish
continue
}
//上个任务是否完成
pre := this.preTaskStatus(v.PreTask, v.TaskType-1, gt)
if pre != nil {
if v.TaskType-1 >= 1 &&
pre.Status == pb.GrowtaskStatus_Finish &&
pre.TaskType == v.TaskType-1 { //非初级
taskStatusMap[v.PreTask] = pb.GrowtaskStatus_Finish
}
} else {
taskStatusMap[v.Id] = v.Status
}
//任务完成
if code := this.moduleGrowtask.ModuleRtask.CheckCondi(uid, v.Fstask); code == pb.ErrorCode_Success {
if v.PreTask == 0 {
v.Status = pb.GrowtaskStatus_Wait //待领奖状态
} else {
if s, ok := taskStatusMap[v.PreTask]; ok {
// 上个任务是领取状态
if s == pb.GrowtaskStatus_Wait {
continue
} else if s == pb.GrowtaskStatus_Finish {
v.Status = pb.GrowtaskStatus_Wait //待领状态
}
}
}
} else {
if v.PreTask == 0 {
v.Status = pb.GrowtaskStatus_Ongoing //进行中
} else {
if s, ok := taskStatusMap[v.PreTask]; ok {
// 上个任务是领取状态
if s == pb.GrowtaskStatus_Ongoing {
v.Status = pb.GrowtaskStatus_Lock
continue
}
}
}
}
}
return list
}
getCurTaskId := func(list []*pb.Growtask) (curTaskId int32) {
for _, v := range list {
if v.Status == pb.GrowtaskStatus_Ongoing ||
v.Status == pb.GrowtaskStatus_Wait {
curTaskId = v.Id
return
}
}
return
}
if gt.Uid != "" {
update := map[string]interface{}{}
switch taskType {
case 1:
curList = getList(gt.InitTaskList)
update["initTaskList"] = curList
curTaskId = getCurTaskId(curList)
case 2:
curList = getList(gt.MidTaskList)
update["midTaskList"] = curList
curTaskId = getCurTaskId(curList)
case 3:
curList = getList(gt.HighTaskList)
update["highTaskList"] = curList
curTaskId = getCurTaskId(curList)
}
//更新
if len(update) > 0 {
if err := this.Change(uid, update); err != nil {
log.Errorf("更新任务列表 err:%v", err)
return nil, 0
}
}
}
return curList, curTaskId
}
// 获取上一个任务状态
func (this *ModelGrowtask) preTaskStatus(preTaskId int32, preTaskType int32, gt *pb.DBGrowtask) *pb.Growtask {
switch preTaskType {
case 1:
for _, v := range gt.InitTaskList {
if v.Id == preTaskId {
return v
}
}
case 2:
for _, v := range gt.MidTaskList {
if v.Id == preTaskId {
return v
}
}
case 3:
for _, v := range gt.HighTaskList {
if v.Id == preTaskId {
return v
}
}
}
return nil
}
// 领取子任务奖励
func (this *ModelGrowtask) receive(uid string, taskId int32) error {
gt, err := this.getUserGrowtask(uid)
if err != nil {
return err
}
switch gt.CurTaskType {
case 1:
for _, v := range gt.InitTaskList {
if v.Id == taskId {
if v.Status == pb.GrowtaskStatus_Wait {
v.Status = pb.GrowtaskStatus_Finish
} else {
return errors.New("不能领取")
}
break
}
}
//更新
update := map[string]interface{}{
"initTaskList": gt.InitTaskList,
}
if err := this.Change(uid, update); err != nil {
log.Errorf("更新任务列表 err:%v", err)
return err
}
case 2:
for _, v := range gt.MidTaskList {
if v.Id == taskId {
if v.Status == pb.GrowtaskStatus_Wait {
v.Status = pb.GrowtaskStatus_Finish
} else {
return errors.New("不能领取")
}
break
}
}
//更新
update := map[string]interface{}{
"midTaskList": gt.MidTaskList,
}
if err := this.Change(uid, update); err != nil {
log.Errorf("更新任务列表 err:%v", err)
return err
}
case 3:
for _, v := range gt.HighTaskList {
if v.Id == taskId {
if v.Status == pb.GrowtaskStatus_Wait {
v.Status = pb.GrowtaskStatus_Finish
} else {
return errors.New("不能领取")
}
break
}
}
//更新
update := map[string]interface{}{
"highTaskList": gt.HighTaskList,
}
if err := this.Change(uid, update); err != nil {
log.Errorf("更新任务列表 err:%v", err)
return err
}
}
return nil
}
// 当前进阶是否全部完成
func (this *ModelGrowtask) isAllFinish(gt *pb.DBGrowtask, taskType int32) bool {
switch taskType {
case 1:
for _, v := range gt.InitTaskList {
if v.Status != pb.GrowtaskStatus_Finish {
return false
}
}
case 2:
for _, v := range gt.MidTaskList {
if v.Status != pb.GrowtaskStatus_Finish {
return false
}
}
case 3:
for _, v := range gt.HighTaskList {
if v.Status != pb.GrowtaskStatus_Finish {
return false
}
}
default:
return false
}
return true
}

View File

@ -0,0 +1,35 @@
package growtask
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type Growtask struct {
modules.ModuleBase
api *apiComp
service base.IRPCXService
configure *configureComp
modelGrowtask *ModelGrowtask
}
func NewModule() core.IModule {
return &Growtask{}
}
func (this *Growtask) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
return
}
func (this *Growtask) GetType() core.M_Modules {
return comm.ModuleGrowtask
}
func (this *Growtask) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelGrowtask = this.RegisterComp(new(ModelGrowtask)).(*ModelGrowtask)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}

View File

@ -123,6 +123,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
sdata.LastRefreshTime = time.Now().Unix()
sdata.ManualRefreshNum++
sdata.Items = make([]int32, len(items))
sdata.Preview = make(map[int32]*pb.DB_Equipment)
for i, v := range items {
sdata.Items[i] = v.Key
if v.Preview { //是否预览
@ -146,6 +147,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
sdata.Buy = make(map[int32]int32)
sdata.LastRefreshTime = time.Now().Unix()
sdata.Items = make([]int32, len(items))
sdata.Preview = make(map[int32]*pb.DB_Equipment)
for i, v := range items {
sdata.Items[i] = v.Key
if v.Preview { //是否预览

View File

@ -21,7 +21,7 @@ func (this *apiComp) Activitylist(session comm.IUserSession, req *pb.SociatyActi
this.module.Errorf("uid:%s not in sociaty", uid)
return
}
rsp := &pb.SociatyActivityListResp{}
defer func() {
@ -30,7 +30,7 @@ func (this *apiComp) Activitylist(session comm.IUserSession, req *pb.SociatyActi
}
}()
sociatyTask := this.module.modelSociatyTask.taskList(uid, sociaty.Id)
sociatyTask := this.module.modelSociatyTask.getUserTask(uid, sociaty.Id)
if sociatyTask.SociatyId != "" {
var activityList []*pb.SociatyActivity

View File

@ -42,6 +42,9 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
return
}
// 发邮件
this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{uid})
//审核通过推送
this.module.SendMsgToUser(string(this.module.GetType()), "pagree", &pb.SociatyPAgreePush{
Uid: uid,

View File

@ -44,7 +44,7 @@ func (this *apiComp) Discharge(session comm.IUserSession, req *pb.SociatyDischar
// 发邮件
receiver := this.module.modelSociaty.getMemberIds(sociaty)
this.module.modelSociaty.sendMail(receiver)
this.module.modelSociaty.sendMail("GuildExpel", []string{sociaty.Name}, receiver)
//清除玩家sociatyId
update := map[string]interface{}{

View File

@ -40,7 +40,6 @@ func (this *apiComp) Dismiss(session comm.IUserSession, req *pb.SociatyDismissRe
update["dismissTime"] = utils.AddHour(24).Unix()
} else {
if req.Dismiss == 1 { //取消解散
update := map[string]interface{}{}
if utils.IsInCDHour(int64(sociaty.DismissCD)) {
code = pb.ErrorCode_SociatyCDLimit
return

View File

@ -3,6 +3,7 @@ package sociaty
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/utils"
"google.golang.org/protobuf/proto"
)
@ -37,6 +38,18 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.SociatyMineReq) (co
return
}
// 初始玩家公会任务
sociatyTask := this.module.modelSociatyTask.getUserTask(uid, sociaty.Id)
if sociatyTask.SociatyId != "" {
if utils.IsFirstTody(sociatyTask.LastUpdateTime) {
if err := this.module.modelSociatyTask.deleTask(sociaty.Id, uid); err == nil {
if err = this.module.modelSociatyTask.initSociatyTask(uid, sociaty.Id); err != nil {
this.module.Errorf("初始化玩家攻击任务失败 err:%v", err)
}
}
}
}
// 获取会长
master := this.module.modelSociaty.getMasterInfo(sociaty)
if master != nil {

View File

@ -29,7 +29,7 @@ func (this *apiComp) TaskList(session comm.IUserSession, req *pb.SociatyTaskList
}
}()
sociatyTask := this.module.modelSociatyTask.taskList(uid, sociaty.Id)
sociatyTask := this.module.modelSociatyTask.getUserTask(uid, sociaty.Id)
if sociatyTask.SociatyId != "" {
var taskList []*pb.SociatyTask

View File

@ -337,6 +337,8 @@ func (this *ModelSociaty) dismiss(sociaty *pb.DBSociaty) error {
this.getMemberIds(sociaty)...); err != nil {
log.Errorf("公会解散推送 err:%v", err)
}
//发邮件
this.sendMail("GuildDissolution", []string{sociaty.Name}, this.getMemberIds(sociaty))
return nil
}
@ -379,20 +381,21 @@ func (this *ModelSociaty) addMember(uid string, sociaty *pb.DBSociaty) error {
return err
}
// 发邮件
this.sendMail(this.getMemberIds(sociaty))
// 记录日志
this.moduleSociaty.modelSociatyLog.addLog(Log_Add, sociaty.Id, uid)
return nil
}
// 发邮件给公会成员
func (this *ModelSociaty) sendMail(receiver []string) error {
// if module, err := this.moduleSociaty.service.GetModule(comm.ModuleMail); err == nil {
// if mail, ok := module.(comm.Imail); ok {
// mail.SendNewMail(&pb.DBMailData{}, receiver...)
// }
// }
func (this *ModelSociaty) sendMail(confId string, params []string, receiver []string) error {
if module, err := this.moduleSociaty.service.GetModule(comm.ModuleMail); err == nil {
if mail, ok := module.(comm.Imail); ok {
mail.SendNewMail(&pb.DBMailData{
Cid: confId,
Param: params,
}, receiver...)
}
}
return nil
}
@ -543,10 +546,15 @@ func (this *ModelSociaty) accuse(sociaty *pb.DBSociaty) error {
if err != nil {
return err
}
ggd := this.moduleSociaty.configure.GetGlobalConf()
if ggd == nil {
return errors.New("config not found")
}
//会长离线时间
now := time.Now().Unix()
left := now - user.Offlinetime
if left < 72*3600 || user.Offlinetime == 0 {
if left < int64(ggd.GuildImpeachmentCountDown*3600) || user.Offlinetime == 0 {
return errors.New("会长很称职,无需弹劾")
} else {
//更新会长的弹劾时间
@ -911,8 +919,8 @@ func (this *ModelSociaty) memberClear(sociaty *pb.DBSociaty) error {
}
}
//发送邮件
if err := this.moduleSociaty.modelSociaty.sendMail(receiver); err != nil {
log.Errorf("邮件发送失败 sociatyId: %s err:%v", sociaty.Id, err)
}
// if err := this.moduleSociaty.modelSociaty.sendMail(receiver); err != nil {
// log.Errorf("邮件发送失败 sociatyId: %s err:%v", sociaty.Id, err)
// }
return nil
}

View File

@ -7,6 +7,7 @@ import (
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/utils"
"time"
)
type ModelSociatyTask struct {
@ -36,10 +37,15 @@ func (this *ModelSociatyTask) initSociatyTask(uid, sociatyId string) error {
var taskList []*pb.SociatyTask
list := ggt.GetDataList()
ggd := this.moduleSociaty.configure.GetGlobalConf()
if ggd == nil {
return errors.New("config not found")
}
// 大于4条配置
if len(list) > 4 {
if len(list) > int(ggd.GuildTaskNum) {
//随机4条任务
randInts := utils.RandomNumbers(0, len(list)-1, 4)
randInts := utils.RandomNumbers(0, len(list)-1, int(ggd.GuildTaskNum))
for _, v := range randInts {
taskList = append(taskList, &pb.SociatyTask{
TaskId: list[v].Id,
@ -53,11 +59,12 @@ func (this *ModelSociatyTask) initSociatyTask(uid, sociatyId string) error {
}
}
sociatyTask.TaskList = taskList
sociatyTask.LastUpdateTime = time.Now().Unix()
return this.moduleSociaty.modelSociatyTask.AddList(sociatyId, uid, sociatyTask)
}
//任务列表
func (this *ModelSociatyTask) taskList(uid, sociatyId string) (task *pb.DBSociatyTask) {
func (this *ModelSociatyTask) getUserTask(uid, sociatyId string) (task *pb.DBSociatyTask) {
task = &pb.DBSociatyTask{}
this.GetListObj(sociatyId, uid, task)
return

359
pb/growtask_db.pb.go Normal file
View File

@ -0,0 +1,359 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: growtask/growtask_db.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//任务状态
type GrowtaskStatus int32
const (
GrowtaskStatus_Lock GrowtaskStatus = 0 //锁定
GrowtaskStatus_Ongoing GrowtaskStatus = 1 //进行中
GrowtaskStatus_Wait GrowtaskStatus = 2 //待领奖
GrowtaskStatus_Finish GrowtaskStatus = 3 //完成
)
// Enum value maps for GrowtaskStatus.
var (
GrowtaskStatus_name = map[int32]string{
0: "Lock",
1: "Ongoing",
2: "Wait",
3: "Finish",
}
GrowtaskStatus_value = map[string]int32{
"Lock": 0,
"Ongoing": 1,
"Wait": 2,
"Finish": 3,
}
)
func (x GrowtaskStatus) Enum() *GrowtaskStatus {
p := new(GrowtaskStatus)
*p = x
return p
}
func (x GrowtaskStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GrowtaskStatus) Descriptor() protoreflect.EnumDescriptor {
return file_growtask_growtask_db_proto_enumTypes[0].Descriptor()
}
func (GrowtaskStatus) Type() protoreflect.EnumType {
return &file_growtask_growtask_db_proto_enumTypes[0]
}
func (x GrowtaskStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GrowtaskStatus.Descriptor instead.
func (GrowtaskStatus) EnumDescriptor() ([]byte, []int) {
return file_growtask_growtask_db_proto_rawDescGZIP(), []int{0}
}
type DBGrowtask struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
InitTaskList []*Growtask `protobuf:"bytes,2,rep,name=initTaskList,proto3" json:"initTaskList" bson:"initTaskList"` //初级任务列表
MidTaskList []*Growtask `protobuf:"bytes,3,rep,name=midTaskList,proto3" json:"midTaskList" bson:"midTaskList"` //中级任务列表
HighTaskList []*Growtask `protobuf:"bytes,4,rep,name=highTaskList,proto3" json:"highTaskList" bson:"highTaskList"` //高级任务列表
CurTaskType int32 `protobuf:"varint,5,opt,name=curTaskType,proto3" json:"curTaskType" bson:"curTaskType"` //进行中的任务类型
AdvReceive int32 `protobuf:"varint,6,opt,name=advReceive,proto3" json:"advReceive" bson:"advReceive"` //已领取的进阶奖励ID
}
func (x *DBGrowtask) Reset() {
*x = DBGrowtask{}
if protoimpl.UnsafeEnabled {
mi := &file_growtask_growtask_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBGrowtask) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBGrowtask) ProtoMessage() {}
func (x *DBGrowtask) ProtoReflect() protoreflect.Message {
mi := &file_growtask_growtask_db_proto_msgTypes[0]
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 DBGrowtask.ProtoReflect.Descriptor instead.
func (*DBGrowtask) Descriptor() ([]byte, []int) {
return file_growtask_growtask_db_proto_rawDescGZIP(), []int{0}
}
func (x *DBGrowtask) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBGrowtask) GetInitTaskList() []*Growtask {
if x != nil {
return x.InitTaskList
}
return nil
}
func (x *DBGrowtask) GetMidTaskList() []*Growtask {
if x != nil {
return x.MidTaskList
}
return nil
}
func (x *DBGrowtask) GetHighTaskList() []*Growtask {
if x != nil {
return x.HighTaskList
}
return nil
}
func (x *DBGrowtask) GetCurTaskType() int32 {
if x != nil {
return x.CurTaskType
}
return 0
}
func (x *DBGrowtask) GetAdvReceive() int32 {
if x != nil {
return x.AdvReceive
}
return 0
}
type Growtask struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id" bson:"id"` //配置ID
TaskType int32 `protobuf:"varint,2,opt,name=taskType,proto3" json:"taskType" bson:"taskType"` //任务类型
Status GrowtaskStatus `protobuf:"varint,3,opt,name=status,proto3,enum=GrowtaskStatus" json:"status" bson:"status"` //任务状态
Fstask int32 `protobuf:"varint,4,opt,name=fstask,proto3" json:"fstask" bson:"fstask"` //任务条件
PreTask int32 `protobuf:"varint,5,opt,name=preTask,proto3" json:"preTask" bson:"preTask"` //前置任务ID
}
func (x *Growtask) Reset() {
*x = Growtask{}
if protoimpl.UnsafeEnabled {
mi := &file_growtask_growtask_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Growtask) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Growtask) ProtoMessage() {}
func (x *Growtask) ProtoReflect() protoreflect.Message {
mi := &file_growtask_growtask_db_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Growtask.ProtoReflect.Descriptor instead.
func (*Growtask) Descriptor() ([]byte, []int) {
return file_growtask_growtask_db_proto_rawDescGZIP(), []int{1}
}
func (x *Growtask) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *Growtask) GetTaskType() int32 {
if x != nil {
return x.TaskType
}
return 0
}
func (x *Growtask) GetStatus() GrowtaskStatus {
if x != nil {
return x.Status
}
return GrowtaskStatus_Lock
}
func (x *Growtask) GetFstask() int32 {
if x != nil {
return x.Fstask
}
return 0
}
func (x *Growtask) GetPreTask() int32 {
if x != nil {
return x.PreTask
}
return 0
}
var File_growtask_growtask_db_proto protoreflect.FileDescriptor
var file_growtask_growtask_db_proto_rawDesc = []byte{
0x0a, 0x1a, 0x67, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x67, 0x72, 0x6f, 0x77, 0x74,
0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x01, 0x0a,
0x0a, 0x44, 0x42, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x75,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2d, 0x0a,
0x0c, 0x69, 0x6e, 0x69, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x0c,
0x69, 0x6e, 0x69, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x0b,
0x6d, 0x69, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x09, 0x2e, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x0b, 0x6d, 0x69,
0x64, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0c, 0x68, 0x69, 0x67,
0x68, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x09, 0x2e, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x0c, 0x68, 0x69, 0x67, 0x68,
0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x72, 0x54,
0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63,
0x75, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64,
0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x61, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x08, 0x47,
0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54,
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54,
0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06,
0x66, 0x73, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x73,
0x74, 0x61, 0x73, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x18,
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x72, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x2a, 0x3d,
0x0a, 0x0e, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, 0x63, 0x6b, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x6e,
0x67, 0x6f, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, 0x10,
0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, 0x03, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_growtask_growtask_db_proto_rawDescOnce sync.Once
file_growtask_growtask_db_proto_rawDescData = file_growtask_growtask_db_proto_rawDesc
)
func file_growtask_growtask_db_proto_rawDescGZIP() []byte {
file_growtask_growtask_db_proto_rawDescOnce.Do(func() {
file_growtask_growtask_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_growtask_growtask_db_proto_rawDescData)
})
return file_growtask_growtask_db_proto_rawDescData
}
var file_growtask_growtask_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_growtask_growtask_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_growtask_growtask_db_proto_goTypes = []interface{}{
(GrowtaskStatus)(0), // 0: GrowtaskStatus
(*DBGrowtask)(nil), // 1: DBGrowtask
(*Growtask)(nil), // 2: Growtask
}
var file_growtask_growtask_db_proto_depIdxs = []int32{
2, // 0: DBGrowtask.initTaskList:type_name -> Growtask
2, // 1: DBGrowtask.midTaskList:type_name -> Growtask
2, // 2: DBGrowtask.highTaskList:type_name -> Growtask
0, // 3: Growtask.status:type_name -> GrowtaskStatus
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_growtask_growtask_db_proto_init() }
func file_growtask_growtask_db_proto_init() {
if File_growtask_growtask_db_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_growtask_growtask_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBGrowtask); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_growtask_growtask_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Growtask); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_growtask_growtask_db_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_growtask_growtask_db_proto_goTypes,
DependencyIndexes: file_growtask_growtask_db_proto_depIdxs,
EnumInfos: file_growtask_growtask_db_proto_enumTypes,
MessageInfos: file_growtask_growtask_db_proto_msgTypes,
}.Build()
File_growtask_growtask_db_proto = out.File
file_growtask_growtask_db_proto_rawDesc = nil
file_growtask_growtask_db_proto_goTypes = nil
file_growtask_growtask_db_proto_depIdxs = nil
}

496
pb/growtask_msg.pb.go Normal file
View File

@ -0,0 +1,496 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: growtask/growtask_msg.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 成长任务列表
type GrowtaskListReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskType int32 `protobuf:"varint,1,opt,name=taskType,proto3" json:"taskType"` //任务类型1初级2中级3高级
}
func (x *GrowtaskListReq) Reset() {
*x = GrowtaskListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_growtask_growtask_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GrowtaskListReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GrowtaskListReq) ProtoMessage() {}
func (x *GrowtaskListReq) ProtoReflect() protoreflect.Message {
mi := &file_growtask_growtask_msg_proto_msgTypes[0]
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 GrowtaskListReq.ProtoReflect.Descriptor instead.
func (*GrowtaskListReq) Descriptor() ([]byte, []int) {
return file_growtask_growtask_msg_proto_rawDescGZIP(), []int{0}
}
func (x *GrowtaskListReq) GetTaskType() int32 {
if x != nil {
return x.TaskType
}
return 0
}
type GrowtaskListResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskList []*Growtask `protobuf:"bytes,1,rep,name=taskList,proto3" json:"taskList"`
CurTaskType int32 `protobuf:"varint,2,opt,name=curTaskType,proto3" json:"curTaskType"` // 进行中的任务类型
AdvReceive int32 `protobuf:"varint,3,opt,name=advReceive,proto3" json:"advReceive"` //已领取的进阶奖励ID
CurTaskId int32 `protobuf:"varint,4,opt,name=curTaskId,proto3" json:"curTaskId"` // 当前未完成的任务ID
}
func (x *GrowtaskListResp) Reset() {
*x = GrowtaskListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_growtask_growtask_msg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GrowtaskListResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GrowtaskListResp) ProtoMessage() {}
func (x *GrowtaskListResp) ProtoReflect() protoreflect.Message {
mi := &file_growtask_growtask_msg_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GrowtaskListResp.ProtoReflect.Descriptor instead.
func (*GrowtaskListResp) Descriptor() ([]byte, []int) {
return file_growtask_growtask_msg_proto_rawDescGZIP(), []int{1}
}
func (x *GrowtaskListResp) GetTaskList() []*Growtask {
if x != nil {
return x.TaskList
}
return nil
}
func (x *GrowtaskListResp) GetCurTaskType() int32 {
if x != nil {
return x.CurTaskType
}
return 0
}
func (x *GrowtaskListResp) GetAdvReceive() int32 {
if x != nil {
return x.AdvReceive
}
return 0
}
func (x *GrowtaskListResp) GetCurTaskId() int32 {
if x != nil {
return x.CurTaskId
}
return 0
}
//子任务奖励领取
type GrowtaskReceiveReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"` //子任务ID
}
func (x *GrowtaskReceiveReq) Reset() {
*x = GrowtaskReceiveReq{}
if protoimpl.UnsafeEnabled {
mi := &file_growtask_growtask_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GrowtaskReceiveReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GrowtaskReceiveReq) ProtoMessage() {}
func (x *GrowtaskReceiveReq) ProtoReflect() protoreflect.Message {
mi := &file_growtask_growtask_msg_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GrowtaskReceiveReq.ProtoReflect.Descriptor instead.
func (*GrowtaskReceiveReq) Descriptor() ([]byte, []int) {
return file_growtask_growtask_msg_proto_rawDescGZIP(), []int{2}
}
func (x *GrowtaskReceiveReq) GetTaskId() int32 {
if x != nil {
return x.TaskId
}
return 0
}
type GrowtaskReceiveResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"`
}
func (x *GrowtaskReceiveResp) Reset() {
*x = GrowtaskReceiveResp{}
if protoimpl.UnsafeEnabled {
mi := &file_growtask_growtask_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GrowtaskReceiveResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GrowtaskReceiveResp) ProtoMessage() {}
func (x *GrowtaskReceiveResp) ProtoReflect() protoreflect.Message {
mi := &file_growtask_growtask_msg_proto_msgTypes[3]
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 GrowtaskReceiveResp.ProtoReflect.Descriptor instead.
func (*GrowtaskReceiveResp) Descriptor() ([]byte, []int) {
return file_growtask_growtask_msg_proto_rawDescGZIP(), []int{3}
}
func (x *GrowtaskReceiveResp) GetTaskId() int32 {
if x != nil {
return x.TaskId
}
return 0
}
//进阶奖励领取
type GrowtaskAdvReceiveReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskType int32 `protobuf:"varint,1,opt,name=taskType,proto3" json:"taskType"` //任务类型
}
func (x *GrowtaskAdvReceiveReq) Reset() {
*x = GrowtaskAdvReceiveReq{}
if protoimpl.UnsafeEnabled {
mi := &file_growtask_growtask_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GrowtaskAdvReceiveReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GrowtaskAdvReceiveReq) ProtoMessage() {}
func (x *GrowtaskAdvReceiveReq) ProtoReflect() protoreflect.Message {
mi := &file_growtask_growtask_msg_proto_msgTypes[4]
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 GrowtaskAdvReceiveReq.ProtoReflect.Descriptor instead.
func (*GrowtaskAdvReceiveReq) Descriptor() ([]byte, []int) {
return file_growtask_growtask_msg_proto_rawDescGZIP(), []int{4}
}
func (x *GrowtaskAdvReceiveReq) GetTaskType() int32 {
if x != nil {
return x.TaskType
}
return 0
}
type GrowtaskAdvReceiveResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TaskType int32 `protobuf:"varint,1,opt,name=taskType,proto3" json:"taskType"`
}
func (x *GrowtaskAdvReceiveResp) Reset() {
*x = GrowtaskAdvReceiveResp{}
if protoimpl.UnsafeEnabled {
mi := &file_growtask_growtask_msg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GrowtaskAdvReceiveResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GrowtaskAdvReceiveResp) ProtoMessage() {}
func (x *GrowtaskAdvReceiveResp) ProtoReflect() protoreflect.Message {
mi := &file_growtask_growtask_msg_proto_msgTypes[5]
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 GrowtaskAdvReceiveResp.ProtoReflect.Descriptor instead.
func (*GrowtaskAdvReceiveResp) Descriptor() ([]byte, []int) {
return file_growtask_growtask_msg_proto_rawDescGZIP(), []int{5}
}
func (x *GrowtaskAdvReceiveResp) GetTaskType() int32 {
if x != nil {
return x.TaskType
}
return 0
}
var File_growtask_growtask_msg_proto protoreflect.FileDescriptor
var file_growtask_growtask_msg_proto_rawDesc = []byte{
0x0a, 0x1b, 0x67, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x67, 0x72, 0x6f, 0x77, 0x74,
0x61, 0x73, 0x6b, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67,
0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x67, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b,
0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, 0x0f, 0x47, 0x72, 0x6f,
0x77, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08,
0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x10, 0x47, 0x72, 0x6f,
0x77, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a,
0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x09, 0x2e, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b,
0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x54,
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x54, 0x61,
0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x76, 0x52, 0x65, 0x63,
0x65, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x64, 0x76, 0x52,
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x54, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x75, 0x72, 0x54, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b,
0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 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, 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 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, 0x33, 0x0a, 0x15, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x64, 0x76,
0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61,
0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x61,
0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x34, 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61,
0x73, 0x6b, 0x41, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70,
0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_growtask_growtask_msg_proto_rawDescOnce sync.Once
file_growtask_growtask_msg_proto_rawDescData = file_growtask_growtask_msg_proto_rawDesc
)
func file_growtask_growtask_msg_proto_rawDescGZIP() []byte {
file_growtask_growtask_msg_proto_rawDescOnce.Do(func() {
file_growtask_growtask_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_growtask_growtask_msg_proto_rawDescData)
})
return file_growtask_growtask_msg_proto_rawDescData
}
var file_growtask_growtask_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_growtask_growtask_msg_proto_goTypes = []interface{}{
(*GrowtaskListReq)(nil), // 0: GrowtaskListReq
(*GrowtaskListResp)(nil), // 1: GrowtaskListResp
(*GrowtaskReceiveReq)(nil), // 2: GrowtaskReceiveReq
(*GrowtaskReceiveResp)(nil), // 3: GrowtaskReceiveResp
(*GrowtaskAdvReceiveReq)(nil), // 4: GrowtaskAdvReceiveReq
(*GrowtaskAdvReceiveResp)(nil), // 5: GrowtaskAdvReceiveResp
(*Growtask)(nil), // 6: Growtask
}
var file_growtask_growtask_msg_proto_depIdxs = []int32{
6, // 0: GrowtaskListResp.taskList:type_name -> Growtask
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_growtask_growtask_msg_proto_init() }
func file_growtask_growtask_msg_proto_init() {
if File_growtask_growtask_msg_proto != nil {
return
}
file_growtask_growtask_db_proto_init()
if !protoimpl.UnsafeEnabled {
file_growtask_growtask_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GrowtaskListReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_growtask_growtask_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GrowtaskListResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_growtask_growtask_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GrowtaskReceiveReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_growtask_growtask_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GrowtaskReceiveResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_growtask_growtask_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GrowtaskAdvReceiveReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_growtask_growtask_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GrowtaskAdvReceiveResp); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_growtask_growtask_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_growtask_growtask_msg_proto_goTypes,
DependencyIndexes: file_growtask_growtask_msg_proto_depIdxs,
MessageInfos: file_growtask_growtask_msg_proto_msgTypes,
}.Build()
File_growtask_growtask_msg_proto = out.File
file_growtask_growtask_msg_proto_rawDesc = nil
file_growtask_growtask_msg_proto_goTypes = nil
file_growtask_growtask_msg_proto_depIdxs = nil
}

View File

@ -35,6 +35,7 @@ type DBMailData struct {
Reward bool `protobuf:"varint,8,opt,name=Reward,proto3" json:"Reward"` // 附件领取状态
Items []*UserAssets `protobuf:"bytes,9,rep,name=Items,proto3" json:"Items"` // 附件
Cid string `protobuf:"bytes,10,opt,name=Cid,proto3" json:"Cid"` // 邮件的配置表ID
Param []string `protobuf:"bytes,11,rep,name=Param,proto3" json:"Param"`
}
func (x *DBMailData) Reset() {
@ -139,12 +140,19 @@ func (x *DBMailData) GetCid() string {
return ""
}
func (x *DBMailData) GetParam() []string {
if x != nil {
return x.Param
}
return nil
}
var File_mail_mail_db_proto protoreflect.FileDescriptor
var file_mail_mail_db_proto_rawDesc = []byte{
0x0a, 0x12, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xff, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12,
0x22, 0x95, 0x02, 0x0a, 0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12,
0x14, 0x0a, 0x05, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x4f, 0x62, 0x6a, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x55, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65,
@ -160,8 +168,9 @@ var file_mail_mail_db_proto_rawDesc = []byte{
0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73,
0x12, 0x10, 0x0a, 0x03, 0x43, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x43,
0x69, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x0b, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -504,10 +504,11 @@ type DBSociatyTask struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"` //@go_tags(`bson:"sociatyId") 公会ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
TaskList []*SociatyTask `protobuf:"bytes,3,rep,name=taskList,proto3" json:"taskList" bson:"taskList"` //任务列表
ActivityList []*SociatyActivity `protobuf:"bytes,4,rep,name=activityList,proto3" json:"activityList" bson:"activityList"` //活跃度列表
SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"` //@go_tags(`bson:"sociatyId") 公会ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
TaskList []*SociatyTask `protobuf:"bytes,3,rep,name=taskList,proto3" json:"taskList" bson:"taskList"` //任务列表
ActivityList []*SociatyActivity `protobuf:"bytes,4,rep,name=activityList,proto3" json:"activityList" bson:"activityList"` //活跃度列表
LastUpdateTime int64 `protobuf:"varint,5,opt,name=lastUpdateTime,proto3" json:"lastUpdateTime" bson:"lastUpdateTime"` //上次初始时间
}
func (x *DBSociatyTask) Reset() {
@ -570,6 +571,13 @@ func (x *DBSociatyTask) GetActivityList() []*SociatyActivity {
return nil
}
func (x *DBSociatyTask) GetLastUpdateTime() int64 {
if x != nil {
return x.LastUpdateTime
}
return 0
}
// 任务
type SociatyTask struct {
state protoimpl.MessageState
@ -818,7 +826,7 @@ var file_sociaty_sociaty_db_proto_rawDesc = []byte{
0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a,
0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x53, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x9f,
0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xc7,
0x01, 0x0a, 0x0d, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b,
0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x10,
@ -829,29 +837,31 @@ var file_sociaty_sociaty_db_proto_rawDesc = []byte{
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x10, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
0x74, 0x79, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74,
0x22, 0x3d, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 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, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22,
0x39, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0d, 0x44,
0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x1a,
0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74,
0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65,
0x2a, 0x50, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x09,
0x0a, 0x05, 0x4e, 0x4f, 0x4a, 0x4f, 0x42, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d,
0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02,
0x12, 0x11, 0x0a, 0x0d, 0x56, 0x49, 0x43, 0x45, 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e,
0x54, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54,
0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69,
0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x3d, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 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,
0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x39, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74,
0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x52, 0x61, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x50, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4a, 0x4f, 0x42, 0x10,
0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a,
0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x56, 0x49, 0x43, 0x45,
0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x50,
0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -12,6 +12,7 @@ import (
"go_dreamfactory/modules/friend"
"go_dreamfactory/modules/gm"
"go_dreamfactory/modules/gourmet"
"go_dreamfactory/modules/growtask"
"go_dreamfactory/modules/hero"
"go_dreamfactory/modules/horoscope"
"go_dreamfactory/modules/hunting"
@ -99,6 +100,7 @@ func main() {
horoscope.NewModule(),
pay.NewModule(),
//privilege.NewModule(),
growtask.NewModule(),
)
}

View File

@ -13,6 +13,7 @@ import "errors"
type GameGrowRewardData struct {
Type int32
Allreward []*Gameatn
Title string
}
const TypeId_GameGrowRewardData = 1151266152
@ -37,6 +38,7 @@ func (_v *GameGrowRewardData)Deserialize(_buf map[string]interface{}) (err error
}
}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["title"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Title error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Title, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
return
}

View File

@ -14,6 +14,7 @@ type GameGrowTaskData struct {
Id int32
Type int32
Title string
Onetask int32
Txt string
Portrait string
Fstask int32
@ -31,6 +32,7 @@ func (_v *GameGrowTaskData)Deserialize(_buf map[string]interface{}) (err error)
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; if _v.Title, _ok_ = _buf["title"].(string); !_ok_ { err = errors.New("title error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["onetask"].(float64); !_ok_ { err = errors.New("onetask error"); return }; _v.Onetask = int32(_tempNum_) }
{ var _ok_ bool; if _v.Txt, _ok_ = _buf["txt"].(string); !_ok_ { err = errors.New("txt error"); return } }
{ var _ok_ bool; if _v.Portrait, _ok_ = _buf["portrait"].(string); !_ok_ { err = errors.New("portrait error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["fstask"].(float64); !_ok_ { err = errors.New("fstask error"); return }; _v.Fstask = int32(_tempNum_) }

View File

@ -100,6 +100,7 @@ type GameGlobalData struct {
GuildViceAllianceLeaderMaxNum int32
GuildAdministratorsMaxNum int32
GuildInitiateImpeachmentTime int32
GuildTaskNum int32
GuildImpeachmentCountDown int32
GuildDissolutionCountDownCd int32
GuildDissolutionCd int32
@ -356,6 +357,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_ViceAllianceLeader_MaxNum"].(float64); !_ok_ { err = errors.New("guild_ViceAllianceLeader_MaxNum error"); return }; _v.GuildViceAllianceLeaderMaxNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_administrators_MaxNum"].(float64); !_ok_ { err = errors.New("guild_administrators_MaxNum error"); return }; _v.GuildAdministratorsMaxNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_InitiateImpeachmentTime"].(float64); !_ok_ { err = errors.New("guild_InitiateImpeachmentTime error"); return }; _v.GuildInitiateImpeachmentTime = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_TaskNum"].(float64); !_ok_ { err = errors.New("guild_TaskNum error"); return }; _v.GuildTaskNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_ImpeachmentCountDown"].(float64); !_ok_ { err = errors.New("guild_ImpeachmentCountDown error"); return }; _v.GuildImpeachmentCountDown = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_DissolutionCountDown_cd"].(float64); !_ok_ { err = errors.New("guild_DissolutionCountDown_cd error"); return }; _v.GuildDissolutionCountDownCd = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_dissolution_cd"].(float64); !_ok_ { err = errors.New("guild_dissolution_cd error"); return }; _v.GuildDissolutionCd = int32(_tempNum_) }

View File

@ -26,6 +26,21 @@ func IsAfterWeek(d int64) bool {
return nowt.Unix() >= at
}
// 是否今日首次
func IsFirstTody(timestamp int64) bool {
now := time.Now()
if timestamp == 0 || timestamp > now.Unix() {
return false
}
tt := time.Unix(timestamp, 0)
if !IsToday(timestamp) {
if tt.Before(now) {
return true
}
}
return false
}
// 获取当前时间戳下一天0点时间戳
func GetZeroTime(curTime int64) int64 {
currentTime := time.Unix(curTime, 0)