上传周长任务

This commit is contained in:
liwei1dao 2023-08-30 18:46:17 +08:00
parent b1d2ef7dae
commit 651669499f
50 changed files with 4939 additions and 4174 deletions

View File

@ -1,7 +1,6 @@
[ [
{ {
"key": 1, "key": 1,
"id_tag": 2,
"active": 40, "active": 40,
"reword": [ "reword": [
{ {
@ -15,7 +14,6 @@
}, },
{ {
"key": 2, "key": 2,
"id_tag": 2,
"active": 80, "active": 80,
"reword": [ "reword": [
{ {
@ -34,7 +32,6 @@
}, },
{ {
"key": 3, "key": 3,
"id_tag": 2,
"active": 120, "active": 120,
"reword": [ "reword": [
{ {
@ -53,7 +50,6 @@
}, },
{ {
"key": 4, "key": 4,
"id_tag": 2,
"active": 160, "active": 160,
"reword": [ "reword": [
{ {

View File

@ -110,7 +110,7 @@
}, },
"planC": { "planC": {
"key": "ask_ask_library_planC_04", "key": "ask_ask_library_planC_04",
"text": "熊猫" "text": "李山"
}, },
"planD": { "planD": {
"key": "ask_ask_library_planD_04", "key": "ask_ask_library_planD_04",

View File

@ -24619,7 +24619,7 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_870", "key": "buried_buried_condi_tasktxt_870",
"text": "城市移動" "text": "前往功夫熊猫城市"
}, },
"type": 212, "type": 212,
"valid": 0, "valid": 0,
@ -24643,7 +24643,7 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_871", "key": "buried_buried_condi_tasktxt_871",
"text": "购买特产" "text": "购买疯狂外星人特产"
}, },
"type": 209, "type": 209,
"valid": 0, "valid": 0,
@ -24667,7 +24667,7 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_872", "key": "buried_buried_condi_tasktxt_872",
"text": "贩卖货物" "text": "出售货物给功夫熊猫"
}, },
"type": 210, "type": 210,
"valid": 0, "valid": 0,
@ -24691,7 +24691,7 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_873", "key": "buried_buried_condi_tasktxt_873",
"text": "贩卖特产" "text": "特产出售给魔法精灵"
}, },
"type": 211, "type": 211,
"valid": 0, "valid": 0,
@ -24703,8 +24703,7 @@
"NPC": -10041, "NPC": -10041,
"value": 1000, "value": 1000,
"filter": [ "filter": [
105, 105
1
], ],
"filter2": [] "filter2": []
}, },

View File

@ -204,8 +204,7 @@
"id": 103, "id": 103,
"citylink": [ "citylink": [
102, 102,
101, 101
108
], ],
"cityticket": [ "cityticket": [
{ {
@ -316,7 +315,8 @@
"citylink": [ "citylink": [
101, 101,
113, 113,
109 109,
105
], ],
"cityticket": [ "cityticket": [
{ {
@ -429,7 +429,8 @@
"id": 105, "id": 105,
"citylink": [ "citylink": [
108, 108,
106 106,
103
], ],
"cityticket": [ "cityticket": [
{ {
@ -656,7 +657,8 @@
"id": 107, "id": 107,
"citylink": [ "citylink": [
113, 113,
106 106,
108
], ],
"cityticket": [ "cityticket": [
{ {
@ -768,8 +770,8 @@
{ {
"id": 108, "id": 108,
"citylink": [ "citylink": [
103, 105,
105 107
], ],
"cityticket": [ "cityticket": [
{ {

View File

@ -4,7 +4,7 @@
"eventgroup": 1, "eventgroup": 1,
"eventweight": 250, "eventweight": 250,
"eventtype": 1, "eventtype": 1,
"mustdo": 1, "mustdo": 2,
"citystory": 50020010, "citystory": 50020010,
"citynormal": 50020030, "citynormal": 50020030,
"cityabnormal": 50020020, "cityabnormal": 50020020,
@ -64,7 +64,7 @@
"eventgroup": 1, "eventgroup": 1,
"eventweight": 250, "eventweight": 250,
"eventtype": 1, "eventtype": 1,
"mustdo": 1, "mustdo": 2,
"citystory": 50020010, "citystory": 50020010,
"citynormal": 50020030, "citynormal": 50020030,
"cityabnormal": 50020020, "cityabnormal": 50020020,
@ -94,7 +94,7 @@
"eventgroup": 1, "eventgroup": 1,
"eventweight": 250, "eventweight": 250,
"eventtype": 1, "eventtype": 1,
"mustdo": 1, "mustdo": 2,
"citystory": 50020010, "citystory": 50020010,
"citynormal": 50020030, "citynormal": 50020030,
"cityabnormal": 50020020, "cityabnormal": 50020020,

View File

@ -3,7 +3,7 @@
"id": 1, "id": 1,
"pool": 1, "pool": 1,
"hero_initial": "25001", "hero_initial": "25001",
"hero_replace": "25001", "hero_replace": "15002",
"replace_cd": 0, "replace_cd": 0,
"replace_num": 0, "replace_num": 0,
"buy_cos": { "buy_cos": {
@ -16,7 +16,7 @@
"id": 2, "id": 2,
"pool": 1, "pool": 1,
"hero_initial": "25001", "hero_initial": "25001",
"hero_replace": "24002", "hero_replace": "15004",
"replace_cd": 0, "replace_cd": 0,
"replace_num": 0, "replace_num": 0,
"buy_cos": { "buy_cos": {
@ -29,7 +29,7 @@
"id": 3, "id": 3,
"pool": 1, "pool": 1,
"hero_initial": "25001", "hero_initial": "25001",
"hero_replace": "13003", "hero_replace": "25001",
"replace_cd": 0, "replace_cd": 0,
"replace_num": 0, "replace_num": 0,
"buy_cos": { "buy_cos": {
@ -40,6 +40,45 @@
}, },
{ {
"id": 4, "id": 4,
"pool": 1,
"hero_initial": "25001",
"hero_replace": "25004",
"replace_cd": 0,
"replace_num": 0,
"buy_cos": {
"a": "item",
"t": "10000101",
"n": 150
}
},
{
"id": 5,
"pool": 1,
"hero_initial": "25001",
"hero_replace": "35004",
"replace_cd": 0,
"replace_num": 0,
"buy_cos": {
"a": "item",
"t": "10000101",
"n": 180
}
},
{
"id": 6,
"pool": 1,
"hero_initial": "25001",
"hero_replace": "35005",
"replace_cd": 0,
"replace_num": 0,
"buy_cos": {
"a": "item",
"t": "10000101",
"n": 180
}
},
{
"id": 7,
"pool": 2, "pool": 2,
"hero_initial": "15002", "hero_initial": "15002",
"hero_replace": "15002", "hero_replace": "15002",
@ -52,7 +91,7 @@
} }
}, },
{ {
"id": 5, "id": 8,
"pool": 2, "pool": 2,
"hero_initial": "15002", "hero_initial": "15002",
"hero_replace": "15004", "hero_replace": "15004",
@ -65,7 +104,7 @@
} }
}, },
{ {
"id": 6, "id": 9,
"pool": 2, "pool": 2,
"hero_initial": "15002", "hero_initial": "15002",
"hero_replace": "25001", "hero_replace": "25001",
@ -78,7 +117,7 @@
} }
}, },
{ {
"id": 7, "id": 10,
"pool": 2, "pool": 2,
"hero_initial": "15002", "hero_initial": "15002",
"hero_replace": "25004", "hero_replace": "25004",
@ -91,7 +130,7 @@
} }
}, },
{ {
"id": 8, "id": 11,
"pool": 2, "pool": 2,
"hero_initial": "15002", "hero_initial": "15002",
"hero_replace": "35004", "hero_replace": "35004",
@ -104,7 +143,7 @@
} }
}, },
{ {
"id": 9, "id": 12,
"pool": 2, "pool": 2,
"hero_initial": "15002", "hero_initial": "15002",
"hero_replace": "35005", "hero_replace": "35005",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -19032,7 +19032,7 @@
}, },
"describe": { "describe": {
"key": "item_item_describe_391", "key": "item_item_describe_391",
"text": "迷宫中的美丽水晶,波澜浮光的棕红,是石洞天然形成的瑰宝。它拥有特殊的能量,将它握在手中,能使感官大幅度增强。(注意要和巨怪商队中的画的不一样)" "text": "秘境中的美丽水晶,波澜浮光的棕红,是石洞天然形成的瑰宝。它拥有特殊的能量,将它握在手中,能使感官大幅度增强。"
}, },
"dialogue": { "dialogue": {
"key": "item_item_dialogue_389", "key": "item_item_dialogue_389",

View File

@ -323,12 +323,12 @@
{ {
"id": "PeackReward", "id": "PeackReward",
"title": { "title": {
"key": "", "key": "mail_mail_title_16",
"text": "" "text": ""
}, },
"recipient": { "recipient": {
"key": "", "key": "mail_mail_recipient_16",
"text": "" "text": "亲爱的{0}"
}, },
"content": { "content": {
"key": "mail_mail_content_16", "key": "mail_mail_content_16",
@ -344,15 +344,15 @@
{ {
"id": "Venturegifts", "id": "Venturegifts",
"title": { "title": {
"key": "mail_mail_title_16", "key": "mail_mail_title_17",
"text": "转盘活动奖励转换" "text": "转盘活动奖励转换"
}, },
"recipient": { "recipient": {
"key": "", "key": "mail_mail_recipient_17",
"text": "" "text": "亲爱的{0}"
}, },
"content": { "content": {
"key": "", "key": "mail_mail_content_17",
"text": "" "text": ""
}, },
"sender": { "sender": {
@ -365,16 +365,16 @@
{ {
"id": "CaravanLvReward", "id": "CaravanLvReward",
"title": { "title": {
"key": "mail_mail_title_17", "key": "mail_mail_title_18",
"text": "商队等级奖励" "text": "商队等级奖励"
}, },
"recipient": { "recipient": {
"key": "", "key": "mail_mail_recipient_18",
"text": "" "text": "亲爱的{0}"
}, },
"content": { "content": {
"key": "mail_mail_content_18", "key": "mail_mail_content_18",
"text": "商队等级奖励" "text": "这是的商队等级提升奖励,请查收。"
}, },
"sender": { "sender": {
"key": "mail_mail_sender_18", "key": "mail_mail_sender_18",
@ -382,5 +382,26 @@
}, },
"reword": [], "reword": [],
"duration": 720 "duration": 720
},
{
"id": "CaravantReward",
"title": {
"key": "mail_mail_title_19",
"text": "商队进度奖励"
},
"recipient": {
"key": "mail_mail_recipient_19",
"text": "亲爱的{0}"
},
"content": {
"key": "mail_mail_content_19",
"text": "这是商队盈利进度"
},
"sender": {
"key": "mail_mail_sender_19",
"text": "系统"
},
"reword": [],
"duration": 720
} }
] ]

File diff suppressed because it is too large Load Diff

View File

@ -304,5 +304,23 @@
], ],
"functionicon": "cgt_icon_hfsj", "functionicon": "cgt_icon_hfsj",
"jumpId": 10019 "jumpId": 10019
},
{
"Id": 18,
"scene": "CaravanScene",
"scenename": {
"key": "navigation_Sheet1_scenename_18",
"text": "巨怪列车"
},
"sceneicon": "ty_qp_zhb",
"functionname": {
"key": "navigation_Sheet1_functionname_18",
"text": "巨怪商队"
},
"npcName": [
"列车长"
],
"functionicon": "cgt_icon_hfsj",
"jumpId": 11001
} }
] ]

View File

@ -1857,10 +1857,6 @@
{ {
"key": 1, "key": 1,
"param": 1 "param": 1
},
{
"key": 2,
"param": 1101208
} }
], ],
"wkqbx": 0, "wkqbx": 0,
@ -1880,12 +1876,7 @@
"key": "opencond_opencond_name_83", "key": "opencond_opencond_name_83",
"text": "无极塔" "text": "无极塔"
}, },
"main": [ "main": [],
{
"key": 2,
"param": 1101008
}
],
"wkqbx": 0, "wkqbx": 0,
"kqbx": 0, "kqbx": 0,
"img": "", "img": "",
@ -1930,10 +1921,6 @@
{ {
"key": 1, "key": 1,
"param": 1 "param": 1
},
{
"key": 2,
"param": 1100408
} }
], ],
"wkqbx": 2, "wkqbx": 2,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2583,7 +2583,7 @@
"key": "skill_skill_buff_Desc_390001327", "key": "skill_skill_buff_Desc_390001327",
"text": "抵抗提升40%。" "text": "抵抗提升40%。"
}, },
"BuffType": 20, "BuffType": 0,
"EffectArgu": [ "EffectArgu": [
76, 76,
500 500
@ -3592,7 +3592,7 @@
"Id": 390001426, "Id": 390001426,
"Name": { "Name": {
"key": "skill_skill_buff_Name_390001426", "key": "skill_skill_buff_Name_390001426",
"text": "[color=#37d8a9]仇视[/color] " "text": "[color=#e5621b]仇视[/color] "
}, },
"Desc": { "Desc": {
"key": "skill_skill_buff_Desc_390001426", "key": "skill_skill_buff_Desc_390001426",
@ -10567,5 +10567,183 @@
"buffeffect": "", "buffeffect": "",
"buffpos": "根节点", "buffpos": "根节点",
"forbidFloat": 0 "forbidFloat": 0
},
{
"Id": 391000066,
"Name": {
"key": "skill_skill_buff_Name_391000066",
"text": "[color=#e5621b]最大生命值上限下降[/color] "
},
"Desc": {
"key": "skill_skill_buff_Desc_391000066",
"text": "最大生命值上限下降。"
},
"BuffType": 128,
"EffectArgu": [
112,
1000,
1,
500
],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": [
1,
6
],
"AddEffect": false,
"RemoveType": false,
"Priority": 0,
"NotOverlay": 0,
"OverlayTimes": 1,
"SameID": true,
"golbalbufficon": "",
"buffIcon": "",
"buffeffect": "",
"buffpos": "",
"forbidFloat": 0
},
{
"Id": 391000067,
"Name": {
"key": "skill_skill_buff_Name_391000067",
"text": "从弱势属性英雄受到的伤害增加50%给优势属性的英雄造成的伤害增加50%。"
},
"Desc": {
"key": "skill_skill_buff_Desc_391000067",
"text": "从弱势属性英雄受到的伤害增加50%给优势属性的英雄造成的伤害增加50%。"
},
"BuffType": 112,
"EffectArgu": [
500,
-500
],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": [
3
],
"AddEffect": false,
"RemoveType": true,
"Priority": 0,
"NotOverlay": 0,
"OverlayTimes": 99,
"SameID": false,
"golbalbufficon": "",
"buffIcon": "",
"buffeffect": "",
"buffpos": "",
"forbidFloat": 0
},
{
"Id": 391000068,
"Name": {
"key": "skill_skill_buff_Name_391000068",
"text": "维京直觉"
},
"Desc": {
"key": "skill_skill_buff_Desc_391000068",
"text": "无法驱散类每层使自身受到伤害降低最高可叠加25层。"
},
"BuffType": 129,
"EffectArgu": [
-50
],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": [
3,
0
],
"AddEffect": false,
"RemoveType": false,
"Priority": 0,
"NotOverlay": 0,
"OverlayTimes": 25,
"SameID": false,
"golbalbufficon": "",
"buffIcon": "",
"buffeffect": "",
"buffpos": "",
"forbidFloat": 0
},
{
"Id": 391000069,
"Name": {
"key": "skill_skill_buff_Name_391000069",
"text": "维京之吼"
},
"Desc": {
"key": "skill_skill_buff_Desc_391000069",
"text": "(无法驱散类)回合开始时受到伤害。携带者受到净化效果时恢复自身生命值,但受到其他所有治疗效果降低。"
},
"BuffType": 130,
"EffectArgu": [
1,
4,
500,
1,
2,
200,
-400
],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": [
1,
0
],
"AddEffect": false,
"RemoveType": false,
"Priority": 0,
"NotOverlay": 0,
"OverlayTimes": 1,
"SameID": false,
"golbalbufficon": "",
"buffIcon": "",
"buffeffect": "",
"buffpos": "",
"forbidFloat": 0
},
{
"Id": 391000070,
"Name": {
"key": "skill_skill_buff_Name_391000070",
"text": "维京标记"
},
"Desc": {
"key": "skill_skill_buff_Desc_391000070",
"text": "无法驱散类自身受到来自无【标记】目标的伤害大幅降低。防御提升造成的伤害提升。携带者死亡时boss基础速度提升。"
},
"BuffType": 131,
"EffectArgu": [
23,
500,
200,
-200,
25
],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": [
3,
0
],
"AddEffect": false,
"RemoveType": false,
"Priority": 0,
"NotOverlay": 0,
"OverlayTimes": 1,
"SameID": false,
"golbalbufficon": "",
"buffIcon": "",
"buffeffect": "",
"buffpos": "",
"forbidFloat": 0
} }
] ]

View File

@ -2252,7 +2252,7 @@
"When": 10, "When": 10,
"FromCheck": "Target=3", "FromCheck": "Target=3",
"TargetCheck": "3", "TargetCheck": "3",
"MainSkillCheck": "", "MainSkillCheck": "MainSkillID=151010111",
"AfterSkillCheck": "", "AfterSkillCheck": "",
"BuffCheck": "", "BuffCheck": "",
"AddCon": [], "AddCon": [],
@ -2271,7 +2271,7 @@
"When": 10, "When": 10,
"FromCheck": "Target=3", "FromCheck": "Target=3",
"TargetCheck": "3", "TargetCheck": "3",
"MainSkillCheck": "", "MainSkillCheck": "MainSkillID=151010211",
"AfterSkillCheck": "", "AfterSkillCheck": "",
"BuffCheck": "", "BuffCheck": "",
"AddCon": [], "AddCon": [],
@ -2424,8 +2424,8 @@
"Id": 444001113, "Id": 444001113,
"When": 10, "When": 10,
"FromCheck": "Target=3", "FromCheck": "Target=3",
"TargetCheck": "3", "TargetCheck": "Target=2",
"MainSkillCheck": "", "MainSkillCheck": "MainSkillID=144001111",
"AfterSkillCheck": "", "AfterSkillCheck": "",
"BuffCheck": "", "BuffCheck": "",
"AddCon": [], "AddCon": [],
@ -2443,8 +2443,8 @@
"Id": 444001213, "Id": 444001213,
"When": 10, "When": 10,
"FromCheck": "Target=3", "FromCheck": "Target=3",
"TargetCheck": "3", "TargetCheck": "Target=2",
"MainSkillCheck": "", "MainSkillCheck": "MainSkillID=144001211",
"AfterSkillCheck": "", "AfterSkillCheck": "",
"BuffCheck": "", "BuffCheck": "",
"AddCon": [], "AddCon": [],
@ -2900,13 +2900,11 @@
"Id": 455002213, "Id": 455002213,
"When": 16, "When": 16,
"FromCheck": "", "FromCheck": "",
"TargetCheck": "Target=3", "TargetCheck": "Target=3,Hpproless=300",
"MainSkillCheck": "", "MainSkillCheck": "",
"AfterSkillCheck": "", "AfterSkillCheck": "",
"BuffCheck": "", "BuffCheck": "",
"AddCon": [ "AddCon": [],
"Hpproless=300"
],
"PasPr": 1000, "PasPr": 1000,
"PasCorrection": 0, "PasCorrection": 0,
"Type": "CallSkillPas", "Type": "CallSkillPas",
@ -7610,5 +7608,45 @@
"Callback": [ "Callback": [
234007216 234007216
] ]
},
{
"Id": 475003311,
"When": 16,
"FromCheck": "Target=2",
"TargetCheck": "Target=3",
"MainSkillCheck": "",
"AfterSkillCheck": "",
"BuffCheck": "",
"AddCon": [],
"PasPr": 1000,
"PasCorrection": 0,
"Type": "CallSkillPas",
"MaxEmitTimesInRoundByRole": 0,
"MaxEmitTimes": 0,
"MaxEmitTimesInRound": 1,
"Callback": [
275003212,
275003213,
275003214
]
},
{
"Id": 475005211,
"When": 16,
"FromCheck": "Target=3,HasBuff=390001211",
"TargetCheck": "",
"MainSkillCheck": "",
"AfterSkillCheck": "",
"BuffCheck": "",
"AddCon": [],
"PasPr": 1000,
"PasCorrection": 0,
"Type": "CallSkillPas",
"MaxEmitTimesInRoundByRole": 0,
"MaxEmitTimes": 0,
"MaxEmitTimesInRound": 1,
"Callback": [
275005213
]
} }
] ]

View File

@ -74,7 +74,7 @@
"BaseTerms": 40, "BaseTerms": 40,
"ExtraTerms": 48, "ExtraTerms": 48,
"PerTerms": 87, "PerTerms": 87,
"FixTerms": 88 "FixTerms": 32
}, },
{ {
"ProType": 7, "ProType": 7,
@ -85,7 +85,7 @@
"BaseTerms": 41, "BaseTerms": 41,
"ExtraTerms": 49, "ExtraTerms": 49,
"PerTerms": 90, "PerTerms": 90,
"FixTerms": 91 "FixTerms": 33
}, },
{ {
"ProType": 8, "ProType": 8,
@ -96,7 +96,7 @@
"BaseTerms": 42, "BaseTerms": 42,
"ExtraTerms": 50, "ExtraTerms": 50,
"PerTerms": 93, "PerTerms": 93,
"FixTerms": 94 "FixTerms": 34
}, },
{ {
"ProType": 9, "ProType": 9,
@ -107,7 +107,7 @@
"BaseTerms": 43, "BaseTerms": 43,
"ExtraTerms": 51, "ExtraTerms": 51,
"PerTerms": 96, "PerTerms": 96,
"FixTerms": 97 "FixTerms": 35
}, },
{ {
"ProType": 10, "ProType": 10,

View File

@ -1,7 +1,6 @@
[ [
{ {
"key": 1, "key": 1,
"id_tag": 2,
"active": 40, "active": 40,
"reword": [ "reword": [
{ {
@ -15,7 +14,6 @@
}, },
{ {
"key": 2, "key": 2,
"id_tag": 2,
"active": 80, "active": 80,
"reword": [ "reword": [
{ {
@ -34,7 +32,6 @@
}, },
{ {
"key": 3, "key": 3,
"id_tag": 2,
"active": 120, "active": 120,
"reword": [ "reword": [
{ {
@ -53,7 +50,6 @@
}, },
{ {
"key": 4, "key": 4,
"id_tag": 2,
"active": 160, "active": 160,
"reword": [ "reword": [
{ {

View File

@ -2,15 +2,16 @@
{ {
"key": 20001, "key": 20001,
"id_list": 1, "id_list": 1,
"id_tag": 2,
"open": "", "open": "",
"opentask": "arena",
"id_before": 0,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_1", "key": "task_task_round_task_display_1",
"text": "本周竞技场挑战10次" "text": "本周竞技场挑战10次"
}, },
"type_id": 13000001, "type_id": 13000001,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 156, "jump_interface": 156,
"icon": "wp_icon_0001", "icon": "wp_icon_0001",
"reword": [ "reword": [
@ -29,15 +30,16 @@
{ {
"key": 20002, "key": 20002,
"id_list": 2, "id_list": 2,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20001,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_2", "key": "task_task_round_task_display_2",
"text": "本周竞技场挑战30次" "text": "本周竞技场挑战30次"
}, },
"type_id": 13000002, "type_id": 13000002,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 156, "jump_interface": 156,
"icon": "wp_icon_0001", "icon": "wp_icon_0001",
"reword": [ "reword": [
@ -56,15 +58,16 @@
{ {
"key": 20003, "key": 20003,
"id_list": 3, "id_list": 3,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20002,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_3", "key": "task_task_round_task_display_3",
"text": "本周竞技场挑战50次" "text": "本周竞技场挑战50次"
}, },
"type_id": 13000003, "type_id": 13000003,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 156, "jump_interface": 156,
"icon": "wp_icon_0001", "icon": "wp_icon_0001",
"reword": [ "reword": [
@ -83,15 +86,16 @@
{ {
"key": 20004, "key": 20004,
"id_list": 4, "id_list": 4,
"id_tag": 2,
"open": "", "open": "",
"opentask": "arena",
"id_before": 0,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_4", "key": "task_task_round_task_display_4",
"text": "本周竞技场胜利10次" "text": "本周竞技场胜利10次"
}, },
"type_id": 13000004, "type_id": 13000004,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 156, "jump_interface": 156,
"icon": "wp_icon_0001", "icon": "wp_icon_0001",
"reword": [ "reword": [
@ -110,15 +114,16 @@
{ {
"key": 20005, "key": 20005,
"id_list": 5, "id_list": 5,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20004,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_5", "key": "task_task_round_task_display_5",
"text": "本周竞技场胜利20次" "text": "本周竞技场胜利20次"
}, },
"type_id": 13000005, "type_id": 13000005,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 156, "jump_interface": 156,
"icon": "wp_icon_0001", "icon": "wp_icon_0001",
"reword": [ "reword": [
@ -137,15 +142,16 @@
{ {
"key": 20006, "key": 20006,
"id_list": 6, "id_list": 6,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20005,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_6", "key": "task_task_round_task_display_6",
"text": "本周竞技场胜利30次" "text": "本周竞技场胜利30次"
}, },
"type_id": 13000006, "type_id": 13000006,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 156, "jump_interface": 156,
"icon": "wp_icon_0001", "icon": "wp_icon_0001",
"reword": [ "reword": [
@ -164,15 +170,16 @@
{ {
"key": 20007, "key": 20007,
"id_list": 7, "id_list": 7,
"id_tag": 2,
"open": "", "open": "",
"opentask": "vikingexpedition_experience",
"id_before": 0,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_7", "key": "task_task_round_task_display_7",
"text": "本周累计梦境回廊消耗300体力" "text": "本周累计梦境回廊消耗300体力"
}, },
"type_id": 13000007, "type_id": 13000007,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 11012, "jump_interface": 11012,
"icon": "wp_icon_0001", "icon": "wp_icon_0001",
"reword": [ "reword": [
@ -191,15 +198,16 @@
{ {
"key": 20008, "key": 20008,
"id_list": 8, "id_list": 8,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20007,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_8", "key": "task_task_round_task_display_8",
"text": "本周累计梦境回廊消耗600体力" "text": "本周累计梦境回廊消耗600体力"
}, },
"type_id": 13000008, "type_id": 13000008,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 11012, "jump_interface": 11012,
"icon": "wp_icon_0001", "icon": "wp_icon_0001",
"reword": [ "reword": [
@ -218,15 +226,16 @@
{ {
"key": 20009, "key": 20009,
"id_list": 9, "id_list": 9,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20008,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_9", "key": "task_task_round_task_display_9",
"text": "本周累计梦境回廊消耗1000体力" "text": "本周累计梦境回廊消耗1000体力"
}, },
"type_id": 13000009, "type_id": 13000009,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 11012, "jump_interface": 11012,
"icon": "wp_icon_0002", "icon": "wp_icon_0002",
"reword": [ "reword": [
@ -245,15 +254,16 @@
{ {
"key": 20010, "key": 20010,
"id_list": 10, "id_list": 10,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 0,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_10", "key": "task_task_round_task_display_10",
"text": "本周累计消耗3000000点金币" "text": "本周累计消耗3000000点金币"
}, },
"type_id": 13000010, "type_id": 13000010,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 122, "jump_interface": 122,
"icon": "wp_icon_0003", "icon": "wp_icon_0003",
"reword": [ "reword": [
@ -272,15 +282,16 @@
{ {
"key": 20011, "key": 20011,
"id_list": 11, "id_list": 11,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20010,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_11", "key": "task_task_round_task_display_11",
"text": "本周累计消耗6000000点金币" "text": "本周累计消耗6000000点金币"
}, },
"type_id": 13000011, "type_id": 13000011,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 122, "jump_interface": 122,
"icon": "wp_icon_0004", "icon": "wp_icon_0004",
"reword": [ "reword": [
@ -299,15 +310,16 @@
{ {
"key": 20012, "key": 20012,
"id_list": 12, "id_list": 12,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20011,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_12", "key": "task_task_round_task_display_12",
"text": "本周累计消耗10000000点金币" "text": "本周累计消耗10000000点金币"
}, },
"type_id": 13000012, "type_id": 13000012,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 122, "jump_interface": 122,
"icon": "wp_icon_0005", "icon": "wp_icon_0005",
"reword": [ "reword": [
@ -326,15 +338,16 @@
{ {
"key": 20013, "key": 20013,
"id_list": 13, "id_list": 13,
"id_tag": 2,
"open": "", "open": "",
"opentask": "vikingexpedition",
"id_before": 0,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_13", "key": "task_task_round_task_display_13",
"text": "本周累计维京远征消耗300体力" "text": "本周累计维京远征消耗300体力"
}, },
"type_id": 13000013, "type_id": 13000013,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 11012, "jump_interface": 11012,
"icon": "wp_icon_0006", "icon": "wp_icon_0006",
"reword": [ "reword": [
@ -353,15 +366,16 @@
{ {
"key": 20014, "key": 20014,
"id_list": 14, "id_list": 14,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20013,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_14", "key": "task_task_round_task_display_14",
"text": "本周累计维京远征消耗600体力" "text": "本周累计维京远征消耗600体力"
}, },
"type_id": 13000014, "type_id": 13000014,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 11012, "jump_interface": 11012,
"icon": "wp_icon_0007", "icon": "wp_icon_0007",
"reword": [ "reword": [
@ -380,15 +394,16 @@
{ {
"key": 20015, "key": 20015,
"id_list": 15, "id_list": 15,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20014,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_15", "key": "task_task_round_task_display_15",
"text": "本周累计维京远征消耗1000体力" "text": "本周累计维京远征消耗1000体力"
}, },
"type_id": 13000015, "type_id": 13000015,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 11012, "jump_interface": 11012,
"icon": "wp_icon_0008", "icon": "wp_icon_0008",
"reword": [ "reword": [
@ -407,15 +422,16 @@
{ {
"key": 20016, "key": 20016,
"id_list": 16, "id_list": 16,
"id_tag": 2,
"open": "", "open": "",
"opentask": "hunting",
"id_before": 0,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_16", "key": "task_task_round_task_display_16",
"text": "本周累计猎魂挑战消耗300体力" "text": "本周累计猎魂挑战消耗300体力"
}, },
"type_id": 13000016, "type_id": 13000016,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 168, "jump_interface": 168,
"icon": "wp_icon_0009", "icon": "wp_icon_0009",
"reword": [ "reword": [
@ -434,15 +450,16 @@
{ {
"key": 20017, "key": 20017,
"id_list": 17, "id_list": 17,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20016,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_17", "key": "task_task_round_task_display_17",
"text": "本周累计猎魂挑战消耗600体力" "text": "本周累计猎魂挑战消耗600体力"
}, },
"type_id": 13000017, "type_id": 13000017,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 168, "jump_interface": 168,
"icon": "wp_icon_0010", "icon": "wp_icon_0010",
"reword": [ "reword": [
@ -461,15 +478,16 @@
{ {
"key": 20018, "key": 20018,
"id_list": 18, "id_list": 18,
"id_tag": 2,
"open": "", "open": "",
"opentask": "",
"id_before": 20017,
"Id_after": 0,
"task_display": { "task_display": {
"key": "task_task_round_task_display_18", "key": "task_task_round_task_display_18",
"text": "本周累计猎魂挑战消耗1000体力" "text": "本周累计猎魂挑战消耗1000体力"
}, },
"type_id": 13000018, "type_id": 13000018,
"active": 10, "active": 10,
"id_after": 0,
"jump_interface": 168, "jump_interface": 168,
"icon": "wp_icon_0011", "icon": "wp_icon_0011",
"reword": [ "reword": [

View File

@ -5049,15 +5049,15 @@
"icon": "25001", "icon": "25001",
"task_name": { "task_name": {
"key": "worldtask_world_task_task_name_122", "key": "worldtask_world_task_task_name_122",
"text": "商队任务1-任意1装备+3" "text": "兄弟,带一程"
}, },
"task_details": { "task_details": {
"key": "worldtask_world_task_task_details_122", "key": "worldtask_world_task_task_details_122",
"text": "商队任务1-任意1装备+3" "text": "途中偶遇的守护者,期望我们带他前往某个城市。"
}, },
"npctxt": { "npctxt": {
"key": "worldtask_world_task_npctxt_122", "key": "worldtask_world_task_npctxt_122",
"text": "商队任务1-任意1装备+3" "text": "兄弟,带一程"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 0,
@ -5068,7 +5068,7 @@
"deliver_npc": 50018, "deliver_npc": 50018,
"taskend_removeitem": [], "taskend_removeitem": [],
"auto_accept": 0, "auto_accept": 0,
"tasktips": 1, "tasktips": 0,
"lock_add": 1, "lock_add": 1,
"reword": [ "reword": [
{ {
@ -5094,15 +5094,15 @@
"icon": "25001", "icon": "25001",
"task_name": { "task_name": {
"key": "worldtask_world_task_task_name_123", "key": "worldtask_world_task_task_name_123",
"text": "商队任务1-任意2装备+3" "text": "特产不嫌多"
}, },
"task_details": { "task_details": {
"key": "worldtask_world_task_task_details_123", "key": "worldtask_world_task_task_details_123",
"text": "商队任务1-任意2装备+3" "text": "一名守护者希望我们帮他购买一些特产,并承诺会用其他东西作为报酬。"
}, },
"npctxt": { "npctxt": {
"key": "worldtask_world_task_npctxt_123", "key": "worldtask_world_task_npctxt_123",
"text": "商队任务1-任意2装备+3" "text": "特产不嫌多"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 0,
@ -5113,7 +5113,7 @@
"deliver_npc": 50028, "deliver_npc": 50028,
"taskend_removeitem": [], "taskend_removeitem": [],
"auto_accept": 0, "auto_accept": 0,
"tasktips": 1, "tasktips": 0,
"lock_add": 1, "lock_add": 1,
"reword": [ "reword": [
{ {
@ -5139,15 +5139,15 @@
"icon": "25001", "icon": "25001",
"task_name": { "task_name": {
"key": "worldtask_world_task_task_name_124", "key": "worldtask_world_task_task_name_124",
"text": "商队任务1-任意3装备+3" "text": "资助城市"
}, },
"task_details": { "task_details": {
"key": "worldtask_world_task_task_details_124", "key": "worldtask_world_task_task_details_124",
"text": "商队任务1-任意3装备+3" "text": "如今我们稍有资产,守护者希望我们能资助一些城市,当地人会给予一些报酬。"
}, },
"npctxt": { "npctxt": {
"key": "worldtask_world_task_npctxt_124", "key": "worldtask_world_task_npctxt_124",
"text": "商队任务1-任意3装备+3" "text": "资助城市"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 0,
@ -5158,7 +5158,7 @@
"deliver_npc": 50038, "deliver_npc": 50038,
"taskend_removeitem": [], "taskend_removeitem": [],
"auto_accept": 0, "auto_accept": 0,
"tasktips": 1, "tasktips": 0,
"lock_add": 1, "lock_add": 1,
"reword": [ "reword": [
{ {
@ -5184,15 +5184,15 @@
"icon": "25001", "icon": "25001",
"task_name": { "task_name": {
"key": "worldtask_world_task_task_name_125", "key": "worldtask_world_task_task_name_125",
"text": "商队任务2-维京远征2次" "text": "雪中送炭"
}, },
"task_details": { "task_details": {
"key": "worldtask_world_task_task_details_125", "key": "worldtask_world_task_task_details_125",
"text": "商队任务2-维京远征2次" "text": "一些城市急需某些道具度过难关,我们或许应当帮助他们运转一下。"
}, },
"npctxt": { "npctxt": {
"key": "worldtask_world_task_npctxt_125", "key": "worldtask_world_task_npctxt_125",
"text": "商队任务2-维京远征2次" "text": "雪中送炭"
}, },
"get_item": [], "get_item": [],
"trigger": 0, "trigger": 0,
@ -5203,7 +5203,7 @@
"deliver_npc": 50048, "deliver_npc": 50048,
"taskend_removeitem": [], "taskend_removeitem": [],
"auto_accept": 0, "auto_accept": 0,
"tasktips": 1, "tasktips": 0,
"lock_add": 1, "lock_add": 1,
"reword": [ "reword": [
{ {

View File

@ -546,6 +546,8 @@ type (
} }
//埋点中心 //埋点中心
IBuried interface { IBuried interface {
//完成任务埋点
CompleteCondition(uid string, condiId int32) (err error)
//埋点中心触发 //埋点中心触发
TriggerBuried(session IUserSession, burieds ...*pb.BuriedParam) TriggerBuried(session IUserSession, burieds ...*pb.BuriedParam)
//校验条件是否达成 返回未完成列表 //校验条件是否达成 返回未完成列表

View File

@ -86,6 +86,89 @@ func (this *Buried) Rpc_ModuleBuriedTrigger(ctx context.Context, req *pb.Rpc_Mod
return return
} }
//完成任务
func (this *Buried) CompleteCondition(uid string, condiId int32) (err error) {
var (
model *buriedModel
bdatas *pb.DBBuried
bitem *pb.DBBuriedConItem
conf *cfg.GameBuriedCondiData
ok bool
bdata *pb.DBBuriedItem
)
if model, err = this.modelBuried.getburiedModel(uid); err != nil {
return
}
if bdatas, err = model.getUserBurieds(uid); err != nil {
return
}
this.Debug("完成埋点!", log.Field{Key: "condiId", Value: condiId})
lock, _ := model.userlock(uid)
err = lock.Lock()
if err != nil {
this.Error("埋点分布式锁失效 err!", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
return
}
defer lock.Unlock()
if conf, err = this.configure.getburiedcondidata(condiId); err != nil {
return
}
if bdata, ok = bdatas.Items[conf.Type]; ok {
ok = false
for _, v1 := range bdata.Condi {
if v1.Conid == condiId {
ok = true
if v1.Finish != pb.BuriedItemFinishState_buried_finish {
if conf.Ctype == ctype_once { //完成后自动锁定
v1.State = pb.BuriedItemState_Freeze
} else if conf.Ctype == ctype_repeat {
v1.State = pb.BuriedItemState_Sleep
} else if conf.Ctype == ctype_daily {
v1.State = pb.BuriedItemState_Sleep
} else if conf.Ctype == ctype_weekly {
v1.State = pb.BuriedItemState_Sleep
}
v1.Value = conf.Value
v1.Finish = pb.BuriedItemFinishState_buried_finish
}
}
}
} else {
bdata = &pb.DBBuriedItem{
Btype: conf.Type,
Condi: make([]*pb.DBBuriedConItem, 0),
}
bdatas.Items[conf.Type] = bdata
}
if !ok { //未找到 初始化一个
bitem = &pb.DBBuriedConItem{
Conid: condiId,
State: pb.BuriedItemState_Activated,
Value: conf.Value,
Statistics: make([]string, 0),
Timestamp: time.Now().Unix(),
Finish: pb.BuriedItemFinishState_buried_finish,
}
if conf.Ctype == ctype_once { //完成后自动锁定
bitem.State = pb.BuriedItemState_Freeze
} else if conf.Ctype == ctype_repeat {
bitem.State = pb.BuriedItemState_Sleep
} else if conf.Ctype == ctype_daily {
bitem.State = pb.BuriedItemState_Sleep
} else if conf.Ctype == ctype_weekly {
bitem.State = pb.BuriedItemState_Sleep
}
bdata.Condi = append(bdata.Condi, bitem)
}
if err = model.updateUserBurieds(uid, bdatas); err != nil {
this.Error("更新用户埋点数据错误!", log.Field{Key: "err", Value: err.Error()})
return
}
return
}
// 激活数据采集点 // 激活数据采集点
func (this *Buried) ActiveCondition(uid string, condiIds ...int32) (errdata *pb.ErrorData) { func (this *Buried) ActiveCondition(uid string, condiIds ...int32) (errdata *pb.ErrorData) {
var ( var (

View File

@ -663,6 +663,30 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
} }
module1.(comm.Imail).SendNewMail(mail, session.GetUserId()) module1.(comm.Imail).SendNewMail(mail, session.GetUserId())
this.Debug("使用bingo命令:uid = %s ",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "0", Value: datas[0]},
)
} else if len(datas) == 2 && (datas[0] == "buried") {
var (
condiId int
err error
)
condiId, err = strconv.Atoi(datas[1])
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
return
}
module1, err := this.service.GetModule(comm.ModuleBuried)
if err != nil {
return
}
module1.(comm.IBuried).CompleteCondition(session.GetUserId(), int32(condiId))
this.Debug("使用bingo命令:uid = %s ", this.Debug("使用bingo命令:uid = %s ",
log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "0", Value: datas[0]}, log.Field{Key: "0", Value: datas[0]},

View File

@ -33,7 +33,6 @@ type ModuleBase struct {
ModuleItems comm.IItems //道具背包模块 ModuleItems comm.IItems //道具背包模块
ModuleHero comm.IHero //英雄模块 ModuleHero comm.IHero //英雄模块
ModuleEquipment comm.IEquipment //装备模块 ModuleEquipment comm.IEquipment //装备模块
ModuleTask comm.ITask //任务
ModuleFriend comm.IFriend //好友 ModuleFriend comm.IFriend //好友
ModuleSociaty comm.ISociaty //公会 ModuleSociaty comm.ISociaty //公会
ModulePrivilege comm.IPrivilege // 月卡 ModulePrivilege comm.IPrivilege // 月卡
@ -92,11 +91,6 @@ func (this *ModuleBase) Start() (err error) {
} }
this.ModuleEquipment = module.(comm.IEquipment) this.ModuleEquipment = module.(comm.IEquipment)
if module, err = this.service.GetModule(comm.ModuleTask); err != nil {
return
}
this.ModuleTask = module.(comm.ITask)
if module, err = this.service.GetModule(comm.ModuleFriend); err != nil { if module, err = this.service.GetModule(comm.ModuleFriend); err != nil {
return return
} }

View File

@ -23,10 +23,10 @@ func (this *apiComp) Get(session comm.IUserSession, req *pb.ReddotGetReq) (errda
_rid := comm.ReddotType(rid) _rid := comm.ReddotType(rid)
switch _rid { switch _rid {
//任务 //任务
case comm.Reddot10101, comm.Reddot10102, comm.Reddot10103, comm.Reddot10201, comm.Reddot10301: // case comm.Reddot10101, comm.Reddot10102, comm.Reddot10103, comm.Reddot10201, comm.Reddot10301:
for k, v := range this.module.ModuleTask.Reddot(session, _rid) { // for k, v := range this.module.ModuleTask.Reddot(session, _rid) {
reddot[int32(k)] = v // reddot[int32(k)] = v
} // }
//主线 //主线
case comm.Reddot24101: case comm.Reddot24101:
for k, v := range this.module.mline.Reddot(session, _rid) { for k, v := range this.module.mline.Reddot(session, _rid) {

View File

@ -20,14 +20,14 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
return return
} }
//任务系统 //任务系统
for k, v := range this.module.ModuleTask.Reddot(session, // for k, v := range this.module.ModuleTask.Reddot(session,
comm.Reddot10101, // comm.Reddot10101,
comm.Reddot10102, // comm.Reddot10102,
comm.Reddot10103, // comm.Reddot10103,
comm.Reddot10201, // comm.Reddot10201,
comm.Reddot10301) { // comm.Reddot10301) {
reddot[int32(k)] = v // reddot[int32(k)] = v
} // }
//每日任务 //每日任务
for k, v := range this.module.dailytask.Reddot(session, for k, v := range this.module.dailytask.Reddot(session,

View File

@ -1,37 +0,0 @@
package task
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
const (
TaskSubTypeList = "list" //任务列表
TaskSubTypeReceive = "receive" //领取
TaskSubTypeActiveList = "activelist" //活跃度列表
TaskSubTypeActiveReceive = "activereceive" //活跃度领取
TaskSubTypeStrategy = "strategy" //卡牌攻略
TaskSubTypeFinishedPush = "taskfinishedpush" //推送
TaskSubTypeGetrecord = "getrecord" //任务数据
TaskSubTypeSend = "send" //触发任务
)
type apiComp struct {
modules.MCompGate
service core.IService
module *ModuleTask
}
// 组件初始化接口
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompGate.Init(service, module, comp, options)
this.module = module.(*ModuleTask)
this.service = service
return
}
func (this *apiComp) Start() (err error) {
err = this.MCompGate.Start()
return
}

View File

@ -1,53 +0,0 @@
package task
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
// 活跃度列表
func (this *apiComp) ActiveListCheck(session comm.IUserSession, req *pb.TaskActiveListReq) (errdata *pb.ErrorData) {
if req.TaskTag <= 0 || req.TaskTag > 2 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
return
}
func (this *apiComp) ActiveList(session comm.IUserSession, req *pb.TaskActiveListReq) (errdata *pb.ErrorData) {
if errdata = this.ActiveListCheck(session, req); errdata != nil {
return
}
resp := &pb.TaskActiveListResp{}
defer func() {
session.SendMsg(string(this.module.GetType()), TaskSubTypeActiveList, resp)
}()
// 获取玩家活跃度
expand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId())
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
if expand != nil {
// 返回活跃度
if req.TaskTag == int32(comm.TASK_DAILY) {
resp.Active = expand.Activeday
} else if req.TaskTag == int32(comm.TASK_WEEKLY) {
resp.Active = expand.Activeweek
}
}
//获取当前Tag的活跃度列表
resp.List = this.module.modelTaskActive.getActiveListByTag(session.GetUserId(), comm.TaskTag(req.TaskTag))
return
}

View File

@ -1,143 +0,0 @@
package task
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
// 活跃度领取
func (this *apiComp) ActiveReceiveCheck(session comm.IUserSession, req *pb.TaskActiveReceiveReq) (errdata *pb.ErrorData) {
var code pb.ErrorCode
if req.Id == 0 {
code = pb.ErrorCode_TaskIdEmpty
} else if req.TaskTag <= 0 || req.TaskTag > 2 {
code = pb.ErrorCode_TaskTagEmpty
}
errdata = &pb.ErrorData{
Code: code,
Title: code.ToString(),
}
return
}
func (this *apiComp) ActiveReceive(session comm.IUserSession, req *pb.TaskActiveReceiveReq) (errdata *pb.ErrorData) {
var (
active *pb.DBActivity
err error
)
if errdata = this.ActiveReceiveCheck(session, req); errdata != nil {
return
}
uid := session.GetUserId()
ue, err := this.module.ModuleUser.GetUserExpand(uid)
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
if ue == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_UserExpandNull,
Title: pb.ErrorCode_UserExpandNull.ToString(),
Message: err.Error(),
}
return
}
var rewards []*cfg.Gameatn
var flag bool
update := map[string]interface{}{}
// 玩家的
if active, err = this.module.modelTaskActive.getActiveList(uid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
// var activityData *pb.ActivityData
for _, v := range active.ActivityList {
if v.TaskId == req.Id {
if v.Received != 1 {
conf := this.module.configure.getTaskActiveById(v.TaskId)
if conf == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
if req.TaskTag == int32(comm.TASK_DAILY) {
if ue.Activeday < conf.Active {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_TaskActiveNoenough,
Title: pb.ErrorCode_TaskActiveNoenough.ToString(),
Message: err.Error(),
}
return
}
} else if req.TaskTag == int32(comm.TASK_WEEKLY) {
if ue.Activeweek < conf.Active {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_TaskActiveNoenough,
Title: pb.ErrorCode_TaskActiveNoenough.ToString(),
Message: err.Error(),
}
return
}
}
v.Received = 1
flag = true
rewards = append(rewards, conf.Reword...)
}
break
}
}
if flag {
update["activityList"] = active.ActivityList
if err := this.module.modelTaskActive.Change(session.GetUserId(), update); err != nil {
this.module.Errorf("updateReceive err %v", err)
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
}
if len(rewards) > 0 {
//派发奖励
if errdata = this.module.DispenseRes(session, rewards, true); errdata != nil {
this.module.Error("活跃度奖励",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "rewards", Value: rewards},
)
}
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype171, 1))
}
resp := &pb.TaskActiveReceiveResp{
TaskTag: req.TaskTag,
Id: req.Id,
}
session.SendMsg(string(this.module.GetType()), TaskSubTypeActiveReceive, resp)
return
}

View File

@ -1,46 +0,0 @@
package task
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
// 任务列表
func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.TaskListReq) (errdata *pb.ErrorData) {
if req.TaskTag <= 0 || req.TaskTag > 3 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
return
}
func (this *apiComp) List(session comm.IUserSession, req *pb.TaskListReq) (errdata *pb.ErrorData) {
if errdata = this.ListCheck(session, req); errdata != nil {
return
}
rsp := &pb.TaskListResp{}
task := this.module.modelTask.getTaskListByTag(session.GetUserId(), comm.TaskTag(req.TaskTag))
if task == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_TaskNotFound,
Title: pb.ErrorCode_TaskNotFound.ToString(),
}
return
}
switch req.TaskTag {
case int32(comm.TASK_DAILY):
rsp.List = task.DayList
case int32(comm.TASK_WEEKLY):
rsp.List = task.WeekList
case int32(comm.TASK_ACHIEVE):
rsp.List = task.AchieveList
}
session.SendMsg(string(this.module.GetType()), TaskSubTypeList, rsp)
return
}

View File

@ -1,228 +0,0 @@
package task
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
//任务奖励领取
func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.TaskReceiveReq) (errdata *pb.ErrorData) {
var code pb.ErrorCode
if req.Id == 0 {
code = pb.ErrorCode_TaskIdEmpty
} else if req.TaskTag == 0 {
code = pb.ErrorCode_TaskTagEmpty
}
if code != 0 {
errdata = &pb.ErrorData{
Code: code,
Title: code.ToString(),
Message: fmt.Sprintf("Id:%v tag:%v", req.Id, req.TaskTag),
}
}
return
}
func (this *apiComp) Receive(session comm.IUserSession, req *pb.TaskReceiveReq) (errdata *pb.ErrorData) {
var (
userTask *pb.DBTask
taskDataList []*pb.TaskData
active *pb.DBActivity
err error
)
if errdata = this.ReceiveCheck(session, req); errdata != nil {
return
}
uid := session.GetUserId()
// 获取待领取的任务
if userTask, err = this.module.modelTask.getUserTask(uid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_TaskNotFound,
Title: pb.ErrorCode_TaskNotFound.ToString(),
}
return
}
switch req.TaskTag {
case int32(comm.TASK_DAILY):
taskDataList = userTask.DayList
case int32(comm.TASK_WEEKLY):
taskDataList = userTask.WeekList
case int32(comm.TASK_ACHIEVE):
taskDataList = userTask.AchieveList
}
var taskData *pb.TaskData
for _, v := range taskDataList {
if v.TaskId == req.Id {
taskData = v
}
}
//判断是否完成
if taskData.Status == 0 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_TaskNoFinished,
Title: pb.ErrorCode_TaskNoFinished.ToString(),
}
return
}
//判断任务是否领取
if taskData.Received == 1 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_TaskReceived,
Title: pb.ErrorCode_TaskReceived.ToString(),
}
return
}
// 待领取的任务配置
conf := this.module.configure.getTaskById(taskData.TaskId)
if conf == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
}
return
}
// 更新活跃度
if conf.Active > 0 {
//更新活跃度
ue, err := this.module.ModuleUser.GetUserExpand(session.GetUserId())
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
update := make(map[string]interface{})
if ue != nil {
if comm.TaskTag(req.TaskTag) == comm.TASK_DAILY {
ue.Activeday = ue.Activeday + conf.Active
update["activeday"] = ue.Activeday
}
if comm.TaskTag(req.TaskTag) == comm.TASK_WEEKLY {
ue.Activeweek = ue.Activeweek + conf.Active
update["activeweek"] = ue.Activeweek
}
// 周任务 自动领取奖励
if comm.TaskTag(req.TaskTag) == comm.TASK_WEEKLY {
TaskActive := make(map[string]interface{})
if active, err = this.module.modelTaskActive.getActiveList(uid); err != nil {
}
var rewards []*cfg.Gameatn
var maxTaskId int32
for _, v := range active.ActivityList {
if v.Received != 1 {
conf := this.module.configure.getTaskActiveById(v.TaskId)
if conf == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
if ue.Activeweek < conf.Active {
continue
}
v.Received = 1
rewards = append(rewards, conf.Reword...)
}
maxTaskId = v.TaskId
}
if len(rewards) > 0 {
TaskActive["activityList"] = active.ActivityList
if err := this.module.modelTaskActive.Change(session.GetUserId(), TaskActive); err != nil {
this.module.Errorf("updateReceive err %v", err)
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
//派发奖励
if errdata = this.module.DispenseRes(session, rewards, true); errdata != nil {
this.module.Error("活跃度奖励",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "rewards", Value: rewards},
)
}
go this.module.ModuleBuried.TriggerBuried(session.Clone(), comm.GetBuriedParam(comm.Rtype171, 1))
session.SendMsg(string(this.module.GetType()), "activereceive", &pb.TaskActiveReceivePush{
TaskTag: int32(comm.TASK_WEEKLY),
Id: maxTaskId,
})
}
}
}
if len(update) > 0 {
if err = this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), update); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
}
}
//奖励
if errdata = this.module.DispenseRes(session, conf.Reword, true); errdata != nil {
this.module.Error("发送奖励",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "rewards", Value: conf.Reword},
log.Field{Key: "errdata", Value: errdata},
)
return
}
//更新用户领取状态
for _, v := range taskDataList {
if v.TaskId == req.Id {
v.Received = 1
break
}
}
update := map[string]interface{}{}
switch req.TaskTag {
case int32(comm.TASK_DAILY):
update["dayList"] = taskDataList
case int32(comm.TASK_WEEKLY):
update["weekList"] = taskDataList
case int32(comm.TASK_ACHIEVE):
update["achieveList"] = taskDataList
}
if err := this.module.modelTask.Change(session.GetUserId(), update); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), TaskSubTypeReceive, &pb.TaskReceiveResp{TaskId: taskData.TaskId})
return
}

View File

@ -1,31 +0,0 @@
package task
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
func (this *apiComp) SendCheck(session comm.IUserSession, req *pb.TaskSendReq) (errdata *pb.ErrorData) {
if len(req.Params) == 0 || req.TaskType == 0 {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
return
}
func (this *apiComp) Send(session comm.IUserSession, req *pb.TaskSendReq) (errdata *pb.ErrorData) {
// if imodule, err := this.service.GetModule(comm.ModuleRtask); err == nil {
// if itask, ok := imodule.(comm.IRtask); ok {
// itask.TriggerTask(session.GetUserId(), comm.GetTaskParam(comm.TaskType(req.TaskType), req.Params...))
// }
// }
// this.module.ModuleBuried.TriggerBuried(session.Clone(),comm.GetBuriedParam(comm.TaskType(req.TaskType)))
rsp := &pb.TaskSendResp{
IsSucc: true,
}
session.SendMsg(string(this.module.GetType()), TaskSubTypeSend, rsp)
return
}

View File

@ -1,201 +0,0 @@
package task
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
cfg "go_dreamfactory/sys/configure/structs"
"sort"
)
const (
gameActiveReward = "game_taskactivereward.json"
gameTaskRound = "game_taskround.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)
this.LoadMultiConfigure(map[string]interface{}{
gameTaskRound: cfg.NewGameTaskRound,
gameActiveReward: cfg.NewGameActiveReward,
})
return
}
//获取活跃度奖励配置
func (this *configureComp) getActiveRewardCfg() (data *cfg.GameActiveReward, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameActiveReward); err != nil {
return
} else {
if data, ok = v.(*cfg.GameActiveReward); !ok {
err = fmt.Errorf("%T no is *cfg.Game_ActiveReward", v)
return
}
}
return
}
//获取任务配置
func (this *configureComp) getTaskRoundCfg() (data *cfg.GameTaskRound, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameTaskRound); err != nil {
return
} else {
if data, ok = v.(*cfg.GameTaskRound); !ok {
err = fmt.Errorf("%T no is *cfg.Game_taskRound", v)
return
}
}
return
}
//根据taskId获取配置
func (this *configureComp) getTaskById(taskId int32) (data *cfg.GameTaskRoundData) {
cfg, err := this.getTaskRoundCfg()
if err != nil {
log.Errorf("%v", err)
return nil
}
if cfg != nil {
data = cfg.GetDataMap()[taskId]
}
return
}
//是否第一个成就任务
func (this *configureComp) isFirstTask(taskId int32) bool {
data := this.getTaskByTag(int32(comm.TASK_ACHIEVE))
for _, v := range data {
if taskId == v.IdAfter {
return false
} else {
continue
}
}
return true
}
// 上一个任务
func (this *configureComp) getPreTask(preTaskId int32) *cfg.GameTaskRoundData {
data := this.getTaskByTag(int32(comm.TASK_ACHIEVE))
for _, v := range data {
if v.IdAfter == preTaskId {
return v
}
}
return nil
}
//获取任务配置列表
func (this *configureComp) getTaskList() (data []*cfg.GameTaskRoundData, err error) {
cfg, err := this.getTaskRoundCfg()
if err != nil {
log.Errorf("%v", err)
return data, err
}
if cfg != nil {
data = cfg.GetDataList()
}
return
}
//根据任务类型获取任务列表
func (this *configureComp) getTasks(taskType int32) (data []*cfg.GameTaskRoundData, err error) {
list, err := this.getTaskList()
if err != nil {
log.Errorf("%v", err)
return data, err
}
for _, d := range list {
if d.TypeId == taskType {
data = append(data, d)
}
}
return
}
//任务列表 正序
func (this *configureComp) getSortedTasks(taskType int32) (data []*cfg.GameTaskRoundData, err error) {
if data, err = this.getTasks(taskType); err != nil {
return nil, err
}
sort.SliceStable(data, func(i, j int) bool {
return data[i].IdList > data[j].IdList
})
return
}
//获取任务配置 条件 tasktag
func (this *configureComp) getTaskByTag(taskTag int32) (data []*cfg.GameTaskRoundData) {
list, err := this.getTaskList()
if err != nil {
log.Errorf("%v", err)
return data
}
for _, d := range list {
if d.IdTag == taskTag {
data = append(data, d)
}
}
return
}
func (this *configureComp) getTaskActiveList() (data []*cfg.GameActiveRewardData) {
conf, err := this.getActiveRewardCfg()
if err != nil {
log.Errorf("get conf err:%v", err)
return
}
if conf != nil {
data = conf.GetDataList()
}
return
}
//获取活跃度奖励list
func (this *configureComp) getTaskActiveByTag(taskTag int32) (data []*cfg.GameActiveRewardData) {
conf, err := this.getActiveRewardCfg()
if err != nil {
log.Errorf("get conf err:%v", err)
return
}
if conf != nil {
for _, v := range conf.GetDataList() {
if v.IdTag == taskTag {
data = append(data, v)
}
}
}
return
}
// 获取活跃度配置map
func (this *configureComp) getTaskActiveById(id int32) (data *cfg.GameActiveRewardData) {
conf, err := this.getActiveRewardCfg()
if err != nil {
log.Errorf("get conf err:%v", err)
return
}
if conf != nil {
if v, ok := conf.GetDataMap()[id]; ok {
return v
}
}
return
}

View File

@ -1,147 +0,0 @@
package task
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
type ModelTaskActive struct {
modules.MCompModel
module *ModuleTask
}
func (this *ModelTaskActive) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.TableName = comm.TableTaskActive
err = this.MCompModel.Init(service, module, comp, options)
this.module = module.(*ModuleTask)
// 加索引
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
// 初始化活跃度
func (this *ModelTaskActive) initActiveReward(active *pb.DBActivity, taskTag comm.TaskTag) {
data := this.module.configure.getTaskActiveByTag(int32(taskTag))
for _, conf := range data {
ta := &pb.ActivityData{
Tag: int32(taskTag),
TaskId: conf.Key,
}
active.ActivityList = append(active.ActivityList, ta)
}
}
func (this *ModelTaskActive) getActiveList(uid string) (active *pb.DBActivity, err error) {
active = &pb.DBActivity{}
if err = this.Get(uid, active); err != nil && err != mgo.MongodbNil {
this.module.Errorf("getTaskList err %v", err)
return
}
if err == mongo.ErrNoDocuments {
objId := primitive.NewObjectID().Hex()
active = &pb.DBActivity{
Uid: uid,
Id: objId,
ActivityList: make([]*pb.ActivityData, 0),
}
err = this.Add(uid, active)
}
return
}
// 获取玩家活跃度列表
func (this *ModelTaskActive) getActiveListByTag(uid string, taskTag comm.TaskTag) (list []*pb.ActivityData) {
task := &pb.DBActivity{}
if err := this.Get(uid, task); err != nil {
this.module.Errorf("getTaskList err %v", err)
return
}
for _, v := range task.ActivityList {
if v.Tag == int32(taskTag) {
list = append(list, v)
}
}
return list
}
// 查询完成的且未领取的任务 发现未领取返回true
func (this *ModelTaskActive) noReceiveTaskActive(user *pb.DBUserExpand, activityList []*pb.ActivityData, taskTag comm.TaskTag) (bool, error) {
for _, v := range activityList {
if v.Tag == int32(taskTag) && v.Received == 0 {
conf := this.module.configure.getTaskActiveById(v.TaskId)
if conf != nil && user != nil {
switch taskTag {
case comm.TASK_DAILY:
if user.Activeday >= conf.Active {
return true, nil
}
case comm.TASK_WEEKLY:
if user.Activeweek >= conf.Active {
return true, nil
}
}
}
}
}
return false, nil
}
// 获取玩家活跃记录 id 唯一ID
func (this *ModelTaskActive) getUserActive(uid string, taskId int32, taskTag comm.TaskTag) *pb.ActivityData {
record := this.getActiveListByTag(uid, taskTag)
for _, v := range record {
if v.TaskId == taskId {
return v
}
}
return nil
}
func (this *ModelTaskActive) updateReceive(uid string, data map[string]interface{}) (err error) {
if len(data) == 0 {
return
}
return this.module.modelTaskActive.Change(uid, data)
}
// 清空活跃度任务
func (this *ModelTaskActive) clearTask(uid string, taskTag ...comm.TaskTag) {
if len(taskTag) == 0 {
this.module.Errorf("least one param for taskTag")
return
}
var (
active *pb.DBActivity
err error
)
if active, err = this.getActiveList(uid); err != nil {
this.module.Errorln(err)
return
}
for i := 0; i < len(active.ActivityList); i++ {
if active.ActivityList[i].Tag == int32(taskTag[0]) {
active.ActivityList = append(active.ActivityList[:i], active.ActivityList[i+1:]...)
i--
}
}
update := map[string]interface{}{
"activityList": active.ActivityList,
}
if err := this.module.modelTaskActive.Change(uid, update); err != nil {
this.module.Errorf("uid: %v err:%v", uid, err)
return
}
}

View File

@ -1,371 +0,0 @@
package task
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
event_v2 "go_dreamfactory/lego/sys/event/v2"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"sort"
"github.com/pkg/errors"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
type ModelTask struct {
modules.MCompModel
module *ModuleTask
EventApp *event_v2.App
}
func (this *ModelTask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.TableName = comm.TableTask
err = this.MCompModel.Init(service, module, comp, options)
this.module = module.(*ModuleTask)
this.EventApp = event_v2.NewApp()
// this.EventApp.Listen(comm.EventTaskChanged, this.doTaskHandle)
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
// 查询完成的且未领取的任务 发现未领取返回true
func (this *ModelTask) noReceiveTask(task *pb.DBTask, taskTag comm.TaskTag) (bool, error) {
if taskTag == comm.TASK_DAILY {
for _, v := range task.DayList {
if v.Received == 0 {
return true, nil
}
}
} else if taskTag == comm.TASK_WEEKLY {
for _, v := range task.WeekList {
if v.Received == 0 {
return true, nil
}
}
}
return false, nil
}
func (this *ModelTask) checkTaskStatus(uid string, list []*pb.TaskData) []*pb.TaskData {
// 待校验的条件ID
condIds := []int32{}
for _, v := range list {
condIds = append(condIds, v.TypeId)
}
conds, err := this.module.ModuleBuried.CheckCondition(uid, condIds...)
if err != nil {
this.module.Error(err.Error())
return nil
}
for _, v := range list {
for _, cond := range conds {
if v.TypeId == cond.Conid {
v.Cond = cond
if cond.State == pb.BuriedItemFinishState_buried_finish {
v.Status = 1
}
}
}
}
return list
}
// 获取玩家任务列表
func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) *pb.DBTask {
task := &pb.DBTask{}
if err := this.Get(uid, task); err != nil {
this.module.Errorf("getTaskList err %v", err)
return nil
}
if task == nil {
return nil
}
// 排序
sort.SliceStable(task.DayList, func(i, j int) bool {
return task.DayList[i].Sort < task.DayList[j].Sort
})
sort.SliceStable(task.WeekList, func(i, j int) bool {
return task.WeekList[i].Sort < task.WeekList[j].Sort
})
update := map[string]interface{}{}
var dataList []*pb.TaskData
if taskTag == comm.TASK_DAILY {
dataList = task.DayList
} else if taskTag == comm.TASK_WEEKLY {
dataList = task.WeekList
}
dataList = this.checkTaskStatus(uid, dataList)
if taskTag == comm.TASK_DAILY {
update["dayList"] = dataList
} else if taskTag == comm.TASK_WEEKLY {
update["weekList"] = dataList
}
if err := this.module.modelTask.Change(uid, update); err != nil {
this.module.Error("change err", log.Field{Key: "uid", Value: uid})
}
// 当前玩家成就任务
getCurTask := func(taskId int32) *pb.TaskData {
for _, v := range task.AchieveList {
if v.TaskId == taskId {
return v
}
}
return nil
}
// 判断上个成就任务领取了才显示最后一个任务
isReceived := func(taskId int32) bool {
if preCnf := this.module.configure.getPreTask(taskId); preCnf != nil {
if preTask := getCurTask(preCnf.Key); preTask != nil {
if preTask.Received == 1 {
return true
}
}
}
return false
}
// 成就列表
var achieveList []*pb.TaskData
if taskTag == comm.TASK_ACHIEVE {
for _, v := range task.AchieveList {
if curTask := this.module.configure.getTaskById(v.TaskId); curTask != nil {
if v.Received == 0 {
isFirst := this.module.configure.isFirstTask(curTask.Key)
if curTask.IdAfter == 0 && isFirst { //未领取和没有下个连续任务的
achieveList = append(achieveList, v)
continue
}
if isFirst && curTask.IdAfter != 0 { //连续任务的第一个任务
next := this.module.configure.getTaskById(curTask.IdAfter)
if next != nil && v.Received == 0 {
achieveList = append(achieveList, v)
}
} else {
if isReceived(curTask.Key) {
achieveList = append(achieveList, v)
}
}
}
}
}
achieveList = this.checkTaskStatus(uid, achieveList)
update["achieveList"] = achieveList
if err := this.module.modelTask.Change(uid, update); err != nil {
log.Error("err", log.Field{Key: "uid", Value: uid})
}
task.AchieveList = achieveList
}
return task
}
// 获取用户任务
func (this *ModelTask) getTaskById(uid string, taskTag comm.TaskTag, taskId int32) *pb.DBTask {
task := &pb.DBTask{}
if err := this.Get(uid, task); err != nil {
this.module.Errorf("getTaskById err %v", err)
return nil
}
if task != nil {
if taskTag == comm.TASK_DAILY {
for _, v := range task.DayList {
if v.TaskId == taskId {
task.DayList = append(task.DayList, v)
}
}
} else if taskTag == comm.TASK_WEEKLY {
for _, v := range task.WeekList {
if v.TaskId == taskId {
task.WeekList = append(task.WeekList, v)
}
}
} else if taskTag == comm.TASK_ACHIEVE {
for _, v := range task.AchieveList {
if v.TaskId == taskId {
task.AchieveList = append(task.AchieveList, v)
}
}
}
}
return task
}
// 初始化任务
func (this *ModelTask) initTask(opencond map[string]int32, task *pb.DBTask, taskTag comm.TaskTag) error {
data := this.module.configure.getTaskByTag(int32(taskTag))
for _, cnf := range data {
if unlock, ok := opencond[cnf.Open]; cnf.Open != "" && (!ok || unlock != 2) {
continue
}
t := &pb.TaskData{
Tag: cnf.IdTag,
TypeId: cnf.TypeId,
TaskId: cnf.Key,
Active: cnf.Active,
Sort: cnf.IdList,
}
if taskTag == comm.TASK_DAILY {
task.DayList = append(task.DayList, t)
} else if taskTag == comm.TASK_WEEKLY {
task.WeekList = append(task.WeekList, t)
} else if taskTag == comm.TASK_ACHIEVE {
task.AchieveList = append(task.AchieveList, t)
}
}
return nil
}
// 查询用户任务
func (this *ModelTask) getUserTask(uid string) (task *pb.DBTask, err error) {
task = &pb.DBTask{}
if err = this.Get(uid, task); err != nil && err != mgo.MongodbNil {
return
}
if err == mongo.ErrNoDocuments {
objId := primitive.NewObjectID().Hex()
task = &pb.DBTask{
Uid: uid,
Id: objId,
}
if err = this.Add(uid, task); err != nil {
return
}
}
return
}
// 获取待处理的(日、周)任务
func (this *ModelTask) getUnFinishTasks(uid string, taskId int32) (list []*pb.TaskData) {
task := &pb.DBTask{}
if err := this.Get(uid, task); err != nil {
this.module.Errorf("getTaskById err %v", err)
return nil
}
if task != nil {
for _, v := range task.DayList {
if v.TaskId == taskId && v.Status == 0 {
list = append(list, v)
}
}
for _, v := range task.WeekList {
if v.TaskId == taskId && v.Status == 0 {
list = append(list, v)
}
}
for _, v := range task.AchieveList {
if v.TaskId == taskId && v.Status == 0 {
list = append(list, v)
}
}
}
return
}
// 更改用户任务
// Deprecated
func (this *ModelTask) modifyUserTask(uid string, taskId int32, data map[string]interface{}) error {
var task *pb.DBTask
if err := this.GetList(uid, &task); err != nil {
this.module.Errorf("getTaskById err %v", err)
return nil
}
var err error
for _, v := range task.DayList {
if v.TaskId == taskId {
// v.Progress = data["progress"].(int32)
v.Status = data["status"].(int32)
}
}
day_update := map[string]interface{}{
"dayList": task.DayList,
}
err = this.Change(uid, day_update)
for _, v := range task.WeekList {
if v.TaskId == taskId {
// v.Progress = data["progress"].(int32)
v.Status = data["status"].(int32)
}
}
week_update := map[string]interface{}{
"weekList": task.WeekList,
}
err = this.Change(uid, week_update)
for _, v := range task.AchieveList {
if v.TaskId == taskId {
// v.Progress = data["progress"].(int32)
v.Status = data["status"].(int32)
}
}
achieve_update := map[string]interface{}{
"achieveList": task.AchieveList,
}
err = this.Change(uid, achieve_update)
return err
}
// 更新活跃度
func (this *ModelTask) updateActive(uid string, cfgId int32) error {
// 更新活跃度
de, err := this.module.ModuleUser.GetUserExpand(uid)
if err != nil {
return err
}
conf := this.module.configure.getTaskById(cfgId)
if conf == nil {
return errors.New(fmt.Sprintf("%v config nil", cfgId))
}
switch conf.IdTag {
case int32(comm.TASK_DAILY):
de.Activeday += conf.Active
case int32(comm.TASK_WEEKLY):
de.Activeweek += conf.Active
}
update := map[string]interface{}{
"activeday": de.Activeday,
"activeweek": de.Activeweek,
}
return this.module.ModuleUser.ChangeUserExpand(uid, update)
}
type TaskListen struct {
event_v2.Event
Uid string
TaskType comm.TaskType
}

View File

@ -1,184 +0,0 @@
// package
// 日/周常成就任务
// 赵长远
package task
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
event_v2 "go_dreamfactory/lego/sys/event/v2"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
)
var _ comm.ITask = (*ModuleTask)(nil)
type ModuleTask struct {
modules.ModuleBase
modelTask *ModelTask
modelTaskActive *ModelTaskActive
api *apiComp
configure *configureComp
}
func NewModule() core.IModule {
return &ModuleTask{}
}
func (this *ModuleTask) GetType() core.M_Modules {
return comm.ModuleTask
}
func (this *ModuleTask) GetEventApp() *event_v2.App {
return this.modelTask.EventApp
}
func (this *ModuleTask) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
return
}
func (this *ModuleTask) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelTask = this.RegisterComp(new(ModelTask)).(*ModelTask)
this.modelTaskActive = this.RegisterComp(new(ModelTaskActive)).(*ModelTaskActive)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}
// 模块启动接口
func (this *ModuleTask) Start() (err error) {
err = this.ModuleBase.Start()
event.RegisterGO(comm.EventUserLogin, this.EventUserLogin)
event.RegisterGO(comm.EventUserOffline, this.CleanTask)
return
}
func (this *ModuleTask) EventUserLogin(session comm.IUserSession) {
var (
opencond map[string]int32
errdata *pb.ErrorData
task *pb.DBTask
active *pb.DBActivity
err error
)
if opencond, errdata = this.ModuleSys.QueryOpenCondData(session.GetUserId()); errdata != nil {
this.Errorf("getTaskList err %v", errdata)
return
}
if task, err = this.modelTask.getUserTask(session.GetUserId()); err != nil {
this.Errorf("getTaskList err %v", err)
return
}
this.modelTask.initTask(opencond, task, comm.TASK_DAILY)
this.modelTask.initTask(opencond, task, comm.TASK_WEEKLY)
this.modelTask.initTask(opencond, task, comm.TASK_ACHIEVE)
if err = this.modelTask.Change(session.GetUserId(), map[string]interface{}{
"dayList": task.DayList,
"weekList": task.WeekList,
"achieveList": task.AchieveList,
}); err != nil {
log.Error("err", log.Field{Key: "uid", Value: session.GetUserId()})
return
}
if active, err = this.modelTaskActive.getActiveList(session.GetUserId()); err != nil {
return
}
this.modelTaskActive.initActiveReward(active, comm.TASK_DAILY)
this.modelTaskActive.initActiveReward(active, comm.TASK_WEEKLY)
if err = this.modelTaskActive.Change(session.GetUserId(), map[string]interface{}{
"activityList": active.ActivityList,
}); err != nil {
log.Error("err", log.Field{Key: "uid", Value: session.GetUserId()})
return
}
}
// 清除缓存
func (this *ModuleTask) CleanTask(uid, sessionid string) {
this.modelTask.BatchDelLists(uid)
this.modelTaskActive.BatchDelLists(uid)
}
// 重置玩家活跃度
func (this *ModuleTask) resetActive(uid string, taskTag comm.TaskTag) {
update := make(map[string]interface{})
if taskTag == comm.TASK_DAILY {
update["activeday"] = 0
} else if taskTag == comm.TASK_WEEKLY {
update["activeweek"] = 0
}
if len(update) > 0 {
this.ModuleUser.ChangeUserExpand(uid, update)
}
}
func (this *ModuleTask) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]*pb.ReddotItem) {
reddot = make(map[comm.ReddotType]*pb.ReddotItem)
var (
task *pb.DBTask = &pb.DBTask{}
active *pb.DBActivity
userExpand *pb.DBUserExpand
err error
)
if task, err = this.modelTask.getUserTask(session.GetUserId()); err != nil {
this.Errorf("getTaskList err %v", err)
return
}
if active, err = this.modelTaskActive.getActiveList(session.GetUserId()); err != nil {
return
}
// 获取玩家活跃度
userExpand, err = this.ModuleUser.GetUserExpand(session.GetUserId())
if err != nil {
return
}
for _, v := range rid {
switch v {
case comm.Reddot10101:
tf, _ := this.modelTask.noReceiveTask(task, comm.TASK_DAILY)
reddot[comm.Reddot10101] = &pb.ReddotItem{
Rid: int32(comm.Reddot10101),
Activated: tf,
Nextchanagetime: 0,
}
case comm.Reddot10102:
tf, _ := this.modelTask.noReceiveTask(task, comm.TASK_WEEKLY)
reddot[comm.Reddot10102] = &pb.ReddotItem{
Rid: int32(comm.Reddot10102),
Activated: tf,
Nextchanagetime: 0,
}
case comm.Reddot10103:
tf, _ := this.modelTask.noReceiveTask(task, comm.TASK_ACHIEVE)
reddot[comm.Reddot10103] = &pb.ReddotItem{
Rid: int32(comm.Reddot10103),
Activated: tf,
Nextchanagetime: 0,
}
case comm.Reddot10201:
tf, _ := this.modelTaskActive.noReceiveTaskActive(userExpand, active.ActivityList, comm.TASK_DAILY)
reddot[comm.Reddot10201] = &pb.ReddotItem{
Rid: int32(comm.Reddot10201),
Activated: tf,
Nextchanagetime: 0,
}
case comm.Reddot10301:
tf, _ := this.modelTaskActive.noReceiveTaskActive(userExpand, active.ActivityList, comm.TASK_WEEKLY)
reddot[comm.Reddot10301] = &pb.ReddotItem{
Rid: int32(comm.Reddot10301),
Activated: tf,
Nextchanagetime: 0,
}
}
}
return
}

View File

@ -1,4 +1,4 @@
package dailytask package weektask
import ( import (
"go_dreamfactory/lego/base" "go_dreamfactory/lego/base"

View File

@ -1,4 +1,4 @@
package dailytask package weektask
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"

View File

@ -1,4 +1,4 @@
package dailytask package weektask
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"

View File

@ -1,4 +1,4 @@
package dailytask package weektask
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"

View File

@ -1,4 +1,4 @@
package dailytask package weektask
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"

View File

@ -1,4 +1,4 @@
package dailytask package weektask
import ( import (
"fmt" "fmt"
@ -7,6 +7,7 @@ import (
"go_dreamfactory/lego/sys/mgo" "go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"
@ -44,7 +45,7 @@ func (this *ModelWeektask) getUserDTasks(uid string) (results *pb.DBWeektask, er
Tasks: make([]int32, 0), Tasks: make([]int32, 0),
Tcomplete: make(map[int32]bool), Tcomplete: make(map[int32]bool),
Acomplete: make(map[int32]bool), Acomplete: make(map[int32]bool),
Rtime: 0, Rtime: configure.Now().Unix(),
} }
if opencmd, errdata := this.module.sys.QueryOpenCondData(uid); errdata != nil { if opencmd, errdata := this.module.sys.QueryOpenCondData(uid); errdata != nil {
err = fmt.Errorf("sys.QueryOpenCondData err:%s", errdata.Message) err = fmt.Errorf("sys.QueryOpenCondData err:%s", errdata.Message)
@ -78,10 +79,9 @@ func (this *ModelWeektask) inquireActivations(info *pb.DBWeektask, opencmd map[s
if v.Open != "" && opencmd[v.Open] != 2 { //功能未开启 if v.Open != "" && opencmd[v.Open] != 2 { //功能未开启
continue continue
} }
if v.IdBefore != 0 && !info.Tcomplete[v.Key] { //前置任务未完成
// if v.IdBefore != 0 && !info.Tcomplete[v.Key] { //前置任务未完成 continue
// continue }
// }
info.Tasks = append(info.Tasks, v.Key) info.Tasks = append(info.Tasks, v.Key)
} }
return return

View File

@ -1,4 +1,4 @@
package dailytask package weektask
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"

View File

@ -57,12 +57,12 @@ import (
"go_dreamfactory/modules/stonehenge" "go_dreamfactory/modules/stonehenge"
"go_dreamfactory/modules/storyline" "go_dreamfactory/modules/storyline"
"go_dreamfactory/modules/sys" "go_dreamfactory/modules/sys"
"go_dreamfactory/modules/task"
"go_dreamfactory/modules/tools" "go_dreamfactory/modules/tools"
"go_dreamfactory/modules/uigame" "go_dreamfactory/modules/uigame"
"go_dreamfactory/modules/user" "go_dreamfactory/modules/user"
"go_dreamfactory/modules/viking" "go_dreamfactory/modules/viking"
"go_dreamfactory/modules/warorder" "go_dreamfactory/modules/warorder"
"go_dreamfactory/modules/weektask"
"go_dreamfactory/modules/wtask" "go_dreamfactory/modules/wtask"
"go_dreamfactory/services" "go_dreamfactory/services"
"go_dreamfactory/sys/db" "go_dreamfactory/sys/db"
@ -102,7 +102,6 @@ func main() {
friend.NewModule(), friend.NewModule(),
hero.NewModule(), hero.NewModule(),
equipment.NewModule(), equipment.NewModule(),
task.NewModule(),
shop.NewModule(), shop.NewModule(),
notify.NewModule(), notify.NewModule(),
chat.NewModule(), chat.NewModule(),
@ -156,6 +155,7 @@ func main() {
pushgiftbag.NewModule(), pushgiftbag.NewModule(),
uigame.NewModule(), uigame.NewModule(),
battlerecord.NewModule(), battlerecord.NewModule(),
weektask.NewModule(),
) )
} }

View File

@ -118,4 +118,8 @@ const (
GameBuffType_ADJUST_PRO_FULL_EMIT_SKILL = 125 GameBuffType_ADJUST_PRO_FULL_EMIT_SKILL = 125
GameBuffType_APPEND_DMG = 126 GameBuffType_APPEND_DMG = 126
GameBuffType_PRO_HIGH_IGNORE_IMMUNITY = 127 GameBuffType_PRO_HIGH_IGNORE_IMMUNITY = 127
GameBuffType_ADJUST_PRO_BY_PARAM = 128
GameBuffType_VIKING_INTUITION = 129
GameBuffType_VIKING_ROAR = 130
GameBuffType_VIKING_FLAG = 131
) )

View File

@ -36,18 +36,19 @@ const (
GameSkillEffectType_ExtraDmg_2 = 25 GameSkillEffectType_ExtraDmg_2 = 25
GameSkillEffectType_ExtraDmg_3 = 26 GameSkillEffectType_ExtraDmg_3 = 26
GameSkillEffectType_ExtraDmg_4 = 27 GameSkillEffectType_ExtraDmg_4 = 27
GameSkillEffectType_Round = 28 GameSkillEffectType_ExtraDmg_5 = 28
GameSkillEffectType_TreBeyondByAddBuff = 29 GameSkillEffectType_Round = 29
GameSkillEffectType_DpsByTre = 30 GameSkillEffectType_TreBeyondByAddBuff = 30
GameSkillEffectType_Rebirth = 31 GameSkillEffectType_DpsByTre = 31
GameSkillEffectType_StealBuff = 32 GameSkillEffectType_Rebirth = 32
GameSkillEffectType_BuffDmg = 33 GameSkillEffectType_StealBuff = 33
GameSkillEffectType_BuffTre = 34 GameSkillEffectType_BuffDmg = 34
GameSkillEffectType_ShiftOurAllBuff = 35 GameSkillEffectType_BuffTre = 35
GameSkillEffectType_DrawActValueToTeam = 36 GameSkillEffectType_ShiftOurAllBuff = 36
GameSkillEffectType_SpecialTre = 37 GameSkillEffectType_DrawActValueToTeam = 37
GameSkillEffectType_RandChildSkill = 38 GameSkillEffectType_SpecialTre = 38
GameSkillEffectType_AddActValueByEffect = 39 GameSkillEffectType_RandChildSkill = 39
GameSkillEffectType_TreByBuffNum = 40 GameSkillEffectType_AddActValueByEffect = 40
GameSkillEffectType_GetTargetBuffNum = 41 GameSkillEffectType_TreByBuffNum = 41
GameSkillEffectType_GetTargetBuffNum = 42
) )

View File

@ -12,7 +12,6 @@ import "errors"
type GameActiveRewardData struct { type GameActiveRewardData struct {
Key int32 Key int32
IdTag int32
Active int32 Active int32
Reword []*Gameatn Reword []*Gameatn
Action string Action string
@ -27,7 +26,6 @@ func (*GameActiveRewardData) GetTypeId() int32 {
func (_v *GameActiveRewardData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameActiveRewardData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_tag"].(float64); !_ok_ { err = errors.New("id_tag error"); return }; _v.IdTag = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["active"].(float64); !_ok_ { err = errors.New("active error"); return }; _v.Active = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["active"].(float64); !_ok_ { err = errors.New("active error"); return }; _v.Active = int32(_tempNum_) }
{ {
var _arr_ []interface{} var _arr_ []interface{}

View File

@ -12,7 +12,6 @@ import "errors"
type GameTaskActiveRewardData struct { type GameTaskActiveRewardData struct {
Key int32 Key int32
IdTag int32
Active int32 Active int32
Reword []*Gameatn Reword []*Gameatn
Action string Action string
@ -27,7 +26,6 @@ func (*GameTaskActiveRewardData) GetTypeId() int32 {
func (_v *GameTaskActiveRewardData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameTaskActiveRewardData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_tag"].(float64); !_ok_ { err = errors.New("id_tag error"); return }; _v.IdTag = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["active"].(float64); !_ok_ { err = errors.New("active error"); return }; _v.Active = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["active"].(float64); !_ok_ { err = errors.New("active error"); return }; _v.Active = int32(_tempNum_) }
{ {
var _arr_ []interface{} var _arr_ []interface{}

View File

@ -13,12 +13,13 @@ import "errors"
type GameTaskRoundData struct { type GameTaskRoundData struct {
Key int32 Key int32
IdList int32 IdList int32
IdTag int32
Open string Open string
Opentask string
IdBefore int32
IdAfter int32
TaskDisplay string TaskDisplay string
TypeId int32 TypeId int32
Active int32 Active int32
IdAfter int32
JumpInterface int32 JumpInterface int32
Icon string Icon string
Reword []*Gameatn Reword []*Gameatn
@ -33,12 +34,13 @@ func (*GameTaskRoundData) GetTypeId() int32 {
func (_v *GameTaskRoundData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameTaskRoundData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_list"].(float64); !_ok_ { err = errors.New("id_list error"); return }; _v.IdList = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_list"].(float64); !_ok_ { err = errors.New("id_list error"); return }; _v.IdList = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_tag"].(float64); !_ok_ { err = errors.New("id_tag error"); return }; _v.IdTag = int32(_tempNum_) }
{ var _ok_ bool; if _v.Open, _ok_ = _buf["open"].(string); !_ok_ { err = errors.New("open error"); return } } { var _ok_ bool; if _v.Open, _ok_ = _buf["open"].(string); !_ok_ { err = errors.New("open error"); return } }
{ var _ok_ bool; if _v.Opentask, _ok_ = _buf["opentask"].(string); !_ok_ { err = errors.New("opentask error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_before"].(float64); !_ok_ { err = errors.New("id_before error"); return }; _v.IdBefore = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Id_after"].(float64); !_ok_ { err = errors.New("Id_after error"); return }; _v.IdAfter = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_display"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDisplay error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDisplay, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_display"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDisplay error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDisplay, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type_id"].(float64); !_ok_ { err = errors.New("type_id error"); return }; _v.TypeId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type_id"].(float64); !_ok_ { err = errors.New("type_id error"); return }; _v.TypeId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["active"].(float64); !_ok_ { err = errors.New("active error"); return }; _v.Active = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["active"].(float64); !_ok_ { err = errors.New("active error"); return }; _v.Active = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_after"].(float64); !_ok_ { err = errors.New("id_after error"); return }; _v.IdAfter = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["jump_interface"].(float64); !_ok_ { err = errors.New("jump_interface error"); return }; _v.JumpInterface = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["jump_interface"].(float64); !_ok_ { err = errors.New("jump_interface error"); return }; _v.JumpInterface = int32(_tempNum_) }
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } } { var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
{ {