This commit is contained in:
meixiongfeng 2023-11-09 09:28:25 +08:00
commit 24bfff009d
52 changed files with 5427 additions and 357 deletions

View File

@ -23381,7 +23381,7 @@
"NPC": 10334, "NPC": 10334,
"value": 1, "value": 1,
"filter": [ "filter": [
1104013 1103013
], ],
"filter2": [ "filter2": [
"剧情ID", "剧情ID",

View File

@ -4,34 +4,54 @@
"distance": 10, "distance": 10,
"value": 8, "value": 8,
"energy": 20, "energy": 20,
"matchvalue": 5 "matchvalue": 5,
"scoreText": {
"key": "buzkashi_buzkashi_grade_scoreText_1",
"text": "完美闪避!"
}
}, },
{ {
"num": 2, "num": 2,
"distance": 15, "distance": 15,
"value": 6, "value": 6,
"energy": 15, "energy": 15,
"matchvalue": 4 "matchvalue": 4,
"scoreText": {
"key": "buzkashi_buzkashi_grade_scoreText_2",
"text": "精彩绝伦!"
}
}, },
{ {
"num": 3, "num": 3,
"distance": 20, "distance": 20,
"value": 4, "value": 4,
"energy": 10, "energy": 10,
"matchvalue": 3 "matchvalue": 3,
"scoreText": {
"key": "buzkashi_buzkashi_grade_scoreText_3",
"text": "太棒了!"
}
}, },
{ {
"num": 4, "num": 4,
"distance": 25, "distance": 25,
"value": 2, "value": 2,
"energy": 5, "energy": 5,
"matchvalue": 2 "matchvalue": 2,
"scoreText": {
"key": "buzkashi_buzkashi_grade_scoreText_4",
"text": "还不错!"
}
}, },
{ {
"num": 5, "num": 5,
"distance": 30, "distance": 30,
"value": 1, "value": 1,
"energy": 5, "energy": 5,
"matchvalue": 1 "matchvalue": 1,
"scoreText": {
"key": "buzkashi_buzkashi_grade_scoreText_5",
"text": "普通"
}
} }
] ]

View File

@ -3,18 +3,30 @@
"num": 1, "num": 1,
"time": 1, "time": 1,
"value": 10, "value": 10,
"matchvalue": 5 "matchvalue": 5,
"scoreText": {
"key": "buzkashi_buzkashi_qtelv_scoreText_1",
"text": "略微迟缓"
}
}, },
{ {
"num": 2, "num": 2,
"time": 2, "time": 2,
"value": 15, "value": 15,
"matchvalue": 10 "matchvalue": 10,
"scoreText": {
"key": "buzkashi_buzkashi_qtelv_scoreText_2",
"text": "较为精准"
}
}, },
{ {
"num": 3, "num": 3,
"time": 3, "time": 3,
"value": 20, "value": 20,
"matchvalue": 15 "matchvalue": 15,
"scoreText": {
"key": "buzkashi_buzkashi_qtelv_scoreText_3",
"text": "完美抓取"
}
} }
] ]

View File

@ -0,0 +1,408 @@
[
{
"id": 100001,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_1",
"text": "1"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_1",
"text": "2"
},
"pic": "item_10000001",
"weights": 1000
},
{
"id": 100002,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_2",
"text": "2"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_2",
"text": "3"
},
"pic": "ytx_js_15005",
"weights": 1000
},
{
"id": 100003,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_3",
"text": "3"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_3",
"text": "4"
},
"pic": "item_10000003",
"weights": 1000
},
{
"id": 100004,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_4",
"text": "4"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_4",
"text": "5"
},
"pic": "item_10000004",
"weights": 1000
},
{
"id": 100005,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_5",
"text": "5"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_5",
"text": "6"
},
"pic": "item_10000005",
"weights": 1000
},
{
"id": 100006,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_6",
"text": "6"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_6",
"text": "7"
},
"pic": "item_10000006",
"weights": 1000
},
{
"id": 100007,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_7",
"text": "7"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_7",
"text": "8"
},
"pic": "item_10000007",
"weights": 1000
},
{
"id": 100008,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_8",
"text": "8"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_8",
"text": "9"
},
"pic": "item_10000008",
"weights": 1000
},
{
"id": 100009,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_9",
"text": "9"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_9",
"text": "10"
},
"pic": "item_10000009",
"weights": 1000
},
{
"id": 100010,
"rarity": 1,
"cardname": {
"key": "catchbugs_Illustrated_cardname_10",
"text": "10"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_10",
"text": "11"
},
"pic": "item_10000010",
"weights": 1000
},
{
"id": 100011,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_11",
"text": "11"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_11",
"text": "12"
},
"pic": "item_10000011",
"weights": 500
},
{
"id": 100012,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_12",
"text": "12"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_12",
"text": "13"
},
"pic": "item_10000012",
"weights": 500
},
{
"id": 100013,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_13",
"text": "13"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_13",
"text": "14"
},
"pic": "item_10000013",
"weights": 500
},
{
"id": 100014,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_14",
"text": "14"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_14",
"text": "15"
},
"pic": "wp_icon_10020",
"weights": 500
},
{
"id": 100015,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_15",
"text": "15"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_15",
"text": "16"
},
"pic": "item_10000022",
"weights": 500
},
{
"id": 100016,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_16",
"text": "16"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_16",
"text": "17"
},
"pic": "wp_icon_10022",
"weights": 500
},
{
"id": 100017,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_17",
"text": "17"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_17",
"text": "18"
},
"pic": "wp_icon_10024",
"weights": 500
},
{
"id": 100018,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_18",
"text": "18"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_18",
"text": "19"
},
"pic": "wp_icon_10020",
"weights": 500
},
{
"id": 100019,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_19",
"text": "19"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_19",
"text": "20"
},
"pic": "wp_icon_10021",
"weights": 500
},
{
"id": 100020,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_20",
"text": "20"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_20",
"text": "21"
},
"pic": "wp_icon_10022",
"weights": 500
},
{
"id": 100021,
"rarity": 2,
"cardname": {
"key": "catchbugs_Illustrated_cardname_21",
"text": "21"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_21",
"text": "22"
},
"pic": "wp_icon_10024",
"weights": 500
},
{
"id": 100022,
"rarity": 3,
"cardname": {
"key": "catchbugs_Illustrated_cardname_22",
"text": "22"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_22",
"text": "23"
},
"pic": "wp_icon_10023",
"weights": 100
},
{
"id": 100023,
"rarity": 3,
"cardname": {
"key": "catchbugs_Illustrated_cardname_23",
"text": "23"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_23",
"text": "24"
},
"pic": "item_50013001",
"weights": 100
},
{
"id": 100024,
"rarity": 3,
"cardname": {
"key": "catchbugs_Illustrated_cardname_24",
"text": "24"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_24",
"text": "25"
},
"pic": "item_50013002",
"weights": 100
},
{
"id": 100025,
"rarity": 3,
"cardname": {
"key": "catchbugs_Illustrated_cardname_25",
"text": "25"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_25",
"text": "26"
},
"pic": "item_50013003",
"weights": 100
},
{
"id": 100026,
"rarity": 3,
"cardname": {
"key": "catchbugs_Illustrated_cardname_26",
"text": "26"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_26",
"text": "27"
},
"pic": "item_50013004",
"weights": 100
},
{
"id": 100027,
"rarity": 3,
"cardname": {
"key": "catchbugs_Illustrated_cardname_27",
"text": "27"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_27",
"text": "28"
},
"pic": "item_50013001",
"weights": 100
},
{
"id": 100028,
"rarity": 3,
"cardname": {
"key": "catchbugs_Illustrated_cardname_28",
"text": "28"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_28",
"text": "29"
},
"pic": "item_50013002",
"weights": 100
},
{
"id": 100029,
"rarity": 3,
"cardname": {
"key": "catchbugs_Illustrated_cardname_29",
"text": "29"
},
"carddescribe": {
"key": "catchbugs_Illustrated_carddescribe_29",
"text": "30"
},
"pic": "item_50013003",
"weights": 100
}
]

View File

@ -0,0 +1,130 @@
[
{
"key": 1001,
"condition": 15,
"reward": [
{
"a": "item",
"t": "10000001",
"n": 1
},
{
"a": "attr",
"t": "gold",
"n": 100000
}
]
},
{
"key": 1002,
"condition": 20,
"reward": [
{
"a": "item",
"t": "10000001",
"n": 1
},
{
"a": "attr",
"t": "gold",
"n": 100000
}
]
},
{
"key": 1003,
"condition": 25,
"reward": [
{
"a": "item",
"t": "10000001",
"n": 1
},
{
"a": "attr",
"t": "gold",
"n": 100000
}
]
},
{
"key": 1004,
"condition": 30,
"reward": [
{
"a": "item",
"t": "10000001",
"n": 1
},
{
"a": "attr",
"t": "gold",
"n": 100000
}
]
},
{
"key": 1005,
"condition": 35,
"reward": [
{
"a": "item",
"t": "10000001",
"n": 1
},
{
"a": "attr",
"t": "gold",
"n": 100000
}
]
},
{
"key": 1006,
"condition": 40,
"reward": [
{
"a": "item",
"t": "10000001",
"n": 1
},
{
"a": "attr",
"t": "gold",
"n": 100000
}
]
},
{
"key": 1007,
"condition": 45,
"reward": [
{
"a": "item",
"t": "10000001",
"n": 1
},
{
"a": "attr",
"t": "gold",
"n": 100000
}
]
},
{
"key": 1008,
"condition": 50,
"reward": [
{
"a": "item",
"t": "10000001",
"n": 1
},
{
"a": "attr",
"t": "gold",
"n": 100000
}
]
}
]

View File

@ -0,0 +1,34 @@
[
{
"id": 1,
"skillname": {
"key": "catchbug_skill_skillname_1",
"text": "暗影作祟"
},
"round": 1
},
{
"id": 2,
"skillname": {
"key": "catchbug_skill_skillname_2",
"text": "乾坤旋转"
},
"round": 3
},
{
"id": 3,
"skillname": {
"key": "catchbug_skill_skillname_3",
"text": "地雷滚滚"
},
"round": 2
},
{
"id": 4,
"skillname": {
"key": "catchbug_skill_skillname_4",
"text": "电光火石"
},
"round": 1
}
]

View File

@ -0,0 +1,92 @@
[
{
"id": 1,
"round": 1,
"time": 30,
"deducttime": [
1,
2,
3
],
"rewardtime": [
1,
2,
3
]
},
{
"id": 2,
"round": 2,
"time": 20,
"deducttime": [
1,
2,
3
],
"rewardtime": [
1,
2,
3
]
},
{
"id": 3,
"round": 3,
"time": 15,
"deducttime": [
1,
2,
3
],
"rewardtime": [
1,
2,
3
]
},
{
"id": 4,
"round": 4,
"time": 30,
"deducttime": [
1,
2,
3
],
"rewardtime": [
1,
2,
3
]
},
{
"id": 5,
"round": 5,
"time": 20,
"deducttime": [
1,
2,
3
],
"rewardtime": [
1,
2,
3
]
},
{
"id": 6,
"round": 6,
"time": 15,
"deducttime": [
1,
2,
3
],
"rewardtime": [
1,
2,
3
]
}
]

View File

@ -0,0 +1,132 @@
[
{
"id": 1001,
"cardnum": {
"k": 2,
"v": 2
},
"stagetime": 120,
"skill": [],
"skilltime": []
},
{
"id": 1002,
"cardnum": {
"k": 2,
"v": 4
},
"stagetime": 120,
"skill": [],
"skilltime": []
},
{
"id": 1003,
"cardnum": {
"k": 2,
"v": 4
},
"stagetime": 120,
"skill": [],
"skilltime": []
},
{
"id": 1004,
"cardnum": {
"k": 2,
"v": 4
},
"stagetime": 120,
"skill": [
1
],
"skilltime": [
20
]
},
{
"id": 1005,
"cardnum": {
"k": 2,
"v": 4
},
"stagetime": 120,
"skill": [
2
],
"skilltime": [
20
]
},
{
"id": 1006,
"cardnum": {
"k": 4,
"v": 4
},
"stagetime": 120,
"skill": [
3
],
"skilltime": [
20
]
},
{
"id": 1007,
"cardnum": {
"k": 4,
"v": 4
},
"stagetime": 120,
"skill": [
4
],
"skilltime": [
20
]
},
{
"id": 1008,
"cardnum": {
"k": 4,
"v": 4
},
"stagetime": 120,
"skill": [
1
],
"skilltime": [
20
]
},
{
"id": 1009,
"cardnum": {
"k": 4,
"v": 6
},
"stagetime": 120,
"skill": [
2
],
"skilltime": [
20
]
},
{
"id": 1010,
"cardnum": {
"k": 4,
"v": 6
},
"stagetime": 120,
"skill": [
3,
4
],
"skilltime": [
20,
20
]
}
]

View File

@ -3,378 +3,378 @@
"key": 1, "key": 1,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 200, "fraction": 600,
"fail": 0 "fail": 0
}, },
{ {
"key": 2, "key": 2,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 100, "fraction": 300,
"fail": 0 "fail": 0
}, },
{ {
"key": 3, "key": 3,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 90, "fraction": 270,
"fail": 0 "fail": 0
}, },
{ {
"key": 4, "key": 4,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 80, "fraction": 240,
"fail": 0 "fail": 0
}, },
{ {
"key": 5, "key": 5,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 70, "fraction": 210,
"fail": 0 "fail": 0
}, },
{ {
"key": 6, "key": 6,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 60, "fraction": 180,
"fail": 0 "fail": 0
}, },
{ {
"key": 7, "key": 7,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 50, "fraction": 150,
"fail": 0 "fail": 0
}, },
{ {
"key": 8, "key": 8,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 40, "fraction": 120,
"fail": 0 "fail": 0
}, },
{ {
"key": 9, "key": 9,
"difficulty": 1, "difficulty": 1,
"repeat": 1, "repeat": 1,
"fraction": 30, "fraction": 90,
"fail": 10 "fail": 30
}, },
{ {
"key": 10, "key": 10,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 1000, "fraction": 3000,
"fail": 0 "fail": 0
}, },
{ {
"key": 11, "key": 11,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 800, "fraction": 2400,
"fail": 0 "fail": 0
}, },
{ {
"key": 12, "key": 12,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 750, "fraction": 2250,
"fail": 0 "fail": 0
}, },
{ {
"key": 13, "key": 13,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 700, "fraction": 2100,
"fail": 0 "fail": 0
}, },
{ {
"key": 14, "key": 14,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 650, "fraction": 1950,
"fail": 0 "fail": 0
}, },
{ {
"key": 15, "key": 15,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 600, "fraction": 1800,
"fail": 0 "fail": 0
}, },
{ {
"key": 16, "key": 16,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 550, "fraction": 1650,
"fail": 0 "fail": 0
}, },
{ {
"key": 17, "key": 17,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 500, "fraction": 1500,
"fail": 0 "fail": 0
}, },
{ {
"key": 18, "key": 18,
"difficulty": 2, "difficulty": 2,
"repeat": 1, "repeat": 1,
"fraction": 450, "fraction": 1350,
"fail": 150 "fail": 200
}, },
{ {
"key": 19, "key": 19,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 10000, "fraction": 30000,
"fail": 0 "fail": 0
}, },
{ {
"key": 20, "key": 20,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 9000, "fraction": 27000,
"fail": 0 "fail": 0
}, },
{ {
"key": 21, "key": 21,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 8500, "fraction": 25500,
"fail": 0 "fail": 0
}, },
{ {
"key": 22, "key": 22,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 8000, "fraction": 24000,
"fail": 0 "fail": 0
}, },
{ {
"key": 23, "key": 23,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 7500, "fraction": 22500,
"fail": 0 "fail": 0
}, },
{ {
"key": 24, "key": 24,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 7000, "fraction": 21000,
"fail": 0 "fail": 0
}, },
{ {
"key": 25, "key": 25,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 6500, "fraction": 19500,
"fail": 0 "fail": 0
}, },
{ {
"key": 26, "key": 26,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 6000, "fraction": 18000,
"fail": 0 "fail": 0
}, },
{ {
"key": 27, "key": 27,
"difficulty": 3, "difficulty": 3,
"repeat": 1, "repeat": 1,
"fraction": 5500, "fraction": 16500,
"fail": 1000 "fail": 1500
}, },
{ {
"key": 28, "key": 28,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 600, "fraction": 200,
"fail": 0 "fail": 0
}, },
{ {
"key": 29, "key": 29,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 300, "fraction": 100,
"fail": 0 "fail": 0
}, },
{ {
"key": 30, "key": 30,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 270, "fraction": 90,
"fail": 0 "fail": 0
}, },
{ {
"key": 31, "key": 31,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 240, "fraction": 80,
"fail": 0 "fail": 0
}, },
{ {
"key": 32, "key": 32,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 210, "fraction": 70,
"fail": 0 "fail": 0
}, },
{ {
"key": 33, "key": 33,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 180, "fraction": 60,
"fail": 0 "fail": 0
}, },
{ {
"key": 34, "key": 34,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 150, "fraction": 50,
"fail": 0 "fail": 0
}, },
{ {
"key": 35, "key": 35,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 120, "fraction": 40,
"fail": 0 "fail": 0
}, },
{ {
"key": 36, "key": 36,
"difficulty": 1, "difficulty": 1,
"repeat": 2, "repeat": 2,
"fraction": 90, "fraction": 30,
"fail": 30 "fail": 10
}, },
{ {
"key": 37, "key": 37,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 3000, "fraction": 1000,
"fail": 0 "fail": 0
}, },
{ {
"key": 38, "key": 38,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 2400, "fraction": 800,
"fail": 0 "fail": 0
}, },
{ {
"key": 39, "key": 39,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 2250, "fraction": 750,
"fail": 0 "fail": 0
}, },
{ {
"key": 40, "key": 40,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 2100, "fraction": 700,
"fail": 0 "fail": 0
}, },
{ {
"key": 41, "key": 41,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 1950, "fraction": 650,
"fail": 0 "fail": 0
}, },
{ {
"key": 42, "key": 42,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 1800, "fraction": 600,
"fail": 0 "fail": 0
}, },
{ {
"key": 43, "key": 43,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 1650, "fraction": 550,
"fail": 0 "fail": 0
}, },
{ {
"key": 44, "key": 44,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 1500, "fraction": 500,
"fail": 0 "fail": 0
}, },
{ {
"key": 45, "key": 45,
"difficulty": 2, "difficulty": 2,
"repeat": 2, "repeat": 2,
"fraction": 1350, "fraction": 450,
"fail": 200 "fail": 150
}, },
{ {
"key": 46, "key": 46,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 30000, "fraction": 10000,
"fail": 0 "fail": 0
}, },
{ {
"key": 47, "key": 47,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 27000, "fraction": 9000,
"fail": 0 "fail": 0
}, },
{ {
"key": 48, "key": 48,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 25500, "fraction": 8500,
"fail": 0 "fail": 0
}, },
{ {
"key": 49, "key": 49,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 24000, "fraction": 8000,
"fail": 0 "fail": 0
}, },
{ {
"key": 50, "key": 50,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 22500, "fraction": 7500,
"fail": 0 "fail": 0
}, },
{ {
"key": 51, "key": 51,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 21000, "fraction": 7000,
"fail": 0 "fail": 0
}, },
{ {
"key": 52, "key": 52,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 19500, "fraction": 6500,
"fail": 0 "fail": 0
}, },
{ {
"key": 53, "key": 53,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 18000, "fraction": 6000,
"fail": 0 "fail": 0
}, },
{ {
"key": 54, "key": 54,
"difficulty": 3, "difficulty": 3,
"repeat": 2, "repeat": 2,
"fraction": 16500, "fraction": 5500,
"fail": 1500 "fail": 1000
} }
] ]

View File

@ -766,47 +766,7 @@
"key": "GM_GM_text_110", "key": "GM_GM_text_110",
"text": "前往石阵秘境" "text": "前往石阵秘境"
}, },
"data": "10026", "data": "10027",
"prefix": ""
},
{
"id": 85,
"type": 4,
"text": {
"key": "GM_GM_text_111",
"text": "月卡"
},
"data": "10028",
"prefix": ""
},
{
"id": 86,
"type": 4,
"text": {
"key": "GM_GM_text_112",
"text": "礼包"
},
"data": "10029",
"prefix": ""
},
{
"id": 87,
"type": 4,
"text": {
"key": "GM_GM_text_116",
"text": "月梦战令"
},
"data": "10033",
"prefix": ""
},
{
"id": 88,
"type": 4,
"text": {
"key": "GM_GM_text_117",
"text": "补给战令"
},
"data": "10034",
"prefix": "" "prefix": ""
}, },
{ {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
"icon": "loading_icon_fc", "icon": "loading_icon_fc",
"prompt": { "prompt": {
"key": "loading_Sheet1_prompt_1", "key": "loading_Sheet1_prompt_1",
"text": "废墟中重建的奇迹,文明与希望的火种,人类的新家园中轴城。" "text": "地下的月能闪耀光芒,中心的桃树继续盛放,城中的一切都充满希望。"
} }
}, },
{ {
@ -26,7 +26,7 @@
"icon": "loading_icon_gfxm", "icon": "loading_icon_gfxm",
"prompt": { "prompt": {
"key": "loading_Sheet1_prompt_3", "key": "loading_Sheet1_prompt_3",
"text": "武学的第一奥义,便是要心如止水。" "text": "功夫的心学奥义,便是要心如止水。"
} }
}, },
{ {

View File

@ -23405,7 +23405,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {
@ -23429,7 +23429,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {
@ -23453,7 +23453,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {
@ -23477,7 +23477,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {
@ -23501,7 +23501,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {
@ -23525,7 +23525,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {
@ -23549,7 +23549,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {
@ -23573,7 +23573,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {
@ -23597,7 +23597,7 @@
"description": "英雄自选宝箱", "description": "英雄自选宝箱",
"type": 3, "type": 3,
"groupwt": 0, "groupwt": 0,
"groupid": 2, "groupid": 1,
"subtype": 2, "subtype": 2,
"groupnum": 1, "groupnum": 1,
"itemid": { "itemid": {

View File

@ -481,10 +481,10 @@
{ {
"Id": 225004315, "Id": 225004315,
"EmitPR": 1000, "EmitPR": 1000,
"From": 1, "From": 8,
"Where": [], "Where": [],
"Order": "", "Order": "",
"Limit": 10, "Limit": 1,
"ExecuteCnt": 1, "ExecuteCnt": 1,
"Type": 5, "Type": 5,
"Argu": [ "Argu": [
@ -550,10 +550,10 @@
{ {
"Id": 225004325, "Id": 225004325,
"EmitPR": 1000, "EmitPR": 1000,
"From": 1, "From": 8,
"Where": [], "Where": [],
"Order": "", "Order": "",
"Limit": 10, "Limit": 1,
"ExecuteCnt": 1, "ExecuteCnt": 1,
"Type": 5, "Type": 5,
"Argu": [ "Argu": [
@ -596,10 +596,10 @@
{ {
"Id": 225004335, "Id": 225004335,
"EmitPR": 1000, "EmitPR": 1000,
"From": 1, "From": 8,
"Where": [], "Where": [],
"Order": "", "Order": "",
"Limit": 10, "Limit": 1,
"ExecuteCnt": 1, "ExecuteCnt": 1,
"Type": 5, "Type": 5,
"Argu": [ "Argu": [
@ -642,10 +642,10 @@
{ {
"Id": 225004345, "Id": 225004345,
"EmitPR": 1000, "EmitPR": 1000,
"From": 1, "From": 8,
"Where": [], "Where": [],
"Order": "", "Order": "",
"Limit": 10, "Limit": 1,
"ExecuteCnt": 1, "ExecuteCnt": 1,
"Type": 5, "Type": 5,
"Argu": [ "Argu": [

View File

@ -2287,7 +2287,7 @@
}, },
{ {
"Id": 414002212, "Id": 414002212,
"When": 12, "When": 16,
"FromCheck": "Target=2,HasBuff=390001426", "FromCheck": "Target=2,HasBuff=390001426",
"TargetCheck": "Target=3", "TargetCheck": "Target=3",
"MainSkillCheck": "", "MainSkillCheck": "",
@ -2309,7 +2309,7 @@
}, },
{ {
"Id": 414002213, "Id": 414002213,
"When": 12, "When": 16,
"FromCheck": "Target=2,HasBuff=390001426", "FromCheck": "Target=2,HasBuff=390001426",
"TargetCheck": "Target=4", "TargetCheck": "Target=4",
"MainSkillCheck": "", "MainSkillCheck": "",
@ -3391,9 +3391,9 @@
"PasPr": 1000, "PasPr": 1000,
"PasCorrection": 0, "PasCorrection": 0,
"Type": "CallSkillPas", "Type": "CallSkillPas",
"MaxEmitTimesInRoundByRole": 0, "MaxEmitTimesInRoundByRole": 1,
"MaxEmitTimes": 0, "MaxEmitTimes": 0,
"MaxEmitTimesInRound": 10, "MaxEmitTimesInRound": 0,
"Callback": [ "Callback": [
224008114 224008114
] ]
@ -3413,9 +3413,9 @@
"PasPr": 1000, "PasPr": 1000,
"PasCorrection": 0, "PasCorrection": 0,
"Type": "CallSkillPas", "Type": "CallSkillPas",
"MaxEmitTimesInRoundByRole": 0, "MaxEmitTimesInRoundByRole": 1,
"MaxEmitTimes": 0, "MaxEmitTimes": 0,
"MaxEmitTimesInRound": 10, "MaxEmitTimesInRound": 0,
"Callback": [ "Callback": [
224008214 224008214
] ]
@ -3435,9 +3435,9 @@
"PasPr": 1000, "PasPr": 1000,
"PasCorrection": 0, "PasCorrection": 0,
"Type": "CallSkillPas", "Type": "CallSkillPas",
"MaxEmitTimesInRoundByRole": 0, "MaxEmitTimesInRoundByRole": 1,
"MaxEmitTimes": 0, "MaxEmitTimes": 0,
"MaxEmitTimesInRound": 1, "MaxEmitTimesInRound": 0,
"Callback": [ "Callback": [
234008114 234008114
] ]
@ -3457,9 +3457,9 @@
"PasPr": 1000, "PasPr": 1000,
"PasCorrection": 0, "PasCorrection": 0,
"Type": "CallSkillPas", "Type": "CallSkillPas",
"MaxEmitTimesInRoundByRole": 0, "MaxEmitTimesInRoundByRole": 1,
"MaxEmitTimes": 0, "MaxEmitTimes": 0,
"MaxEmitTimesInRound": 1, "MaxEmitTimesInRound": 0,
"Callback": [ "Callback": [
234008214 234008214
] ]

View File

@ -122,6 +122,7 @@ const (
ModuleCanineRabbit core.M_Modules = "caninerabbit" //犬兔游戏 ModuleCanineRabbit core.M_Modules = "caninerabbit" //犬兔游戏
ModuleIsLand core.M_Modules = "island" //海岛探险 ModuleIsLand core.M_Modules = "island" //海岛探险
ModuleEgghunt core.M_Modules = "egghunt" //彩蛋 ModuleEgghunt core.M_Modules = "egghunt" //彩蛋
ModuleCatchbugs core.M_Modules = "catchbugs" //捉虫子
) )
// 数据表名定义处 // 数据表名定义处

View File

@ -68,6 +68,8 @@ func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr stri
red *pb.DBUser red *pb.DBUser
redtype, bluetype int32 redtype, bluetype int32
blue *pb.DBUser blue *pb.DBUser
redinfo *pb.DBCanineRabbit
blueinfo *pb.DBCanineRabbit
room *Room room *Room
) )
@ -87,6 +89,16 @@ func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr stri
this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[1].GetUserId()}) this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[1].GetUserId()})
return return
} }
if redinfo, err = this.model.getModel(sessions[0].GetUserId()); err != nil {
this.Error("未找到红方信息", log.Field{Key: "uid", Value: sessions[0].GetUserId()})
return
}
if blueinfo, err = this.model.getModel(sessions[0].GetUserId()); err != nil {
this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[0].GetUserId()})
return
}
chess = make([]*pb.DBCanineRabbitChess, 0) chess = make([]*pb.DBCanineRabbitChess, 0)
roomid = primitive.NewObjectID().Hex() roomid = primitive.NewObjectID().Hex()
@ -127,12 +139,16 @@ func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr stri
Rid: roomid, Rid: roomid,
Rules: rules, Rules: rules,
Red: &pb.DBCanineRabbitRoomPlayer{ Red: &pb.DBCanineRabbitRoomPlayer{
Info: comm.GetUserBaseInfo(red), Info: comm.GetUserBaseInfo(red),
Ctype: redtype, Rabbitintegral: redinfo.Rabbitintegral,
Houndintegral: redinfo.Houndintegral,
Ctype: redtype,
}, },
Blue: &pb.DBCanineRabbitRoomPlayer{ Blue: &pb.DBCanineRabbitRoomPlayer{
Info: comm.GetUserBaseInfo(blue), Info: comm.GetUserBaseInfo(blue),
Ctype: bluetype, Rabbitintegral: blueinfo.Rabbitintegral,
Houndintegral: blueinfo.Houndintegral,
Ctype: bluetype,
}, },
Chess: chess, Chess: chess,
}, sessions); err != nil { }, sessions); err != nil {

17
modules/catchbugs/api.go Normal file
View File

@ -0,0 +1,17 @@
package catchbugs
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
type apiComp struct {
modules.MCompGate
module *CatchBugs
}
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
_ = this.MCompGate.Init(service, module, comp, options)
this.module = module.(*CatchBugs)
return
}

View File

@ -0,0 +1,56 @@
package catchbugs
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.CatchbugsAwardReq) (errdata *pb.ErrorData) {
return
}
func (this *apiComp) Award(session comm.IUserSession, req *pb.CatchbugsAwardReq) (errdata *pb.ErrorData) {
var (
confs []*cfg.GameCatchbugRewardData
info *pb.DBCatchBugs
res []*cfg.Gameatn
atno []*pb.UserAtno
ok bool
err error
)
if errdata = this.AwardCheck(session, req); errdata != nil {
return
}
if confs, err = this.module.configure.getGameGColorRewardDatas(); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Message: err.Error(),
}
return
}
if info, err = this.module.model.getModel(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
for _, v := range confs {
if _, ok = info.Awards[v.Key]; !ok && info.Integral >= v.Condition {
res = append(res, v.Reward...)
info.Awards[v.Key] = true
}
}
if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil {
return
}
this.module.model.Change(session.GetUserId(), map[string]interface{}{
"award": info.Awards,
})
session.SendMsg(string(this.module.GetType()), "award", &pb.CatchbugsAwardResp{Awardmap: info.Awards, Award: atno})
return
}

View File

@ -0,0 +1,48 @@
package catchbugs
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//接受切磋
func (this *apiComp) HandleCheck(session comm.IUserSession, req *pb.CatchbugsHandleReq) (errdata *pb.ErrorData) {
if req.Roomid == "" {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
return
}
func (this *apiComp) Handle(session comm.IUserSession, req *pb.CatchbugsHandleReq) (errdata *pb.ErrorData) {
var (
room *Room
err error
)
if errdata = this.HandleCheck(session, req); errdata != nil {
return
}
if room, err = this.module.rooms.queryRoom(req.Roomid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.String(),
Message: err.Error(),
}
return
}
if err = room.PlayerHandle(session.GetUserId(), req); errdata != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.String(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "handle", &pb.CanineRabbitHandleResp{})
return
}

View File

@ -0,0 +1,48 @@
package catchbugs
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//接受切磋
func (this *apiComp) HandleEndCheck(session comm.IUserSession, req *pb.CatchbugsHandleEndReq) (errdata *pb.ErrorData) {
if req.Roomid == "" {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
return
}
func (this *apiComp) HandleEnd(session comm.IUserSession, req *pb.CatchbugsHandleEndReq) (errdata *pb.ErrorData) {
var (
room *Room
err error
)
if errdata = this.HandleEndCheck(session, req); errdata != nil {
return
}
if room, err = this.module.rooms.queryRoom(req.Roomid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.String(),
Message: err.Error(),
}
return
}
if err = room.PlayerHandleEnd(session.GetUserId(), req); errdata != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.String(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "handle", &pb.CatchbugsHandleEndResp{})
return
}

View File

@ -0,0 +1,30 @@
package catchbugs
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.CatchbugsInfoReq) (errdata *pb.ErrorData) {
return
}
func (this *apiComp) Info(session comm.IUserSession, req *pb.CatchbugsInfoReq) (errdata *pb.ErrorData) {
var (
info *pb.DBCatchBugs
err error
)
if errdata = this.InfoCheck(session, req); errdata != nil {
return
}
if info, err = this.module.model.getModel(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "info", &pb.CatchbugsInfoResp{Info: info})
return
}

View File

@ -0,0 +1,48 @@
package catchbugs
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//接受切磋
func (this *apiComp) LoadCompleteCheck(session comm.IUserSession, req *pb.CanineRabbitLoadCompleteReq) (errdata *pb.ErrorData) {
if req.Roomid == "" {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
}
}
return
}
func (this *apiComp) LoadComplete(session comm.IUserSession, req *pb.CanineRabbitLoadCompleteReq) (errdata *pb.ErrorData) {
var (
room *Room
err error
)
if errdata = this.LoadCompleteCheck(session, req); errdata != nil {
return
}
if room, err = this.module.rooms.queryRoom(req.Roomid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.String(),
Message: err.Error(),
}
return
}
if err = room.PlayerLoadEnd(session.GetUserId()); errdata != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.String(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "loadcomplete", &pb.CanineRabbitLoadCompleteResp{Roomid: req.Roomid, Issucc: true})
return
}

View File

@ -0,0 +1,21 @@
package catchbugs
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
//接受切磋
func (this *apiComp) SingleOverCheck(session comm.IUserSession, req *pb.CanineRabbitSingleOverReq) (errdata *pb.ErrorData) {
return
}
func (this *apiComp) SingleOver(session comm.IUserSession, req *pb.CanineRabbitSingleOverReq) (errdata *pb.ErrorData) {
if errdata = this.SingleOverCheck(session, req); errdata != nil {
return
}
session.SendMsg(string(this.module.GetType()), "singleover", &pb.CanineRabbitSingleOverResp{})
return
}

View File

@ -0,0 +1,51 @@
package catchbugs
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
cfg "go_dreamfactory/sys/configure/structs"
)
const (
game_catchbugreward = "game_catchbugreward.json"
game_catchbuglllustrated = "game_catchbuglllustrated.json"
)
type configureComp struct {
modules.MCompConfigure
module *CatchBugs
}
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.module = module.(*CatchBugs)
err = this.LoadMultiConfigure(map[string]interface{}{
game_catchbugreward: cfg.NewGameCatchbugReward,
game_catchbuglllustrated: cfg.NewGameCatchbugLllustrated,
})
return
}
// 获取奖励列表
func (this *configureComp) getGameGColorRewardDatas() (confs []*cfg.GameCatchbugRewardData, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(game_catchbugreward); err != nil {
return
}
confs = v.(*cfg.GameCatchbugReward).GetDataList()
return
}
// 获取奖励列表
func (this *configureComp) getGameCatchbugLllustratedDatas() (confs []*cfg.GameCatchbugLllustratedData, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(game_catchbuglllustrated); err != nil {
return
}
confs = v.(*cfg.GameCatchbugLllustrated).GetDataList()
return
}

View File

@ -0,0 +1,46 @@
package catchbugs
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 modelComp struct {
modules.MCompModel
module *CatchBugs
}
func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompModel.Init(service, module, comp, options)
this.TableName = comm.TablekCanineRabbit
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
})
return
}
// 获取用户全部的埋点数据
func (this *modelComp) getModel(uid string) (info *pb.DBCatchBugs, err error) {
info = &pb.DBCatchBugs{}
if err = this.Get(uid, info); err != nil && err != mgo.MongodbNil {
this.module.Errorln(err)
return
}
if err == mgo.MongodbNil {
info = &pb.DBCatchBugs{
Id: primitive.NewObjectID().Hex(),
Uid: uid,
Books: make(map[int32]int32),
Awards: make(map[int32]bool),
}
err = this.Add(uid, info)
}
return
}

154
modules/catchbugs/module.go Normal file
View File

@ -0,0 +1,154 @@
package catchbugs
import (
"encoding/json"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"go.mongodb.org/mongo-driver/bson/primitive"
)
func NewModule() core.IModule {
m := new(CatchBugs)
return m
}
/*
模块名称:捉虫子
*/
type CatchBugs struct {
modules.ModuleBase
service comm.IService
api *apiComp
configure *configureComp
model *modelComp
rooms *roomsComp
gameInvite comm.IGameInvite
}
// 模块名
func (this *CatchBugs) GetType() core.M_Modules {
return comm.ModuleCatchbugs
}
// 模块初始化接口 注册用户创建角色事件
func (this *CatchBugs) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
this.service = service.(comm.IService)
return
}
func (this *CatchBugs) Start() (err error) {
if err = this.ModuleBase.Start(); err != nil {
return
}
var module core.IModule
if module, err = this.service.GetModule(comm.ModuleGameInvite); err != nil {
return
}
this.gameInvite = module.(comm.IGameInvite)
return
}
func (this *CatchBugs) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
this.model = this.RegisterComp(new(modelComp)).(*modelComp)
this.rooms = this.RegisterComp(new(roomsComp)).(*roomsComp)
}
func (this *CatchBugs) CreateRoom(sessions []comm.IUserSession, rulesStr string) (roomid string, err error) {
var (
rules *pb.DBCatchBugsRules = &pb.DBCatchBugsRules{}
confs []*cfg.GameCatchbugLllustratedData
cardsSlice []int32
cardsTemp []*pb.DBCatchBugsCard
cards []*pb.DBCatchBugsCard
weights []int32
red *pb.DBUser
blue *pb.DBUser
redinfo *pb.DBCatchBugs
blueinfo *pb.DBCatchBugs
room *Room
)
if err = json.Unmarshal([]byte(rulesStr), rules); err != nil {
this.Error("解析规则json", log.Field{Key: "err", Value: err.Error()})
return
}
//发起者 red
red, err = this.ModuleUser.GetUser(sessions[0].GetUserId())
if err != nil {
this.Error("未找到红方信息", log.Field{Key: "uid", Value: sessions[0].GetUserId()})
return
}
blue, err = this.ModuleUser.GetUser(sessions[1].GetUserId())
if err != nil {
this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[1].GetUserId()})
return
}
if confs, err = this.configure.getGameCatchbugLllustratedDatas(); err != nil {
this.Error("配置未找到", log.Field{Key: "err", Value: err.Error()})
return
}
for _, v := range confs {
weights = append(weights, v.Weights)
}
results := comm.GetRandWs(weights, 24)
for _, v := range results {
cardsSlice = append(cardsSlice, confs[v].Id)
}
for i, v := range cardsSlice[:12] {
cardsTemp = append(cardsTemp, &pb.DBCatchBugsCard{
Id: int32(1000 + i*2),
Cid: v,
}, &pb.DBCatchBugsCard{
Id: int32(1001 + i*2),
Cid: v,
})
}
indexs := comm.RandShuffle(len(cardsTemp))
cards = make([]*pb.DBCatchBugsCard, len(cardsTemp))
for i, v := range indexs {
cards[i] = cardsTemp[v]
cards[i].Index = int32(i)
}
if redinfo, err = this.model.getModel(sessions[0].GetUserId()); err != nil {
this.Error("未找到红方信息", log.Field{Key: "uid", Value: sessions[0].GetUserId()})
return
}
if blueinfo, err = this.model.getModel(sessions[0].GetUserId()); err != nil {
this.Error("未找到蓝方信息", log.Field{Key: "uid", Value: sessions[0].GetUserId()})
return
}
roomid = primitive.NewObjectID().Hex()
if room, err = this.rooms.newRoom(&pb.DBCatchBugsRoom{
Rid: roomid,
Rules: rules,
Red: &pb.DBCatchBugsPlayer{
Info: comm.GetUserBaseInfo(red),
Integral: redinfo.Integral,
},
Blue: &pb.DBCatchBugsPlayer{
Info: comm.GetUserBaseInfo(blue),
Integral: blueinfo.Integral,
},
Backup: cardsSlice[12:],
Card: cards,
}, sessions); err != nil {
this.Error("创建房间错误", log.Field{Key: "err", Value: err.Error()})
return
}
go room.GameStart()
return
}

170
modules/catchbugs/room.go Normal file
View File

@ -0,0 +1,170 @@
package catchbugs
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"time"
"google.golang.org/protobuf/proto"
)
type Room struct {
module *CatchBugs
data *pb.DBCatchBugsRoom
sessions []comm.IUserSession
starttime time.Time
round int32
handleplayer string
currindex int32
}
func (this *Room) GameStart() (err error) {
this.starttime = configure.Now()
if err = this.Broadcast("gameready", &pb.CatchbugsGameReadyPush{
ServicePath: fmt.Sprintf("%s/%s", this.module.service.GetType(), this.module.service.GetId()),
Room: this.data,
Countdown: 60,
}); err != nil {
this.module.Errorln(err)
}
return
}
func (this *Room) PlayerLoadEnd(uid string) (err error) {
if uid == this.data.Red.Info.Uid {
this.data.Red.Ready = true
} else {
this.data.Blue.Ready = true
}
if this.data.Rules.Headstart == 0 {
this.handleplayer = this.data.Red.Info.Uid
} else {
this.handleplayer = this.data.Blue.Info.Uid
}
if this.data.Red.Ready && this.data.Blue.Ready { //两个人都准备了
if err = this.Broadcast("roundstart", &pb.CatchbugsRoundStartPush{
Round: this.round,
Handleplayer: this.handleplayer,
}); err != nil {
this.module.Errorln(err)
}
}
return
}
//玩家操作
func (this *Room) PlayerHandle(uid string, handle *pb.CatchbugsHandleReq) (err error) {
if uid != this.handleplayer {
err = fmt.Errorf("It's not your operation!")
return
}
var (
issucc bool
)
if this.data.Red.Info.Uid == uid {
if this.data.Red.Lastopencard == 0 {
this.data.Red.Lastopencard = handle.Index
} else {
if this.data.Card[this.data.Red.Lastopencard].Cid == this.data.Card[handle.Index].Cid {
issucc = true
this.data.Card[this.data.Red.Lastopencard].Isopen = true
this.data.Card[handle.Index].Isopen = true
this.data.Red.Cards = append(this.data.Red.Cards, this.data.Card[this.data.Red.Lastopencard].Cid)
}
}
} else {
if this.data.Blue.Lastopencard == 0 {
this.data.Blue.Lastopencard = handle.Index
} else {
if this.data.Card[this.data.Blue.Lastopencard].Cid == this.data.Card[handle.Index].Cid {
issucc = true
this.data.Card[this.data.Red.Lastopencard].Isopen = true
this.data.Card[handle.Index].Isopen = true
this.data.Blue.Cards = append(this.data.Red.Cards, this.data.Card[this.data.Blue.Lastopencard].Cid)
}
}
}
if err = this.Broadcast("gameover", &pb.CatchbugsOpenCardPush{
Roomid: this.data.Rid,
Index: handle.Index,
Issucc: issucc,
}); err != nil {
this.module.Errorln(err)
}
return
}
//玩家操作
func (this *Room) PlayerHandleEnd(uid string, handle *pb.CatchbugsHandleEndReq) (err error) {
if uid != this.handleplayer {
err = fmt.Errorf("It's not your operation!")
return
}
this.round++
if this.data.Red.Info.Uid == uid {
this.handleplayer = this.data.Blue.Info.Uid
} else {
this.handleplayer = this.data.Red.Info.Uid
}
if err = this.Broadcast("roundstart", &pb.CatchbugsRoundStartPush{
Round: this.round,
Handleplayer: this.handleplayer,
}); err != nil {
this.module.Errorln(err)
}
return
}
func (this *Room) Broadcast(stype string, msg proto.Message) (err error) {
if err = this.module.SendMsgToSession(string(this.module.GetType()), stype, msg, this.sessions...); err != nil {
this.module.Errorln(err)
}
return
}
//技能效果1 随机2x2的区域 旋转
func Skill1Effect(cards []*pb.DBCatchBugsCard) (ramdonCard []*pb.DBCatchBugsCard) {
var (
cardsSlice []int32
ramdon int32 //随机点
x int32
y int32
offsetX, offsetY int32
)
for _, v := range cards {
if !v.Isopen {
cardsSlice = append(cardsSlice, v.Index)
}
}
ramdon = cardsSlice[comm.RandShuffle(len(cardsSlice))[0]]
x = ramdon % 4
y = ramdon / 4
offsetX = 1
if x == 3 {
offsetX = -1
}
offsetY = 1
if y == 6 {
offsetY = -1
}
ramdonCard = append(ramdonCard, cards[y*6+x])
ramdonCard = append(ramdonCard, cards[y*6+x+offsetX])
ramdonCard = append(ramdonCard, cards[(y+offsetY)*6+x+offsetX])
ramdonCard = append(ramdonCard, cards[(y+offsetY)*6+x])
index0 := ramdonCard[0].Index
for i, v := range ramdonCard {
if i < len(ramdonCard) {
v.Index = ramdonCard[i+1].Index
} else {
v.Index = index0
}
}
return
}

View File

@ -0,0 +1,65 @@
package catchbugs
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase"
"go_dreamfactory/pb"
"sync"
)
type roomsComp struct {
cbase.ModuleCompBase
module *CatchBugs
lock sync.RWMutex
rooms map[string]*Room
}
func (this *roomsComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.ModuleCompBase.Init(service, module, comp, options)
this.module = module.(*CatchBugs)
this.rooms = make(map[string]*Room)
return
}
func (this *roomsComp) queryRoom(rid string) (room *Room, err error) {
var (
ok bool
)
this.lock.Lock()
room, ok = this.rooms[rid]
this.lock.Unlock()
if !ok {
err = fmt.Errorf("no found room:%s", rid)
return
}
return
}
func (this *roomsComp) newRoom(data *pb.DBCatchBugsRoom, session []comm.IUserSession) (room *Room, err error) {
room = &Room{
module: this.module,
data: data,
sessions: session,
}
this.lock.Lock()
this.rooms[data.Rid] = room
this.lock.Unlock()
return
}
func (this *roomsComp) removeRoom(rid string) {
var (
ok bool
room *Room
)
this.lock.Lock()
room, ok = this.rooms[rid]
delete(this.rooms, rid)
this.lock.Unlock()
if ok {
go this.module.gameInvite.GameInviteEnd(3, room.data.Red.Info.Uid)
}
}

View File

@ -17,7 +17,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.IsLandReceiveReq
var ( var (
info *pb.DBIsland info *pb.DBIsland
warorder *pb.Warorder warorder *pb.Warorder
confs []*cfg.GamePuggsyPassCheckData confs []*cfg.GamePuggsyPasscheckData
awards []*cfg.Gameatn awards []*cfg.Gameatn
award []*pb.UserAtno award []*pb.UserAtno
err error err error

View File

@ -31,7 +31,7 @@ func (this *ConfigureComp) Init(service core.IService, module core.IModule, comp
err = this.LoadConfigure(game_puggsyskill, cfg.NewGamePuggsySkill) err = this.LoadConfigure(game_puggsyskill, cfg.NewGamePuggsySkill)
err = this.LoadConfigure(game_puggsyfight, cfg.NewGamePuggsyFight) err = this.LoadConfigure(game_puggsyfight, cfg.NewGamePuggsyFight)
err = this.LoadConfigure(game_puggsyscore, cfg.NewGamePuggsyScore) err = this.LoadConfigure(game_puggsyscore, cfg.NewGamePuggsyScore)
err = this.LoadConfigure(game_puggsypasscheck, cfg.NewGamePuggsyPassCheck) err = this.LoadConfigure(game_puggsypasscheck, cfg.NewGamePuggsyPasscheck)
return return
} }
@ -133,14 +133,14 @@ func (this *ConfigureComp) getGamePuggsyScoreData(harm int32) (results *cfg.Game
} }
// 获取伤害对应的评分组 // 获取伤害对应的评分组
func (this *ConfigureComp) getGamePuggsyPasscheckData() (results []*cfg.GamePuggsyPassCheckData, err error) { func (this *ConfigureComp) getGamePuggsyPasscheckData() (results []*cfg.GamePuggsyPasscheckData, err error) {
var ( var (
v interface{} v interface{}
) )
if v, err = this.GetConfigure(game_puggsyscore); err != nil { if v, err = this.GetConfigure(game_puggsyscore); err != nil {
return return
} else { } else {
results = v.(*cfg.GamePuggsyPassCheck).GetDataList() results = v.(*cfg.GamePuggsyPasscheck).GetDataList()
} }
return return
} }

604
pb/catchbugs_db.pb.go Normal file
View File

@ -0,0 +1,604 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: catchbugs/catchbugs_db.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//捉虫子
type DBCatchBugs struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
Integral int32 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral"`
Books map[int32]int32 `protobuf:"bytes,4,rep,name=books,proto3" json:"books" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //图鉴
Awards map[int32]bool `protobuf:"bytes,5,rep,name=awards,proto3" json:"awards" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //奖励
Weektime int64 `protobuf:"varint,6,opt,name=weektime,proto3" json:"weektime"` //周时长
}
func (x *DBCatchBugs) Reset() {
*x = DBCatchBugs{}
if protoimpl.UnsafeEnabled {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBCatchBugs) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBCatchBugs) ProtoMessage() {}
func (x *DBCatchBugs) ProtoReflect() protoreflect.Message {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DBCatchBugs.ProtoReflect.Descriptor instead.
func (*DBCatchBugs) Descriptor() ([]byte, []int) {
return file_catchbugs_catchbugs_db_proto_rawDescGZIP(), []int{0}
}
func (x *DBCatchBugs) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DBCatchBugs) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBCatchBugs) GetIntegral() int32 {
if x != nil {
return x.Integral
}
return 0
}
func (x *DBCatchBugs) GetBooks() map[int32]int32 {
if x != nil {
return x.Books
}
return nil
}
func (x *DBCatchBugs) GetAwards() map[int32]bool {
if x != nil {
return x.Awards
}
return nil
}
func (x *DBCatchBugs) GetWeektime() int64 {
if x != nil {
return x.Weektime
}
return 0
}
//游戏规则
type DBCatchBugsRules struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Skill int32 `protobuf:"varint,1,opt,name=skill,proto3" json:"skill"`
Headstart int32 `protobuf:"varint,3,opt,name=headstart,proto3" json:"headstart"` //谁先手 0 红方 1 蓝方
}
func (x *DBCatchBugsRules) Reset() {
*x = DBCatchBugsRules{}
if protoimpl.UnsafeEnabled {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBCatchBugsRules) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBCatchBugsRules) ProtoMessage() {}
func (x *DBCatchBugsRules) ProtoReflect() protoreflect.Message {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DBCatchBugsRules.ProtoReflect.Descriptor instead.
func (*DBCatchBugsRules) Descriptor() ([]byte, []int) {
return file_catchbugs_catchbugs_db_proto_rawDescGZIP(), []int{1}
}
func (x *DBCatchBugsRules) GetSkill() int32 {
if x != nil {
return x.Skill
}
return 0
}
func (x *DBCatchBugsRules) GetHeadstart() int32 {
if x != nil {
return x.Headstart
}
return 0
}
//玩家信息
type DBCatchBugsPlayer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Info *BaseUserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` //发起者信息
Ready bool `protobuf:"varint,2,opt,name=ready,proto3" json:"ready"`
Score int32 `protobuf:"varint,3,opt,name=score,proto3" json:"score"`
Integral int32 `protobuf:"varint,4,opt,name=integral,proto3" json:"integral"` //积分
Lastopencard int32 `protobuf:"varint,5,opt,name=lastopencard,proto3" json:"lastopencard"`
Cards []int32 `protobuf:"varint,6,rep,packed,name=cards,proto3" json:"cards"`
}
func (x *DBCatchBugsPlayer) Reset() {
*x = DBCatchBugsPlayer{}
if protoimpl.UnsafeEnabled {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBCatchBugsPlayer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBCatchBugsPlayer) ProtoMessage() {}
func (x *DBCatchBugsPlayer) ProtoReflect() protoreflect.Message {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DBCatchBugsPlayer.ProtoReflect.Descriptor instead.
func (*DBCatchBugsPlayer) Descriptor() ([]byte, []int) {
return file_catchbugs_catchbugs_db_proto_rawDescGZIP(), []int{2}
}
func (x *DBCatchBugsPlayer) GetInfo() *BaseUserInfo {
if x != nil {
return x.Info
}
return nil
}
func (x *DBCatchBugsPlayer) GetReady() bool {
if x != nil {
return x.Ready
}
return false
}
func (x *DBCatchBugsPlayer) GetScore() int32 {
if x != nil {
return x.Score
}
return 0
}
func (x *DBCatchBugsPlayer) GetIntegral() int32 {
if x != nil {
return x.Integral
}
return 0
}
func (x *DBCatchBugsPlayer) GetLastopencard() int32 {
if x != nil {
return x.Lastopencard
}
return 0
}
func (x *DBCatchBugsPlayer) GetCards() []int32 {
if x != nil {
return x.Cards
}
return nil
}
//卡牌
type DBCatchBugsCard struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` //唯一id
Cid int32 `protobuf:"varint,2,opt,name=cid,proto3" json:"cid"` //卡牌配置id
Index int32 `protobuf:"varint,3,opt,name=index,proto3" json:"index"`
Isopen bool `protobuf:"varint,4,opt,name=isopen,proto3" json:"isopen"` //是否开启
}
func (x *DBCatchBugsCard) Reset() {
*x = DBCatchBugsCard{}
if protoimpl.UnsafeEnabled {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBCatchBugsCard) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBCatchBugsCard) ProtoMessage() {}
func (x *DBCatchBugsCard) ProtoReflect() protoreflect.Message {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DBCatchBugsCard.ProtoReflect.Descriptor instead.
func (*DBCatchBugsCard) Descriptor() ([]byte, []int) {
return file_catchbugs_catchbugs_db_proto_rawDescGZIP(), []int{3}
}
func (x *DBCatchBugsCard) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *DBCatchBugsCard) GetCid() int32 {
if x != nil {
return x.Cid
}
return 0
}
func (x *DBCatchBugsCard) GetIndex() int32 {
if x != nil {
return x.Index
}
return 0
}
func (x *DBCatchBugsCard) GetIsopen() bool {
if x != nil {
return x.Isopen
}
return false
}
//犬兔大赛 房间
type DBCatchBugsRoom struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Rid string `protobuf:"bytes,1,opt,name=rid,proto3" json:"rid"`
Rules *DBCatchBugsRules `protobuf:"bytes,2,opt,name=rules,proto3" json:"rules"`
Red *DBCatchBugsPlayer `protobuf:"bytes,3,opt,name=red,proto3" json:"red"`
Blue *DBCatchBugsPlayer `protobuf:"bytes,4,opt,name=blue,proto3" json:"blue"`
Backup []int32 `protobuf:"varint,5,rep,packed,name=backup,proto3" json:"backup"` //预备卡牌
Card []*DBCatchBugsCard `protobuf:"bytes,6,rep,name=card,proto3" json:"card"` //桌面卡牌
}
func (x *DBCatchBugsRoom) Reset() {
*x = DBCatchBugsRoom{}
if protoimpl.UnsafeEnabled {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBCatchBugsRoom) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBCatchBugsRoom) ProtoMessage() {}
func (x *DBCatchBugsRoom) ProtoReflect() protoreflect.Message {
mi := &file_catchbugs_catchbugs_db_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DBCatchBugsRoom.ProtoReflect.Descriptor instead.
func (*DBCatchBugsRoom) Descriptor() ([]byte, []int) {
return file_catchbugs_catchbugs_db_proto_rawDescGZIP(), []int{4}
}
func (x *DBCatchBugsRoom) GetRid() string {
if x != nil {
return x.Rid
}
return ""
}
func (x *DBCatchBugsRoom) GetRules() *DBCatchBugsRules {
if x != nil {
return x.Rules
}
return nil
}
func (x *DBCatchBugsRoom) GetRed() *DBCatchBugsPlayer {
if x != nil {
return x.Red
}
return nil
}
func (x *DBCatchBugsRoom) GetBlue() *DBCatchBugsPlayer {
if x != nil {
return x.Blue
}
return nil
}
func (x *DBCatchBugsRoom) GetBackup() []int32 {
if x != nil {
return x.Backup
}
return nil
}
func (x *DBCatchBugsRoom) GetCard() []*DBCatchBugsCard {
if x != nil {
return x.Card
}
return nil
}
var File_catchbugs_catchbugs_db_proto protoreflect.FileDescriptor
var file_catchbugs_catchbugs_db_proto_rawDesc = []byte{
0x0a, 0x1c, 0x63, 0x61, 0x74, 0x63, 0x68, 0x62, 0x75, 0x67, 0x73, 0x2f, 0x63, 0x61, 0x74, 0x63,
0x68, 0x62, 0x75, 0x67, 0x73, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a,
0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x02, 0x0a, 0x0b, 0x44,
0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08,
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6b,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63,
0x68, 0x42, 0x75, 0x67, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x77, 0x61, 0x72, 0x64,
0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63,
0x68, 0x42, 0x75, 0x67, 0x73, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x06, 0x61, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x65, 0x65,
0x6b, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x77, 0x65, 0x65,
0x6b, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x42, 0x6f, 0x6f, 0x6b, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
0x39, 0x0a, 0x0b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x46, 0x0a, 0x10, 0x44, 0x42,
0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14,
0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73,
0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x61, 0x64, 0x73, 0x74, 0x61, 0x72,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x68, 0x65, 0x61, 0x64, 0x73, 0x74, 0x61,
0x72, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x11, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75,
0x67, 0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65,
0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x72,
0x65, 0x61, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67,
0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67,
0x72, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x6f, 0x70, 0x65, 0x6e, 0x63,
0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x6f,
0x70, 0x65, 0x6e, 0x63, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x73,
0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x63, 0x61, 0x72, 0x64, 0x73, 0x22, 0x61, 0x0a,
0x0f, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x43, 0x61, 0x72, 0x64,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63,
0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x6f, 0x70,
0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x6f, 0x70, 0x65, 0x6e,
0x22, 0xd8, 0x01, 0x0a, 0x0f, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73,
0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x72, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42,
0x75, 0x67, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12,
0x24, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x44,
0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67, 0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72,
0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67,
0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a,
0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x62,
0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x74, 0x63, 0x68, 0x42, 0x75, 0x67,
0x73, 0x43, 0x61, 0x72, 0x64, 0x52, 0x04, 0x63, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_catchbugs_catchbugs_db_proto_rawDescOnce sync.Once
file_catchbugs_catchbugs_db_proto_rawDescData = file_catchbugs_catchbugs_db_proto_rawDesc
)
func file_catchbugs_catchbugs_db_proto_rawDescGZIP() []byte {
file_catchbugs_catchbugs_db_proto_rawDescOnce.Do(func() {
file_catchbugs_catchbugs_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_catchbugs_catchbugs_db_proto_rawDescData)
})
return file_catchbugs_catchbugs_db_proto_rawDescData
}
var file_catchbugs_catchbugs_db_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_catchbugs_catchbugs_db_proto_goTypes = []interface{}{
(*DBCatchBugs)(nil), // 0: DBCatchBugs
(*DBCatchBugsRules)(nil), // 1: DBCatchBugsRules
(*DBCatchBugsPlayer)(nil), // 2: DBCatchBugsPlayer
(*DBCatchBugsCard)(nil), // 3: DBCatchBugsCard
(*DBCatchBugsRoom)(nil), // 4: DBCatchBugsRoom
nil, // 5: DBCatchBugs.BooksEntry
nil, // 6: DBCatchBugs.AwardsEntry
(*BaseUserInfo)(nil), // 7: BaseUserInfo
}
var file_catchbugs_catchbugs_db_proto_depIdxs = []int32{
5, // 0: DBCatchBugs.books:type_name -> DBCatchBugs.BooksEntry
6, // 1: DBCatchBugs.awards:type_name -> DBCatchBugs.AwardsEntry
7, // 2: DBCatchBugsPlayer.info:type_name -> BaseUserInfo
1, // 3: DBCatchBugsRoom.rules:type_name -> DBCatchBugsRules
2, // 4: DBCatchBugsRoom.red:type_name -> DBCatchBugsPlayer
2, // 5: DBCatchBugsRoom.blue:type_name -> DBCatchBugsPlayer
3, // 6: DBCatchBugsRoom.card:type_name -> DBCatchBugsCard
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_catchbugs_catchbugs_db_proto_init() }
func file_catchbugs_catchbugs_db_proto_init() {
if File_catchbugs_catchbugs_db_proto != nil {
return
}
file_comm_proto_init()
if !protoimpl.UnsafeEnabled {
file_catchbugs_catchbugs_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBCatchBugs); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_catchbugs_catchbugs_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBCatchBugsRules); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_catchbugs_catchbugs_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBCatchBugsPlayer); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_catchbugs_catchbugs_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBCatchBugsCard); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_catchbugs_catchbugs_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBCatchBugsRoom); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_catchbugs_catchbugs_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_catchbugs_catchbugs_db_proto_goTypes,
DependencyIndexes: file_catchbugs_catchbugs_db_proto_depIdxs,
MessageInfos: file_catchbugs_catchbugs_db_proto_msgTypes,
}.Build()
File_catchbugs_catchbugs_db_proto = out.File
file_catchbugs_catchbugs_db_proto_rawDesc = nil
file_catchbugs_catchbugs_db_proto_goTypes = nil
file_catchbugs_catchbugs_db_proto_depIdxs = nil
}

1217
pb/catchbugs_msg.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -16,6 +16,7 @@ type GameBuzkashiGradeData struct {
Value int32 Value int32
Energy int32 Energy int32
Matchvalue int32 Matchvalue int32
ScoreText string
} }
const TypeId_GameBuzkashiGradeData = -378990226 const TypeId_GameBuzkashiGradeData = -378990226
@ -30,6 +31,7 @@ func (_v *GameBuzkashiGradeData)Deserialize(_buf map[string]interface{}) (err er
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["value"].(float64); !_ok_ { err = errors.New("value error"); return }; _v.Value = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["value"].(float64); !_ok_ { err = errors.New("value error"); return }; _v.Value = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["energy"].(float64); !_ok_ { err = errors.New("energy error"); return }; _v.Energy = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["energy"].(float64); !_ok_ { err = errors.New("energy error"); return }; _v.Energy = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["matchvalue"].(float64); !_ok_ { err = errors.New("matchvalue error"); return }; _v.Matchvalue = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["matchvalue"].(float64); !_ok_ { err = errors.New("matchvalue error"); return }; _v.Matchvalue = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["scoreText"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.ScoreText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.ScoreText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
return return
} }

View File

@ -15,6 +15,7 @@ type GameBuzkashiQteLvData struct {
Time float32 Time float32
Value int32 Value int32
Matchvalue int32 Matchvalue int32
ScoreText string
} }
const TypeId_GameBuzkashiQteLvData = 795602659 const TypeId_GameBuzkashiQteLvData = 795602659
@ -28,6 +29,7 @@ func (_v *GameBuzkashiQteLvData)Deserialize(_buf map[string]interface{}) (err er
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = float32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["value"].(float64); !_ok_ { err = errors.New("value error"); return }; _v.Value = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["value"].(float64); !_ok_ { err = errors.New("value error"); return }; _v.Value = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["matchvalue"].(float64); !_ok_ { err = errors.New("matchvalue error"); return }; _v.Matchvalue = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["matchvalue"].(float64); !_ok_ { err = errors.New("matchvalue error"); return }; _v.Matchvalue = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["scoreText"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.ScoreText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.ScoreText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
return 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 GameCatchbugLllustrated struct {
_dataMap map[int32]*GameCatchbugLllustratedData
_dataList []*GameCatchbugLllustratedData
}
func NewGameCatchbugLllustrated(_buf []map[string]interface{}) (*GameCatchbugLllustrated, error) {
_dataList := make([]*GameCatchbugLllustratedData, 0, len(_buf))
dataMap := make(map[int32]*GameCatchbugLllustratedData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameCatchbugLllustratedData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameCatchbugLllustrated{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameCatchbugLllustrated) GetDataMap() map[int32]*GameCatchbugLllustratedData {
return table._dataMap
}
func (table *GameCatchbugLllustrated) GetDataList() []*GameCatchbugLllustratedData {
return table._dataList
}
func (table *GameCatchbugLllustrated) Get(key int32) *GameCatchbugLllustratedData {
return table._dataMap[key]
}

View File

@ -0,0 +1,45 @@
//------------------------------------------------------------------------------
// <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 GameCatchbugLllustratedData struct {
Id int32
Rarity int32
Cardname string
Carddescribe string
Pic string
Weights int32
}
const TypeId_GameCatchbugLllustratedData = -1899586481
func (*GameCatchbugLllustratedData) GetTypeId() int32 {
return -1899586481
}
func (_v *GameCatchbugLllustratedData)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["rarity"].(float64); !_ok_ { err = errors.New("rarity error"); return }; _v.Rarity = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["cardname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Cardname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Cardname, _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["carddescribe"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Carddescribe error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Carddescribe, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Pic, _ok_ = _buf["pic"].(string); !_ok_ { err = errors.New("pic error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weights"].(float64); !_ok_ { err = errors.New("weights error"); return }; _v.Weights = int32(_tempNum_) }
return
}
func DeserializeGameCatchbugLllustratedData(_buf map[string]interface{}) (*GameCatchbugLllustratedData, error) {
v := &GameCatchbugLllustratedData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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 GameCatchbugReward struct {
_dataMap map[int32]*GameCatchbugRewardData
_dataList []*GameCatchbugRewardData
}
func NewGameCatchbugReward(_buf []map[string]interface{}) (*GameCatchbugReward, error) {
_dataList := make([]*GameCatchbugRewardData, 0, len(_buf))
dataMap := make(map[int32]*GameCatchbugRewardData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameCatchbugRewardData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Key] = _v
}
}
return &GameCatchbugReward{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameCatchbugReward) GetDataMap() map[int32]*GameCatchbugRewardData {
return table._dataMap
}
func (table *GameCatchbugReward) GetDataList() []*GameCatchbugRewardData {
return table._dataList
}
func (table *GameCatchbugReward) Get(key int32) *GameCatchbugRewardData {
return table._dataMap[key]
}

View File

@ -0,0 +1,52 @@
//------------------------------------------------------------------------------
// <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 GameCatchbugRewardData struct {
Key int32
Condition int32
Reward []*Gameatn
}
const TypeId_GameCatchbugRewardData = -1852697170
func (*GameCatchbugRewardData) GetTypeId() int32 {
return -1852697170
}
func (_v *GameCatchbugRewardData)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["condition"].(float64); !_ok_ { err = errors.New("condition error"); return }; _v.Condition = int32(_tempNum_) }
{
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_)
}
}
return
}
func DeserializeGameCatchbugRewardData(_buf map[string]interface{}) (*GameCatchbugRewardData, error) {
v := &GameCatchbugRewardData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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 GameCatchbugSkill struct {
_dataMap map[int32]*GameCatchbugSkillData
_dataList []*GameCatchbugSkillData
}
func NewGameCatchbugSkill(_buf []map[string]interface{}) (*GameCatchbugSkill, error) {
_dataList := make([]*GameCatchbugSkillData, 0, len(_buf))
dataMap := make(map[int32]*GameCatchbugSkillData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameCatchbugSkillData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameCatchbugSkill{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameCatchbugSkill) GetDataMap() map[int32]*GameCatchbugSkillData {
return table._dataMap
}
func (table *GameCatchbugSkill) GetDataList() []*GameCatchbugSkillData {
return table._dataList
}
func (table *GameCatchbugSkill) Get(key int32) *GameCatchbugSkillData {
return table._dataMap[key]
}

View File

@ -0,0 +1,39 @@
//------------------------------------------------------------------------------
// <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 GameCatchbugSkillData struct {
Id int32
Skillname string
Round int32
}
const TypeId_GameCatchbugSkillData = -340365114
func (*GameCatchbugSkillData) GetTypeId() int32 {
return -340365114
}
func (_v *GameCatchbugSkillData)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 __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["skillname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Skillname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Skillname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["round"].(float64); !_ok_ { err = errors.New("round error"); return }; _v.Round = int32(_tempNum_) }
return
}
func DeserializeGameCatchbugSkillData(_buf map[string]interface{}) (*GameCatchbugSkillData, error) {
v := &GameCatchbugSkillData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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 GameCatchbugSset struct {
_dataMap map[int32]*GameCatchbugSsetData
_dataList []*GameCatchbugSsetData
}
func NewGameCatchbugSset(_buf []map[string]interface{}) (*GameCatchbugSset, error) {
_dataList := make([]*GameCatchbugSsetData, 0, len(_buf))
dataMap := make(map[int32]*GameCatchbugSsetData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameCatchbugSsetData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameCatchbugSset{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameCatchbugSset) GetDataMap() map[int32]*GameCatchbugSsetData {
return table._dataMap
}
func (table *GameCatchbugSset) GetDataList() []*GameCatchbugSsetData {
return table._dataList
}
func (table *GameCatchbugSset) Get(key int32) *GameCatchbugSsetData {
return table._dataMap[key]
}

View File

@ -0,0 +1,69 @@
//------------------------------------------------------------------------------
// <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 GameCatchbugSsetData struct {
Id int32
Round int32
Time int32
Deducttime []int32
Rewardtime []int32
}
const TypeId_GameCatchbugSsetData = 469033678
func (*GameCatchbugSsetData) GetTypeId() int32 {
return 469033678
}
func (_v *GameCatchbugSsetData)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["round"].(float64); !_ok_ { err = errors.New("round error"); return }; _v.Round = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["deducttime"].([]interface{}); !_ok_ { err = errors.New("deducttime error"); return }
_v.Deducttime = 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.Deducttime = append(_v.Deducttime, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["rewardtime"].([]interface{}); !_ok_ { err = errors.New("rewardtime error"); return }
_v.Rewardtime = 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.Rewardtime = append(_v.Rewardtime, _list_v_)
}
}
return
}
func DeserializeGameCatchbugSsetData(_buf map[string]interface{}) (*GameCatchbugSsetData, error) {
v := &GameCatchbugSsetData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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 GameCatchbugStage struct {
_dataMap map[int32]*GameCatchbugStageData
_dataList []*GameCatchbugStageData
}
func NewGameCatchbugStage(_buf []map[string]interface{}) (*GameCatchbugStage, error) {
_dataList := make([]*GameCatchbugStageData, 0, len(_buf))
dataMap := make(map[int32]*GameCatchbugStageData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameCatchbugStageData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameCatchbugStage{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameCatchbugStage) GetDataMap() map[int32]*GameCatchbugStageData {
return table._dataMap
}
func (table *GameCatchbugStage) GetDataList() []*GameCatchbugStageData {
return table._dataList
}
func (table *GameCatchbugStage) Get(key int32) *GameCatchbugStageData {
return table._dataMap[key]
}

View File

@ -0,0 +1,69 @@
//------------------------------------------------------------------------------
// <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 GameCatchbugStageData struct {
Id int32
Cardnum *Gamekv
Stagetime int32
Skill []int32
Skilltime []int32
}
const TypeId_GameCatchbugStageData = -494646541
func (*GameCatchbugStageData) GetTypeId() int32 {
return -494646541
}
func (_v *GameCatchbugStageData)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 _x_ map[string]interface{}; if _x_, _ok_ = _buf["cardnum"].(map[string]interface{}); !_ok_ { err = errors.New("cardnum error"); return }; if _v.Cardnum, err = DeserializeGamekv(_x_); err != nil { return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["stagetime"].(float64); !_ok_ { err = errors.New("stagetime error"); return }; _v.Stagetime = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["skill"].([]interface{}); !_ok_ { err = errors.New("skill error"); return }
_v.Skill = 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.Skill = append(_v.Skill, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["skilltime"].([]interface{}); !_ok_ { err = errors.New("skilltime error"); return }
_v.Skilltime = 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.Skilltime = append(_v.Skilltime, _list_v_)
}
}
return
}
func DeserializeGameCatchbugStageData(_buf map[string]interface{}) (*GameCatchbugStageData, error) {
v := &GameCatchbugStageData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -8,34 +8,34 @@
package cfg package cfg
type GamePuggsyPassCheck struct { type GamePuggsyPasscheck struct {
_dataMap map[int32]*GamePuggsyPassCheckData _dataMap map[int32]*GamePuggsyPasscheckData
_dataList []*GamePuggsyPassCheckData _dataList []*GamePuggsyPasscheckData
} }
func NewGamePuggsyPassCheck(_buf []map[string]interface{}) (*GamePuggsyPassCheck, error) { func NewGamePuggsyPasscheck(_buf []map[string]interface{}) (*GamePuggsyPasscheck, error) {
_dataList := make([]*GamePuggsyPassCheckData, 0, len(_buf)) _dataList := make([]*GamePuggsyPasscheckData, 0, len(_buf))
dataMap := make(map[int32]*GamePuggsyPassCheckData) dataMap := make(map[int32]*GamePuggsyPasscheckData)
for _, _ele_ := range _buf { for _, _ele_ := range _buf {
if _v, err2 := DeserializeGamePuggsyPassCheckData(_ele_); err2 != nil { if _v, err2 := DeserializeGamePuggsyPasscheckData(_ele_); err2 != nil {
return nil, err2 return nil, err2
} else { } else {
_dataList = append(_dataList, _v) _dataList = append(_dataList, _v)
dataMap[_v.Id] = _v dataMap[_v.Id] = _v
} }
} }
return &GamePuggsyPassCheck{_dataList:_dataList, _dataMap:dataMap}, nil return &GamePuggsyPasscheck{_dataList:_dataList, _dataMap:dataMap}, nil
} }
func (table *GamePuggsyPassCheck) GetDataMap() map[int32]*GamePuggsyPassCheckData { func (table *GamePuggsyPasscheck) GetDataMap() map[int32]*GamePuggsyPasscheckData {
return table._dataMap return table._dataMap
} }
func (table *GamePuggsyPassCheck) GetDataList() []*GamePuggsyPassCheckData { func (table *GamePuggsyPasscheck) GetDataList() []*GamePuggsyPasscheckData {
return table._dataList return table._dataList
} }
func (table *GamePuggsyPassCheck) Get(key int32) *GamePuggsyPassCheckData { func (table *GamePuggsyPasscheck) Get(key int32) *GamePuggsyPasscheckData {
return table._dataMap[key] return table._dataMap[key]
} }

View File

@ -10,7 +10,7 @@ package cfg
import "errors" import "errors"
type GamePuggsyPassCheckData struct { type GamePuggsyPasscheckData struct {
Id int32 Id int32
PayId string PayId string
Parameter int32 Parameter int32
@ -19,13 +19,13 @@ type GamePuggsyPassCheckData struct {
PayReward []*Gameatn PayReward []*Gameatn
} }
const TypeId_GamePuggsyPassCheckData = -216498502 const TypeId_GamePuggsyPasscheckData = 2074500826
func (*GamePuggsyPassCheckData) GetTypeId() int32 { func (*GamePuggsyPasscheckData) GetTypeId() int32 {
return -216498502 return 2074500826
} }
func (_v *GamePuggsyPassCheckData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GamePuggsyPasscheckData)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["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; if _v.PayId, _ok_ = _buf["pay_id"].(string); !_ok_ { err = errors.New("pay_id error"); return } } { var _ok_ bool; if _v.PayId, _ok_ = _buf["pay_id"].(string); !_ok_ { err = errors.New("pay_id error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["parameter"].(float64); !_ok_ { err = errors.New("parameter error"); return }; _v.Parameter = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["parameter"].(float64); !_ok_ { err = errors.New("parameter error"); return }; _v.Parameter = int32(_tempNum_) }
@ -48,8 +48,8 @@ func (_v *GamePuggsyPassCheckData)Deserialize(_buf map[string]interface{}) (err
return return
} }
func DeserializeGamePuggsyPassCheckData(_buf map[string]interface{}) (*GamePuggsyPassCheckData, error) { func DeserializeGamePuggsyPasscheckData(_buf map[string]interface{}) (*GamePuggsyPasscheckData, error) {
v := &GamePuggsyPassCheckData{} v := &GamePuggsyPasscheckData{}
if err := v.Deserialize(_buf); err == nil { if err := v.Deserialize(_buf); err == nil {
return v, nil return v, nil
} else { } else {

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 GameUnblanking struct {
_dataMap map[int32]*GameUnblankingData
_dataList []*GameUnblankingData
}
func NewGameUnblanking(_buf []map[string]interface{}) (*GameUnblanking, error) {
_dataList := make([]*GameUnblankingData, 0, len(_buf))
dataMap := make(map[int32]*GameUnblankingData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameUnblankingData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameUnblanking{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameUnblanking) GetDataMap() map[int32]*GameUnblankingData {
return table._dataMap
}
func (table *GameUnblanking) GetDataList() []*GameUnblankingData {
return table._dataList
}
func (table *GameUnblanking) Get(key int32) *GameUnblankingData {
return table._dataMap[key]
}

View File

@ -0,0 +1,88 @@
//------------------------------------------------------------------------------
// <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 GameUnblankingData struct {
Id int32
Key int32
Type int32
Pic string
Left []*Gamekv
Right []*Gamekv
Picangle []int32
Time int32
}
const TypeId_GameUnblankingData = 1670050157
func (*GameUnblankingData) GetTypeId() int32 {
return 1670050157
}
func (_v *GameUnblankingData)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["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; if _v.Pic, _ok_ = _buf["pic"].(string); !_ok_ { err = errors.New("pic error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["left"].([]interface{}); !_ok_ { err = errors.New("left error"); return }
_v.Left = make([]*Gamekv, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gamekv
{ 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 = DeserializeGamekv(_x_); err != nil { return } }
_v.Left = append(_v.Left, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["right"].([]interface{}); !_ok_ { err = errors.New("right error"); return }
_v.Right = make([]*Gamekv, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gamekv
{ 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 = DeserializeGamekv(_x_); err != nil { return } }
_v.Right = append(_v.Right, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["picangle"].([]interface{}); !_ok_ { err = errors.New("picangle error"); return }
_v.Picangle = 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.Picangle = append(_v.Picangle, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) }
return
}
func DeserializeGameUnblankingData(_buf map[string]interface{}) (*GameUnblankingData, error) {
v := &GameUnblankingData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -290,8 +290,14 @@ type Tables struct {
PuggsyFight *GamePuggsyFight PuggsyFight *GamePuggsyFight
PuggsyScore *GamePuggsyScore PuggsyScore *GamePuggsyScore
PuggsySkill *GamePuggsySkill PuggsySkill *GamePuggsySkill
PuggsyPasscheck *GamePuggsyPasscheck
Catchrabbit *GameCatchrabbit Catchrabbit *GameCatchrabbit
PuggsyPassCheck *GamePuggsyPassCheck Unblanking *GameUnblanking
CatchbugSset *GameCatchbugSset
CatchbugStage *GameCatchbugStage
CatchbugReward *GameCatchbugReward
CatchbugLllustrated *GameCatchbugLllustrated
CatchbugSkill *GameCatchbugSkill
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -1973,16 +1979,52 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.PuggsySkill, err = NewGamePuggsySkill(buf) ; err != nil { if tables.PuggsySkill, err = NewGamePuggsySkill(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_puggsypasscheck") ; err != nil {
return nil, err
}
if tables.PuggsyPasscheck, err = NewGamePuggsyPasscheck(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_catchrabbit") ; err != nil { if buf, err = loader("game_catchrabbit") ; err != nil {
return nil, err return nil, err
} }
if tables.Catchrabbit, err = NewGameCatchrabbit(buf) ; err != nil { if tables.Catchrabbit, err = NewGameCatchrabbit(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_puggsypasscheck") ; err != nil { if buf, err = loader("game_unblanking") ; err != nil {
return nil, err return nil, err
} }
if tables.PuggsyPassCheck, err = NewGamePuggsyPassCheck(buf) ; err != nil { if tables.Unblanking, err = NewGameUnblanking(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_catchbugsset") ; err != nil {
return nil, err
}
if tables.CatchbugSset, err = NewGameCatchbugSset(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_catchbugstage") ; err != nil {
return nil, err
}
if tables.CatchbugStage, err = NewGameCatchbugStage(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_catchbugreward") ; err != nil {
return nil, err
}
if tables.CatchbugReward, err = NewGameCatchbugReward(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_catchbuglllustrated") ; err != nil {
return nil, err
}
if tables.CatchbugLllustrated, err = NewGameCatchbugLllustrated(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_catchbugskill") ; err != nil {
return nil, err
}
if tables.CatchbugSkill, err = NewGameCatchbugSkill(buf) ; err != nil {
return nil, err return nil, err
} }
return tables, nil return tables, nil

View File

@ -25,6 +25,7 @@ type GameHeroData struct {
Prefab string Prefab string
Rotation string Rotation string
Revolve int32 Revolve int32
Scale []float32
Icon string Icon string
Vocal string Vocal string
Tujing []int32 Tujing []int32
@ -74,6 +75,20 @@ func (_v *GameHeroData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; if _v.Prefab, _ok_ = _buf["prefab"].(string); !_ok_ { err = errors.New("prefab error"); return } } { var _ok_ bool; if _v.Prefab, _ok_ = _buf["prefab"].(string); !_ok_ { err = errors.New("prefab error"); return } }
{ var _ok_ bool; if _v.Rotation, _ok_ = _buf["rotation"].(string); !_ok_ { err = errors.New("rotation error"); return } } { var _ok_ bool; if _v.Rotation, _ok_ = _buf["rotation"].(string); !_ok_ { err = errors.New("rotation error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["revolve"].(float64); !_ok_ { err = errors.New("revolve error"); return }; _v.Revolve = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["revolve"].(float64); !_ok_ { err = errors.New("revolve error"); return }; _v.Revolve = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["scale"].([]interface{}); !_ok_ { err = errors.New("scale error"); return }
_v.Scale = make([]float32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ float32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = float32(_x_) }
_v.Scale = append(_v.Scale, _list_v_)
}
}
{ 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 } }
{ var _ok_ bool; if _v.Vocal, _ok_ = _buf["vocal"].(string); !_ok_ { err = errors.New("vocal error"); return } } { var _ok_ bool; if _v.Vocal, _ok_ = _buf["vocal"].(string); !_ok_ { err = errors.New("vocal error"); return } }
{ {