Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
0ed81a543b
@ -30,8 +30,8 @@
|
|||||||
{
|
{
|
||||||
"num": 5,
|
"num": 5,
|
||||||
"distance": 30,
|
"distance": 30,
|
||||||
"value": 0,
|
"value": 1,
|
||||||
"energy": 0,
|
"energy": 5,
|
||||||
"matchvalue": 0
|
"matchvalue": 1
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -18,7 +18,7 @@
|
|||||||
{
|
{
|
||||||
"id": 100003,
|
"id": 100003,
|
||||||
"track": "Track",
|
"track": "Track",
|
||||||
"type": 1,
|
"type": 0,
|
||||||
"startPos": 3,
|
"startPos": 3,
|
||||||
"endPos": 4,
|
"endPos": 4,
|
||||||
"local": 2
|
"local": 2
|
||||||
@ -26,7 +26,7 @@
|
|||||||
{
|
{
|
||||||
"id": 100004,
|
"id": 100004,
|
||||||
"track": "Track",
|
"track": "Track",
|
||||||
"type": 0,
|
"type": 1,
|
||||||
"startPos": 4,
|
"startPos": 4,
|
||||||
"endPos": 5,
|
"endPos": 5,
|
||||||
"local": 0
|
"local": 0
|
||||||
@ -35,8 +35,88 @@
|
|||||||
"id": 100005,
|
"id": 100005,
|
||||||
"track": "Track",
|
"track": "Track",
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"startPos": 5,
|
"startPos": 8,
|
||||||
"endPos": 6,
|
"endPos": 9,
|
||||||
|
"local": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100006,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 0,
|
||||||
|
"startPos": 8,
|
||||||
|
"endPos": 9,
|
||||||
|
"local": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100007,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 0,
|
||||||
|
"startPos": 10,
|
||||||
|
"endPos": 11,
|
||||||
|
"local": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100008,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 1,
|
||||||
|
"startPos": 10,
|
||||||
|
"endPos": 11,
|
||||||
"local": 1
|
"local": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100009,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 0,
|
||||||
|
"startPos": 14,
|
||||||
|
"endPos": 15,
|
||||||
|
"local": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100010,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 1,
|
||||||
|
"startPos": 14,
|
||||||
|
"endPos": 15,
|
||||||
|
"local": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100011,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 0,
|
||||||
|
"startPos": 15,
|
||||||
|
"endPos": 16,
|
||||||
|
"local": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100012,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 0,
|
||||||
|
"startPos": 19,
|
||||||
|
"endPos": 20,
|
||||||
|
"local": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100013,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 0,
|
||||||
|
"startPos": 20,
|
||||||
|
"endPos": 21,
|
||||||
|
"local": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100014,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 0,
|
||||||
|
"startPos": 22,
|
||||||
|
"endPos": 23,
|
||||||
|
"local": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100015,
|
||||||
|
"track": "Track",
|
||||||
|
"type": 1,
|
||||||
|
"startPos": 22,
|
||||||
|
"endPos": 23,
|
||||||
|
"local": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -875,6 +875,7 @@
|
|||||||
2
|
2
|
||||||
],
|
],
|
||||||
"consume_pvp_time": 40,
|
"consume_pvp_time": 40,
|
||||||
"consume_pve_time": 60
|
"consume_pve_time": 60,
|
||||||
|
"consume_rounds": 5
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -19756,7 +19756,7 @@
|
|||||||
"reddottype": 0,
|
"reddottype": 0,
|
||||||
"effects": "",
|
"effects": "",
|
||||||
"modelName": "",
|
"modelName": "",
|
||||||
"box_id": 0,
|
"box_id": 18001004,
|
||||||
"synthetize_num": 0,
|
"synthetize_num": 0,
|
||||||
"synthetize_deplete": [],
|
"synthetize_deplete": [],
|
||||||
"synthetize_get": [],
|
"synthetize_get": [],
|
||||||
|
@ -98350,5 +98350,77 @@
|
|||||||
"playerlvmin": 0,
|
"playerlvmin": 0,
|
||||||
"playerlvmax": 0,
|
"playerlvmax": 0,
|
||||||
"notice": 0
|
"notice": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4099,
|
||||||
|
"lotteryid": 18001004,
|
||||||
|
"description": "三种族招募卡自选箱",
|
||||||
|
"type": 3,
|
||||||
|
"groupwt": 1000,
|
||||||
|
"groupid": 11050,
|
||||||
|
"subtype": 1,
|
||||||
|
"groupnum": 1,
|
||||||
|
"itemid": {
|
||||||
|
"a": "iiem",
|
||||||
|
"t": "10000021",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
"itemdes": "烈焰圣桃枝",
|
||||||
|
"itemwt": 1000,
|
||||||
|
"min": 1,
|
||||||
|
"max": 1,
|
||||||
|
"VIPmin": 0,
|
||||||
|
"VIPmax": 15,
|
||||||
|
"playerlvmin": 0,
|
||||||
|
"playerlvmax": 0,
|
||||||
|
"notice": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4100,
|
||||||
|
"lotteryid": 18001004,
|
||||||
|
"description": "三种族招募卡自选箱",
|
||||||
|
"type": 3,
|
||||||
|
"groupwt": 1000,
|
||||||
|
"groupid": 11050,
|
||||||
|
"subtype": 1,
|
||||||
|
"groupnum": 1,
|
||||||
|
"itemid": {
|
||||||
|
"a": "iiem",
|
||||||
|
"t": "10000022",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
"itemdes": "苍翠圣桃枝",
|
||||||
|
"itemwt": 1000,
|
||||||
|
"min": 1,
|
||||||
|
"max": 1,
|
||||||
|
"VIPmin": 0,
|
||||||
|
"VIPmax": 15,
|
||||||
|
"playerlvmin": 0,
|
||||||
|
"playerlvmax": 0,
|
||||||
|
"notice": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4101,
|
||||||
|
"lotteryid": 18001004,
|
||||||
|
"description": "三种族招募卡自选箱",
|
||||||
|
"type": 3,
|
||||||
|
"groupwt": 1000,
|
||||||
|
"groupid": 11050,
|
||||||
|
"subtype": 1,
|
||||||
|
"groupnum": 1,
|
||||||
|
"itemid": {
|
||||||
|
"a": "iiem",
|
||||||
|
"t": "10000023",
|
||||||
|
"n": 1
|
||||||
|
},
|
||||||
|
"itemdes": "寒霜圣桃枝",
|
||||||
|
"itemwt": 1000,
|
||||||
|
"min": 1,
|
||||||
|
"max": 1,
|
||||||
|
"VIPmin": 0,
|
||||||
|
"VIPmax": 15,
|
||||||
|
"playerlvmin": 0,
|
||||||
|
"playerlvmax": 0,
|
||||||
|
"notice": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -17207,7 +17207,7 @@
|
|||||||
"venturemodelspeed": 9,
|
"venturemodelspeed": 9,
|
||||||
"venturemodelscale": 1,
|
"venturemodelscale": 1,
|
||||||
"move_type": 0,
|
"move_type": 0,
|
||||||
"venturemodel": "Person/yacht/yacht.prefab",
|
"venturemodel": "Person/43002/43002_q.prefab",
|
||||||
"bubbletalk": {
|
"bubbletalk": {
|
||||||
"key": "",
|
"key": "",
|
||||||
"text": ""
|
"text": ""
|
||||||
@ -17315,12 +17315,85 @@
|
|||||||
{
|
{
|
||||||
"id": 1103002,
|
"id": 1103002,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100302,
|
"group_id": 1003011,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
100301
|
100301
|
||||||
],
|
],
|
||||||
"previoustage": 0,
|
"previoustage": 0,
|
||||||
"grouptype": [],
|
"grouptype": [],
|
||||||
|
"Episodetype": 5,
|
||||||
|
"stage_param": 10001,
|
||||||
|
"inherit": 0,
|
||||||
|
"battle_fail": 0,
|
||||||
|
"venturemodelspeed": 0,
|
||||||
|
"venturemodelscale": 1,
|
||||||
|
"move_type": 0,
|
||||||
|
"venturemodel": "Person/yacht/yacht.prefab",
|
||||||
|
"bubbletalk": {
|
||||||
|
"key": "",
|
||||||
|
"text": ""
|
||||||
|
},
|
||||||
|
"venturetype": 0,
|
||||||
|
"ventureavatar": [],
|
||||||
|
"scene_effect": [],
|
||||||
|
"scene_effectfilter": "",
|
||||||
|
"is_near": 0,
|
||||||
|
"openlevel": 1,
|
||||||
|
"EditorStage": 0,
|
||||||
|
"herocolor": 1,
|
||||||
|
"heroimg": "zxgq_qp_icon_gth",
|
||||||
|
"bubbletext": {
|
||||||
|
"key": "",
|
||||||
|
"text": ""
|
||||||
|
},
|
||||||
|
"animation": [],
|
||||||
|
"hide": 0,
|
||||||
|
"destroy": 1,
|
||||||
|
"progress": 1,
|
||||||
|
"stroyshow": 0,
|
||||||
|
"frontstoryid": 0,
|
||||||
|
"afterstoryid": 0,
|
||||||
|
"maingroupName": {
|
||||||
|
"key": "",
|
||||||
|
"text": ""
|
||||||
|
},
|
||||||
|
"mainlineName": {
|
||||||
|
"key": "",
|
||||||
|
"text": ""
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"key": "",
|
||||||
|
"text": ""
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"key": "",
|
||||||
|
"text": ""
|
||||||
|
},
|
||||||
|
"exp": 0,
|
||||||
|
"hero_exp": 0,
|
||||||
|
"ps_consume": [],
|
||||||
|
"ps_mg": [],
|
||||||
|
"firstaward": [],
|
||||||
|
"lotteryward": 0,
|
||||||
|
"commonaward": [],
|
||||||
|
"BattleReadyID": 0,
|
||||||
|
"FormatList": [],
|
||||||
|
"helphero": [],
|
||||||
|
"banhero": [],
|
||||||
|
"star": [],
|
||||||
|
"star_type": [],
|
||||||
|
"star_value": [],
|
||||||
|
"challengeward": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1103003,
|
||||||
|
"chapterid": 11003,
|
||||||
|
"group_id": 100302,
|
||||||
|
"previous_group_id": [
|
||||||
|
1003011
|
||||||
|
],
|
||||||
|
"previoustage": 0,
|
||||||
|
"grouptype": [],
|
||||||
"Episodetype": 1,
|
"Episodetype": 1,
|
||||||
"stage_param": 0,
|
"stage_param": 0,
|
||||||
"inherit": 0,
|
"inherit": 0,
|
||||||
@ -17434,7 +17507,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103003,
|
"id": 1103004,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100303,
|
"group_id": 100303,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -17555,7 +17628,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103004,
|
"id": 1103005,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100304,
|
"group_id": 100304,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -17676,7 +17749,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103005,
|
"id": 1103006,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100305,
|
"group_id": 100305,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -17755,7 +17828,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103006,
|
"id": 1103007,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100306,
|
"group_id": 100306,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -17834,7 +17907,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103007,
|
"id": 1103008,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100307,
|
"group_id": 100307,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -17955,7 +18028,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103008,
|
"id": 1103009,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100308,
|
"group_id": 100308,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -18076,7 +18149,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103009,
|
"id": 1103010,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100309,
|
"group_id": 100309,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -18155,7 +18228,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103010,
|
"id": 1103011,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100310,
|
"group_id": 100310,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -18276,7 +18349,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103011,
|
"id": 1103012,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100311,
|
"group_id": 100311,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
@ -18397,7 +18470,7 @@
|
|||||||
"challengeward": 0
|
"challengeward": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1103012,
|
"id": 1103013,
|
||||||
"chapterid": 11003,
|
"chapterid": 11003,
|
||||||
"group_id": 100312,
|
"group_id": 100312,
|
||||||
"previous_group_id": [
|
"previous_group_id": [
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"name": {
|
"name": {
|
||||||
"key": "guild_guild_boss_score_name_1",
|
"key": "push_gift_name_1",
|
||||||
"text": "英雄特惠礼包"
|
"text": "英雄特惠礼包"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
@ -30,7 +30,7 @@
|
|||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"name": {
|
"name": {
|
||||||
"key": "guild_guild_boss_score_name_2",
|
"key": "push_gift_name_2",
|
||||||
"text": "充值礼包"
|
"text": "充值礼包"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
@ -58,7 +58,7 @@
|
|||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"name": {
|
"name": {
|
||||||
"key": "guild_guild_boss_score_name_3",
|
"key": "push_gift_name_3",
|
||||||
"text": "月卡礼包"
|
"text": "月卡礼包"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
@ -86,7 +86,7 @@
|
|||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"name": {
|
"name": {
|
||||||
"key": "guild_guild_boss_score_name_4",
|
"key": "push_gift_name_4",
|
||||||
"text": "累充礼包"
|
"text": "累充礼包"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
@ -114,7 +114,7 @@
|
|||||||
{
|
{
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"name": {
|
"name": {
|
||||||
"key": "guild_guild_boss_score_name_5",
|
"key": "push_gift_name_5",
|
||||||
"text": "登陆礼包"
|
"text": "登陆礼包"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
@ -142,7 +142,7 @@
|
|||||||
{
|
{
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"name": {
|
"name": {
|
||||||
"key": "guild_guild_boss_score_name_6",
|
"key": "push_gift_name_6",
|
||||||
"text": "循环塔礼包"
|
"text": "循环塔礼包"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
@ -170,7 +170,7 @@
|
|||||||
{
|
{
|
||||||
"id": 7,
|
"id": 7,
|
||||||
"name": {
|
"name": {
|
||||||
"key": "guild_guild_boss_score_name_7",
|
"key": "push_gift_name_7",
|
||||||
"text": "种族塔礼包"
|
"text": "种族塔礼包"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
],
|
],
|
||||||
"txt": {
|
"txt": {
|
||||||
"key": "title_title_txt_02",
|
"key": "title_title_txt_02",
|
||||||
"text": "只有最强公会才配得上的称号。"
|
"text": "寻宝学徒"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -47,7 +47,7 @@
|
|||||||
],
|
],
|
||||||
"txt": {
|
"txt": {
|
||||||
"key": "title_title_txt_03",
|
"key": "title_title_txt_03",
|
||||||
"text": "只有最强公会才配得上的称号。"
|
"text": "泰坦驾驭者"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -64,7 +64,7 @@
|
|||||||
],
|
],
|
||||||
"txt": {
|
"txt": {
|
||||||
"key": "title_title_txt_04",
|
"key": "title_title_txt_04",
|
||||||
"text": "只有最强公会才配得上的称号。"
|
"text": "龙之气息"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -81,7 +81,7 @@
|
|||||||
],
|
],
|
||||||
"txt": {
|
"txt": {
|
||||||
"key": "title_title_txt_05",
|
"key": "title_title_txt_05",
|
||||||
"text": "只有最强公会才配得上的称号。"
|
"text": "恐惧驱散者"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -12,9 +12,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxPs = 2 // 最大体力
|
MaxPs = 2 // 最大体力
|
||||||
MaxRound = 7 // 最大回合数
|
//MaxRound = 7 // 最大回合数
|
||||||
MaxTime = 1800 // 游戏操作时间
|
MaxTime = 1800 // 游戏操作时间
|
||||||
// AITime = 4 // AI延迟操作时间操作时间 随机+-3
|
// AITime = 4 // AI延迟操作时间操作时间 随机+-3
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ type Room struct {
|
|||||||
//aiTimer *timewheel.Task //AI操作随机做个延时
|
//aiTimer *timewheel.Task //AI操作随机做个延时
|
||||||
curPower string // 当前操作的玩家
|
curPower string // 当前操作的玩家
|
||||||
NexPower string // 下一个操作的玩家
|
NexPower string // 下一个操作的玩家
|
||||||
|
MaxRound int32
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
|
func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
|
||||||
@ -77,13 +78,14 @@ func (this *Room) operateTimeOut(task *timewheel.Task, args ...interface{}) {
|
|||||||
}
|
}
|
||||||
// 变更权限
|
// 变更权限
|
||||||
this.curPower = this.NexPower
|
this.curPower = this.NexPower
|
||||||
if this.round > MaxRound { // 游戏结束
|
if this.round > this.MaxRound { // 游戏结束
|
||||||
this.GameOver()
|
this.GameOver()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Room) InitRoom(module *Entertainment, s1 comm.IUserSession, s2 comm.IUserSession, p1 *pb.PlayerData, p2 *pb.PlayerData) *Room {
|
func (this *Room) InitRoom(module *Entertainment, s1 comm.IUserSession, s2 comm.IUserSession, p1 *pb.PlayerData, p2 *pb.PlayerData) *Room {
|
||||||
|
|
||||||
this.chessboard = new(MapData)
|
this.chessboard = new(MapData)
|
||||||
this.chessboard.InitMap(module) // 初始化棋盘
|
this.chessboard.InitMap(module) // 初始化棋盘
|
||||||
|
|
||||||
@ -91,7 +93,7 @@ func (this *Room) InitRoom(module *Entertainment, s1 comm.IUserSession, s2 comm.
|
|||||||
if p2.Uid != "999" { // 是否是机器人
|
if p2.Uid != "999" { // 是否是机器人
|
||||||
this.szSession = append(this.szSession, s2.Clone())
|
this.szSession = append(this.szSession, s2.Clone())
|
||||||
}
|
}
|
||||||
|
this.MaxRound = this.module.ModuleTools.GetGlobalConf().ConsumeRounds
|
||||||
return &Room{
|
return &Room{
|
||||||
ModuleBase: modules.ModuleBase{},
|
ModuleBase: modules.ModuleBase{},
|
||||||
Id: primitive.NewObjectID().Hex(),
|
Id: primitive.NewObjectID().Hex(),
|
||||||
@ -144,7 +146,7 @@ func (this *Room) AiOperator() {
|
|||||||
}, this.szSession...); err != nil {
|
}, this.szSession...); err != nil {
|
||||||
this.Errorln(err)
|
this.Errorln(err)
|
||||||
}
|
}
|
||||||
if this.round > MaxRound { // 游戏结束
|
if this.round > this.MaxRound { // 游戏结束
|
||||||
this.GameOver()
|
this.GameOver()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -162,6 +164,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
AIOperator bool
|
AIOperator bool
|
||||||
oid1 int32 // 唯一id
|
oid1 int32 // 唯一id
|
||||||
oid2 int32
|
oid2 int32
|
||||||
|
color int32 // 校验消除的颜色
|
||||||
)
|
)
|
||||||
var szMap []*pb.MapData
|
var szMap []*pb.MapData
|
||||||
req := msg.(*pb.EntertainOperatorReq)
|
req := msg.(*pb.EntertainOperatorReq)
|
||||||
@ -184,7 +187,12 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if score, m, _ := this.chessboard.CheckMap(1); score > 0 {
|
if this.curPower == this.player1.Uid {
|
||||||
|
color = 1
|
||||||
|
} else {
|
||||||
|
color = 2
|
||||||
|
}
|
||||||
|
if score, m := this.chessboard.CheckMap(color); score > 0 {
|
||||||
curScore += score
|
curScore += score
|
||||||
szMap = append(szMap, m...)
|
szMap = append(szMap, m...)
|
||||||
} else { // 不能消除
|
} else { // 不能消除
|
||||||
@ -199,24 +207,42 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
if this.curPower == this.player1.Uid { //权限校验
|
if this.curPower == this.player1.Uid { //权限校验
|
||||||
this.player1.Score += curScore
|
this.player1.Score += curScore
|
||||||
this.player1.Ps--
|
this.player1.Ps--
|
||||||
if this.player1.Ps <= 0 { // 权限给下一个人
|
if curScore >= 4 {
|
||||||
this.NexPower = this.player2.Uid
|
this.player1.Ps++
|
||||||
if len(this.szSession) == 1 { // 校验2号玩家是不是AI
|
if this.player1.Ps > MaxPs {
|
||||||
AIOperator = true
|
this.player1.Ps = MaxPs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.player2.Ps = MaxPs
|
this.player2.Ps = MaxPs
|
||||||
} else if this.curPower == this.player2.Uid {
|
} else { // this.curPower == this.player2.Uid
|
||||||
this.player2.Score += curScore
|
this.player2.Score += curScore
|
||||||
this.player2.Ps--
|
this.player2.Ps--
|
||||||
if this.player2.Ps <= 0 { // 权限给下一个人
|
if curScore >= 4 {
|
||||||
this.NexPower = this.player1.Uid
|
this.player2.Ps++
|
||||||
|
if this.player2.Ps > MaxPs {
|
||||||
|
this.player2.Ps = MaxPs
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.player1.Ps = MaxPs
|
this.player1.Ps = MaxPs
|
||||||
} else { // err 未知权限
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
for _, v := range szMap { //
|
||||||
|
if v.Xgrid >= 4 {
|
||||||
|
if color == 1 {
|
||||||
|
this.player1.Energy += v.Xgrid
|
||||||
|
} else {
|
||||||
|
this.player2.Energy += v.Xgrid
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if this.player1.Ps <= 0 { // 权限给下一个人
|
||||||
|
this.NexPower = this.player2.Uid
|
||||||
|
if len(this.szSession) == 1 { // 校验2号玩家是不是AI
|
||||||
|
AIOperator = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if this.player2.Ps <= 0 { // 权限给下一个人
|
||||||
|
this.NexPower = this.player1.Uid
|
||||||
|
}
|
||||||
if this.NexPower != this.curPower {
|
if this.NexPower != this.curPower {
|
||||||
this.round++
|
this.round++
|
||||||
if this.operatetimer != nil {
|
if this.operatetimer != nil {
|
||||||
@ -240,7 +266,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
}, this.szSession...); err != nil {
|
}, this.szSession...); err != nil {
|
||||||
this.Errorln(err)
|
this.Errorln(err)
|
||||||
}
|
}
|
||||||
if this.round > MaxRound { // 游戏结束
|
if this.round > this.MaxRound { // 游戏结束
|
||||||
this.GameOver()
|
this.GameOver()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -86,12 +86,12 @@ func (this *MapData) SwapGirde(oldId, newId int32) (bSwap bool) {
|
|||||||
func (this *MapData) SetMap() {
|
func (this *MapData) SetMap() {
|
||||||
sz2 := []int32{
|
sz2 := []int32{
|
||||||
5, 1, 2, 5, 1, 5, 2,
|
5, 1, 2, 5, 1, 5, 2,
|
||||||
5, 1, 5, 4, 2, 4, 4,
|
5, 2, 3, 1, 2, 4, 4,
|
||||||
4, 5, 5, 1, 6, 4, 1,
|
4, 1, 1, 3, 6, 4, 1,
|
||||||
6, 3, 1, 4, 3, 6, 3,
|
1, 3, 1, 4, 3, 6, 3,
|
||||||
6, 1, 3, 5, 1, 6, 1,
|
1, 3, 3, 5, 1, 6, 1,
|
||||||
5, 6, 5, 5, 1, 3, 1,
|
5, 1, 5, 5, 1, 3, 1,
|
||||||
6, 1, 5, 1, 2, 1, 4,
|
1, 1, 5, 1, 2, 1, 4,
|
||||||
}
|
}
|
||||||
var pos int
|
var pos int
|
||||||
for index := Width - 1; index >= 0; index-- {
|
for index := Width - 1; index >= 0; index-- {
|
||||||
@ -439,11 +439,11 @@ func (this *MapData) Check3X(color int32) (bEliminate bool, score int32, count i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 校验地图可消除的 判断各组上面2个和右边两个是否三个相等
|
// 校验地图可消除的 判断各组上面2个和右边两个是否三个相等
|
||||||
func (this *MapData) CheckMap(color int32) (score int32, szMap []*pb.MapData, count int32) {
|
func (this *MapData) CheckMap(color int32) (score int32, szMap []*pb.MapData) {
|
||||||
var curScore int32
|
var curScore int32
|
||||||
for {
|
for {
|
||||||
curScore = 0
|
curScore = 0
|
||||||
|
var count int32
|
||||||
if bRet, s, c := this.Check5X(color); bRet {
|
if bRet, s, c := this.Check5X(color); bRet {
|
||||||
fmt.Printf("=====检测消除5x===========\n")
|
fmt.Printf("=====检测消除5x===========\n")
|
||||||
curScore += s
|
curScore += s
|
||||||
@ -466,6 +466,7 @@ func (this *MapData) CheckMap(color int32) (score int32, szMap []*pb.MapData, co
|
|||||||
szMap = append(szMap, &pb.MapData{
|
szMap = append(szMap, &pb.MapData{
|
||||||
Data: this.Plat,
|
Data: this.Plat,
|
||||||
CurSocre: curScore,
|
CurSocre: curScore,
|
||||||
|
Xgrid: count,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 检查掉落
|
// 检查掉落
|
||||||
@ -516,7 +517,7 @@ func (this *MapData) AiSwapGirde() (bSwap bool, szMap []*pb.MapData, oid1 int32,
|
|||||||
if b := this.SwapGirde(int32(pos), int32(pos+1)); b {
|
if b := this.SwapGirde(int32(pos), int32(pos+1)); b {
|
||||||
oid1 = this.Plat[pos+1].Oid
|
oid1 = this.Plat[pos+1].Oid
|
||||||
oid2 = this.Plat[pos].Oid
|
oid2 = this.Plat[pos].Oid
|
||||||
if s, m, _ := this.CheckMap(2); s == 0 {
|
if s, m := this.CheckMap(2); s == 0 {
|
||||||
this.SwapGirde(int32(pos+1), int32(pos))
|
this.SwapGirde(int32(pos+1), int32(pos))
|
||||||
this.operElem = []int32{}
|
this.operElem = []int32{}
|
||||||
oid1 = 0
|
oid1 = 0
|
||||||
@ -532,7 +533,7 @@ func (this *MapData) AiSwapGirde() (bSwap bool, szMap []*pb.MapData, oid1 int32,
|
|||||||
if b := this.SwapGirde(int32(pos), int32(pos+Width)); b {
|
if b := this.SwapGirde(int32(pos), int32(pos+Width)); b {
|
||||||
oid1 = this.Plat[pos+Width].Oid
|
oid1 = this.Plat[pos+Width].Oid
|
||||||
oid2 = this.Plat[pos].Oid
|
oid2 = this.Plat[pos].Oid
|
||||||
if s, m, _ := this.CheckMap(2); s == 0 {
|
if s, m := this.CheckMap(2); s == 0 {
|
||||||
this.SwapGirde(int32(pos+Width), int32(pos))
|
this.SwapGirde(int32(pos+Width), int32(pos))
|
||||||
this.operElem = []int32{}
|
this.operElem = []int32{}
|
||||||
oid1 = 0
|
oid1 = 0
|
||||||
|
@ -95,7 +95,7 @@ func Test_Main(t *testing.T) {
|
|||||||
|
|
||||||
m.DropGirde()
|
m.DropGirde()
|
||||||
|
|
||||||
if score, m, _ := m.CheckMap(1); score > 0 {
|
if score, m := m.CheckMap(1); score > 0 {
|
||||||
|
|
||||||
szMap = append(szMap, m...)
|
szMap = append(szMap, m...)
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ type MapData struct {
|
|||||||
|
|
||||||
Data []*GirdeData `protobuf:"bytes,1,rep,name=data,proto3" json:"data"` // 地图数据
|
Data []*GirdeData `protobuf:"bytes,1,rep,name=data,proto3" json:"data"` // 地图数据
|
||||||
CurSocre int32 `protobuf:"varint,2,opt,name=curSocre,proto3" json:"curSocre"` // 本轮得分
|
CurSocre int32 `protobuf:"varint,2,opt,name=curSocre,proto3" json:"curSocre"` // 本轮得分
|
||||||
|
Xgrid int32 `protobuf:"varint,3,opt,name=xgrid,proto3" json:"xgrid"` // 本次掉落消除的格子(客户端不用)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MapData) Reset() {
|
func (x *MapData) Reset() {
|
||||||
@ -76,6 +77,13 @@ func (x *MapData) GetCurSocre() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *MapData) GetXgrid() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Xgrid
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
// 消消乐
|
// 消消乐
|
||||||
type GirdeData struct {
|
type GirdeData struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -162,10 +170,11 @@ type PlayerData struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
|
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
|
||||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` // 昵称
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` // 昵称
|
||||||
Score int32 `protobuf:"varint,3,opt,name=score,proto3" json:"score"` // 积分
|
Score int32 `protobuf:"varint,3,opt,name=score,proto3" json:"score"` // 积分
|
||||||
Ps int32 `protobuf:"varint,4,opt,name=ps,proto3" json:"ps"` // 体力
|
Ps int32 `protobuf:"varint,4,opt,name=ps,proto3" json:"ps"` // 体力
|
||||||
Cardid string `protobuf:"bytes,5,opt,name=cardid,proto3" json:"cardid"` // 出战的英雄卡
|
Cardid string `protobuf:"bytes,5,opt,name=cardid,proto3" json:"cardid"` // 出战的英雄卡
|
||||||
|
Energy int32 `protobuf:"varint,6,opt,name=energy,proto3" json:"energy"` // 能量进度
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PlayerData) Reset() {
|
func (x *PlayerData) Reset() {
|
||||||
@ -235,31 +244,41 @@ func (x *PlayerData) GetCardid() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *PlayerData) GetEnergy() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Energy
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_entertain_entertain_db_proto protoreflect.FileDescriptor
|
var File_entertain_entertain_db_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_entertain_entertain_db_proto_rawDesc = []byte{
|
var file_entertain_entertain_db_proto_rawDesc = []byte{
|
||||||
0x0a, 0x1c, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x6e, 0x74, 0x65,
|
0x0a, 0x1c, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x2f, 0x65, 0x6e, 0x74, 0x65,
|
||||||
0x72, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45,
|
0x72, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b,
|
||||||
0x0a, 0x07, 0x4d, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74,
|
0x0a, 0x07, 0x4d, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74,
|
||||||
0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x47, 0x69, 0x72, 0x64, 0x65, 0x44,
|
0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x47, 0x69, 0x72, 0x64, 0x65, 0x44,
|
||||||
0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72,
|
0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72,
|
||||||
0x53, 0x6f, 0x63, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x75, 0x72,
|
0x53, 0x6f, 0x63, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x75, 0x72,
|
||||||
0x53, 0x6f, 0x63, 0x72, 0x65, 0x22, 0x75, 0x0a, 0x09, 0x47, 0x69, 0x72, 0x64, 0x65, 0x44, 0x61,
|
0x53, 0x6f, 0x63, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x78, 0x67, 0x72, 0x69, 0x64, 0x18, 0x03,
|
||||||
0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x78, 0x67, 0x72, 0x69, 0x64, 0x22, 0x75, 0x0a, 0x09, 0x47,
|
||||||
0x03, 0x6f, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20,
|
0x69, 0x72, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69,
|
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
|
||||||
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72,
|
||||||
0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f,
|
0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x63,
|
||||||
0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x18, 0x05, 0x20,
|
0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x22, 0x70, 0x0a, 0x0a,
|
0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x70, 0x65, 0x63,
|
||||||
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
0x69, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x70, 0x65, 0x63, 0x69,
|
||||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
0x61, 0x6c, 0x22, 0x88, 0x01, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01,
|
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65,
|
||||||
0x28, 0x05, 0x52, 0x02, 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x72, 0x64, 0x69, 0x64,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x0e, 0x0a,
|
||||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x72, 0x64, 0x69, 0x64, 0x42, 0x06,
|
0x02, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x70, 0x73, 0x12, 0x16, 0x0a,
|
||||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x06, 0x63, 0x61, 0x72, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63,
|
||||||
|
0x61, 0x72, 0x64, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18,
|
||||||
|
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x42, 0x06, 0x5a,
|
||||||
|
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -299,6 +299,7 @@ type GameGlobalData struct {
|
|||||||
Consumeblock []int32
|
Consumeblock []int32
|
||||||
ConsumePvpTime int32
|
ConsumePvpTime int32
|
||||||
ConsumePveTime int32
|
ConsumePveTime int32
|
||||||
|
ConsumeRounds int32
|
||||||
}
|
}
|
||||||
|
|
||||||
const TypeId_GameGlobalData = 477542761
|
const TypeId_GameGlobalData = 477542761
|
||||||
@ -1181,6 +1182,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
|
|||||||
|
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["consume_pvp_time"].(float64); !_ok_ { err = errors.New("consume_pvp_time error"); return }; _v.ConsumePvpTime = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["consume_pvp_time"].(float64); !_ok_ { err = errors.New("consume_pvp_time error"); return }; _v.ConsumePvpTime = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["consume_pve_time"].(float64); !_ok_ { err = errors.New("consume_pve_time error"); return }; _v.ConsumePveTime = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["consume_pve_time"].(float64); !_ok_ { err = errors.New("consume_pve_time error"); return }; _v.ConsumePveTime = int32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["consume_rounds"].(float64); !_ok_ { err = errors.New("consume_rounds error"); return }; _v.ConsumeRounds = int32(_tempNum_) }
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user