更新配置

This commit is contained in:
wh_zcy 2022-08-26 17:10:45 +08:00
parent 2a1f9ce395
commit e20dd5d33c
48 changed files with 16701 additions and 3703 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,8 @@
[
{
"star": 1,
"level": 1,
"maxlevel": 10,
"starup_hp": 0,
"starup_atk": 0,
"starup_def": 0,
@ -8,6 +10,8 @@
},
{
"star": 2,
"level": 10,
"maxlevel": 20,
"starup_hp": 9.5,
"starup_atk": 9.5,
"starup_def": 9.5,
@ -15,6 +19,8 @@
},
{
"star": 3,
"level": 20,
"maxlevel": 30,
"starup_hp": 19,
"starup_atk": 19,
"starup_def": 19,
@ -22,6 +28,8 @@
},
{
"star": 4,
"level": 30,
"maxlevel": 40,
"starup_hp": 28.5,
"starup_atk": 28.5,
"starup_def": 28.5,
@ -29,6 +37,8 @@
},
{
"star": 5,
"level": 40,
"maxlevel": 50,
"starup_hp": 38,
"starup_atk": 38,
"starup_def": 38,
@ -36,6 +46,8 @@
},
{
"star": 6,
"level": 50,
"maxlevel": 60,
"starup_hp": 47.5,
"starup_atk": 47.5,
"starup_def": 47.5,

View File

@ -7,7 +7,7 @@
"needherostar": 4,
"needheronum": 1,
"needrace": [
1
2
],
"needracestar": 4,
"needracenum": 4,
@ -21,7 +21,7 @@
"needherostar": 5,
"needheronum": 1,
"needrace": [
1
2
],
"needracestar": 5,
"needracenum": 4,
@ -73,7 +73,7 @@
"needherostar": 5,
"needheronum": 1,
"needrace": [
3
2
],
"needracestar": 5,
"needracenum": 4,
@ -99,7 +99,7 @@
"needherostar": 5,
"needheronum": 1,
"needrace": [
4
1
],
"needracestar": 5,
"needracenum": 4,

View File

@ -494,8 +494,8 @@
"var": [
{
"a": "hero",
"t": "11001",
"n": 1
"t": "35002",
"n": 5
}
]
},
@ -504,8 +504,8 @@
"var": [
{
"a": "hero",
"t": "11003",
"n": 2
"t": "24003",
"n": 5
}
]
},
@ -514,8 +514,8 @@
"var": [
{
"a": "hero",
"t": "11009",
"n": 1
"t": "34006",
"n": 5
}
]
},
@ -524,8 +524,8 @@
"var": [
{
"a": "hero",
"t": "11009",
"n": 1
"t": "44006",
"n": 5
}
]
},
@ -534,8 +534,18 @@
"var": [
{
"a": "hero",
"t": "11009",
"n": 1
"t": "35001",
"n": 5
}
]
},
{
"index": "58",
"var": [
{
"a": "hero",
"t": "44005",
"n": 5
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,9 @@
"area": 1,
"consume": [
{
"a": "item",
"t": "10002",
"n": 1
"a": "attr",
"t": "gold",
"n": 50
}
]
},
@ -17,9 +17,9 @@
"area": 2,
"consume": [
{
"a": "item",
"t": "10002",
"n": 1
"a": "attr",
"t": "gold",
"n": 50
}
]
},
@ -29,9 +29,9 @@
"area": 3,
"consume": [
{
"a": "item",
"t": "10002",
"n": 1
"a": "attr",
"t": "gold",
"n": 50
}
]
},
@ -41,9 +41,9 @@
"area": 4,
"consume": [
{
"a": "item",
"t": "10002",
"n": 1
"a": "attr",
"t": "gold",
"n": 50
}
]
},
@ -53,9 +53,9 @@
"area": 5,
"consume": [
{
"a": "item",
"t": "10002",
"n": 1
"a": "attr",
"t": "gold",
"n": 50
}
]
}

View File

@ -2185,7 +2185,7 @@
},
{
"id": "55007",
"preson": "11021",
"preson": "55007",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_55007",
@ -2205,14 +2205,14 @@
}
},
{
"id": "55008",
"preson": "55008",
"id": "63002",
"preson": "63002",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_55008",
"fight": "ytx_js_63002",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_55008",
"portrait": "portrait_63002",
"bust": "bust_55008",
"postxyz": [
0,
@ -2224,5 +2224,257 @@
"y": 180,
"z": 0
}
},
{
"id": "63003",
"preson": "63003",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_63003",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_63003",
"bust": "bust_55009",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "63004",
"preson": "63004",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_63004",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_63004",
"bust": "bust_55010",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "64003",
"preson": "64003",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_64003",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_64003",
"bust": "bust_55011",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "74002",
"preson": "74002",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_74002",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_74002",
"bust": "bust_55012",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "74003",
"preson": "74003",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_74003",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_74003",
"bust": "bust_55013",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "74004",
"preson": "74004",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_74004",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_74004",
"bust": "bust_55014",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "83002",
"preson": "83002",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_83002",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_83002",
"bust": "bust_55015",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "83006",
"preson": "83006",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_83006",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_83006",
"bust": "bust_55016",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "84002",
"preson": "84002",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_84002",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_84002",
"bust": "bust_55017",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "94002",
"preson": "94002",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_94002",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_94002",
"bust": "bust_55018",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "94005",
"preson": "94005",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_94005",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_94005",
"bust": "bust_55019",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
},
{
"id": "64007",
"preson": "64007",
"presonshow": "",
"ico": "tx_hhjs_35002",
"fight": "ytx_js_64007",
"img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002",
"portrait": "portrait_64007",
"bust": "bust_55020",
"postxyz": [
0,
0,
0
],
"rotation": {
"x": 0,
"y": 180,
"z": 0
}
}
]

View File

@ -197,7 +197,39 @@
"key": "num_1007",
"text": "维京远征"
},
"main": "{\"lv\": 999}",
"main": "{\"lv\": 9}",
"optional": "",
"wkqbx": 0,
"kqbx": 0,
"img": "",
"prompt": {
"key": "opencond_prompt_10002",
"text": "暂不开启,敬请期待"
}
},
{
"id": "vikingexpedition2",
"name": {
"key": "num_1007",
"text": "维京远征"
},
"main": "{\"lv\": 10}",
"optional": "",
"wkqbx": 0,
"kqbx": 0,
"img": "",
"prompt": {
"key": "opencond_prompt_10002",
"text": "暂不开启,敬请期待"
}
},
{
"id": "vikingexpedition3",
"name": {
"key": "num_1007",
"text": "维京远征"
},
"main": "{\"lv\": 11}",
"optional": "",
"wkqbx": 0,
"kqbx": 0,

View File

@ -7,29 +7,9 @@
"condition": [
101
],
"CD": 0,
"objType": 1,
"point": "model_01",
"storyBegin": 4,
"storyEnd": 0,
"chooseId": [
10001,
10002,
10003
],
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 10
},
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"nextTid": 100101
"sidequest": [
1001
]
},
{
"id": 100101,
@ -39,28 +19,9 @@
"condition": [
101
],
"CD": 0,
"objType": 2,
"point": "icon_01",
"storyBegin": 6,
"storyEnd": 9,
"chooseId": [
20001,
20002
],
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 10
},
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"nextTid": 100102
"sidequest": [
1002
]
},
{
"id": 100102,
@ -71,24 +32,8 @@
101,
107
],
"CD": 0,
"objType": 1,
"point": "model_02",
"storyBegin": 7,
"storyEnd": 0,
"chooseId": [],
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 10
},
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"nextTid": 0
"sidequest": [
1003
]
}
]

View File

@ -5,8 +5,7 @@
"preTid": 0,
"needItem": [
0
],
"endTid": 0
]
},
{
"id": 10002,
@ -14,8 +13,7 @@
"preTid": 107,
"needItem": [
0
],
"endTid": 0
]
},
{
"id": 10003,
@ -23,8 +21,7 @@
"preTid": 0,
"needItem": [
0
],
"endTid": 0
]
},
{
"id": 20001,
@ -32,8 +29,7 @@
"preTid": 0,
"needItem": [
0
],
"endTid": 105
]
},
{
"id": 20002,
@ -41,7 +37,6 @@
"preTid": 0,
"needItem": [
0
],
"endTid": 0
]
}
]

View File

@ -2,7 +2,7 @@
{
"id": 101,
"type": 1,
"data1": 90001,
"data1": 25001,
"data2": 0,
"data3": 0
},
@ -23,7 +23,7 @@
{
"id": 104,
"type": 4,
"data1": 90001,
"data1": 25001,
"data2": 20,
"data3": 0
},
@ -37,7 +37,7 @@
{
"id": 106,
"type": 5,
"data1": 90001,
"data1": 25001,
"data2": 2,
"data3": 0
},
@ -51,7 +51,7 @@
{
"id": 108,
"type": 6,
"data1": 90001,
"data1": 25001,
"data2": 5,
"data3": 0
}

View File

@ -0,0 +1,78 @@
[
{
"id": 1001,
"objType": 1,
"point": "model_01",
"storyBegin": 4,
"storyEnd": 0,
"chooseId": [
10001,
10002,
10003
],
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 10
},
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"CD": 0,
"nextTid": 100101,
"endTid": -1
},
{
"id": 1002,
"objType": 2,
"point": "icon_01",
"storyBegin": 6,
"storyEnd": 9,
"chooseId": [
20001,
20002
],
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 10
},
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"CD": 0,
"nextTid": 100102,
"endTid": 105
},
{
"id": 1003,
"objType": 1,
"point": "model_02",
"storyBegin": 7,
"storyEnd": 0,
"chooseId": [],
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 10
},
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"CD": 0,
"nextTid": 0,
"endTid": -1
}
]

View File

@ -1101,7 +1101,7 @@
"buffid": []
},
{
"Id": 925001211,
"Id": 925001411,
"Name": {
"key": "skillname_925001211",
"text": "阿宝2技能"
@ -1152,5 +1152,522 @@
],
"Desc": [],
"buffid": []
},
{
"Id": 144005011,
"Name": {
"key": "skillname_144005011",
"text": "小伊队长技"
},
"ico": "jn_dzj_01",
"act": "",
"Type": 3,
"MaxLV": 1,
"CD": [
-1
],
"Target": 1,
"ChildSkill": [
{
"Id": [
244005011
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 144005111,
"Name": {
"key": "skillname_144005111",
"text": "小伊1技能"
},
"ico": "jn_icon_001",
"act": "Skill_1",
"Type": 1,
"MaxLV": 5,
"CD": [
0,
0,
0,
0,
0
],
"Target": 2,
"ChildSkill": [
{
"Id": [
244005111
]
},
{
"Id": [
244005121
]
},
{
"Id": [
244005131
]
},
{
"Id": [
244005141
]
},
{
"Id": [
244005151
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 144005211,
"Name": {
"key": "skillname_144005211",
"text": "小伊2技能"
},
"ico": "jn_icon_002",
"act": "Skill_2",
"Type": 1,
"MaxLV": 5,
"CD": [
4,
4,
4,
4,
3
],
"Target": 2,
"ChildSkill": [
{
"Id": [
244005211
]
},
{
"Id": [
244005221
]
},
{
"Id": [
244005231
]
},
{
"Id": [
244005241
]
},
{
"Id": [
244005251
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 144005311,
"Name": {
"key": "skillname_144005311",
"text": "小伊3技能"
},
"ico": "jn_icon_003",
"act": "Skill_3",
"Type": 1,
"MaxLV": 5,
"CD": [
5,
5,
5,
5,
4
],
"Target": 2,
"ChildSkill": [
{
"Id": [
244005311,
244005312,
244005313
]
},
{
"Id": [
244005321,
244005322,
244005313
]
},
{
"Id": [
244005331,
244005332,
244005313
]
},
{
"Id": [
244005341,
244005342,
244005313
]
},
{
"Id": [
244005341,
244005342,
244005313
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 944005411,
"Name": {
"key": "skillname_944005411",
"text": "小伊3技能"
},
"ico": "jn_icon_003",
"act": "Skill_3",
"Type": 1,
"MaxLV": 5,
"CD": [
5,
5,
5,
5,
4
],
"Target": 2,
"ChildSkill": [
{
"Id": [
244005311,
244005312,
244005313,
944005311
]
},
{
"Id": [
244005321,
244005322,
244005313,
944005311
]
},
{
"Id": [
244005331,
244005332,
244005313,
944005311
]
},
{
"Id": [
244005341,
244005342,
244005313,
944005311
]
},
{
"Id": [
244005341,
244005342,
244005313,
944005311
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 135001011,
"Name": {
"key": "skillname_135001011",
"text": "师傅队长技"
},
"ico": "jn_dzj_01",
"act": "",
"Type": 3,
"MaxLV": 1,
"CD": [
-1
],
"Target": 1,
"ChildSkill": [
{
"Id": [
235001011
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 135001111,
"Name": {
"key": "skillname_135001111",
"text": "师傅1技能"
},
"ico": "jn_icon_001",
"act": "Skill_1",
"Type": 1,
"MaxLV": 6,
"CD": [
0,
0,
0,
0,
0,
0
],
"Target": 2,
"ChildSkill": [
{
"Id": [
235001111,
235001112,
235001113,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001122,
235001123,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001132,
235001133,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001142,
235001143,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001152,
235001153,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001152,
235001153,
235001114,
235001115,
235001116
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 135001211,
"Name": {
"key": "skillname_135001211",
"text": "师傅2技能"
},
"ico": "jn_icon_002",
"act": "Skill_2",
"Type": 1,
"MaxLV": 5,
"CD": [
3,
3,
3,
3,
2
],
"Target": 2,
"ChildSkill": [
{
"Id": [
235001211,
235001212
]
},
{
"Id": [
235001221,
235001212
]
},
{
"Id": [
235001231,
235001212
]
},
{
"Id": [
235001241,
235001212
]
},
{
"Id": [
235001251,
235001212
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 135001311,
"Name": {
"key": "skillname_135001311",
"text": "师傅3技能"
},
"ico": "jn_icon_003",
"act": "Skill_3",
"Type": 1,
"MaxLV": 4,
"CD": [
4,
4,
4,
3
],
"Target": 2,
"ChildSkill": [
{
"Id": [
235001311,
235001312,
235001313,
235001314
]
},
{
"Id": [
235001311,
235001312,
235001313,
235001324
]
},
{
"Id": [
235001311,
235001312,
235001313,
235001334
]
},
{
"Id": [
235001311,
235001312,
235001313,
235001344
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 935001411,
"Name": {
"key": "skillname_935001411",
"text": "师傅2技能"
},
"ico": "jn_icon_002",
"act": "Skill_2",
"Type": 1,
"MaxLV": 5,
"CD": [
3,
3,
3,
3,
2
],
"Target": 2,
"ChildSkill": [
{
"Id": [
235001211,
235001212,
935001211,
935001212
]
},
{
"Id": [
235001221,
235001212,
935001211,
935001212
]
},
{
"Id": [
235001231,
235001212,
935001211,
935001212
]
},
{
"Id": [
235001241,
235001212,
935001211,
935001212
]
},
{
"Id": [
235001251,
235001212
]
}
],
"Desc": [],
"buffid": []
}
]

File diff suppressed because it is too large Load Diff

View File

@ -1101,7 +1101,7 @@
"buffid": []
},
{
"Id": 925001211,
"Id": 925001411,
"Name": {
"key": "skillname_925001211",
"text": "阿宝2技能"
@ -1152,5 +1152,522 @@
],
"Desc": [],
"buffid": []
},
{
"Id": 144005011,
"Name": {
"key": "skillname_144005011",
"text": "小伊队长技"
},
"ico": "jn_dzj_01",
"act": "",
"Type": 3,
"MaxLV": 1,
"CD": [
-1
],
"Target": 1,
"ChildSkill": [
{
"Id": [
244005011
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 144005111,
"Name": {
"key": "skillname_144005111",
"text": "小伊1技能"
},
"ico": "jn_icon_001",
"act": "Skill_1",
"Type": 1,
"MaxLV": 5,
"CD": [
0,
0,
0,
0,
0
],
"Target": 2,
"ChildSkill": [
{
"Id": [
244005111
]
},
{
"Id": [
244005121
]
},
{
"Id": [
244005131
]
},
{
"Id": [
244005141
]
},
{
"Id": [
244005151
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 144005211,
"Name": {
"key": "skillname_144005211",
"text": "小伊2技能"
},
"ico": "jn_icon_002",
"act": "Skill_2",
"Type": 1,
"MaxLV": 5,
"CD": [
4,
4,
4,
4,
3
],
"Target": 2,
"ChildSkill": [
{
"Id": [
244005211
]
},
{
"Id": [
244005221
]
},
{
"Id": [
244005231
]
},
{
"Id": [
244005241
]
},
{
"Id": [
244005251
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 144005311,
"Name": {
"key": "skillname_144005311",
"text": "小伊3技能"
},
"ico": "jn_icon_003",
"act": "Skill_3",
"Type": 1,
"MaxLV": 5,
"CD": [
5,
5,
5,
5,
4
],
"Target": 2,
"ChildSkill": [
{
"Id": [
244005311,
244005312,
244005313
]
},
{
"Id": [
244005321,
244005322,
244005313
]
},
{
"Id": [
244005331,
244005332,
244005313
]
},
{
"Id": [
244005341,
244005342,
244005313
]
},
{
"Id": [
244005341,
244005342,
244005313
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 944005411,
"Name": {
"key": "skillname_944005411",
"text": "小伊3技能"
},
"ico": "jn_icon_003",
"act": "Skill_3",
"Type": 1,
"MaxLV": 5,
"CD": [
5,
5,
5,
5,
4
],
"Target": 2,
"ChildSkill": [
{
"Id": [
244005311,
244005312,
244005313,
944005311
]
},
{
"Id": [
244005321,
244005322,
244005313,
944005311
]
},
{
"Id": [
244005331,
244005332,
244005313,
944005311
]
},
{
"Id": [
244005341,
244005342,
244005313,
944005311
]
},
{
"Id": [
244005341,
244005342,
244005313,
944005311
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 135001011,
"Name": {
"key": "skillname_135001011",
"text": "师傅队长技"
},
"ico": "jn_dzj_01",
"act": "",
"Type": 3,
"MaxLV": 1,
"CD": [
-1
],
"Target": 1,
"ChildSkill": [
{
"Id": [
235001011
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 135001111,
"Name": {
"key": "skillname_135001111",
"text": "师傅1技能"
},
"ico": "jn_icon_001",
"act": "Skill_1",
"Type": 1,
"MaxLV": 6,
"CD": [
0,
0,
0,
0,
0,
0
],
"Target": 2,
"ChildSkill": [
{
"Id": [
235001111,
235001112,
235001113,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001122,
235001123,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001132,
235001133,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001142,
235001143,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001152,
235001153,
235001114,
235001115,
235001116
]
},
{
"Id": [
235001111,
235001152,
235001153,
235001114,
235001115,
235001116
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 135001211,
"Name": {
"key": "skillname_135001211",
"text": "师傅2技能"
},
"ico": "jn_icon_002",
"act": "Skill_2",
"Type": 1,
"MaxLV": 5,
"CD": [
3,
3,
3,
3,
2
],
"Target": 2,
"ChildSkill": [
{
"Id": [
235001211,
235001212
]
},
{
"Id": [
235001221,
235001212
]
},
{
"Id": [
235001231,
235001212
]
},
{
"Id": [
235001241,
235001212
]
},
{
"Id": [
235001251,
235001212
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 135001311,
"Name": {
"key": "skillname_135001311",
"text": "师傅3技能"
},
"ico": "jn_icon_003",
"act": "Skill_3",
"Type": 1,
"MaxLV": 4,
"CD": [
4,
4,
4,
3
],
"Target": 2,
"ChildSkill": [
{
"Id": [
235001311,
235001312,
235001313,
235001314
]
},
{
"Id": [
235001311,
235001312,
235001313,
235001324
]
},
{
"Id": [
235001311,
235001312,
235001313,
235001334
]
},
{
"Id": [
235001311,
235001312,
235001313,
235001344
]
}
],
"Desc": [],
"buffid": []
},
{
"Id": 935001411,
"Name": {
"key": "skillname_935001411",
"text": "师傅2技能"
},
"ico": "jn_icon_002",
"act": "Skill_2",
"Type": 1,
"MaxLV": 5,
"CD": [
3,
3,
3,
3,
2
],
"Target": 2,
"ChildSkill": [
{
"Id": [
235001211,
235001212,
935001211,
935001212
]
},
{
"Id": [
235001221,
235001212,
935001211,
935001212
]
},
{
"Id": [
235001231,
235001212,
935001211,
935001212
]
},
{
"Id": [
235001241,
235001212,
935001211,
935001212
]
},
{
"Id": [
235001251,
235001212
]
}
],
"Desc": [],
"buffid": []
}
]

View File

@ -259,6 +259,32 @@
"buffeffect": "",
"buffpos": ""
},
{
"Id": 390001011,
"Name": {
"key": "skill_buff_390001011",
"text": "伤害提升"
},
"Desc": {
"key": "skill_buffdes_390001011",
"text": "造成伤害提升10%"
},
"BuffType": 30,
"EffectArgu": [
100
],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": 0,
"AddEffect": false,
"RemoveType": true,
"OverlayTimes": 3,
"SameID": false,
"buffIcon": "",
"buffeffect": "",
"buffpos": ""
},
{
"Id": 390001101,
"Name": {
@ -701,6 +727,134 @@
"buffeffect": "",
"buffpos": ""
},
{
"Id": 390001119,
"Name": {
"key": "skill_buff_390001119",
"text": "炎"
},
"Desc": {
"key": "skill_buffdes_390001119",
"text": "无法驱散类状态造成伤害时为目标附加2回合【禁疗】"
},
"BuffType": 0,
"EffectArgu": [],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": 4,
"AddEffect": false,
"RemoveType": false,
"OverlayTimes": 1,
"SameID": false,
"buffIcon": "",
"buffeffect": "",
"buffpos": ""
},
{
"Id": 390001120,
"Name": {
"key": "skill_buff_390001120",
"text": "死"
},
"Desc": {
"key": "skill_buffdes_390001120",
"text": "无法驱散类状态造成伤害时附带效果附加伤害伤害为目标最大生命值5%不超过自身攻击力50%"
},
"BuffType": 0,
"EffectArgu": [],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": 4,
"AddEffect": false,
"RemoveType": false,
"OverlayTimes": 1,
"SameID": false,
"buffIcon": "",
"buffeffect": "",
"buffpos": ""
},
{
"Id": 390001121,
"Name": {
"key": "skill_buff_390001121",
"text": "缚"
},
"Desc": {
"key": "skill_buffdes_390001121",
"text": "无法驱散类状态造成伤害时有40%概率为目标附加2回合【防御下降】"
},
"BuffType": 0,
"EffectArgu": [],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": 4,
"AddEffect": false,
"RemoveType": false,
"OverlayTimes": 1,
"SameID": false,
"buffIcon": "",
"buffeffect": "",
"buffpos": ""
},
{
"Id": 390001122,
"Name": {
"key": "skill_buff_390001122",
"text": "护盾"
},
"Desc": {
"key": "skill_buffdes_390001122",
"text": "护盾量为最大生命值10%"
},
"BuffType": 21,
"EffectArgu": [
1,
1,
100
],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": 0,
"AddEffect": false,
"RemoveType": true,
"OverlayTimes": 1,
"SameID": false,
"buffIcon": "",
"buffeffect": "",
"buffpos": ""
},
{
"Id": 390001123,
"Name": {
"key": "skill_buff_390001123",
"text": "护盾"
},
"Desc": {
"key": "skill_buffdes_390001123",
"text": "护盾量为最大生命值5%"
},
"BuffType": 21,
"EffectArgu": [
1,
1,
50
],
"BufParNum": 1,
"RelyCheckArgu": [],
"CoexistCheckArgu": [],
"Effect": 0,
"AddEffect": false,
"RemoveType": true,
"OverlayTimes": 3,
"SameID": false,
"buffIcon": "",
"buffeffect": "",
"buffpos": ""
},
{
"Id": 390001201,
"Name": {

View File

@ -2,7 +2,7 @@
{
"Id": 490067001,
"When": "RouFro",
"Where": "Target=3",
"Where": "3",
"AddCon": [],
"PasPr": 1000,
"Type": "CallSkillPas",
@ -14,7 +14,7 @@
{
"Id": 490068001,
"When": "RouFro",
"Where": "Target=3",
"Where": "3",
"AddCon": [
"hpproless=500"
],
@ -263,5 +263,37 @@
"Callback": [
125001212
]
},
{
"Id": 444005311,
"When": "RemoveBuffEnd",
"Where": "2",
"AddCon": [
"EffType=0",
"Result=1"
],
"PasPr": 1000,
"Type": "CallSkillPas",
"MaxEmitTimes": 10,
"Callback": [
244005314
]
},
{
"Id": 435001211,
"When": "RemoveBuffEnd",
"Where": "3",
"AddCon": [
"EffType=4",
"Result=1"
],
"PasPr": 1000,
"Type": "CallSkillPas",
"MaxEmitTimes": 10,
"Callback": [
935001213,
935001214,
935001215
]
}
]

View File

@ -2,6 +2,8 @@ package model
type SSHModel struct {
Ip string
Port string
UserName string
Password string
CmdLast string
}

View File

@ -19,6 +19,8 @@ type DbService interface {
GetLubanConf(key string) *model.GenTool
// 保存SSH连接信息
SaveSSHConf(conf *model.SSHModel) error
//获取终端配置
GetSSHConf(key string) *model.SSHModel
}
type DbServiceImpl struct {
@ -55,37 +57,30 @@ func (this *DbServiceImpl) save(key string, model interface{}) error {
return nil
}
func (this *DbServiceImpl) get(key string, model interface{}) (b *bolt.Bucket, err error) {
boltDb = GetBoltDb()
if err = boltDb.View(func(tx *bolt.Tx) error {
b = tx.Bucket([]byte(common.BOLTDB_BUCKETNAME))
if b == nil {
return fmt.Errorf("Bucket %s not found!", common.BOLTDB_BUCKETNAME)
}
return nil
}); err != nil {
logrus.Errorf("get db conf err: %v", err)
return nil, err
}
return b, nil
}
func (this *DbServiceImpl) SaveLubanConf(conf *model.GenTool) error {
return this.save(common.BUCKET_LUBANCONF, conf)
}
func (this *DbServiceImpl) GetLubanConf(key string) *model.GenTool {
boltDb = GetBoltDb()
defer boltDb.Close()
model := &model.GenTool{}
if b, err := this.get(key, model); err != nil {
return nil
} else {
if err = boltDb.View(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte(common.BOLTDB_BUCKETNAME))
if b == nil {
return fmt.Errorf("Bucket %s not found!", common.BOLTDB_BUCKETNAME)
}
val := b.Get([]byte(key))
if err = json.Unmarshal(val, model); err != nil {
logrus.Errorf("get gen conf err:%v", err)
return nil
}
return nil
}); err != nil {
logrus.Errorf("get db conf err: %v", err)
return nil
}
return model
}
@ -94,17 +89,25 @@ func (this *DbServiceImpl) SaveSSHConf(conf *model.SSHModel) error {
}
func (this *DbServiceImpl) GetSSHConf(key string) *model.SSHModel {
boltDb = GetBoltDb()
defer boltDb.Close()
model := &model.SSHModel{}
if b, err := this.get(key, model); err != nil {
return nil
} else {
if err = boltDb.View(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte(common.BOLTDB_BUCKETNAME))
if b == nil {
return fmt.Errorf("Bucket %s not found!", common.BOLTDB_BUCKETNAME)
}
val := b.Get([]byte(key))
if err = json.Unmarshal(val, model); err != nil {
logrus.Errorf("get gen conf err:%v", err)
return nil
}
return nil
}); err != nil {
logrus.Errorf("get db conf err: %v", err)
return nil
}
return model
}

View File

@ -2,28 +2,29 @@ package service
import (
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
"time"
"github.com/pkg/sftp"
"github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh"
)
type SSHService struct {
Client *ssh.Client
LastResult string
}
func NewSSHService() *SSHService {
return &SSHService{}
}
func (ss *SSHService) Connect(user, password, host, key string, port int, cipherList []string) (*ssh.Session, error) {
func (ss *SSHService) Connect(user, password, host, key string, port int, cipherList []string) error {
var (
auth []ssh.AuthMethod //认证方式
addr string
clientConfig *ssh.ClientConfig
client *ssh.Client
config ssh.Config
session *ssh.Session
err error
)
auth = make([]ssh.AuthMethod, 0)
@ -34,7 +35,7 @@ func (ss *SSHService) Connect(user, password, host, key string, port int, cipher
// 秘钥认证
pemBytes, err := ioutil.ReadFile(key)
if err != nil {
return nil, err
return err
}
var signer ssh.Signer
@ -45,7 +46,7 @@ func (ss *SSHService) Connect(user, password, host, key string, port int, cipher
}
if err != nil {
return nil, err
return err
}
// 加载秘钥
auth = append(auth, ssh.PublicKeys(signer))
@ -75,14 +76,22 @@ func (ss *SSHService) Connect(user, password, host, key string, port int, cipher
}
addr = fmt.Sprintf("%s:%d", host, port)
if client, err = ssh.Dial("tcp", addr, clientConfig); err != nil {
return nil, err
if ss.Client, err = ssh.Dial("tcp", addr, clientConfig); err != nil {
return err
}
return nil
}
if session, err = client.NewSession(); err != nil {
return nil, err
func (ss *SSHService) RunShell(shell string) {
var (
session *ssh.Session
err error
)
//获取session这个session是用来远程执行操作的
if session, err = ss.Client.NewSession(); err != nil {
log.Fatalln("error occurred:", err)
}
// 使用 session.Shell() 模拟终端时,所建立的终端参数
modes := ssh.TerminalModes{
ssh.ECHO: 0, //disable echoing
@ -91,8 +100,37 @@ func (ss *SSHService) Connect(user, password, host, key string, port int, cipher
}
if err := session.RequestPty("xterm", 80, 40, modes); err != nil {
return nil, err
logrus.Error(err)
}
//执行shell
if output, err := session.CombinedOutput(shell); err != nil {
log.Fatalln("error occurred:", err)
} else {
ss.LastResult = string(output)
}
return session, nil
}
func (ss *SSHService) Scp(srcFileName, targetFileName string) (int64, error) {
sftpClient, err := sftp.NewClient(ss.Client)
if err != nil {
return 0, fmt.Errorf("new sftp client error: %w", err)
}
defer sftpClient.Close()
source, err := sftpClient.Open(srcFileName)
if err != nil {
return 0, fmt.Errorf("sftp client open src file error: %w", err)
}
defer source.Close()
target, err := os.OpenFile(targetFileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
return 0, fmt.Errorf("open local file error: %w", err)
}
defer target.Close()
n, err := io.Copy(target, source)
if err != nil {
return 0, fmt.Errorf("copy file error: %w", err)
}
return n, nil
}

View File

@ -1,8 +1,7 @@
package service
import (
"bytes"
"strings"
"fmt"
"testing"
)
@ -15,39 +14,34 @@ const (
cmds = "cd /home/liwei/go_dreamfactory&&git pull&&exit" //exit结尾,否则程序不会退出
)
func TestSSHConnect(t *testing.T) {
func TestRunShell(t *testing.T) {
ciphers := []string{}
ssh := &SSHService{}
session, err := ssh.Connect(username, password, ip, "", port, ciphers)
if err != nil {
t.Fatal(err)
}
defer session.Close()
cmdlist := strings.Split(cmds, "&&")
stdinBuf, err := session.StdinPipe()
err := ssh.Connect(username, password, ip, "", port, ciphers)
if err != nil {
t.Fatal(err)
}
var stdoutBuf, errBuf bytes.Buffer
session.Stdout = &stdoutBuf
session.Stderr = &errBuf
// ssh.RunShell("cd /opt")
ssh.RunShell(cmds)
}
func TestScp(t *testing.T) {
ciphers := []string{}
ssh := &SSHService{}
err := ssh.Connect(username, password, ip, "", port, ciphers)
if err != nil {
t.Fatal(err)
}
if n, err := ssh.Scp("E:\\svn\\dreamworks\\client\\dreamworks\\ExcelFile\\check.bat",
"/opt"); err != nil {
fmt.Println(err)
} else {
fmt.Println(n)
}
if err := session.Shell(); err != nil {
t.Error(err)
}
for _, c := range cmdlist {
c = c + "\n"
stdinBuf.Write([]byte(c))
}
session.Wait()
t.Logf(stdoutBuf.String() + errBuf.String())
// if err := session.Run(cmd); err != nil {
// t.Logf("run err: %v", err)
// }
// t.Logf("res: %v", session.Stdout)
}

View File

@ -55,11 +55,13 @@ func (a *appTester) LazyInit(obs observer.Observer) error {
return
}
msg := data.(*pb.UserMessage)
if t.MainType == msg.MainType && t.SubType == msg.SubType {
if t.Print != nil {
resLog.SetText(t.Print(msg))
} else {
resLog.SetText(msg.Data.String())
}
}
},
})

View File

@ -119,7 +119,7 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
}); err != nil {
logrus.WithField("err", err).Debug("保存配置")
}
logrus.Debug("save gen conf")
logrus.Debug("save luban conf")
})
genBtn := &widget.Button{Text: "生成", Icon: theme.ConfirmIcon()}

View File

@ -1,76 +0,0 @@
package ui
import (
"go_dreamfactory/cmd/v2/lib/common"
"go_dreamfactory/cmd/v2/service/observer"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
"golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/terminal"
)
type appTerm struct {
appAdapter
obs observer.Observer
}
type termResizer struct {
widget.Icon
term *terminal.Terminal
debug bool
sess *ssh.Session
win fyne.Window
}
func (this *appTerm) LazyInit(obs observer.Observer) error {
this.obs = obs
this.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_TERM, theme.ContentCopyIcon(), nil)
content := container.NewMax()
content.Objects = []fyne.CanvasObject{}
//cmd input
multiEntry := widget.NewMultiLineEntry()
multiEntry.PlaceHolder = "命令输入,使用;分隔"
//config
ip := widget.NewEntry()
userName := widget.NewEntry()
password := widget.NewPasswordEntry()
configForm := widget.NewForm(
&widget.FormItem{Text: "IP:", Widget: ip},
&widget.FormItem{Text: "用户名:", Widget: userName},
&widget.FormItem{Text: "密码:", Widget: password},
)
saveBtn := widget.NewButtonWithIcon("保存配置", theme.DocumentSaveIcon(), func() {
})
connBtn := widget.NewButtonWithIcon("连接", theme.ConfirmIcon(), func() {
})
btns := container.NewGridWithColumns(2, saveBtn, connBtn)
//term
t := &termResizer{win: toolWin.w}
t.ExtendBaseWidget(t)
split := container.NewVSplit(container.NewGridWithColumns(2,
multiEntry,
container.NewBorder(configForm, btns, widget.NewSeparator(), nil)), t)
split.Offset = 0.3
content.Objects = append(content.Objects, split)
this.tabItem.Content = content
return nil
}
func (a *appTerm) GetAppName() string {
return common.TOOLBAR_TERM
}

159
cmd/v2/ui/tool_term.go Normal file
View File

@ -0,0 +1,159 @@
package ui
import (
"errors"
"go_dreamfactory/cmd/v2/lib/common"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/cmd/v2/service/observer"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"
)
type appTerm struct {
appAdapter
obs observer.Observer
sshService *service.SSHService
}
func (this *appTerm) LazyInit(obs observer.Observer) error {
this.obs = obs
this.sshService = &service.SSHService{}
this.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_TERM, theme.ContentCopyIcon(), nil)
content := container.NewMax()
content.Objects = []fyne.CanvasObject{}
//load term conf
sshConf := service.GetDbService().GetSSHConf(common.BUCKET_SSHCONF)
logrus.Debugf("%v", sshConf)
//cmd input
cmdLast := widget.NewMultiLineEntry()
cmdLast.PlaceHolder = "命令输入,使用;分隔"
// output panel
output := widget.NewMultiLineEntry()
logrus.Debug(output.CursorRow)
//config
ip := widget.NewEntry()
port := widget.NewEntry()
port.Text = "22" //default port
port.PlaceHolder = "端口"
userName := widget.NewEntry()
userName.PlaceHolder = "账号"
password := widget.NewPasswordEntry()
password.PlaceHolder = "密码"
passwordItem := &widget.FormItem{Text: "密码:", Widget: password}
//set input entry
if sshConf != nil {
ip.Text = sshConf.Ip
port.Text = sshConf.Port
userName.Text = sshConf.UserName
password.Text = sshConf.Password
cmdLast.Text = sshConf.CmdLast
}
configForm := widget.NewForm(
&widget.FormItem{Text: "IP:", Widget: container.NewBorder(nil, nil, nil, port, ip)},
&widget.FormItem{Text: "用户名:", Widget: userName},
passwordItem,
)
// 非明文显示
passwordItem.Widget.Refresh()
// save func
saveBtn := widget.NewButtonWithIcon("保存配置", theme.DocumentSaveIcon(), func() {
if err := service.GetDbService().SaveSSHConf(&model.SSHModel{
Ip: ip.Text,
UserName: userName.Text,
Password: password.Text,
Port: port.Text,
CmdLast: cmdLast.Text,
}); err != nil {
logrus.WithField("err", err).Debug("保存配置")
}
logrus.Debug("save term conf")
})
// conn func
connBtn := &widget.Button{Text: "连接", Icon: theme.ConfirmIcon()}
connBtn.OnTapped = func() {
ciphers := []string{}
if userName.Text == "" {
dialog.ShowError(errors.New("账号未填写"), toolWin.w)
return
}
if password.Text == "" {
dialog.ShowError(errors.New("密码未填写"), toolWin.w)
return
}
if port.Text == "" {
dialog.ShowError(errors.New("端口未填写"), toolWin.w)
return
}
connBtn.Disable()
err := this.sshService.Connect(userName.Text, password.Text, ip.Text, "", cast.ToInt(port.Text), ciphers)
if err != nil {
dialog.ShowError(err, toolWin.w)
connBtn.Enable()
return
}
}
//excute
excuteBtn := &widget.Button{Text: "执行", Icon: theme.ConfirmIcon()}
excuteBtn.OnTapped = func() {
output.Text = ""
excuteBtn.Disable()
defer func() {
excuteBtn.Enable()
}()
if this.sshService.Client == nil {
dialog.ShowError(errors.New("请先连接终端"), toolWin.w)
return
}
this.sshService.RunShell(cmdLast.Text)
output.SetText(this.sshService.LastResult)
}
btns := container.NewHBox(excuteBtn, &layout.Spacer{}, saveBtn, connBtn)
// layout
split := container.NewVSplit(container.NewGridWithColumns(2,
cmdLast,
container.NewBorder(configForm, btns, widget.NewSeparator(), nil)), output)
split.Offset = 0.3
content.Objects = append(content.Objects, split)
this.tabItem.Content = content
return nil
}
func (a *appTerm) GetAppName() string {
return common.TOOLBAR_TERM
}
func (a *appTerm) OnClose() bool {
dialog.ShowConfirm("关闭终端", "你希望断开连接吗?", func(b bool) {
if !b {
return
}
a.sshService.Client.Close()
}, toolWin.w)
return true
}

View File

@ -93,6 +93,7 @@ func (this *ListBaseView) listBtnFun() func() {
// set data
func (this *ListBaseView) reloadListData() {
if this.itemListData != nil {
logrus.Debugf("list record:%v", len(this.itemListData.DataList))
d := this.itemListData.AsInterfaceArray()
this.dataBinding.Set(d)
}

View File

@ -10,7 +10,6 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/modules/task"
"go_dreamfactory/pb"
"time"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
@ -72,9 +71,7 @@ func (this *TaskListView) CreateView(t *model.TestCase) fyne.CanvasObject {
func (this *TaskListView) dataListener() {
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
time.Sleep(time.Millisecond * 20)
data := d.(*pb.UserMessage)
logrus.Debugf("%s %s ...", data.MainType, data.SubType)
if !(data.MainType == string(comm.ModuleTask) &&
data.SubType == task.TaskSubTypeList) {
return

13
go.mod
View File

@ -41,12 +41,17 @@ require (
gopkg.in/yaml.v2 v2.4.0
)
require golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
require (
github.com/ActiveState/termtest/conpty v0.5.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/creack/pty v1.1.11 // indirect
github.com/kr/fs v0.1.0 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
)
require (
fyne.io/systray v1.10.1-0.20220621085403-9a2652634e93 // indirect
github.com/PuerkitoBio/goquery v1.8.0 // indirect
github.com/agiledragon/gomonkey/v2 v2.8.0
github.com/akutz/memconn v0.1.0 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/apache/thrift v0.16.0 // indirect
@ -67,6 +72,7 @@ require (
github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe // indirect
github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504 // indirect
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 // indirect
github.com/fyne-io/terminal v0.0.0-20220805163222-7eef24013352
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-cmd/cmd v1.4.0 // indirect
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect
@ -128,6 +134,7 @@ require (
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/rpcxio/libkv v0.5.1-0.20210420120011-1fceaedca8a5 // indirect
@ -166,7 +173,7 @@ require (
go.opentelemetry.io/otel/trace v1.6.3 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 // indirect
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503
golang.org/x/image v0.0.0-20220601225756-64ec528b34cd // indirect
golang.org/x/mobile v0.0.0-20211207041440-4e6c2922fdee // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect

18
go.sum
View File

@ -43,11 +43,17 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
fyne.io/fyne/v2 v2.2.0/go.mod h1:Jl/dcptOV4NZWSK1PlxDbO+jFeQBHzUqDUUsKiP0EQ0=
fyne.io/fyne/v2 v2.2.3 h1:Umi3vVVW8XnWWPJmMkhIWQOMU/jxB1OqpWVUmjhODD0=
fyne.io/fyne/v2 v2.2.3/go.mod h1:MBoGuHzLLSXdQOWFAwWhIhYTEMp33zqtGCReSWhaQTA=
fyne.io/systray v1.9.1-0.20220523202515-bb6f1d955cff/go.mod h1:N4ZU0i34X+n8soFRlBNkmJTunw9wD+9jIP19fSZpjSI=
fyne.io/systray v1.10.1-0.20220621085403-9a2652634e93 h1:V2IC9t0Zj9Ur6qDbfhUuzVmIvXKFyxZXRJyigUvovs4=
fyne.io/systray v1.10.1-0.20220621085403-9a2652634e93/go.mod h1:oM2AQqGJ1AMo4nNqZFYU8xYygSBZkW2hmdJ7n4yjedE=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
github.com/ActiveState/termtest/conpty v0.5.0 h1:JLUe6YDs4Jw4xNPCU+8VwTpniYOGeKzQg4SM2YHQNA8=
github.com/ActiveState/termtest/conpty v0.5.0/go.mod h1:LO4208FLsxw6DcNZ1UtuGUMW+ga9PFtX4ntv8Ymg9og=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/BabySid/gobase v0.0.0-20220614103908-39ac0a583c02 h1:4VkwDX+9araWz3MeAx/3EAWuQTu+dYnJqBlYrk86i4k=
github.com/BabySid/gobase v0.0.0-20220614103908-39ac0a583c02/go.mod h1:psRlcjEywZdxNf9jp6IdYY7VcAsYPtcnLHYQ+dWG5uw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
@ -60,8 +66,6 @@ github.com/Pallinder/go-randomdata v1.2.0 h1:DZ41wBchNRb/0GfsePLiSwb0PHZmT67XY00
github.com/Pallinder/go-randomdata v1.2.0/go.mod h1:yHmJgulpD2Nfrm0cR9tI/+oAgRqCQQixsA8HyRZfV9Y=
github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U=
github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=
github.com/agiledragon/gomonkey/v2 v2.8.0 h1:u2K2nNGyk0ippzklz1CWalllEB9ptD+DtSXeCX5O000=
github.com/agiledragon/gomonkey/v2 v2.8.0/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
github.com/akutz/memconn v0.1.0 h1:NawI0TORU4hcOMsMr11g7vwlCdkYeLKXBcxWu2W/P8A=
github.com/akutz/memconn v0.1.0/go.mod h1:Jo8rI7m0NieZyLI5e2CDlRdRqRRB4S7Xp77ukDjH+Fw=
@ -124,6 +128,8 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@ -166,6 +172,8 @@ github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504 h1:+31CdF/okdokeFN
github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504/go.mod h1:gLRWYfYnMA9TONeppRSikMdXlHQ97xVsPojddUv3b/E=
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 h1:hnLq+55b7Zh7/2IRzWCpiTcAvjv/P8ERF+N7+xXbZhk=
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2/go.mod h1:eO7W361vmlPOrykIg+Rsh1SZ3tQBaOsfzZhsIOb/Lm0=
github.com/fyne-io/terminal v0.0.0-20220805163222-7eef24013352 h1:J4A6pyEH52ZtsCud7vrFiv2t39k4pxe9ny7Tz3lgp1o=
github.com/fyne-io/terminal v0.0.0-20220805163222-7eef24013352/go.mod h1:Iky+QppaD5sUiskAD9P3d0GGVqI8MdPV859yuWlFjmc=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
@ -453,6 +461,7 @@ github.com/klauspost/reedsolomon v1.9.16 h1:mR0AwphBwqFv/I3B9AHtNKvzuowI1vrj8/3U
github.com/klauspost/reedsolomon v1.9.16/go.mod h1:eqPAcE7xar5CIzcdfwydOEdcmchAKAP/qs14y4GCBOk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@ -543,6 +552,7 @@ github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJE
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/nicksnyder/go-i18n/v2 v2.1.2/go.mod h1:d++QJC9ZVf7pa48qrsRWhMJ5pSHIPmS3OLqK1niyLxs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
@ -583,6 +593,8 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
@ -828,7 +840,6 @@ golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220408190544-5352b0902921 h1:iU7T1X1J6yxDr0rda54sWGkHgOp5XJrqm79gcNlC2VM=
golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 h1:vJ2V3lFLg+bBhgroYuRfyN583UzVveQmIXjc8T/y3to=
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
@ -1005,6 +1016,7 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200428200454-593003d681fa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

View File

@ -32,6 +32,13 @@ func (this *apiComp) Choose(session comm.IUserSession, req *pb.RtaskChooseReq) (
return
}
// 获取支线任务配置
sideConf := this.moduleRtask.configure.getRtaskSidById(req.RtaskSubId)
if sideConf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
//获取选项配置
chooseCnf := this.moduleRtask.configure.getRtaskChooseCfg(req.ChooseId)
if chooseCnf == nil {
@ -74,7 +81,7 @@ func (this *apiComp) Choose(session comm.IUserSession, req *pb.RtaskChooseReq) (
}
//发奖励
code = this.moduleRtask.DispenseRes(session, conf.Reward, true)
code = this.moduleRtask.DispenseRes(session, sideConf.Reward, true)
rsp := &pb.RtaskChooseResp{
RtaskId: req.RtaskId,

View File

@ -9,11 +9,8 @@ import (
)
// 做任务
func (this *apiComp) ApplyCheck(session comm.IUserSession, req *pb.RtaskApplyReq) (code pb.ErrorCode) {
if req.RtaskId == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
@ -51,14 +48,21 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.RtaskApplyReq) (co
return
}
//校验限定条件
if req.RtaskSubId == 0 {
//校验前置任务和限定条件
if code, ok = this.moduleRtask.modelRtask.checkHandle(session.GetUserId(), frtaskArr.RtaskIds, conf); !ok {
code = pb.ErrorCode_RtaskCondiNoReach
return
}
} else {
sideConf := this.moduleRtask.configure.getRtaskSidById(req.RtaskSubId)
if sideConf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
// 没有设置选项,表示任务完成
if len(conf.ChooseId) == 0 {
if sideConf.EndTid == -1 {
frtaskArr.RtaskIds = append(frtaskArr.RtaskIds, req.RtaskId)
rtask.FrtaskIds[conf.Group] = frtaskArr
@ -71,7 +75,14 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.RtaskApplyReq) (co
}
// 发奖励
code = this.moduleRtask.DispenseRes(session, conf.Reward, true)
code = this.moduleRtask.DispenseRes(session, sideConf.Reward, true)
} else {
// 校验完成条件
if ok := this.moduleRtask.modelRtask.checkCondi(session.GetUserId(), sideConf.EndTid); !ok {
code = pb.ErrorCode_RtaskCondiNoReach
return
}
}
}
if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeApply, &pb.RtaskApplyResp{

View File

@ -18,14 +18,21 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.RtaskGetReward
if code = this.GetRewardCheck(session, req); code != pb.ErrorCode_Success {
return
}
conf := this.moduleRtask.configure.getRtaskById(req.RtaskId)
if conf == nil {
// conf := this.moduleRtask.configure.getRtaskById(req.RtaskId)
// if conf == nil {
// code = pb.ErrorCode_ConfigNoFound
// return
// }
// 获取支线任务配置
sideConf := this.moduleRtask.configure.getRtaskSidById(req.RtaskSubId)
if sideConf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
//校验是否最后一个任务
if conf.NextTid != 0 {
if sideConf.NextTid != 0 {
code = pb.ErrorCode_RtaskNoLastOne
return
}
@ -44,7 +51,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.RtaskGetReward
}
//发奖励
code = this.moduleRtask.DispenseRes(session, conf.Reward, true)
code = this.moduleRtask.DispenseRes(session, sideConf.Reward, true)
update := map[string]interface{}{
"isReward": true,

View File

@ -11,6 +11,7 @@ const (
gameRtask = "game_rdtask.json"
gameRtaskChoose = "game_rdtaskchoose.json"
gameRtaskCondi = "game_rdtaskcondi.json"
gameRtaskSide = "game_rdtaskside.json"
)
type configureComp struct {
@ -23,6 +24,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
gameRtask: cfg.NewGameRdtask,
gameRtaskChoose: cfg.NewGameRdtaskChoose,
gameRtaskCondi: cfg.NewGameRdtaskCondi,
gameRtaskSide: cfg.NewGameRdtaskSide,
})
return
}
@ -75,6 +77,22 @@ func (this *configureComp) getRtaskChoose() (data *cfg.GameRdtaskChoose, err err
return
}
func (this *configureComp) getRtaskSide() (data *cfg.GameRdtaskSide, err error) {
var (
v interface{}
ok bool
)
if v, err = this.GetConfigure(gameRtaskSide); err != nil {
return
} else {
if data, ok = v.(*cfg.GameRdtaskSide); !ok {
err = fmt.Errorf("%T is *cfg.GameRdtaskSide", v)
return
}
}
return
}
// 获取选项配置
func (this *configureComp) getRtaskChooseCfg(id int32) *cfg.GameRdtaskChooseData {
cfg, err := this.getRtaskChoose()
@ -88,6 +106,18 @@ func (this *configureComp) getRtaskChooseCfg(id int32) *cfg.GameRdtaskChooseData
return nil
}
func (this *configureComp) getRtaskSidById(id int32) *cfg.GameRdtaskSideData {
cfg, err := this.getRtaskSide()
if err != nil {
return nil
}
if data, ok := cfg.GetDataMap()[id]; ok {
return data
}
return nil
}
// 查询任务类型
func (this *configureComp) getRtaskTypeById(typeId int32) (data *cfg.GameRdtaskCondiData, err error) {
cfg, err := this.getRtaskTypeCfg()

View File

@ -75,7 +75,7 @@ func (this *ModelTaskActive) updateReceive(uid, id string, taskTag comm.TaskTag,
return this.moduleTask.modelTaskActive.ChangeList(uid, id, data)
}
//清空任务
//清空活跃度任务
func (this *ModelTaskActive) clearTask(uid string, taskTag ...comm.TaskTag) {
if len(taskTag) == 0 {
this.moduleTask.Errorf("least one param for taskTag")

View File

@ -115,8 +115,8 @@ func (this *ModelTask) getTaskById(uid string, taskId int32) (newlist []*pb.DBTa
}
//初始化任务
func (this *ModelTask) initTask(uid string) error {
if data, err := this.moduleTask.configure.getTaskList(); err == nil {
func (this *ModelTask) initTask(uid string, taskTag comm.TaskTag) error {
data := this.moduleTask.configure.getTaskByTag(int32(taskTag))
for _, cnf := range data {
objId := primitive.NewObjectID().Hex()
task := &pb.DBTask{
@ -134,7 +134,7 @@ func (this *ModelTask) initTask(uid string) error {
return err
}
}
}
return nil
}

View File

@ -52,8 +52,8 @@ func (this *ModuleTask) Start() (err error) {
}
//初始化日常、周常、成就
func (this *ModuleTask) InitTaskAll(uid string) {
this.modelTask.initTask(uid)
func (this *ModuleTask) InitTask(uid string, taskTag comm.TaskTag) {
this.modelTask.initTask(uid, taskTag)
this.modelTaskActive.initActiveReward(uid)
}
@ -96,7 +96,7 @@ func (this *ModuleTask) ResetTask(uid string, taskTag comm.TaskTag) {
this.resetActive(uid, taskTag)
this.modelTask.clearTask(uid, taskTag)
this.modelTaskActive.clearTask(uid, taskTag)
this.InitTaskAll(uid)
this.InitTask(uid, taskTag)
}
//任务处理

View File

@ -27,6 +27,7 @@ type RtaskApplyReq struct {
unknownFields protoimpl.UnknownFields
RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID
RtaskSubId int32 `protobuf:"varint,2,opt,name=rtaskSubId,proto3" json:"rtaskSubId"` //支线任务ID
}
func (x *RtaskApplyReq) Reset() {
@ -68,6 +69,13 @@ func (x *RtaskApplyReq) GetRtaskId() int32 {
return 0
}
func (x *RtaskApplyReq) GetRtaskSubId() int32 {
if x != nil {
return x.RtaskSubId
}
return 0
}
type RtaskApplyResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -218,6 +226,7 @@ type RtaskChooseReq struct {
RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID
ChooseId int32 `protobuf:"varint,2,opt,name=chooseId,proto3" json:"chooseId"` //选项配置ID
RtaskSubId int32 `protobuf:"varint,3,opt,name=rtaskSubId,proto3" json:"rtaskSubId"` //支线任务ID
}
func (x *RtaskChooseReq) Reset() {
@ -266,6 +275,13 @@ func (x *RtaskChooseReq) GetChooseId() int32 {
return 0
}
func (x *RtaskChooseReq) GetRtaskSubId() int32 {
if x != nil {
return x.RtaskSubId
}
return 0
}
type RtaskChooseResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -273,6 +289,7 @@ type RtaskChooseResp struct {
RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"` //任务ID
ChooseId int32 `protobuf:"varint,2,opt,name=chooseId,proto3" json:"chooseId"` //选项配置ID
RtaskSubId int32 `protobuf:"varint,3,opt,name=rtaskSubId,proto3" json:"rtaskSubId"` //支线任务ID
}
func (x *RtaskChooseResp) Reset() {
@ -321,6 +338,13 @@ func (x *RtaskChooseResp) GetChooseId() int32 {
return 0
}
func (x *RtaskChooseResp) GetRtaskSubId() int32 {
if x != nil {
return x.RtaskSubId
}
return 0
}
// 任务完成推送
type RtaskFinishPush struct {
state protoimpl.MessageState
@ -376,6 +400,7 @@ type RtaskGetRewardReq struct {
unknownFields protoimpl.UnknownFields
RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"`
RtaskSubId int32 `protobuf:"varint,2,opt,name=rtaskSubId,proto3" json:"rtaskSubId"` //支线任务ID
}
func (x *RtaskGetRewardReq) Reset() {
@ -417,12 +442,20 @@ func (x *RtaskGetRewardReq) GetRtaskId() int32 {
return 0
}
func (x *RtaskGetRewardReq) GetRtaskSubId() int32 {
if x != nil {
return x.RtaskSubId
}
return 0
}
type RtaskGetRewardResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RtaskId int32 `protobuf:"varint,1,opt,name=rtaskId,proto3" json:"rtaskId"`
RtaskSubId int32 `protobuf:"varint,2,opt,name=rtaskSubId,proto3" json:"rtaskSubId"` //支线任务ID
}
func (x *RtaskGetRewardResp) Reset() {
@ -464,13 +497,22 @@ func (x *RtaskGetRewardResp) GetRtaskId() int32 {
return 0
}
func (x *RtaskGetRewardResp) GetRtaskSubId() int32 {
if x != nil {
return x.RtaskSubId
}
return 0
}
var File_rtask_rtask_msg_proto protoreflect.FileDescriptor
var file_rtask_rtask_msg_proto_rawDesc = []byte{
0x0a, 0x15, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6d, 0x73,
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b,
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b,
0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62,
0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0e, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x70, 0x70, 0x6c, 0x79,
0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x28,
@ -479,24 +521,32 @@ var file_rtask_rtask_msg_proto_rawDesc = []byte{
0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73,
0x6b, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x46, 0x0a, 0x0e, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68,
0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x66, 0x0a, 0x0e, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68,
0x6f, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x22, 0x47, 0x0a,
0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a,
0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x22, 0x67, 0x0a,
0x0f, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70,
0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68,
0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x68,
0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x0f, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x46,
0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53,
0x75, 0x62, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x0f, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x46,
0x69, 0x6e, 0x69, 0x73, 0x68, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x11, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52,
0x6b, 0x49, 0x64, 0x22, 0x4d, 0x0a, 0x11, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52,
0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x22, 0x2e, 0x0a, 0x12, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65,
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62,
0x49, 0x64, 0x22, 0x4e, 0x0a, 0x12, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65,
0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62,
0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}

View File

@ -39,4 +39,5 @@ const (
GameBuffType_HPDOWN = 27
GameBuffType_EFFHITDOWN = 28
GameBuffType_EFFREDOWN = 29
GameBuffType_CAUSEDAMUP = 30
)

View File

@ -44,4 +44,5 @@ const (
GamePropertyType_Add_EffRe = 33
GamePropertyType_ActValue = 34
GamePropertyType_DamRe = 35
GamePropertyType_CAUSEDAM = 36
)

View File

@ -16,14 +16,7 @@ type GameRdtaskData struct {
Type int32
PreTid int32
Condition []int32
CD int32
ObjType int32
Point string
StoryBegin int32
StoryEnd int32
ChooseId []int32
Reward []*Gameatn
NextTid int32
Sidequest []int32
}
const TypeId_GameRdtaskData = -358357379
@ -51,40 +44,20 @@ func (_v *GameRdtaskData)Deserialize(_buf map[string]interface{}) (err error) {
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["CD"].(float64); !_ok_ { err = errors.New("CD error"); return }; _v.CD = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["objType"].(float64); !_ok_ { err = errors.New("objType error"); return }; _v.ObjType = int32(_tempNum_) }
{ var _ok_ bool; if _v.Point, _ok_ = _buf["point"].(string); !_ok_ { err = errors.New("point error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["storyBegin"].(float64); !_ok_ { err = errors.New("storyBegin error"); return }; _v.StoryBegin = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["storyEnd"].(float64); !_ok_ { err = errors.New("storyEnd error"); return }; _v.StoryEnd = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["chooseId"].([]interface{}); !_ok_ { err = errors.New("chooseId error"); return }
if _arr_, _ok_ = _buf["sidequest"].([]interface{}); !_ok_ { err = errors.New("sidequest error"); return }
_v.ChooseId = make([]int32, 0, len(_arr_))
_v.Sidequest = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.ChooseId = append(_v.ChooseId, _list_v_)
_v.Sidequest = append(_v.Sidequest, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
_v.Reward = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Reward = append(_v.Reward, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["nextTid"].(float64); !_ok_ { err = errors.New("nextTid error"); return }; _v.NextTid = int32(_tempNum_) }
return
}

View File

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameRdtaskSide struct {
_dataMap map[int32]*GameRdtaskSideData
_dataList []*GameRdtaskSideData
}
func NewGameRdtaskSide(_buf []map[string]interface{}) (*GameRdtaskSide, error) {
_dataList := make([]*GameRdtaskSideData, 0, len(_buf))
dataMap := make(map[int32]*GameRdtaskSideData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameRdtaskSideData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameRdtaskSide{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameRdtaskSide) GetDataMap() map[int32]*GameRdtaskSideData {
return table._dataMap
}
func (table *GameRdtaskSide) GetDataList() []*GameRdtaskSideData {
return table._dataList
}
func (table *GameRdtaskSide) Get(key int32) *GameRdtaskSideData {
return table._dataMap[key]
}

View File

@ -0,0 +1,79 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameRdtaskSideData struct {
Id int32
ObjType int32
Point string
StoryBegin int32
StoryEnd int32
ChooseId []int32
Reward []*Gameatn
CD int32
NextTid int32
EndTid int32
}
const TypeId_GameRdtaskSideData = 865145588
func (*GameRdtaskSideData) GetTypeId() int32 {
return 865145588
}
func (_v *GameRdtaskSideData)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["objType"].(float64); !_ok_ { err = errors.New("objType error"); return }; _v.ObjType = int32(_tempNum_) }
{ var _ok_ bool; if _v.Point, _ok_ = _buf["point"].(string); !_ok_ { err = errors.New("point error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["storyBegin"].(float64); !_ok_ { err = errors.New("storyBegin error"); return }; _v.StoryBegin = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["storyEnd"].(float64); !_ok_ { err = errors.New("storyEnd error"); return }; _v.StoryEnd = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["chooseId"].([]interface{}); !_ok_ { err = errors.New("chooseId error"); return }
_v.ChooseId = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.ChooseId = append(_v.ChooseId, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
_v.Reward = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Reward = append(_v.Reward, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["CD"].(float64); !_ok_ { err = errors.New("CD error"); return }; _v.CD = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["nextTid"].(float64); !_ok_ { err = errors.New("nextTid error"); return }; _v.NextTid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["endTid"].(float64); !_ok_ { err = errors.New("endTid error"); return }; _v.EndTid = int32(_tempNum_) }
return
}
func DeserializeGameRdtaskSideData(_buf map[string]interface{}) (*GameRdtaskSideData, error) {
v := &GameRdtaskSideData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -20,4 +20,8 @@ const (
GameSkillEffectType_ShiftBuff = 9
GameSkillEffectType_NowHpDps = 10
GameSkillEffectType_AddActValue = 11
GameSkillEffectType_DrawActValue = 12
GameSkillEffectType_SkillCD = 13
GameSkillEffectType_MaxDmg = 14
GameSkillEffectType_RandBuff = 15
)

View File

@ -69,6 +69,7 @@ type Tables struct {
Rdtask *GameRdtask
RdtaskCondi *GameRdtaskCondi
RdtaskChoose *GameRdtaskChoose
RdtaskSide *GameRdtaskSide
KungfuUnlock *GameKungfuUnlock
KungfuMasterworker *GameKungfuMasterworker
Gourmet *GameGourmet
@ -76,6 +77,8 @@ type Tables struct {
Drop *GameDrop
Smithy *GameSmithy
SmithyStove *GameSmithyStove
VikingBoss *GameVikingBoss
VikingChallenge *GameVikingChallenge
}
func NewTables(loader JsonLoader) (*Tables, error) {
@ -431,6 +434,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.RdtaskChoose, err = NewGameRdtaskChoose(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_rdtaskside") ; err != nil {
return nil, err
}
if tables.RdtaskSide, err = NewGameRdtaskSide(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_kungfuunlock") ; err != nil {
return nil, err
}
@ -473,5 +482,17 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.SmithyStove, err = NewGameSmithyStove(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_vikingboss") ; err != nil {
return nil, err
}
if tables.VikingBoss, err = NewGameVikingBoss(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_vikingchallenge") ; err != nil {
return nil, err
}
if tables.VikingChallenge, err = NewGameVikingChallenge(buf) ; err != nil {
return nil, err
}
return tables, nil
}

View File

@ -12,6 +12,8 @@ import "errors"
type GameHeroStargrowData struct {
Star int32
Level int32
Maxlevel int32
StarupHp float32
StarupAtk float32
StarupDef float32
@ -26,6 +28,8 @@ func (*GameHeroStargrowData) GetTypeId() int32 {
func (_v *GameHeroStargrowData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["level"].(float64); !_ok_ { err = errors.New("level error"); return }; _v.Level = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["maxlevel"].(float64); !_ok_ { err = errors.New("maxlevel error"); return }; _v.Maxlevel = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["starup_hp"].(float64); !_ok_ { err = errors.New("starup_hp error"); return }; _v.StarupHp = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["starup_atk"].(float64); !_ok_ { err = errors.New("starup_atk error"); return }; _v.StarupAtk = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["starup_def"].(float64); !_ok_ { err = errors.New("starup_def error"); return }; _v.StarupDef = float32(_tempNum_) }

View File

@ -15,7 +15,6 @@ type GameRdtaskChooseData struct {
Num int32
PreTid int32
NeedItem []int32
EndTid int32
}
const TypeId_GameRdtaskChooseData = -1833024780
@ -42,7 +41,6 @@ func (_v *GameRdtaskChooseData)Deserialize(_buf map[string]interface{}) (err err
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["endTid"].(float64); !_ok_ { err = errors.New("endTid error"); return }; _v.EndTid = int32(_tempNum_) }
return
}