上传代码
This commit is contained in:
parent
5647f0273b
commit
815426f20c
86
bin/json/game_guildboss.json
Normal file
86
bin/json/game_guildboss.json
Normal file
@ -0,0 +1,86 @@
|
||||
[
|
||||
{
|
||||
"boss_id": 50000001,
|
||||
"group": 1,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_1",
|
||||
"text": "希卡普"
|
||||
},
|
||||
"boss_lv": 1,
|
||||
"hp": 10,
|
||||
"BattleReadyID": 121,
|
||||
"boss_img": 11009,
|
||||
"kill_reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "guildcoin",
|
||||
"n": 50
|
||||
}
|
||||
],
|
||||
"boss": [
|
||||
301013
|
||||
],
|
||||
"score": 1,
|
||||
"buff": 50000001,
|
||||
"boss_des": {
|
||||
"key": "guild_guild_boss_boss_name_1",
|
||||
"text": "大家集中火力,优先攻打希卡普"
|
||||
}
|
||||
},
|
||||
{
|
||||
"boss_id": 50000002,
|
||||
"group": 1,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_2",
|
||||
"text": "波比"
|
||||
},
|
||||
"boss_lv": 1,
|
||||
"hp": 10,
|
||||
"BattleReadyID": 121,
|
||||
"boss_img": 11009,
|
||||
"kill_reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "guildcoin",
|
||||
"n": 50
|
||||
}
|
||||
],
|
||||
"boss": [
|
||||
301016
|
||||
],
|
||||
"score": 1,
|
||||
"buff": 50000002,
|
||||
"boss_des": {
|
||||
"key": "guild_guild_boss_boss_name_2",
|
||||
"text": "大家集中火力,优先攻打希卡普"
|
||||
}
|
||||
},
|
||||
{
|
||||
"boss_id": 50000003,
|
||||
"group": 1,
|
||||
"boss_name": {
|
||||
"key": "guild_guild_boss_boss_name_3",
|
||||
"text": "阿宝"
|
||||
},
|
||||
"boss_lv": 1,
|
||||
"hp": 10,
|
||||
"BattleReadyID": 121,
|
||||
"boss_img": 11009,
|
||||
"kill_reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "guildcoin",
|
||||
"n": 50
|
||||
}
|
||||
],
|
||||
"boss": [
|
||||
301019
|
||||
],
|
||||
"score": 1,
|
||||
"buff": 50000003,
|
||||
"boss_des": {
|
||||
"key": "guild_guild_boss_boss_name_3",
|
||||
"text": "大家集中火力,优先攻打希卡普"
|
||||
}
|
||||
}
|
||||
]
|
178
bin/json/game_guildbossrank.json
Normal file
178
bin/json/game_guildbossrank.json
Normal file
@ -0,0 +1,178 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"rank_low": 1,
|
||||
"rank_up": 1,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_1",
|
||||
"text": "1-1名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"rank_low": 2,
|
||||
"rank_up": 2,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_2",
|
||||
"text": "2-2名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"rank_low": 3,
|
||||
"rank_up": 3,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_3",
|
||||
"text": "3-3名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"rank_low": 4,
|
||||
"rank_up": 10,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_4",
|
||||
"text": "4-10名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"rank_low": 11,
|
||||
"rank_up": 20,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_5",
|
||||
"text": "11-20名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"rank_low": 21,
|
||||
"rank_up": 50,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_6",
|
||||
"text": "21-50名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"rank_low": 51,
|
||||
"rank_up": 100,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_7",
|
||||
"text": "51-100名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"rank_low": 101,
|
||||
"rank_up": 300,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_8",
|
||||
"text": "101-300名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"rank_low": 301,
|
||||
"rank_up": 1000,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_9",
|
||||
"text": "301-1000名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"rank_low": 1001,
|
||||
"rank_up": 2000,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_10",
|
||||
"text": "1001-2000名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"rank_low": 2001,
|
||||
"rank_up": 99999999,
|
||||
"rank_display": {
|
||||
"key": "arena_rank_reward_rank_display_11",
|
||||
"text": "2001-99999999名"
|
||||
},
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
146
bin/json/game_guildbossroulette.json
Normal file
146
bin/json/game_guildbossroulette.json
Normal file
@ -0,0 +1,146 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1003
|
||||
}
|
||||
],
|
||||
"weight": 1,
|
||||
"need": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1004
|
||||
}
|
||||
],
|
||||
"weight": 1,
|
||||
"need": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1001
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1005
|
||||
}
|
||||
],
|
||||
"weight": 1,
|
||||
"need": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1002
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1006
|
||||
}
|
||||
],
|
||||
"weight": 1,
|
||||
"need": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1003
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1007
|
||||
}
|
||||
],
|
||||
"weight": 1,
|
||||
"need": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1004
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1008
|
||||
}
|
||||
],
|
||||
"weight": 1,
|
||||
"need": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1005
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1009
|
||||
}
|
||||
],
|
||||
"weight": 1,
|
||||
"need": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1006
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1010
|
||||
}
|
||||
],
|
||||
"weight": 1,
|
||||
"need": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "arenacoin",
|
||||
"n": 1007
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
132
bin/json/game_guildbossscore.json
Normal file
132
bin/json/game_guildbossscore.json
Normal file
@ -0,0 +1,132 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_1",
|
||||
"text": "sss"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 0,
|
||||
"rank_up": 1500000,
|
||||
"hp": 10,
|
||||
"drop": 10001001,
|
||||
"grade": "png1"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_2",
|
||||
"text": "ss"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 1500001,
|
||||
"rank_up": 3000000,
|
||||
"hp": 10,
|
||||
"drop": 10001002,
|
||||
"grade": "png2"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_3",
|
||||
"text": "s"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 3000001,
|
||||
"rank_up": 4500000,
|
||||
"hp": 10,
|
||||
"drop": 10001003,
|
||||
"grade": "png3"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_4",
|
||||
"text": "s"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 4500001,
|
||||
"rank_up": 6000000,
|
||||
"hp": 10,
|
||||
"drop": 10001003,
|
||||
"grade": "png4"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_5",
|
||||
"text": "s"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 6000001,
|
||||
"rank_up": 9000000,
|
||||
"hp": 10,
|
||||
"drop": 10001003,
|
||||
"grade": "png5"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_6",
|
||||
"text": "s"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 9000001,
|
||||
"rank_up": 12000000,
|
||||
"hp": 10,
|
||||
"drop": 10001003,
|
||||
"grade": "png6"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_7",
|
||||
"text": "s"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 12000001,
|
||||
"rank_up": 15000000,
|
||||
"hp": 10,
|
||||
"drop": 10001003,
|
||||
"grade": "png7"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_8",
|
||||
"text": "s"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 15000001,
|
||||
"rank_up": 18000000,
|
||||
"hp": 10,
|
||||
"drop": 10001003,
|
||||
"grade": "png8"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_9",
|
||||
"text": "s"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 18000001,
|
||||
"rank_up": 21000000,
|
||||
"hp": 10,
|
||||
"drop": 10001003,
|
||||
"grade": "png9"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"score_name": {
|
||||
"key": "guild_guild_boss_score_name_10",
|
||||
"text": "s"
|
||||
},
|
||||
"score": 1,
|
||||
"rank_low": 21000001,
|
||||
"rank_up": -1,
|
||||
"hp": 10,
|
||||
"drop": 10001003,
|
||||
"grade": "png10"
|
||||
}
|
||||
]
|
@ -1,152 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"score": 1500000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_1",
|
||||
"text": "总积分达到1500000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"score": 3000000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_2",
|
||||
"text": "总积分达到3000000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"score": 4500000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_3",
|
||||
"text": "总积分达到4500000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"score": 6000000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_4",
|
||||
"text": "总积分达到6000000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"score": 9000000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_5",
|
||||
"text": "总积分达到9000000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"score": 12000000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_6",
|
||||
"text": "总积分达到12000000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"score": 15000000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_7",
|
||||
"text": "总积分达到15000000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"score": 18000000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_8",
|
||||
"text": "总积分达到18000000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"score": 21000000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_9",
|
||||
"text": "总积分达到21000000分"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"score": 24000000,
|
||||
"reward": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"task_describe": {
|
||||
"key": "guildboss_task_task_describe_10",
|
||||
"text": "总积分达到24000000分"
|
||||
}
|
||||
}
|
||||
]
|
@ -1,322 +0,0 @@
|
||||
[
|
||||
{
|
||||
"robotid": 10001,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "激奋的布卢尔",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10002,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "快乐的艾丽莎",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10003,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "朴素的希伯来",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10004,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "庄重的布卢姆",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10005,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "和谐的哈莉特",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10006,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "坦然的乔伊斯",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10007,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "苗条的赫瑟尔",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10008,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "可人的博斯韦",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10009,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "青春的罗瑞尔",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10010,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "开心的茉莉",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10011,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "幸运的蒂安娜",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10012,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "踊跃的波伊尔",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10013,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "愉快的爱罗拉",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10014,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "神奇的塔利娅",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10015,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "不凡的埃达",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10016,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "进步的汉塞尔",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10017,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "业余的桃乐丝",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10018,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "整洁的薇薇安",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10019,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "认真的塞尔特",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10020,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "友爱的白雪",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10021,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "聪明的玛娅",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10022,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "细心的阿拉丁",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10023,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "娇美的布赖特",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10024,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "无知的伊凡",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10025,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "冷魅的梅根",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10026,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "雍容的布罗德",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10027,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "害羞的夏洛特",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10028,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "热情的海洛伊",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10029,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "开朗的克莱儿",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10030,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "唠叨的巴比特",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10031,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "娇媚的波比",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10032,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "绝美的艾薇",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10033,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "职业的艾尔玛",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10034,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "佩服的布鲁克",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10035,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "迷茫的鲍德温",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10036,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "摩登的鲁思",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10037,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "火红的巴纳德",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10038,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "好动的杰奎琳",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10039,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "娇艳的丝特勒",
|
||||
"sex": 0,
|
||||
"showid": "16010101"
|
||||
},
|
||||
{
|
||||
"robotid": 10040,
|
||||
"icon": "hbkp_js_24003",
|
||||
"lvshow": 60,
|
||||
"name": "欢闹的妮莉雅",
|
||||
"sex": 1,
|
||||
"showid": "16010101"
|
||||
}
|
||||
]
|
@ -80,6 +80,6 @@ func (this *apiComp) GetActivity(session comm.IUserSession, req *pb.PayGetActivi
|
||||
}
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "info", &pb.PayGetActivityResp{Info: info})
|
||||
session.SendMsg(string(this.module.GetType()), "getactivity", &pb.PayGetActivityResp{Info: info})
|
||||
return
|
||||
}
|
||||
|
@ -1,84 +0,0 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 设置阵容
|
||||
func (this *apiComp) FormationCheck(session comm.IUserSession, req *pb.SociatyBFormationReq) (errdata *pb.ErrorData) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Formation(session comm.IUserSession, req *pb.SociatyBFormationReq) (errdata *pb.ErrorData) {
|
||||
if errdata = this.FormationCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
uid := session.GetUserId()
|
||||
user := this.module.ModuleUser.GetUser(uid)
|
||||
if user == nil {
|
||||
this.module.Error("GetRemoteUser",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
ggd := this.module.ModuleTools.GetGlobalConf()
|
||||
if ggd == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
//检验第二队或第三队是否达到解锁条件
|
||||
if _, ok := req.Teams[2]; ok {
|
||||
if user.Lv < ggd.GuildBossTroop2 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyTeamUnlock,
|
||||
Title: pb.ErrorCode_SociatyTeamUnlock.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
if _, ok := req.Teams[3]; ok {
|
||||
if user.Lv < ggd.GuildBossTroop3 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyTeamUnlock,
|
||||
Title: pb.ErrorCode_SociatyTeamUnlock.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyNoFound,
|
||||
Title: pb.ErrorCode_SociatyNoFound.ToString(),
|
||||
}
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
}
|
||||
|
||||
if err := this.module.modelSociatyBoss.setFormation(sociaty, uid, req.Teams); err != nil {
|
||||
this.module.Error("设置阵容", log.Field{Key: "uid", Value: uid})
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
rsp := &pb.SociatyBFormationResp{
|
||||
SociatyId: sociaty.Id,
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeFormation, rsp)
|
||||
return
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 公会BOSS入口
|
||||
|
||||
func (this *apiComp) BossmainCheck(session comm.IUserSession, req *pb.SociatyBMainReq) (errdata *pb.ErrorData) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Bossmain(session comm.IUserSession, req *pb.SociatyBMainReq) (errdata *pb.ErrorData) {
|
||||
uid := session.GetUserId()
|
||||
|
||||
ggd := this.module.ModuleTools.GetGlobalConf()
|
||||
if ggd == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
userEx, err := this.module.ModuleUser.GetUserExpand(uid)
|
||||
if err != nil {
|
||||
this.module.Error("GetRemoteUserExpand",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_UserSessionNobeing,
|
||||
Title: pb.ErrorCode_UserSessionNobeing.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
rsp := &pb.SociatyBMainResp{
|
||||
Ticket: userEx.SociatyTicket,
|
||||
}
|
||||
|
||||
// 未参赛(恢复挑战券)
|
||||
if !this.module.modelSociatyBoss.IsInSports(uid) {
|
||||
userEx.SociatyTicket = ggd.GuildBossInitialNum
|
||||
update := map[string]interface{}{
|
||||
"sociatyTicket": userEx.SociatyTicket,
|
||||
}
|
||||
if err := this.module.ModuleUser.ChangeUserExpand(uid, update); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
rsp.Ticket = userEx.SociatyTicket
|
||||
}
|
||||
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyNoFound,
|
||||
Title: pb.ErrorCode_SociatyNoFound.ToString(),
|
||||
}
|
||||
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
}
|
||||
|
||||
// 赛季信息
|
||||
dbs := this.module.modelSociatyBoss.getSociatyBossSports()
|
||||
if dbs == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatySportsNoinit,
|
||||
Title: pb.ErrorCode_SociatySportsNoinit.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
rsp.EndTime = dbs.EndTime
|
||||
rsp.SettlementTime = dbs.SettlementTime
|
||||
|
||||
// 个人积分
|
||||
dbr := this.module.modelSociatyBoss.getChallengeRecord(uid)
|
||||
if dbr != nil {
|
||||
rsp.Total = dbr.Total
|
||||
rsp.HighIntegrals = dbr.Integrals
|
||||
}
|
||||
|
||||
//个人排名
|
||||
rsp.PersonalRanking = this.module.modelSociatyBoss.getRankingByMember(
|
||||
fmt.Sprintf("%s:%s", this.module.modelSociatyBoss.TableName, BOSS_PERSONAL_RANK), uid)
|
||||
|
||||
// 公会排名
|
||||
rsp.SociatyRanking = this.module.modelSociatyBoss.getRankingByMember(
|
||||
fmt.Sprintf("%s:%s", this.module.modelSociatyBoss.TableName, BOSS_SOCIATY_RANK), sociaty.Id)
|
||||
|
||||
if sm := this.module.modelSociaty.getMemberInfo(sociaty, uid); sm != nil {
|
||||
rsp.Teams = sm.Teams
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeBossmain, rsp)
|
||||
return
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 公会BOSS 赛季排行榜
|
||||
|
||||
func (this *apiComp) BrankCheck(session comm.IUserSession, req *pb.SociatyBRankReq) (errdata *pb.ErrorData) {
|
||||
if req.RankType != 1 && req.RankType != 2 && req.RankType != 3 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Brank(session comm.IUserSession, req *pb.SociatyBRankReq) (errdata *pb.ErrorData) {
|
||||
if errdata = this.BrankCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyNoFound,
|
||||
Title: pb.ErrorCode_SociatyNoFound.ToString(),
|
||||
}
|
||||
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
}
|
||||
|
||||
sri := this.module.modelSociatyBoss.bossRank(sociaty, req.RankType)
|
||||
|
||||
rsp := &pb.SociatyBRankResp{
|
||||
Rank: sri,
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeBrank, rsp)
|
||||
return
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 公会BOSS 积分奖励领取
|
||||
|
||||
func (this *apiComp) BreceiveCheck(session comm.IUserSession, req *pb.SociatyBReceiveReq) (errdata *pb.ErrorData) {
|
||||
if req.TaskId <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Breceive(session comm.IUserSession, req *pb.SociatyBReceiveReq) (errdata *pb.ErrorData) {
|
||||
if errdata = this.BreceiveCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyNoFound,
|
||||
Title: pb.ErrorCode_SociatyNoFound.ToString(),
|
||||
}
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
}
|
||||
|
||||
taskConf := this.module.configure.getBossTask(req.TaskId)
|
||||
if taskConf == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
dbr := this.module.modelSociatyBoss.getChallengeRecord(uid)
|
||||
var taskId int32
|
||||
for _, task := range dbr.Tasks {
|
||||
if task.TaskId == req.TaskId {
|
||||
taskId = task.TaskId
|
||||
if task.Status == 2 { //已领取
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyTaskReceived,
|
||||
Title: pb.ErrorCode_SociatyTaskReceived.ToString(),
|
||||
}
|
||||
return
|
||||
} else if taskId == 0 { //未完成
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyTaskNoFinished,
|
||||
Title: pb.ErrorCode_SociatyTaskNoFinished.ToString(),
|
||||
}
|
||||
return
|
||||
} else if taskId == 1 { //可领取
|
||||
task.Status = 2
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
//更新任务状态
|
||||
update := map[string]interface{}{
|
||||
"tasks": dbr.Tasks,
|
||||
}
|
||||
if err := this.module.modelSociatyBoss.Change(uid, update); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 奖励
|
||||
if errdata := this.module.DispenseRes(session, taskConf.Reward, true); errdata != nil {
|
||||
this.module.Error("积分任务奖励领取",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "taskId", Value: taskId},
|
||||
log.Field{Key: "reward", Value: taskConf.Reward})
|
||||
}
|
||||
|
||||
rsp := &pb.SociatyBReceiveResp{
|
||||
SociatyId: sociaty.Id,
|
||||
TaskId: req.TaskId,
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeBreceive, rsp)
|
||||
return
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 结束挑战
|
||||
func (this *apiComp) ChallengefinishCheck(session comm.IUserSession, req *pb.SociatyBChallengeFinishReq) (errdata *pb.ErrorData) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Challengefinish(session comm.IUserSession, req *pb.SociatyBChallengeFinishReq) (errdata *pb.ErrorData) {
|
||||
if errdata = this.ChallengefinishCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyNoFound,
|
||||
Title: pb.ErrorCode_SociatyNoFound.ToString(),
|
||||
}
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
}
|
||||
|
||||
userEx, err := this.module.ModuleUser.GetUserExpand(uid)
|
||||
if err != nil {
|
||||
this.module.Error("GetRemoteUserExpand",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
this.module.modelSociatyBoss.challengefinish(sociaty, uid, req.Report)
|
||||
|
||||
//扣除挑战券
|
||||
userEx.SociatyTicket -= 1
|
||||
updateEx := map[string]interface{}{
|
||||
"sociatyTicket": userEx.SociatyTicket,
|
||||
}
|
||||
if err := this.module.ModuleUser.ChangeUserExpand(uid, updateEx); err != nil {
|
||||
this.module.Error("更新扣除挑战券失败",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "err", Value: err.Error()})
|
||||
}
|
||||
|
||||
rsp := &pb.SociatyBChallengeFinishResp{
|
||||
Integral: this.module.modelSociatyBoss.transIntegral(req.Report.Harm),
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeChallengefinish, rsp)
|
||||
return
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
// 开始挑战
|
||||
func (this *apiComp) ChallengestartCheck(session comm.IUserSession, req *pb.SociatyBChallengeStartReq) (errdata *pb.ErrorData) {
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Challengestart(session comm.IUserSession, req *pb.SociatyBChallengeStartReq) (errdata *pb.ErrorData) {
|
||||
if errdata = this.ChallengestartCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyNoFound,
|
||||
Title: pb.ErrorCode_SociatyNoFound.ToString(),
|
||||
}
|
||||
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
}
|
||||
//校验挑战券
|
||||
userEx, err := this.module.ModuleUser.GetUserExpand(uid)
|
||||
if err != nil {
|
||||
this.module.Error("GetRemoteUserExpand",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
return
|
||||
}
|
||||
if userEx.SociatyTicket <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyTicketsNoEnough,
|
||||
Title: pb.ErrorCode_SociatyTicketsNoEnough.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//校验赛季时间
|
||||
if this.module.modelSociatyBoss.sportsIsFinished() {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatySportsEnd,
|
||||
Title: pb.ErrorCode_SociatySportsEnd.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 开始挑战
|
||||
if err := this.module.modelSociatyBoss.challengestart(session, sociaty); err != nil {
|
||||
var customErr = new(comm.CustomError)
|
||||
if errors.As(err, &customErr) {
|
||||
code := customErr.Code
|
||||
errdata = &pb.ErrorData{
|
||||
Code: code,
|
||||
Title: code.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
rsp := &pb.SociatyBChallengeStartResp{
|
||||
SociatyId: sociaty.Id,
|
||||
Uid: uid,
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), SociatySubTypeChallengestart, rsp)
|
||||
return
|
||||
}
|
@ -29,7 +29,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
|
||||
gameSociatySign: cfg.NewGameGuildSign,
|
||||
gameSociatyActivity: cfg.NewGameGuildActivity,
|
||||
gameRdtaskCondi: cfg.NewGameRdtaskCondi,
|
||||
gameSociatyBossTask: cfg.NewGameGuildBossTask,
|
||||
gameburiedCond: cfg.NewGameBuriedCondi,
|
||||
})
|
||||
return
|
||||
@ -120,37 +119,6 @@ func (this *configureComp) getRtaskCondiCfg() (data *cfg.GameRdtaskCondi, err er
|
||||
return
|
||||
}
|
||||
|
||||
// 积分任务
|
||||
func (this *configureComp) getBossTask(taskId int32) *cfg.GameGuildBossTaskData {
|
||||
if v, err := this.GetConfigure(gameSociatyBossTask); err != nil {
|
||||
return nil
|
||||
} else {
|
||||
data, ok := v.(*cfg.GameGuildBossTask)
|
||||
if !ok {
|
||||
err = fmt.Errorf("%T no is *cfg.GameGuildActivity", v)
|
||||
return nil
|
||||
}
|
||||
if v, ok := data.GetDataMap()[taskId]; ok {
|
||||
return v
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 积分任务列表
|
||||
func (this *configureComp) getBossTaskList() []*cfg.GameGuildBossTaskData {
|
||||
if v, err := this.GetConfigure(gameSociatyBossTask); err != nil {
|
||||
return nil
|
||||
} else {
|
||||
data, ok := v.(*cfg.GameGuildBossTask)
|
||||
if !ok {
|
||||
err = fmt.Errorf("%T no is *cfg.GameGuildActivity", v)
|
||||
return nil
|
||||
}
|
||||
return data.GetDataList()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *configureComp) getBuriedCondCfg() (data *cfg.GameBuriedCondi, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
|
@ -1,560 +0,0 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
rn "go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/lego/sys/redis/pipe"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/utils"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
)
|
||||
|
||||
var (
|
||||
BOSS_SPORTS = "sports"
|
||||
BOSS_PERSONAL_RANK = "personalrank" //个人排行key
|
||||
BOSS_SOCIATY_RANK = "sociatyrank" //公会排名
|
||||
SPORTS_HOUR = 3 * 24 //赛季周期
|
||||
)
|
||||
|
||||
type ModelSociatyBoss struct {
|
||||
modules.MCompModel
|
||||
moduleSociaty *Sociaty
|
||||
service core.IService
|
||||
}
|
||||
|
||||
func (this *ModelSociatyBoss) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.TableName = comm.TableSociatyBoss
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.moduleSociaty = module.(*Sociaty)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
// 初始化赛季
|
||||
func (s *ModelSociatyBoss) initSports() error {
|
||||
if !s.moduleSociaty.IsCross() {
|
||||
return nil
|
||||
}
|
||||
ticker := time.NewTicker(time.Second)
|
||||
sports := &pb.DBSociatyBossSports{}
|
||||
if err := s.Get(BOSS_SPORTS, sports); err != nil {
|
||||
if err == rn.RedisNil || err == mongo.ErrNoDocuments {
|
||||
sports.EndTime, sports.SettlementTime = s.sportsTime()
|
||||
if err2 := s.Add(BOSS_SPORTS, sports); err2 != nil {
|
||||
return err2
|
||||
}
|
||||
} else {
|
||||
s.moduleSociaty.Errorln(err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
now := configure.Now()
|
||||
//触发结算
|
||||
if now.Unix() >= sports.SettlementTime {
|
||||
_, sports.SettlementTime = s.sportsTime()
|
||||
s.settlement()
|
||||
s.moduleSociaty.Debugln("更新赛季结算时间:" + utils.FormatStr(sports.SettlementTime, ""))
|
||||
}
|
||||
if now.Unix() >= sports.EndTime {
|
||||
sports.EndTime, sports.SettlementTime = s.sportsTime()
|
||||
//归档前赛季数据
|
||||
s.resetSportsData()
|
||||
// 更新下一赛季周期结束时间
|
||||
update := map[string]interface{}{
|
||||
"endTime": sports.EndTime,
|
||||
"settlementTime": sports.SettlementTime,
|
||||
"uids": []string{},
|
||||
}
|
||||
if err := s.Change(BOSS_SPORTS, update); err != nil {
|
||||
s.moduleSociaty.Errorln("Failed to change")
|
||||
return
|
||||
}
|
||||
s.moduleSociaty.Debugln("更新赛季周期时间:" + utils.FormatStr(sports.EndTime, ""))
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取赛季数据
|
||||
func (s *ModelSociatyBoss) getSociatyBossSports() *pb.DBSociatyBossSports {
|
||||
sports := &pb.DBSociatyBossSports{}
|
||||
if err := s.Get(BOSS_SPORTS, sports); err != nil {
|
||||
s.moduleSociaty.Errorln(err)
|
||||
return nil
|
||||
}
|
||||
return sports
|
||||
}
|
||||
|
||||
// 更新赛季数据
|
||||
func (s *ModelSociatyBoss) updateSociatyBossSports(data map[string]interface{}) {
|
||||
if err := s.Change(BOSS_SPORTS, data); err != nil {
|
||||
s.moduleSociaty.Error("更新赛季数据", log.Field{Key: "err", Value: err.Error()})
|
||||
}
|
||||
}
|
||||
|
||||
// 赛季结算和结束时间
|
||||
func (s *ModelSociatyBoss) sportsTime() (t1, t2 int64) {
|
||||
now := configure.Now()
|
||||
end1 := now.Add(time.Duration(SPORTS_HOUR) * time.Hour) //测试时单位分钟 else Hour
|
||||
h, _ := time.ParseDuration("-1h") //测试时-2m else -1h
|
||||
end2 := end1.Add(h)
|
||||
return end1.Unix(), end2.Unix()
|
||||
}
|
||||
|
||||
// 公会BOSS赛季是否开始
|
||||
func (s *ModelSociatyBoss) sportsIsStarted() bool {
|
||||
sports := s.getSociatyBossSports()
|
||||
if sports == nil {
|
||||
return false
|
||||
}
|
||||
if sports.EndTime == 0 {
|
||||
return false
|
||||
} else {
|
||||
now := configure.Now().Unix()
|
||||
end := sports.SettlementTime
|
||||
if now < end {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 公会BOSS赛季是否结束
|
||||
func (s *ModelSociatyBoss) sportsIsFinished() bool {
|
||||
sports := s.getSociatyBossSports()
|
||||
if sports == nil {
|
||||
return false
|
||||
}
|
||||
if sports.EndTime == 0 {
|
||||
return true
|
||||
} else {
|
||||
now := configure.Now().Unix()
|
||||
end := sports.SettlementTime
|
||||
if now > end && now < sports.EndTime {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 设置阵容
|
||||
func (s *ModelSociatyBoss) setFormation(sociaty *pb.DBSociaty, uid string, teams map[int32]*pb.ChallengeTeam) error {
|
||||
if !s.moduleSociaty.modelSociaty.isMember(uid, sociaty) {
|
||||
return comm.NewCustomError(pb.ErrorCode_SociatyBelongTo)
|
||||
}
|
||||
for _, m := range sociaty.Members {
|
||||
if m.Uid == uid {
|
||||
m.Teams = teams
|
||||
}
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"members": sociaty.Members,
|
||||
}
|
||||
return s.moduleSociaty.modelSociaty.updateSociaty(sociaty.Id, update)
|
||||
}
|
||||
|
||||
// 挑战开始
|
||||
func (s *ModelSociatyBoss) challengestart(session comm.IUserSession, sociaty *pb.DBSociaty) error {
|
||||
//组装阵容数据
|
||||
var formations []*pb.BattleFormation
|
||||
m := s.moduleSociaty.modelSociaty.getMemberInfo(sociaty, session.GetUserId())
|
||||
for _, v := range m.Teams {
|
||||
formations = append(formations, v.Formation)
|
||||
}
|
||||
|
||||
if len(formations) == 0 {
|
||||
return comm.NewCustomError(pb.ErrorCode_SociatyNoFormation)
|
||||
}
|
||||
|
||||
iBattle, err := s.service.GetModule(comm.ModuleBattle)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if b, y := iBattle.(comm.IBattle); y {
|
||||
if code, _ := b.CreatePvbBattle(session, &pb.BattlePVBReq{
|
||||
Ptype: pb.PlayType_sociaty,
|
||||
Title: "公会BOSS",
|
||||
Format: formations,
|
||||
}); code != nil {
|
||||
return comm.NewCustomError(pb.ErrorCode_ExternalModule)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 挑战结束
|
||||
func (s *ModelSociatyBoss) challengefinish(sociaty *pb.DBSociaty, uid string, report *pb.BattleReport) error {
|
||||
// BOSS无伤害
|
||||
if report.Harm == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
sm := s.moduleSociaty.modelSociaty.getMemberInfo(sociaty, uid)
|
||||
if sm == nil {
|
||||
s.moduleSociaty.Error("没有该成员", log.Field{Key: "uid", Value: uid}, log.Field{Key: "sociatyId", Value: sociaty.Id})
|
||||
return comm.NewCustomError(pb.ErrorCode_SociatyNoMember)
|
||||
}
|
||||
|
||||
//保存挑战记录
|
||||
record := &pb.ChallengeRecord{
|
||||
Teams: sm.Teams,
|
||||
Integral: s.transIntegral(report.Harm),
|
||||
Duration: report.Costtime,
|
||||
Rtime: configure.Now().Unix(),
|
||||
}
|
||||
if err := s.updateChallengeRecord(uid, sociaty.Id, record); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s.addSociatyBossUser(uid)
|
||||
return nil
|
||||
}
|
||||
|
||||
// 添加参赛玩家
|
||||
func (s *ModelSociatyBoss) addSociatyBossUser(uid string) {
|
||||
sports := s.getSociatyBossSports()
|
||||
if sports == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if len(sports.Uids) == 0 {
|
||||
sports.Uids = append(sports.Uids, uid)
|
||||
} else {
|
||||
if _, ok := utils.Findx(sports.Uids, uid); !ok {
|
||||
sports.Uids = append(sports.Uids, uid)
|
||||
}
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"uids": sports.Uids,
|
||||
}
|
||||
if err := s.Change(BOSS_SPORTS, update); err != nil {
|
||||
s.moduleSociaty.Error("添加参赛玩家", log.Field{Key: "err", Value: err.Error()})
|
||||
}
|
||||
}
|
||||
|
||||
// 获取玩家赛季挑战记录
|
||||
func (s *ModelSociatyBoss) getChallengeRecord(uid string) *pb.DBSociatyBossRecord {
|
||||
his := &pb.DBSociatyBossRecord{}
|
||||
if err := s.Get(uid, his); err != nil {
|
||||
return nil
|
||||
}
|
||||
if his.Uid == "" {
|
||||
return nil
|
||||
}
|
||||
return his
|
||||
}
|
||||
|
||||
// 挑战记录 作为阵容推荐的依据;
|
||||
func (s *ModelSociatyBoss) updateChallengeRecord(uid, sociatyId string, record *pb.ChallengeRecord) error {
|
||||
his := &pb.DBSociatyBossRecord{}
|
||||
if err := s.Get(uid, his); err != nil {
|
||||
if err == rn.RedisNil || err == mongo.ErrNoDocuments {
|
||||
if err := s.Add(uid, &pb.DBSociatyBossRecord{
|
||||
Uid: uid,
|
||||
SociatyId: sociatyId,
|
||||
Record: []*pb.ChallengeRecord{record},
|
||||
}); err != nil {
|
||||
return comm.NewCustomError(pb.ErrorCode_DBError)
|
||||
}
|
||||
} else {
|
||||
return comm.NewCustomError(pb.ErrorCode_DBError)
|
||||
}
|
||||
}
|
||||
|
||||
//更新挑战记录
|
||||
his.Record = append(his.Record, record)
|
||||
update := map[string]interface{}{
|
||||
"record": his.Record,
|
||||
}
|
||||
if err := s.Change(uid, update); err != nil {
|
||||
return comm.NewCustomError(pb.ErrorCode_DBError)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 记入个人排行
|
||||
func (s *ModelSociatyBoss) addPersonalRank(uid string, integral int64) error {
|
||||
var (
|
||||
pipe *pipe.RedisPipe = s.Redis.RedisPipe(context.TODO())
|
||||
m *redis.Z
|
||||
)
|
||||
m = &redis.Z{Score: float64(integral), Member: uid}
|
||||
if cmd := pipe.ZAdd(fmt.Sprintf("%s:%s", s.TableName, BOSS_PERSONAL_RANK), m); cmd != nil {
|
||||
_, err := cmd.Result()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if _, err := pipe.Exec(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 记入公会排行
|
||||
func (s *ModelSociatyBoss) addSociatyRank(uid string, integral int64) error {
|
||||
dbr := s.getChallengeRecord(uid)
|
||||
if dbr == nil {
|
||||
return errors.New("没有挑战记录")
|
||||
}
|
||||
|
||||
if dbr.SociatyId != "" {
|
||||
var pipe *pipe.RedisPipe = s.Redis.RedisPipe(context.TODO())
|
||||
if cmd := pipe.ZIncrBy(fmt.Sprintf("%s:%s", s.TableName, BOSS_SOCIATY_RANK), float64(integral), dbr.SociatyId); cmd != nil {
|
||||
_, err := cmd.Result()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if _, err := pipe.Exec(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 伤害转换积分
|
||||
func (s *ModelSociatyBoss) transIntegral(harm int32) int64 {
|
||||
return int64(harm)
|
||||
}
|
||||
|
||||
// 查询排行榜
|
||||
func (s *ModelSociatyBoss) queryRankUid(count int64) (ranks []string, err error) {
|
||||
var (
|
||||
result []string
|
||||
)
|
||||
if result, err = s.DBModel.Redis.ZRevRange(s.TableName, 0, count).Result(); err != nil {
|
||||
return
|
||||
}
|
||||
ranks = make([]string, 0)
|
||||
for i := 0; i < len(result); i += 1 {
|
||||
ranks = append(ranks, result[i])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 取积分
|
||||
func (s *ModelSociatyBoss) getScoreByUid(key, member string) int64 {
|
||||
result, err := s.DBModel.Redis.ZScore(key, member)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return int64(result)
|
||||
}
|
||||
|
||||
// 取排名
|
||||
func (s *ModelSociatyBoss) getRankingByMember(key, member string) int64 {
|
||||
result, err := s.DBModel.Redis.ZRevRank(key, member)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return (result + 1)
|
||||
}
|
||||
|
||||
// 排行榜
|
||||
func (s *ModelSociatyBoss) bossRank(sociaty *pb.DBSociaty, rankType int32) (res []*pb.SociatyRankInfo) {
|
||||
var (
|
||||
rankCount int64
|
||||
key string
|
||||
)
|
||||
|
||||
// 所有排行记录(个人、公会)
|
||||
rank := func() []*pb.SociatyRankInfo {
|
||||
rankUids, err := s.queryRankUid(rankCount)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
for _, uid := range rankUids {
|
||||
imodule, err := s.service.GetModule(comm.ModuleUser)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
if iuser, ok := imodule.(comm.IUser); ok {
|
||||
if user := iuser.GetUser(uid); user != nil && user.Uid != "" {
|
||||
res = append(res, &pb.SociatyRankInfo{
|
||||
SociatyName: sociaty.Name,
|
||||
Name: user.Name,
|
||||
Head: user.Avatar,
|
||||
Lv: user.Lv,
|
||||
Ranking: s.getRankingByMember(key, user.Uid),
|
||||
Integral: s.getScoreByUid(key, user.Uid),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
return res
|
||||
}
|
||||
switch rankType {
|
||||
case 1: //个人
|
||||
rankCount = 1000 //数据数量
|
||||
key = fmt.Sprintf("%s:%s", s.TableName, BOSS_PERSONAL_RANK)
|
||||
rank()
|
||||
case 2: //公会
|
||||
rankCount = 50 //数据数量
|
||||
key = fmt.Sprintf("%s:%s", s.TableName, BOSS_SOCIATY_RANK)
|
||||
rank()
|
||||
case 3: //公会成员排行
|
||||
for _, m := range sociaty.Members {
|
||||
imodule, err := s.service.GetModule(comm.ModuleUser)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
if iuser, ok := imodule.(comm.IUser); ok {
|
||||
if user := iuser.GetUser(m.Uid); user != nil && user.Uid != "" {
|
||||
res = append(res, &pb.SociatyRankInfo{
|
||||
SociatyName: sociaty.Name,
|
||||
Name: user.Name,
|
||||
Head: user.Avatar,
|
||||
Lv: user.Lv,
|
||||
Ranking: s.getRankingByMember(key, user.Uid),
|
||||
Integral: s.getScoreByUid(key, user.Uid),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
sort.SliceStable(res, func(i, j int) bool {
|
||||
return res[i].Integral > res[j].Integral
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 公会BOSS重置数据(每个周期)
|
||||
func (s *ModelSociatyBoss) resetSportsData() error {
|
||||
sports := s.getSociatyBossSports()
|
||||
if sports == nil {
|
||||
return errors.New("sociatyboss sports is nil")
|
||||
}
|
||||
|
||||
// 归档前赛季数据
|
||||
for _, uid := range sports.Uids {
|
||||
var record []*pb.DBSociatyBossRecord
|
||||
_ = s.GetList(uid, &record)
|
||||
for _, v := range record {
|
||||
if err := s.DelByUId(uid); err != nil {
|
||||
s.moduleSociaty.Error("清理玩家赛季记录", log.Field{Key: "uid", Value: v.Uid}, log.Field{Key: "err", Value: err.Error()})
|
||||
}
|
||||
}
|
||||
}
|
||||
// 清理排行榜
|
||||
// if err := s.Del(BOSS_PERSONAL_RANK); err != nil {
|
||||
// s.moduleSociaty.Error("清理排行榜", log.Field{Key: "err", Value: err.Error()})
|
||||
// }
|
||||
return nil
|
||||
}
|
||||
|
||||
// 是否参赛
|
||||
func (s *ModelSociatyBoss) IsInSports(uid string) bool {
|
||||
sports := s.getSociatyBossSports()
|
||||
if sports == nil {
|
||||
return false
|
||||
}
|
||||
for _, v := range sports.Uids {
|
||||
if v == uid {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 赛季结算
|
||||
func (s *ModelSociatyBoss) settlement() error {
|
||||
sports := s.getSociatyBossSports()
|
||||
if sports == nil {
|
||||
return errors.New("sociatyboss sports is nil")
|
||||
}
|
||||
// 计算玩家的赛季积分
|
||||
for _, uid := range sports.Uids {
|
||||
cr := s.getChallengeRecord(uid)
|
||||
//排序-倒叙
|
||||
sort.SliceStable(cr.Record, func(i, j int) bool {
|
||||
return cr.Record[i].Integral > cr.Record[j].Integral
|
||||
})
|
||||
|
||||
var total int64 //当前赛季总积分
|
||||
var highScore []int64 //暂存玩家积分
|
||||
for i, v := range cr.Record {
|
||||
highScore = append(highScore, v.Integral)
|
||||
total += v.Integral
|
||||
if i > 2 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// 更新玩家赛季历史记录
|
||||
isExist := func(tasks []*pb.ChallengeTask, taskId int32) bool {
|
||||
for _, task := range tasks {
|
||||
if task.TaskId == taskId {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
// 判断积分任务是否达标
|
||||
var tasks []*pb.ChallengeTask
|
||||
var taskFlag bool //任务更新状态
|
||||
taskList := s.moduleSociaty.configure.getBossTaskList()
|
||||
for _, task := range taskList {
|
||||
if total >= int64(task.Score) && !isExist(cr.Tasks, task.Id) {
|
||||
tasks = append(tasks, &pb.ChallengeTask{
|
||||
TaskId: task.Id,
|
||||
Status: 1, //可领取
|
||||
})
|
||||
taskFlag = true
|
||||
}
|
||||
}
|
||||
|
||||
cr.Total = total
|
||||
cr.Integrals = highScore
|
||||
update := map[string]interface{}{
|
||||
"total": total,
|
||||
"integrals": highScore,
|
||||
}
|
||||
|
||||
// 任务状态有变化时更新
|
||||
if taskFlag {
|
||||
update["tasks"] = tasks
|
||||
cr.Tasks = tasks
|
||||
}
|
||||
if err := s.Change(uid, update); err != nil {
|
||||
s.moduleSociaty.Error("更新玩家赛事信息", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
|
||||
continue
|
||||
}
|
||||
|
||||
// 将玩家积分加入排行榜
|
||||
s.addPersonalRank(uid, total)
|
||||
// 将玩家积分加入公会排行榜
|
||||
s.addSociatyRank(uid, total)
|
||||
|
||||
s.moduleSociaty.Debug("结算:", log.Field{Key: "uid", Value: uid})
|
||||
|
||||
}
|
||||
|
||||
//归档前10的玩家记录
|
||||
|
||||
return nil
|
||||
}
|
@ -29,7 +29,6 @@ type Sociaty struct {
|
||||
modelSociaty *ModelSociaty
|
||||
modelSociatyTask *ModelSociatyTask
|
||||
modelSociatyLog *ModelSociatyLog
|
||||
modelSociatyBoss *ModelSociatyBoss
|
||||
configure *configureComp
|
||||
globalConf *cfg.GameGlobalData
|
||||
sociatyActivityConf *cfg.GameGuildActivity
|
||||
@ -58,7 +57,6 @@ func (this *Sociaty) OnInstallComp() {
|
||||
this.modelSociaty = this.RegisterComp(new(ModelSociaty)).(*ModelSociaty)
|
||||
this.modelSociatyTask = this.RegisterComp(new(ModelSociatyTask)).(*ModelSociatyTask)
|
||||
this.modelSociatyLog = this.RegisterComp(new(ModelSociatyLog)).(*ModelSociatyLog)
|
||||
this.modelSociatyBoss = this.RegisterComp(new(ModelSociatyBoss)).(*ModelSociatyBoss)
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
// event.Register(comm.EventBuriedComplete, this.TCondFinishNotify)
|
||||
}
|
||||
@ -90,10 +88,7 @@ func (this *Sociaty) Start() (err error) {
|
||||
if err = this.checkSociatyConf(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
this.Debug("check guild conf completed")
|
||||
// 初始化公会BOSS赛季开始时间
|
||||
this.modelSociatyBoss.initSports()
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,57 @@
|
||||
package uniongve
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/core/cbase"
|
||||
"go_dreamfactory/modules"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
const ()
|
||||
const (
|
||||
game_guildboss = "game_guildboss.json"
|
||||
game_guildbossrank = "game_guildbossrank.json"
|
||||
game_guildbossroulette = "game_guildbossroulette.json"
|
||||
game_guildbossscore = "game_guildbossscore.json"
|
||||
)
|
||||
|
||||
// /配置管理基础组件
|
||||
type MCompConfigure struct {
|
||||
cbase.ModuleCompBase
|
||||
modules.MCompConfigure
|
||||
}
|
||||
|
||||
// 组件初始化接口
|
||||
func (this *MCompConfigure) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleCompBase.Init(service, module, comp, options)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
game_guildboss: cfg.NewGameGuildBoss,
|
||||
game_guildbossrank: cfg.NewGameGuildBossRank,
|
||||
game_guildbossroulette: cfg.NewGameGuildBossRoulette,
|
||||
game_guildbossscore: cfg.NewGameGuildBossScore,
|
||||
})
|
||||
err = this.LoadConfigure(game_guildboss, cfg.NewGameGuildBoss)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取所有难度一的boos
|
||||
func (this *MCompConfigure) getguildboss() (results []*cfg.GameGuildBossData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
)
|
||||
|
||||
if v, err = this.GetConfigure(game_guildboss); err != nil {
|
||||
return
|
||||
} else {
|
||||
data, ok := v.(*cfg.GameGuildBoss)
|
||||
if !ok {
|
||||
err = fmt.Errorf("%T no is *cfg.GameGuildActivity", v)
|
||||
return
|
||||
}
|
||||
results = make([]*cfg.GameGuildBossData, 0)
|
||||
for _, v := range data.GetDataList() {
|
||||
if v.BossLv == 1 {
|
||||
results = append(results, v)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,22 @@
|
||||
package uniongve
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/mgo"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type ModelUniongve struct {
|
||||
modules.MCompModel
|
||||
module *UnionGve
|
||||
module *UnionGve
|
||||
conflock sync.RWMutex
|
||||
bossconf *pb.DBUnionGveBossConf
|
||||
}
|
||||
|
||||
func (this *ModelUniongve) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
@ -38,3 +44,31 @@ func (this *ModelUniongve) getUnionGve(unionid string) (results *pb.DBUnionGve,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 刷新全局配置
|
||||
func (this *ModelUniongve) refreshGlobalBoos() (err error) {
|
||||
var (
|
||||
bossconf *pb.DBUnionGveBossConf
|
||||
booss []*cfg.GameGuildBossData
|
||||
rands []int
|
||||
)
|
||||
if booss, err = this.module.configure.getguildboss(); err != nil {
|
||||
return
|
||||
}
|
||||
if len(booss) < 5 {
|
||||
err = fmt.Errorf("guildboss no data!")
|
||||
return
|
||||
}
|
||||
rands = comm.RandShuffle(len(booss))
|
||||
bossconf = &pb.DBUnionGveBossConf{
|
||||
Rtime: configure.Now().Unix(),
|
||||
Boos: make([]int32, 5),
|
||||
}
|
||||
for i := 0; i < 5; i++ {
|
||||
bossconf.Boos[i] = booss[rands[i]].BossId
|
||||
}
|
||||
this.conflock.Lock()
|
||||
this.bossconf = bossconf
|
||||
this.conflock.Unlock()
|
||||
return
|
||||
}
|
||||
|
@ -20,6 +20,62 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
//工会boos战 全局配置数据
|
||||
type DBUnionGveBossConf struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Rtime int64 `protobuf:"varint,1,opt,name=rtime,proto3" json:"rtime"` //刷新时间
|
||||
Boos []int32 `protobuf:"varint,2,rep,packed,name=boos,proto3" json:"boos"` //boosid
|
||||
}
|
||||
|
||||
func (x *DBUnionGveBossConf) Reset() {
|
||||
*x = DBUnionGveBossConf{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBUnionGveBossConf) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBUnionGveBossConf) ProtoMessage() {}
|
||||
|
||||
func (x *DBUnionGveBossConf) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_uniongve_uniongve_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 DBUnionGveBossConf.ProtoReflect.Descriptor instead.
|
||||
func (*DBUnionGveBossConf) Descriptor() ([]byte, []int) {
|
||||
return file_uniongve_uniongve_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DBUnionGveBossConf) GetRtime() int64 {
|
||||
if x != nil {
|
||||
return x.Rtime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBUnionGveBossConf) GetBoos() []int32 {
|
||||
if x != nil {
|
||||
return x.Boos
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//工会战Boos
|
||||
type DBUnionGve struct {
|
||||
state protoimpl.MessageState
|
||||
@ -36,7 +92,7 @@ type DBUnionGve struct {
|
||||
func (x *DBUnionGve) Reset() {
|
||||
*x = DBUnionGve{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[0]
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -49,7 +105,7 @@ func (x *DBUnionGve) String() string {
|
||||
func (*DBUnionGve) ProtoMessage() {}
|
||||
|
||||
func (x *DBUnionGve) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[0]
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -62,7 +118,7 @@ func (x *DBUnionGve) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DBUnionGve.ProtoReflect.Descriptor instead.
|
||||
func (*DBUnionGve) Descriptor() ([]byte, []int) {
|
||||
return file_uniongve_uniongve_db_proto_rawDescGZIP(), []int{0}
|
||||
return file_uniongve_uniongve_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DBUnionGve) GetUnionid() string {
|
||||
@ -114,7 +170,7 @@ type DBUnionGveBoss struct {
|
||||
func (x *DBUnionGveBoss) Reset() {
|
||||
*x = DBUnionGveBoss{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[1]
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -127,7 +183,7 @@ func (x *DBUnionGveBoss) String() string {
|
||||
func (*DBUnionGveBoss) ProtoMessage() {}
|
||||
|
||||
func (x *DBUnionGveBoss) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[1]
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -140,7 +196,7 @@ func (x *DBUnionGveBoss) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DBUnionGveBoss.ProtoReflect.Descriptor instead.
|
||||
func (*DBUnionGveBoss) Descriptor() ([]byte, []int) {
|
||||
return file_uniongve_uniongve_db_proto_rawDescGZIP(), []int{1}
|
||||
return file_uniongve_uniongve_db_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *DBUnionGveBoss) GetBoosid() int32 {
|
||||
@ -177,7 +233,7 @@ type DBGveRecord struct {
|
||||
func (x *DBGveRecord) Reset() {
|
||||
*x = DBGveRecord{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[2]
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -190,7 +246,7 @@ func (x *DBGveRecord) String() string {
|
||||
func (*DBGveRecord) ProtoMessage() {}
|
||||
|
||||
func (x *DBGveRecord) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[2]
|
||||
mi := &file_uniongve_uniongve_db_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -203,7 +259,7 @@ func (x *DBGveRecord) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DBGveRecord.ProtoReflect.Descriptor instead.
|
||||
func (*DBGveRecord) Descriptor() ([]byte, []int) {
|
||||
return file_uniongve_uniongve_db_proto_rawDescGZIP(), []int{2}
|
||||
return file_uniongve_uniongve_db_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DBGveRecord) GetUid() string {
|
||||
@ -224,7 +280,11 @@ var File_uniongve_uniongve_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_uniongve_uniongve_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x2f, 0x75, 0x6e, 0x69, 0x6f, 0x6e,
|
||||
0x67, 0x76, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a,
|
||||
0x67, 0x76, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x12,
|
||||
0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x22, 0x95, 0x01, 0x0a,
|
||||
0x0a, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x75,
|
||||
0x6e, 0x69, 0x6f, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x6e,
|
||||
0x69, 0x6f, 0x6e, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x18,
|
||||
@ -260,15 +320,16 @@ func file_uniongve_uniongve_db_proto_rawDescGZIP() []byte {
|
||||
return file_uniongve_uniongve_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_uniongve_uniongve_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_uniongve_uniongve_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_uniongve_uniongve_db_proto_goTypes = []interface{}{
|
||||
(*DBUnionGve)(nil), // 0: DBUnionGve
|
||||
(*DBUnionGveBoss)(nil), // 1: DBUnionGveBoss
|
||||
(*DBGveRecord)(nil), // 2: DBGveRecord
|
||||
(*DBUnionGveBossConf)(nil), // 0: DBUnionGveBossConf
|
||||
(*DBUnionGve)(nil), // 1: DBUnionGve
|
||||
(*DBUnionGveBoss)(nil), // 2: DBUnionGveBoss
|
||||
(*DBGveRecord)(nil), // 3: DBGveRecord
|
||||
}
|
||||
var file_uniongve_uniongve_db_proto_depIdxs = []int32{
|
||||
1, // 0: DBUnionGve.boos:type_name -> DBUnionGveBoss
|
||||
2, // 1: DBUnionGveBoss.record:type_name -> DBGveRecord
|
||||
2, // 0: DBUnionGve.boos:type_name -> DBUnionGveBoss
|
||||
3, // 1: DBUnionGveBoss.record:type_name -> DBGveRecord
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
@ -283,7 +344,7 @@ func file_uniongve_uniongve_db_proto_init() {
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_uniongve_uniongve_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBUnionGve); i {
|
||||
switch v := v.(*DBUnionGveBossConf); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -295,7 +356,7 @@ func file_uniongve_uniongve_db_proto_init() {
|
||||
}
|
||||
}
|
||||
file_uniongve_uniongve_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBUnionGveBoss); i {
|
||||
switch v := v.(*DBUnionGve); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -307,6 +368,18 @@ func file_uniongve_uniongve_db_proto_init() {
|
||||
}
|
||||
}
|
||||
file_uniongve_uniongve_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBUnionGveBoss); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_uniongve_uniongve_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBGveRecord); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -325,7 +398,7 @@ func file_uniongve_uniongve_db_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_uniongve_uniongve_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -91,7 +91,7 @@ type Warorder struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Opentime int64 `protobuf:"varint,1,opt,name=opentime,proto3" json:"opentime"`
|
||||
Freeprogress int32 `protobuf:"varint,2,opt,name=freeprogress,proto3" json:"freeprogress"`
|
||||
Freeprogress int32 `protobuf:"varint,2,opt,name=freeprogress,proto3" json:"freeprogress"` //已领取天数
|
||||
Payprogress int32 `protobuf:"varint,3,opt,name=payprogress,proto3" json:"payprogress"`
|
||||
Vip bool `protobuf:"varint,4,opt,name=vip,proto3" json:"vip"`
|
||||
}
|
||||
|
42
sys/configure/structs/Game.AnnulartaskAll.go
Normal file
42
sys/configure/structs/Game.AnnulartaskAll.go
Normal 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 GameAnnulartaskAll struct {
|
||||
_dataMap map[int32]*GameAnnulartaskAllData
|
||||
_dataList []*GameAnnulartaskAllData
|
||||
}
|
||||
|
||||
func NewGameAnnulartaskAll(_buf []map[string]interface{}) (*GameAnnulartaskAll, error) {
|
||||
_dataList := make([]*GameAnnulartaskAllData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameAnnulartaskAllData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameAnnulartaskAllData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Taskgroup] = _v
|
||||
}
|
||||
}
|
||||
return &GameAnnulartaskAll{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameAnnulartaskAll) GetDataMap() map[int32]*GameAnnulartaskAllData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameAnnulartaskAll) GetDataList() []*GameAnnulartaskAllData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameAnnulartaskAll) Get(key int32) *GameAnnulartaskAllData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
67
sys/configure/structs/Game.AnnulartaskAllData.go
Normal file
67
sys/configure/structs/Game.AnnulartaskAllData.go
Normal file
@ -0,0 +1,67 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameAnnulartaskAllData struct {
|
||||
Taskgroup int32
|
||||
Taskdetail []int32
|
||||
Weight int32
|
||||
Reward []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_GameAnnulartaskAllData = 561445145
|
||||
|
||||
func (*GameAnnulartaskAllData) GetTypeId() int32 {
|
||||
return 561445145
|
||||
}
|
||||
|
||||
func (_v *GameAnnulartaskAllData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["taskgroup"].(float64); !_ok_ { err = errors.New("taskgroup error"); return }; _v.Taskgroup = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["taskdetail"].([]interface{}); !_ok_ { err = errors.New("taskdetail error"); return }
|
||||
|
||||
_v.Taskdetail = 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.Taskdetail = append(_v.Taskdetail, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = 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 DeserializeGameAnnulartaskAllData(_buf map[string]interface{}) (*GameAnnulartaskAllData, error) {
|
||||
v := &GameAnnulartaskAllData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.Annulartask_Library.go
Normal file
42
sys/configure/structs/Game.Annulartask_Library.go
Normal 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 GameAnnulartask_Library struct {
|
||||
_dataMap map[int32]*GameAnnulartask_LibraryData
|
||||
_dataList []*GameAnnulartask_LibraryData
|
||||
}
|
||||
|
||||
func NewGameAnnulartask_Library(_buf []map[string]interface{}) (*GameAnnulartask_Library, error) {
|
||||
_dataList := make([]*GameAnnulartask_LibraryData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameAnnulartask_LibraryData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameAnnulartask_LibraryData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameAnnulartask_Library{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameAnnulartask_Library) GetDataMap() map[int32]*GameAnnulartask_LibraryData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameAnnulartask_Library) GetDataList() []*GameAnnulartask_LibraryData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameAnnulartask_Library) Get(key int32) *GameAnnulartask_LibraryData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
43
sys/configure/structs/Game.Annulartask_LibraryData.go
Normal file
43
sys/configure/structs/Game.Annulartask_LibraryData.go
Normal file
@ -0,0 +1,43 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameAnnulartask_LibraryData struct {
|
||||
Id int32
|
||||
Assembleid int32
|
||||
Itemid int32
|
||||
Itemwt int32
|
||||
Min int32
|
||||
}
|
||||
|
||||
const TypeId_GameAnnulartask_LibraryData = 1404239256
|
||||
|
||||
func (*GameAnnulartask_LibraryData) GetTypeId() int32 {
|
||||
return 1404239256
|
||||
}
|
||||
|
||||
func (_v *GameAnnulartask_LibraryData)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["assembleid"].(float64); !_ok_ { err = errors.New("assembleid error"); return }; _v.Assembleid = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["itemid"].(float64); !_ok_ { err = errors.New("itemid error"); return }; _v.Itemid = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["itemwt"].(float64); !_ok_ { err = errors.New("itemwt error"); return }; _v.Itemwt = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["min"].(float64); !_ok_ { err = errors.New("min error"); return }; _v.Min = int32(_tempNum_) }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameAnnulartask_LibraryData(_buf map[string]interface{}) (*GameAnnulartask_LibraryData, error) {
|
||||
v := &GameAnnulartask_LibraryData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.AskAll.go
Normal file
42
sys/configure/structs/Game.AskAll.go
Normal 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 GameAskAll struct {
|
||||
_dataMap map[int32]*GameAskAllData
|
||||
_dataList []*GameAskAllData
|
||||
}
|
||||
|
||||
func NewGameAskAll(_buf []map[string]interface{}) (*GameAskAll, error) {
|
||||
_dataList := make([]*GameAskAllData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameAskAllData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameAskAllData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.ExaminationGroup] = _v
|
||||
}
|
||||
}
|
||||
return &GameAskAll{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameAskAll) GetDataMap() map[int32]*GameAskAllData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameAskAll) GetDataList() []*GameAskAllData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameAskAll) Get(key int32) *GameAskAllData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
58
sys/configure/structs/Game.AskAllData.go
Normal file
58
sys/configure/structs/Game.AskAllData.go
Normal file
@ -0,0 +1,58 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameAskAllData struct {
|
||||
ExaminationGroup int32
|
||||
Examinationnum int32
|
||||
Start int32
|
||||
Continue int32
|
||||
Time int32
|
||||
Reward []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_GameAskAllData = 305140654
|
||||
|
||||
func (*GameAskAllData) GetTypeId() int32 {
|
||||
return 305140654
|
||||
}
|
||||
|
||||
func (_v *GameAskAllData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ExaminationGroup"].(float64); !_ok_ { err = errors.New("ExaminationGroup error"); return }; _v.ExaminationGroup = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["examinationnum"].(float64); !_ok_ { err = errors.New("examinationnum error"); return }; _v.Examinationnum = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["start"].(float64); !_ok_ { err = errors.New("start error"); return }; _v.Start = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["continue"].(float64); !_ok_ { err = errors.New("continue error"); return }; _v.Continue = 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["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 DeserializeGameAskAllData(_buf map[string]interface{}) (*GameAskAllData, error) {
|
||||
v := &GameAskAllData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.AskLibrary.go
Normal file
42
sys/configure/structs/Game.AskLibrary.go
Normal 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 GameAskLibrary struct {
|
||||
_dataMap map[int32]*GameAskLibraryData
|
||||
_dataList []*GameAskLibraryData
|
||||
}
|
||||
|
||||
func NewGameAskLibrary(_buf []map[string]interface{}) (*GameAskLibrary, error) {
|
||||
_dataList := make([]*GameAskLibraryData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameAskLibraryData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameAskLibraryData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameAskLibrary{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameAskLibrary) GetDataMap() map[int32]*GameAskLibraryData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameAskLibrary) GetDataList() []*GameAskLibraryData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameAskLibrary) Get(key int32) *GameAskLibraryData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
72
sys/configure/structs/Game.AskLibraryData.go
Normal file
72
sys/configure/structs/Game.AskLibraryData.go
Normal file
@ -0,0 +1,72 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameAskLibraryData struct {
|
||||
Id int32
|
||||
ExaminationGroup int32
|
||||
Type int32
|
||||
Topic string
|
||||
PlanA string
|
||||
PlanB string
|
||||
PlanC string
|
||||
PlanD string
|
||||
Pic string
|
||||
True string
|
||||
Flase string
|
||||
Fraction int32
|
||||
Plantrue []string
|
||||
}
|
||||
|
||||
const TypeId_GameAskLibraryData = -162756536
|
||||
|
||||
func (*GameAskLibraryData) GetTypeId() int32 {
|
||||
return -162756536
|
||||
}
|
||||
|
||||
func (_v *GameAskLibraryData)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["ExaminationGroup"].(float64); !_ok_ { err = errors.New("ExaminationGroup error"); return }; _v.ExaminationGroup = 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; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["topic"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Topic error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Topic, _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["planA"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PlanA error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PlanA, _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["planB"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PlanB error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PlanB, _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["planC"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PlanC error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PlanC, _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["planD"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PlanD error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PlanD, _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; if _v.True, _ok_ = _buf["True"].(string); !_ok_ { err = errors.New("True error"); return } }
|
||||
{ var _ok_ bool; if _v.Flase, _ok_ = _buf["flase"].(string); !_ok_ { err = errors.New("flase error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["fraction"].(float64); !_ok_ { err = errors.New("fraction error"); return }; _v.Fraction = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["plantrue"].([]interface{}); !_ok_ { err = errors.New("plantrue error"); return }
|
||||
|
||||
_v.Plantrue = make([]string, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ string
|
||||
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
|
||||
_v.Plantrue = append(_v.Plantrue, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameAskLibraryData(_buf map[string]interface{}) (*GameAskLibraryData, error) {
|
||||
v := &GameAskLibraryData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.GuildBoss.go
Normal file
42
sys/configure/structs/Game.GuildBoss.go
Normal 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 GameGuildBoss struct {
|
||||
_dataMap map[int32]*GameGuildBossData
|
||||
_dataList []*GameGuildBossData
|
||||
}
|
||||
|
||||
func NewGameGuildBoss(_buf []map[string]interface{}) (*GameGuildBoss, error) {
|
||||
_dataList := make([]*GameGuildBossData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGuildBossData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGuildBossData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.BossId] = _v
|
||||
}
|
||||
}
|
||||
return &GameGuildBoss{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGuildBoss) GetDataMap() map[int32]*GameGuildBossData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGuildBoss) GetDataList() []*GameGuildBossData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGuildBoss) Get(key int32) *GameGuildBossData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
83
sys/configure/structs/Game.GuildBossData.go
Normal file
83
sys/configure/structs/Game.GuildBossData.go
Normal file
@ -0,0 +1,83 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameGuildBossData struct {
|
||||
BossId int32
|
||||
Group int32
|
||||
BossName string
|
||||
BossLv int32
|
||||
Hp int32
|
||||
BattleReadyID int32
|
||||
BossImg int32
|
||||
KillReward []*Gameatn
|
||||
Boss []int32
|
||||
Score int32
|
||||
Buff int32
|
||||
BossDes string
|
||||
}
|
||||
|
||||
const TypeId_GameGuildBossData = 1643692238
|
||||
|
||||
func (*GameGuildBossData) GetTypeId() int32 {
|
||||
return 1643692238
|
||||
}
|
||||
|
||||
func (_v *GameGuildBossData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["boss_id"].(float64); !_ok_ { err = errors.New("boss_id error"); return }; _v.BossId = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["boss_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.BossName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.BossName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["boss_lv"].(float64); !_ok_ { err = errors.New("boss_lv error"); return }; _v.BossLv = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hp"].(float64); !_ok_ { err = errors.New("hp error"); return }; _v.Hp = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["boss_img"].(float64); !_ok_ { err = errors.New("boss_img error"); return }; _v.BossImg = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["kill_reward"].([]interface{}); !_ok_ { err = errors.New("kill_reward error"); return }
|
||||
|
||||
_v.KillReward = 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.KillReward = append(_v.KillReward, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["boss"].([]interface{}); !_ok_ { err = errors.New("boss error"); return }
|
||||
|
||||
_v.Boss = 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.Boss = append(_v.Boss, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score"].(float64); !_ok_ { err = errors.New("score error"); return }; _v.Score = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buff"].(float64); !_ok_ { err = errors.New("buff error"); return }; _v.Buff = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["boss_des"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.BossDes error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.BossDes, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameGuildBossData(_buf map[string]interface{}) (*GameGuildBossData, error) {
|
||||
v := &GameGuildBossData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.GuildBossRank.go
Normal file
42
sys/configure/structs/Game.GuildBossRank.go
Normal 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 GameGuildBossRank struct {
|
||||
_dataMap map[int32]*GameGuildBossRankData
|
||||
_dataList []*GameGuildBossRankData
|
||||
}
|
||||
|
||||
func NewGameGuildBossRank(_buf []map[string]interface{}) (*GameGuildBossRank, error) {
|
||||
_dataList := make([]*GameGuildBossRankData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGuildBossRankData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGuildBossRankData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameGuildBossRank{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGuildBossRank) GetDataMap() map[int32]*GameGuildBossRankData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGuildBossRank) GetDataList() []*GameGuildBossRankData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGuildBossRank) Get(key int32) *GameGuildBossRankData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -10,22 +10,25 @@ package cfg
|
||||
|
||||
import "errors"
|
||||
|
||||
type GameGuildBossTaskData struct {
|
||||
type GameGuildBossRankData struct {
|
||||
Id int32
|
||||
Score int32
|
||||
RankLow int32
|
||||
RankUp int32
|
||||
RankDisplay string
|
||||
Reward []*Gameatn
|
||||
TaskDescribe string
|
||||
}
|
||||
|
||||
const TypeId_GameGuildBossTaskData = -1074074125
|
||||
const TypeId_GameGuildBossRankData = -407873254
|
||||
|
||||
func (*GameGuildBossTaskData) GetTypeId() int32 {
|
||||
return -1074074125
|
||||
func (*GameGuildBossRankData) GetTypeId() int32 {
|
||||
return -407873254
|
||||
}
|
||||
|
||||
func (_v *GameGuildBossTaskData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
func (_v *GameGuildBossRankData)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["score"].(float64); !_ok_ { err = errors.New("score error"); return }; _v.Score = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rank_low"].(float64); !_ok_ { err = errors.New("rank_low error"); return }; _v.RankLow = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rank_up"].(float64); !_ok_ { err = errors.New("rank_up error"); return }; _v.RankUp = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["rank_display"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.RankDisplay error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.RankDisplay, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
@ -40,12 +43,11 @@ func (_v *GameGuildBossTaskData)Deserialize(_buf map[string]interface{}) (err er
|
||||
}
|
||||
}
|
||||
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_describe"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDescribe error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDescribe, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameGuildBossTaskData(_buf map[string]interface{}) (*GameGuildBossTaskData, error) {
|
||||
v := &GameGuildBossTaskData{}
|
||||
func DeserializeGameGuildBossRankData(_buf map[string]interface{}) (*GameGuildBossRankData, error) {
|
||||
v := &GameGuildBossRankData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
42
sys/configure/structs/Game.GuildBossRoulette.go
Normal file
42
sys/configure/structs/Game.GuildBossRoulette.go
Normal 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 GameGuildBossRoulette struct {
|
||||
_dataMap map[int32]*GameGuildBossRouletteData
|
||||
_dataList []*GameGuildBossRouletteData
|
||||
}
|
||||
|
||||
func NewGameGuildBossRoulette(_buf []map[string]interface{}) (*GameGuildBossRoulette, error) {
|
||||
_dataList := make([]*GameGuildBossRouletteData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGuildBossRouletteData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGuildBossRouletteData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameGuildBossRoulette{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGuildBossRoulette) GetDataMap() map[int32]*GameGuildBossRouletteData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGuildBossRoulette) GetDataList() []*GameGuildBossRouletteData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGuildBossRoulette) Get(key int32) *GameGuildBossRouletteData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
67
sys/configure/structs/Game.GuildBossRouletteData.go
Normal file
67
sys/configure/structs/Game.GuildBossRouletteData.go
Normal file
@ -0,0 +1,67 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameGuildBossRouletteData struct {
|
||||
Id int32
|
||||
Reward []*Gameatn
|
||||
Weight int32
|
||||
Need []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_GameGuildBossRouletteData = 797473250
|
||||
|
||||
func (*GameGuildBossRouletteData) GetTypeId() int32 {
|
||||
return 797473250
|
||||
}
|
||||
|
||||
func (_v *GameGuildBossRouletteData)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 _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
|
||||
|
||||
_v.Reward = make([]*Gameatn, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Gameatn
|
||||
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
|
||||
_v.Reward = append(_v.Reward, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["need"].([]interface{}); !_ok_ { err = errors.New("need error"); return }
|
||||
|
||||
_v.Need = 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.Need = append(_v.Need, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameGuildBossRouletteData(_buf map[string]interface{}) (*GameGuildBossRouletteData, error) {
|
||||
v := &GameGuildBossRouletteData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.GuildBossScore.go
Normal file
42
sys/configure/structs/Game.GuildBossScore.go
Normal 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 GameGuildBossScore struct {
|
||||
_dataMap map[int32]*GameGuildBossScoreData
|
||||
_dataList []*GameGuildBossScoreData
|
||||
}
|
||||
|
||||
func NewGameGuildBossScore(_buf []map[string]interface{}) (*GameGuildBossScore, error) {
|
||||
_dataList := make([]*GameGuildBossScoreData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGuildBossScoreData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGuildBossScoreData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameGuildBossScore{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGuildBossScore) GetDataMap() map[int32]*GameGuildBossScoreData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGuildBossScore) GetDataList() []*GameGuildBossScoreData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGuildBossScore) Get(key int32) *GameGuildBossScoreData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
49
sys/configure/structs/Game.GuildBossScoreData.go
Normal file
49
sys/configure/structs/Game.GuildBossScoreData.go
Normal file
@ -0,0 +1,49 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameGuildBossScoreData struct {
|
||||
Id int32
|
||||
ScoreName string
|
||||
Score int32
|
||||
RankLow int32
|
||||
RankUp int32
|
||||
Hp int32
|
||||
Drop int32
|
||||
Grade string
|
||||
}
|
||||
|
||||
const TypeId_GameGuildBossScoreData = -1258467656
|
||||
|
||||
func (*GameGuildBossScoreData) GetTypeId() int32 {
|
||||
return -1258467656
|
||||
}
|
||||
|
||||
func (_v *GameGuildBossScoreData)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["score_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.ScoreName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.ScoreName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score"].(float64); !_ok_ { err = errors.New("score error"); return }; _v.Score = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rank_low"].(float64); !_ok_ { err = errors.New("rank_low error"); return }; _v.RankLow = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rank_up"].(float64); !_ok_ { err = errors.New("rank_up error"); return }; _v.RankUp = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hp"].(float64); !_ok_ { err = errors.New("hp error"); return }; _v.Hp = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["drop"].(float64); !_ok_ { err = errors.New("drop error"); return }; _v.Drop = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Grade, _ok_ = _buf["grade"].(string); !_ok_ { err = errors.New("grade error"); return } }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameGuildBossScoreData(_buf map[string]interface{}) (*GameGuildBossScoreData, error) {
|
||||
v := &GameGuildBossScoreData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameGuildBossTask struct {
|
||||
_dataMap map[int32]*GameGuildBossTaskData
|
||||
_dataList []*GameGuildBossTaskData
|
||||
}
|
||||
|
||||
func NewGameGuildBossTask(_buf []map[string]interface{}) (*GameGuildBossTask, error) {
|
||||
_dataList := make([]*GameGuildBossTaskData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGuildBossTaskData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGuildBossTaskData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameGuildBossTask{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGuildBossTask) GetDataMap() map[int32]*GameGuildBossTaskData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGuildBossTask) GetDataList() []*GameGuildBossTaskData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGuildBossTask) Get(key int32) *GameGuildBossTaskData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameRobotDataData struct {
|
||||
Robotid int32
|
||||
Icon string
|
||||
Lvshow int32
|
||||
Name string
|
||||
Sex int32
|
||||
Showid string
|
||||
}
|
||||
|
||||
const TypeId_GameRobotDataData = 1848956418
|
||||
|
||||
func (*GameRobotDataData) GetTypeId() int32 {
|
||||
return 1848956418
|
||||
}
|
||||
|
||||
func (_v *GameRobotDataData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["robotid"].(float64); !_ok_ { err = errors.New("robotid error"); return }; _v.Robotid = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lvshow"].(float64); !_ok_ { err = errors.New("lvshow error"); return }; _v.Lvshow = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["sex"].(float64); !_ok_ { err = errors.New("sex error"); return }; _v.Sex = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Showid, _ok_ = _buf["showid"].(string); !_ok_ { err = errors.New("showid error"); return } }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameRobotDataData(_buf map[string]interface{}) (*GameRobotDataData, error) {
|
||||
v := &GameRobotDataData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/Game.SearchitemAll.go
Normal file
42
sys/configure/structs/Game.SearchitemAll.go
Normal 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 GameSearchitemAll struct {
|
||||
_dataMap map[int32]*GameSearchitemAllData
|
||||
_dataList []*GameSearchitemAllData
|
||||
}
|
||||
|
||||
func NewGameSearchitemAll(_buf []map[string]interface{}) (*GameSearchitemAll, error) {
|
||||
_dataList := make([]*GameSearchitemAllData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameSearchitemAllData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameSearchitemAllData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Taskid] = _v
|
||||
}
|
||||
}
|
||||
return &GameSearchitemAll{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameSearchitemAll) GetDataMap() map[int32]*GameSearchitemAllData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameSearchitemAll) GetDataList() []*GameSearchitemAllData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameSearchitemAll) Get(key int32) *GameSearchitemAllData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
67
sys/configure/structs/Game.SearchitemAllData.go
Normal file
67
sys/configure/structs/Game.SearchitemAllData.go
Normal file
@ -0,0 +1,67 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameSearchitemAllData struct {
|
||||
Taskid int32
|
||||
Pointnum int32
|
||||
Point []string
|
||||
Pointweight []int32
|
||||
}
|
||||
|
||||
const TypeId_GameSearchitemAllData = -125323084
|
||||
|
||||
func (*GameSearchitemAllData) GetTypeId() int32 {
|
||||
return -125323084
|
||||
}
|
||||
|
||||
func (_v *GameSearchitemAllData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["taskid"].(float64); !_ok_ { err = errors.New("taskid error"); return }; _v.Taskid = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pointnum"].(float64); !_ok_ { err = errors.New("pointnum error"); return }; _v.Pointnum = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["point"].([]interface{}); !_ok_ { err = errors.New("point error"); return }
|
||||
|
||||
_v.Point = make([]string, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ string
|
||||
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
|
||||
_v.Point = append(_v.Point, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["pointweight"].([]interface{}); !_ok_ { err = errors.New("pointweight error"); return }
|
||||
|
||||
_v.Pointweight = 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.Pointweight = append(_v.Pointweight, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameSearchitemAllData(_buf map[string]interface{}) (*GameSearchitemAllData, error) {
|
||||
v := &GameSearchitemAllData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
@ -87,7 +87,6 @@ type Tables struct {
|
||||
GuildActivity *GameGuildActivity
|
||||
GuildSign *GameGuildSign
|
||||
GuildTask *GameGuildTask
|
||||
GuildBossTask *GameGuildBossTask
|
||||
Horoscope *GameHoroscope
|
||||
Sign *GameSign
|
||||
SignReset *GameSignReset
|
||||
@ -191,6 +190,15 @@ type Tables struct {
|
||||
drawReward *GamedrawReward
|
||||
drawReplace *GamedrawReplace
|
||||
drawcardReward *GamedrawcardReward
|
||||
AnnulartaskAll *GameAnnulartaskAll
|
||||
Annulartask_Library *GameAnnulartask_Library
|
||||
AskAll *GameAskAll
|
||||
AskLibrary *GameAskLibrary
|
||||
SearchitemAll *GameSearchitemAll
|
||||
GuildBoss *GameGuildBoss
|
||||
GuildBossRoulette *GameGuildBossRoulette
|
||||
GuildBossRank *GameGuildBossRank
|
||||
GuildBossScore *GameGuildBossScore
|
||||
}
|
||||
|
||||
func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
@ -654,12 +662,6 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.GuildTask, err = NewGameGuildTask(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_guildbosstask") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.GuildBossTask, err = NewGameGuildBossTask(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_horoscope") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -1278,5 +1280,59 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.drawcardReward, err = NewGamedrawcardReward(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_annulartaskall") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.AnnulartaskAll, err = NewGameAnnulartaskAll(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_annulartask_library") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.Annulartask_Library, err = NewGameAnnulartask_Library(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_askall") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.AskAll, err = NewGameAskAll(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_asklibrary") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.AskLibrary, err = NewGameAskLibrary(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_searchitemall") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.SearchitemAll, err = NewGameSearchitemAll(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_guildboss") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.GuildBoss, err = NewGameGuildBoss(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_guildbossroulette") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.GuildBossRoulette, err = NewGameGuildBossRoulette(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_guildbossrank") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.GuildBossRank, err = NewGameGuildBossRank(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_guildbossscore") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.GuildBossScore, err = NewGameGuildBossScore(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return tables, nil
|
||||
}
|
||||
|
@ -138,6 +138,7 @@ type GameGlobalData struct {
|
||||
FriendPeize []*Gameatn
|
||||
EquipWash []*Gameatn
|
||||
TalentReset []*Gameatn
|
||||
HeroMaxstar int32
|
||||
RunHorsetime1 int32
|
||||
RunHorsetime2 int32
|
||||
BoyHeadPortrait string
|
||||
@ -630,6 +631,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hero_maxstar"].(float64); !_ok_ { err = errors.New("hero_maxstar error"); return }; _v.HeroMaxstar = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["run_horsetime1"].(float64); !_ok_ { err = errors.New("run_horsetime1 error"); return }; _v.RunHorsetime1 = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["run_horsetime2"].(float64); !_ok_ { err = errors.New("run_horsetime2 error"); return }; _v.RunHorsetime2 = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.BoyHeadPortrait, _ok_ = _buf["boy_headPortrait"].(string); !_ok_ { err = errors.New("boy_headPortrait error"); return } }
|
||||
|
Loading…
Reference in New Issue
Block a user