Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
30c284b222
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分"
|
||||
}
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,9 @@
|
||||
{
|
||||
"id": 20001,
|
||||
"type": 1,
|
||||
"repeat_num": 5,
|
||||
"type2": 101,
|
||||
"day": 1,
|
||||
"repeat_num": 1,
|
||||
"refreshtime": 1,
|
||||
"packagetype": "",
|
||||
"buy_num": 1,
|
||||
@ -28,13 +30,15 @@
|
||||
{
|
||||
"id": 20002,
|
||||
"type": 1,
|
||||
"repeat_num": 2,
|
||||
"refreshtime": 30,
|
||||
"type2": 101,
|
||||
"day": 2,
|
||||
"repeat_num": 1,
|
||||
"refreshtime": 1,
|
||||
"packagetype": "",
|
||||
"buy_num": 2,
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_20002",
|
||||
"text": "兑换礼包"
|
||||
"text": "每日好礼"
|
||||
},
|
||||
"costitem": [
|
||||
{
|
||||
@ -54,12 +58,96 @@
|
||||
{
|
||||
"id": 20003,
|
||||
"type": 1,
|
||||
"type2": 101,
|
||||
"day": 3,
|
||||
"repeat_num": 1,
|
||||
"refreshtime": 1,
|
||||
"packagetype": "",
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_20003",
|
||||
"text": "每日好礼"
|
||||
},
|
||||
"costitem": [],
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10000001",
|
||||
"n": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 20004,
|
||||
"type": 1,
|
||||
"type2": 101,
|
||||
"day": 4,
|
||||
"repeat_num": 1,
|
||||
"refreshtime": 1,
|
||||
"packagetype": "",
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_20004",
|
||||
"text": "每日好礼"
|
||||
},
|
||||
"costitem": [],
|
||||
"item": []
|
||||
},
|
||||
{
|
||||
"id": 20005,
|
||||
"type": 1,
|
||||
"type2": 101,
|
||||
"day": 5,
|
||||
"repeat_num": 1,
|
||||
"refreshtime": 1,
|
||||
"packagetype": "",
|
||||
"buy_num": 1,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_20005",
|
||||
"text": "每日好礼"
|
||||
},
|
||||
"costitem": [],
|
||||
"item": []
|
||||
},
|
||||
{
|
||||
"id": 20006,
|
||||
"type": 1,
|
||||
"type2": 102,
|
||||
"day": 0,
|
||||
"repeat_num": 2,
|
||||
"refreshtime": 30,
|
||||
"packagetype": "",
|
||||
"buy_num": 2,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_20006",
|
||||
"text": "兑换礼包"
|
||||
},
|
||||
"costitem": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"n": 1888
|
||||
}
|
||||
],
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10000001",
|
||||
"n": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 20007,
|
||||
"type": 1,
|
||||
"type2": 103,
|
||||
"day": 0,
|
||||
"repeat_num": 3,
|
||||
"refreshtime": 30,
|
||||
"packagetype": "drawcard_pack1",
|
||||
"buy_num": 3,
|
||||
"packagename": {
|
||||
"key": "paypackage_paypackage_packagename_20003",
|
||||
"key": "paypackage_paypackage_packagename_20007",
|
||||
"text": "招募礼包1"
|
||||
},
|
||||
"costitem": [],
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
@ -9,14 +9,17 @@ import (
|
||||
)
|
||||
|
||||
// 刷新
|
||||
func (a *apiComp) RefreshCheck(session comm.IUserSession, req *pb.DispatchRefreshReq) (errdata *pb.ErrorData) {
|
||||
func (this *apiComp) RefreshCheck(session comm.IUserSession, req *pb.DispatchRefreshReq) (errdata *pb.ErrorData) {
|
||||
return
|
||||
}
|
||||
|
||||
func (a *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq) (errdata *pb.ErrorData) {
|
||||
|
||||
d := a.module.modelDispatch.getDBDispatch(session.GetUserId())
|
||||
if d == nil {
|
||||
func (this *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
info *pb.DBDispatch
|
||||
need []*cfg.Gameatn
|
||||
)
|
||||
info = this.module.modelDispatch.getDBDispatch(session.GetUserId())
|
||||
if info == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DataNotFound,
|
||||
Title: pb.ErrorCode_DataNotFound.ToString(),
|
||||
@ -24,10 +27,10 @@ func (a *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq)
|
||||
return
|
||||
}
|
||||
|
||||
if d.Nb != nil {
|
||||
if d.Nb.FreeCount > 0 {
|
||||
if info.Nb != nil {
|
||||
if info.Nb.FreeCount > 0 {
|
||||
//更新刷新次数
|
||||
if err := a.module.modelDispatch.updateFreeCount(session.GetUserId(), d.Nb); err != nil {
|
||||
if err := this.module.modelDispatch.updateFreeCount(session.GetUserId(), info.Nb); err != nil {
|
||||
var customer = new(comm.CustomError)
|
||||
var code pb.ErrorCode
|
||||
if errors.As(err, &customer) {
|
||||
@ -47,24 +50,28 @@ func (a *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
refreshCount := a.module.ModuleTools.GetGlobalConf().DispatchRefreshtimes
|
||||
if d.Nb.RefreshCount >= refreshCount {
|
||||
refreshCount := this.module.ModuleTools.GetGlobalConf().DispatchRefreshtimes
|
||||
if info.Nb.RefreshCount >= refreshCount {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DispatchRefreshMax,
|
||||
Title: pb.ErrorCode_DispatchRefreshMax.ToString(),
|
||||
Code: pb.ErrorCode_DispatchRefreshMax,
|
||||
Title: pb.ErrorCode_DispatchRefreshMax.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
//消耗金币
|
||||
money := a.module.ModuleTools.GetGlobalConf().DispatchCheckmoney
|
||||
if errdata = a.module.CheckRes(session, []*cfg.Gameatn{money}); errdata != nil {
|
||||
return
|
||||
}
|
||||
need = make([]*cfg.Gameatn, 0)
|
||||
money := this.module.ModuleTools.GetGlobalConf().DispatchCheckmoney
|
||||
|
||||
if errdata = a.module.ConsumeRes(session, []*cfg.Gameatn{money}, true); errdata != nil {
|
||||
need = append(need, &cfg.Gameatn{
|
||||
A: money.A,
|
||||
T: money.T,
|
||||
N: money.N * (info.Nb.RefreshCount + 1),
|
||||
})
|
||||
//消耗金币
|
||||
|
||||
if errdata = this.module.ConsumeRes(session, need, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
if err := a.module.modelDispatch.updateRefreshCount(session.GetUserId(), d.Nb); err != nil {
|
||||
if err := this.module.modelDispatch.updateRefreshCount(session.GetUserId(), info.Nb); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
@ -76,22 +83,22 @@ func (a *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq)
|
||||
}
|
||||
|
||||
//刷新公告(随机新的任务 包括未领取和正在进行的任务)
|
||||
tasks, err := a.module.modelDispatch.taskRandom(session.GetUserId(), d)
|
||||
tasks, err := this.module.modelDispatch.taskRandom(session.GetUserId(), info)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
//更新公告任务
|
||||
if err := a.module.modelDispatch.updateTasks(session.GetUserId(), d.Nb, tasks); err != nil {
|
||||
a.module.Debug("更新公告失败", log.Field{Key: "uid", Value: session.GetUserId()})
|
||||
if err := this.module.modelDispatch.updateTasks(session.GetUserId(), info.Nb, tasks); err != nil {
|
||||
this.module.Debug("更新公告失败", log.Field{Key: "uid", Value: session.GetUserId()})
|
||||
return
|
||||
}
|
||||
|
||||
rsp := &pb.DispatchRefreshResp{
|
||||
FreeCount: d.Nb.FreeCount,
|
||||
RefreshCount: d.Nb.RefreshCount,
|
||||
FreeCount: info.Nb.FreeCount,
|
||||
RefreshCount: info.Nb.RefreshCount,
|
||||
}
|
||||
|
||||
session.SendMsg(string(a.module.GetType()), "refresh", rsp)
|
||||
session.SendMsg(string(this.module.GetType()), "refresh", rsp)
|
||||
return
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ func (this *apiComp) ActivityBuyCheck(session comm.IUserSession, req *pb.PayActi
|
||||
return
|
||||
}
|
||||
|
||||
// /获取系统公告
|
||||
// 获取系统公告
|
||||
func (this *apiComp) ActivityBuy(session comm.IUserSession, req *pb.PayActivityBuyReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
info *pb.DBActivityGiftbag
|
||||
@ -54,6 +54,16 @@ func (this *apiComp) ActivityBuy(session comm.IUserSession, req *pb.PayActivityB
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if conf.Day > 0 && info.Activitys[conf.Type].Days < conf.Day {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
buynum = info.Activitys[conf.Type].Items[conf.Id].Buyunm
|
||||
totalbuy = info.Activitys[conf.Type].Items[conf.Id].Totalbuynum
|
||||
if conf.RepeatNum >= totalbuy || conf.BuyNum >= 0 && buynum >= conf.BuyNum {
|
||||
@ -69,11 +79,9 @@ func (this *apiComp) ActivityBuy(session comm.IUserSession, req *pb.PayActivityB
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if errdata, items = this.module.modelActivity.delivery(session, conf.Packagetype); errdata != nil {
|
||||
if errdata, items = this.module.modelActivity.deliverybyid(session, conf.Id); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "activitybuy", &pb.PayDailyBuyResp{Isucc: true, Items: items})
|
||||
return
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ func (this *apiComp) DailyBuy(session comm.IUserSession, req *pb.PayDailyBuyReq)
|
||||
}
|
||||
}
|
||||
|
||||
if errdata, items = this.module.modelDaily.delivery(session, conf.Packagetype); errdata != nil {
|
||||
if errdata, items = this.module.modelDaily.deliverybyid(session, conf.Id); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -70,16 +71,16 @@ func (this *apiComp) GetActivity(session comm.IUserSession, req *pb.PayGetActivi
|
||||
v.Lastrefresh = configure.Now().Unix()
|
||||
}
|
||||
}
|
||||
if err = this.module.modelActivity.updateActivitys(session.GetUserId(), activitys); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "info", &pb.PayGetActivityResp{Info: info})
|
||||
info.Days = int32(utils.DiffDays(configure.Now().Unix(), info.Opentime)) + 1
|
||||
if err = this.module.modelActivity.updateActivitys(session.GetUserId(), activitys); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "getactivity", &pb.PayGetActivityResp{Info: info})
|
||||
return
|
||||
}
|
||||
|
@ -80,6 +80,70 @@ func (this *modelActivityComp) updateActivitys(uid string, data *pb.DBActivityGi
|
||||
return
|
||||
}
|
||||
|
||||
// 每日礼包发货
|
||||
func (this *modelActivityComp) deliverybyid(session comm.IUserSession, id int32) (errdata *pb.ErrorData, items []*pb.UserAssets) {
|
||||
var (
|
||||
info *pb.DBActivityGiftbag
|
||||
item *pb.ActivityGiftbagItem
|
||||
conf *cfg.GamePayGiftpackData
|
||||
ok bool
|
||||
err error
|
||||
)
|
||||
if conf, err = this.module.configure.getPayGiftpackeData(id); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if info, err = this.getUserActivitys(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if item, ok = info.Activitys[conf.Type]; !ok {
|
||||
item = &pb.ActivityGiftbagItem{
|
||||
Opentime: 0,
|
||||
Items: make(map[int32]*pb.PayActivityGiftbagItem),
|
||||
}
|
||||
info.Activitys[conf.Type] = item
|
||||
}
|
||||
|
||||
if _, ok = item.Items[conf.Id]; ok {
|
||||
item.Items[conf.Id] = &pb.PayActivityGiftbagItem{
|
||||
Id: conf.Id,
|
||||
}
|
||||
return
|
||||
}
|
||||
item.Items[conf.Id].Buyunm++
|
||||
item.Items[conf.Id].Totalbuynum++
|
||||
if err = this.updateActivitys(session.GetUserId(), info); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
items = make([]*pb.UserAssets, len(conf.Item))
|
||||
for i, v := range conf.Item {
|
||||
items[i] = &pb.UserAssets{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: v.N,
|
||||
}
|
||||
}
|
||||
if errdata = this.module.DispenseRes(session, conf.Item, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 每日礼包发货
|
||||
func (this *modelActivityComp) delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
|
||||
var (
|
||||
|
@ -57,6 +57,54 @@ func (this *modelDailyComp) updateUserDaily(info *pb.DBPayDaily) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// 每日礼包发货
|
||||
func (this *modelDailyComp) deliverybyid(session comm.IUserSession, id int32) (errdata *pb.ErrorData, items []*pb.UserAssets) {
|
||||
var (
|
||||
info *pb.DBPayDaily
|
||||
conf *cfg.GamePayPackageData
|
||||
err error
|
||||
)
|
||||
if conf, err = this.module.configure.getPayPackageData(id); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if info, err = this.queryUserDaily(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
if info.Items[conf.Id] == nil {
|
||||
info.Items[conf.Id] = &pb.PayDailyItem{
|
||||
Id: conf.Id,
|
||||
Buyunm: 0,
|
||||
Lastrefresh: configure.Now().Unix(),
|
||||
}
|
||||
}
|
||||
info.Items[conf.Id].Buyunm++
|
||||
if err = this.updateUserDaily(info); err != nil {
|
||||
return
|
||||
}
|
||||
items = make([]*pb.UserAssets, len(conf.Item))
|
||||
for i, v := range conf.Item {
|
||||
items[i] = &pb.UserAssets{
|
||||
A: v.A,
|
||||
T: v.T,
|
||||
N: v.N,
|
||||
}
|
||||
}
|
||||
if errdata = this.module.DispenseRes(session, conf.Item, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 每日礼包发货
|
||||
func (this *modelDailyComp) delivery(session comm.IUserSession, pid string) (errdata *pb.ErrorData, items []*pb.UserAssets) {
|
||||
var (
|
||||
|
@ -149,6 +149,12 @@ func (this *Pay) Rpc_ModulePayDelivery(ctx context.Context, args *pb.PayDelivery
|
||||
return
|
||||
}
|
||||
break
|
||||
case 5:
|
||||
if errdata, items = this.modelActivity.delivery(session, args.Productid); errdata != nil {
|
||||
reply.Code = errdata.Code
|
||||
return
|
||||
}
|
||||
break
|
||||
}
|
||||
for _, v := range res {
|
||||
items = append(items, &pb.UserAssets{A: v.A, T: v.T, N: v.N})
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/lego/sys/mgo"
|
||||
"go_dreamfactory/modules"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
@ -24,7 +25,7 @@ func (this *modelGlobal) Init(service core.IService, module core.IModule, comp c
|
||||
|
||||
// 查询全局配置
|
||||
func (this *modelGlobal) GetGlobalData(key string, v interface{}) (err error) {
|
||||
if err = this.DBModel.DB.FindOne(core.SqlTable(this.TableName), bson.M{"_id": key}).Decode(v); err != nil {
|
||||
if err = this.DBModel.DB.FindOne(core.SqlTable(this.TableName), bson.M{"_id": key}).Decode(v); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Error("GetGlobalData err", log.Field{Key: "key", Value: key}, log.Field{Key: "err", Value: err.Error()})
|
||||
}
|
||||
return
|
||||
|
@ -3,21 +3,62 @@ package uniongve
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.UniongveChallengeReq) (errdata *pb.ErrorData) {
|
||||
|
||||
if req.Unionid == "" || req.Boosid == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: req.String(),
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 获取工会boos战信息
|
||||
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.UniongveChallengeReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
record *pb.DBBattleRecord
|
||||
conf *cfg.GameGuildBossData
|
||||
err error
|
||||
)
|
||||
|
||||
if errdata = this.ChallengeCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "challenge", &pb.UniongveRankResp{})
|
||||
if conf, err = this.module.configure.getguildbossByid(req.Boosid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||
Ptype: pb.PlayType_moonfantasy,
|
||||
Format: req.Battle,
|
||||
Mformat: conf.Boss,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "challenge", &pb.UniongveChallengeResp{
|
||||
Unionid: req.Unionid,
|
||||
Boosid: req.Boosid,
|
||||
Info: &pb.BattleInfo{
|
||||
Id: record.Id,
|
||||
Rulesid: conf.BattleReadyID,
|
||||
Btype: record.Btype,
|
||||
Ptype: record.Ptype,
|
||||
RedCompId: record.RedCompId,
|
||||
Redflist: record.Redflist,
|
||||
BlueCompId: record.BlueCompId,
|
||||
Buleflist: record.Buleflist,
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
package uniongve
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
// 参数校验
|
||||
@ -13,11 +16,91 @@ func (this *apiComp) ChallengeFinishCheck(session comm.IUserSession, req *pb.Uni
|
||||
|
||||
// 获取工会boos战信息
|
||||
func (this *apiComp) ChallengeFinish(session comm.IUserSession, req *pb.UniongveChallengeFinishRep) (errdata *pb.ErrorData) {
|
||||
|
||||
var (
|
||||
conf *cfg.GameGuildBossData
|
||||
score *cfg.GameGuildBossScoreData
|
||||
info *pb.DBUnionGve
|
||||
prop []*cfg.Gameatn
|
||||
ok bool
|
||||
err error
|
||||
)
|
||||
if errdata = this.ChallengeFinishCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if conf, err = this.module.configure.getguildbossByid(req.Boosid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if errdata, _ = this.module.battle.CheckBattleReport(session, req.Report); errdata != nil {
|
||||
return
|
||||
}
|
||||
if score, err = this.module.configure.getguildbossscore(conf.Group, req.Report.Harm); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
|
||||
if errdata = this.module.DispenseRes(session, prop, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
lock, _ := this.module.modelUniongve.userlock(req.Unionid)
|
||||
err = lock.Lock()
|
||||
if err != nil {
|
||||
this.module.Error("公会战分布式锁 err!", log.Field{Key: "Unionid", Value: req.Unionid}, log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
defer lock.Unlock()
|
||||
if info, err = this.module.modelUniongve.getUnionGve(req.Unionid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range info.Boos {
|
||||
if v.Boosid == req.Boosid {
|
||||
if v.Hp > 0 {
|
||||
ok = true
|
||||
v.Hp -= score.Hp
|
||||
if v.Hp < 0 {
|
||||
v.Hp = 0
|
||||
this.module.modelUniongve.booskill(req.Unionid, req.Boosid, info)
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if ok {
|
||||
user := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||
if prop = this.module.ModuleTools.GetGroupDataByLottery(score.Drop, user.Vip, user.Lv); len(prop) == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: fmt.Sprintf("掉落组未找到:%d", score.Drop),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
if err = this.module.modelUniongve.updateUnionGve(info); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "challengefinish", &pb.UniongveChallengeFinishResp{})
|
||||
return
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package uniongve
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
@ -15,11 +16,26 @@ func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.UniongveInfoRe
|
||||
func (this *apiComp) Info(session comm.IUserSession, req *pb.UniongveInfoReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
info *pb.DBUnionGve
|
||||
err error
|
||||
)
|
||||
if errdata = this.InfoCheck(session, req); errdata != nil {
|
||||
return
|
||||
}
|
||||
this.module.modelUniongve.getUnionGve(req.Unionid)
|
||||
lock, _ := this.module.modelUniongve.userlock(req.Unionid)
|
||||
err = lock.Lock()
|
||||
if err != nil {
|
||||
this.module.Error("公会战分布式锁 err!", log.Field{Key: "Unionid", Value: req.Unionid}, log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
defer lock.Unlock()
|
||||
if info, err = this.module.modelUniongve.getUnionGve(req.Unionid); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "info", &pb.UniongveInfoResp{Info: info})
|
||||
return
|
||||
}
|
||||
|
@ -1,19 +1,100 @@
|
||||
package uniongve
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"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
|
||||
module *UnionGve
|
||||
}
|
||||
|
||||
// 组件初始化接口
|
||||
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)
|
||||
this.module = module.(*UnionGve)
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
// 获取所有难度一的boos
|
||||
func (this *MCompConfigure) getguildbossByid(id int32) (results *cfg.GameGuildBossData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
|
||||
if v, err = this.GetConfigure(game_guildboss); err != nil {
|
||||
return
|
||||
} else {
|
||||
if results, ok = v.(*cfg.GameGuildBoss).GetDataMap()[id]; !ok {
|
||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_guildboss, id)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 获取伤害对应的评分组
|
||||
func (this *MCompConfigure) getguildbossscore(group int32, harm int32) (results *cfg.GameGuildBossScoreData, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
)
|
||||
|
||||
if v, err = this.GetConfigure(game_guildbossscore); err != nil {
|
||||
return
|
||||
} else {
|
||||
for _, v := range v.(*cfg.GameGuildBossScore).GetDataList() {
|
||||
if harm >= v.RankLow && (harm <= v.RankUp || v.RankUp == -1) {
|
||||
results = v
|
||||
return
|
||||
}
|
||||
}
|
||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_guildbossscore, fmt.Sprintf("group:%d harm%d", group, harm))
|
||||
this.module.Errorf("err:%v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
5
modules/uniongve/core.go
Normal file
5
modules/uniongve/core.go
Normal file
@ -0,0 +1,5 @@
|
||||
package uniongve
|
||||
|
||||
const (
|
||||
UnionGveBoosCoonfKey = "UnionGveBoosCoonf"
|
||||
)
|
@ -1,16 +1,26 @@
|
||||
package uniongve
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/event"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/lego/sys/mgo"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"go_dreamfactory/utils"
|
||||
"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) {
|
||||
@ -20,21 +30,137 @@ func (this *ModelUniongve) Init(service core.IService, module core.IModule, comp
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelUniongve) Start() (err error) {
|
||||
err = this.MCompModel.Start()
|
||||
|
||||
event.RegisterGO(core.Event_ServiceStartEnd, func() {
|
||||
err = this.loadGlobalBoos()
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// 获取用户全部的埋点数据
|
||||
func (this *ModelUniongve) getUnionGve(unionid string) (results *pb.DBUnionGve, err error) {
|
||||
var (
|
||||
confs *pb.DBUnionGveBossConf
|
||||
conf *cfg.GameGuildBossData
|
||||
)
|
||||
results = &pb.DBUnionGve{}
|
||||
if err = this.Get(unionid, results); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
if err == mgo.MongodbNil {
|
||||
err = nil
|
||||
if confs, err = this.getGlobalBoos(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
results = &pb.DBUnionGve{
|
||||
Unionid: unionid,
|
||||
Currstage: 0,
|
||||
Rtime: confs.Rtime,
|
||||
Boos: make([]*pb.DBUnionGveBoss, 0),
|
||||
}
|
||||
for _, v := range confs.Boos {
|
||||
if conf, err = this.module.configure.getguildbossByid(v); err != nil {
|
||||
return
|
||||
}
|
||||
results.Boos = append(results.Boos, &pb.DBUnionGveBoss{
|
||||
Boosid: v,
|
||||
Hp: conf.Hp,
|
||||
Record: make([]*pb.DBGveRecord, 0),
|
||||
})
|
||||
}
|
||||
err = this.Add(unionid, results)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelUniongve) updateUnionGve(data *pb.DBUnionGve) (err error) {
|
||||
if err = this.Change(data.Unionid, map[string]interface{}{
|
||||
"fire": data.Fire,
|
||||
"notice": data.Notice,
|
||||
"currstage": data.Currstage,
|
||||
"rtime": data.Rtime,
|
||||
"boos": data.Boos,
|
||||
}); err != nil {
|
||||
this.module.Error("更新用户任务数据 错误!", log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 刷新全局配置
|
||||
func (this *ModelUniongve) loadGlobalBoos() (err error) {
|
||||
var (
|
||||
bossconf *pb.DBUnionGveBossConf = &pb.DBUnionGveBossConf{}
|
||||
)
|
||||
if err = this.module.ModuleTools.GetGlobalData(UnionGveBoosCoonfKey, bossconf); err != nil && err != mgo.MongodbNil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
|
||||
if err == mgo.MongodbNil {
|
||||
_, err = this.refreshGlobalBoos()
|
||||
return
|
||||
}
|
||||
this.conflock.Lock()
|
||||
this.bossconf = bossconf
|
||||
this.conflock.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModelUniongve) getGlobalBoos() (conf *pb.DBUnionGveBossConf, err error) {
|
||||
var (
|
||||
bossconf *pb.DBUnionGveBossConf
|
||||
)
|
||||
this.conflock.RLock()
|
||||
bossconf = this.bossconf
|
||||
this.conflock.Unlock()
|
||||
if bossconf == nil || !utils.IsSameWeek(bossconf.Rtime) {
|
||||
if bossconf, err = this.refreshGlobalBoos(); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 刷新全局配置
|
||||
func (this *ModelUniongve) refreshGlobalBoos() (conf *pb.DBUnionGveBossConf, err error) {
|
||||
var (
|
||||
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))
|
||||
conf = &pb.DBUnionGveBossConf{
|
||||
Key: UnionGveBoosCoonfKey,
|
||||
Rtime: configure.Now().Unix(),
|
||||
Boos: make([]int32, 5),
|
||||
}
|
||||
for i := 0; i < 5; i++ {
|
||||
conf.Boos[i] = booss[rands[i]].BossId
|
||||
}
|
||||
this.conflock.Lock()
|
||||
this.bossconf = conf
|
||||
this.conflock.Unlock()
|
||||
this.module.ModuleTools.UpdateGlobalData(UnionGveBoosCoonfKey, conf)
|
||||
return
|
||||
}
|
||||
|
||||
// 分布式锁
|
||||
func (this *ModelUniongve) userlock(id string) (result *redis.RedisMutex, err error) {
|
||||
return this.DBModel.Redis.NewRedisMutex(fmt.Sprintf("uniongve:%s", id))
|
||||
}
|
||||
|
||||
// 击杀boos
|
||||
func (this *ModelUniongve) booskill(unionid string, boosid int32, info *pb.DBUnionGve) {
|
||||
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ func NewModule() core.IModule {
|
||||
|
||||
type UnionGve struct {
|
||||
modules.ModuleBase
|
||||
service core.IService
|
||||
battle comm.IBattle
|
||||
api *apiComp
|
||||
modelUniongve *ModelUniongve
|
||||
configure *MCompConfigure
|
||||
@ -26,12 +28,16 @@ func (this *UnionGve) GetType() core.M_Modules {
|
||||
// 模块初始化接口 注册用户创建角色事件
|
||||
func (this *UnionGve) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
// 模块初始化接口 注册用户创建角色事件
|
||||
func (this *UnionGve) Start() (err error) {
|
||||
err = this.ModuleBase.Start()
|
||||
var module core.IModule
|
||||
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
||||
return
|
||||
}
|
||||
this.battle = module.(comm.IBattle)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -339,7 +339,8 @@ type ActivityGiftbagItem struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Opentime int64 `protobuf:"varint,1,opt,name=opentime,proto3" json:"opentime"`
|
||||
Items map[int32]*PayActivityGiftbagItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //商品购买次数
|
||||
Days int32 `protobuf:"varint,2,opt,name=days,proto3" json:"days"` //开启天数
|
||||
Items map[int32]*PayActivityGiftbagItem `protobuf:"bytes,3,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //商品购买次数
|
||||
}
|
||||
|
||||
func (x *ActivityGiftbagItem) Reset() {
|
||||
@ -381,6 +382,13 @@ func (x *ActivityGiftbagItem) GetOpentime() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActivityGiftbagItem) GetDays() int32 {
|
||||
if x != nil {
|
||||
return x.Days
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActivityGiftbagItem) GetItems() map[int32]*PayActivityGiftbagItem {
|
||||
if x != nil {
|
||||
return x.Items
|
||||
@ -507,28 +515,30 @@ var file_pay_pay_db_proto_rawDesc = []byte{
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x41, 0x63, 0x74, 0x69,
|
||||
0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x13, 0x41,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcf, 0x01, 0x0a, 0x13, 0x41,
|
||||
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x35,
|
||||
0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
|
||||
0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x51, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x50, 0x61, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
|
||||
0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x01, 0x0a, 0x16, 0x50, 0x61, 0x79,
|
||||
0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x79, 0x75, 0x6e, 0x6d, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x79, 0x75, 0x6e, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x74,
|
||||
0x6f, 0x74, 0x61, 0x6c, 0x62, 0x75, 0x79, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x62, 0x75, 0x79, 0x6e, 0x75, 0x6d, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x61,
|
||||
0x79, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x1f, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74,
|
||||
0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x51, 0x0a, 0x0a, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x50, 0x61, 0x79, 0x41, 0x63,
|
||||
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74, 0x62, 0x61, 0x67, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x01, 0x0a,
|
||||
0x16, 0x50, 0x61, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x47, 0x69, 0x66, 0x74,
|
||||
0x62, 0x61, 0x67, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x79, 0x75, 0x6e,
|
||||
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x79, 0x75, 0x6e, 0x6d, 0x12,
|
||||
0x20, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x62, 0x75, 0x79, 0x6e, 0x75, 0x6d, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x62, 0x75, 0x79, 0x6e, 0x75,
|
||||
0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72,
|
||||
0x65, 0x73, 0x68, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -20,6 +20,70 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
//工会boos战 全局配置数据
|
||||
type DBUnionGveBossConf struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key" bson:"_id"` //刷新时间 //唯一ID
|
||||
Rtime int64 `protobuf:"varint,2,opt,name=rtime,proto3" json:"rtime"` //刷新时间
|
||||
Boos []int32 `protobuf:"varint,3,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) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
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
|
||||
@ -30,13 +94,14 @@ type DBUnionGve struct {
|
||||
Notice string `protobuf:"bytes,2,opt,name=notice,proto3" json:"notice"` //公告
|
||||
Fire int32 `protobuf:"varint,3,opt,name=fire,proto3" json:"fire"` //火力
|
||||
Currstage int32 `protobuf:"varint,4,opt,name=currstage,proto3" json:"currstage"` //当前第几阶段
|
||||
Boos []*DBUnionGveBoss `protobuf:"bytes,5,rep,name=boos,proto3" json:"boos"` //boos列表
|
||||
Rtime int64 `protobuf:"varint,5,opt,name=rtime,proto3" json:"rtime"` //刷新时间
|
||||
Boos []*DBUnionGveBoss `protobuf:"bytes,6,rep,name=boos,proto3" json:"boos"` //boos列表
|
||||
}
|
||||
|
||||
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 +114,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 +127,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 {
|
||||
@ -93,6 +158,13 @@ func (x *DBUnionGve) GetCurrstage() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBUnionGve) GetRtime() int64 {
|
||||
if x != nil {
|
||||
return x.Rtime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBUnionGve) GetBoos() []*DBUnionGveBoss {
|
||||
if x != nil {
|
||||
return x.Boos
|
||||
@ -114,7 +186,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 +199,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 +212,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 +249,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 +262,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 +275,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,28 +296,34 @@ 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,
|
||||
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,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x66, 0x69, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x66, 0x69, 0x72,
|
||||
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x72, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x75, 0x72, 0x72, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12,
|
||||
0x23, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
|
||||
0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x04,
|
||||
0x62, 0x6f, 0x6f, 0x73, 0x22, 0x5e, 0x0a, 0x0e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47,
|
||||
0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x68, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x68, 0x70, 0x12, 0x24,
|
||||
0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c,
|
||||
0x2e, 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65,
|
||||
0x63, 0x6f, 0x72, 0x64, 0x22, 0x3d, 0x0a, 0x0b, 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, 0x65, 0x63,
|
||||
0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x67, 0x76, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x12,
|
||||
0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f,
|
||||
0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x22, 0xab,
|
||||
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, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x66, 0x69, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x66,
|
||||
0x69, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x75, 0x72, 0x72, 0x73, 0x74, 0x61, 0x67, 0x65,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x75, 0x72, 0x72, 0x73, 0x74, 0x61, 0x67,
|
||||
0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x18,
|
||||
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47,
|
||||
0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x73, 0x22, 0x5e, 0x0a, 0x0e,
|
||||
0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x42, 0x6f, 0x73, 0x73, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x02, 0x68, 0x70, 0x12, 0x24, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x47, 0x76, 0x65, 0x52, 0x65,
|
||||
0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x3d, 0x0a, 0x0b,
|
||||
0x44, 0x42, 0x47, 0x76, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -260,15 +338,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 +362,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 +374,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 +386,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 +416,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,
|
||||
},
|
||||
|
@ -599,8 +599,9 @@ type UniongveChallengeFinishRep struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
Info *BattleInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` //战斗信息
|
||||
Unionid string `protobuf:"bytes,1,opt,name=unionid,proto3" json:"unionid"`
|
||||
Boosid int32 `protobuf:"varint,2,opt,name=boosid,proto3" json:"boosid"`
|
||||
Report *BattleReport `protobuf:"bytes,3,opt,name=report,proto3" json:"report"` //战报
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishRep) Reset() {
|
||||
@ -635,16 +636,23 @@ func (*UniongveChallengeFinishRep) Descriptor() ([]byte, []int) {
|
||||
return file_uniongve_uniongve_msg_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishRep) GetBattleConfId() int32 {
|
||||
func (x *UniongveChallengeFinishRep) GetUnionid() string {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
return x.Unionid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishRep) GetBoosid() int32 {
|
||||
if x != nil {
|
||||
return x.Boosid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishRep) GetInfo() *BattleInfo {
|
||||
func (x *UniongveChallengeFinishRep) GetReport() *BattleReport {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
return x.Report
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -655,8 +663,10 @@ type UniongveChallengeFinishResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
BattleConfId int32 `protobuf:"varint,1,opt,name=battleConfId,proto3" json:"battleConfId"` //战斗配表ID
|
||||
Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报
|
||||
Unionid string `protobuf:"bytes,1,opt,name=unionid,proto3" json:"unionid"`
|
||||
Boosid int32 `protobuf:"varint,2,opt,name=boosid,proto3" json:"boosid"`
|
||||
Award []*UserAssets `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //奖励
|
||||
Efficient bool `protobuf:"varint,4,opt,name=efficient,proto3" json:"efficient"` //是否有效
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishResp) Reset() {
|
||||
@ -691,20 +701,34 @@ func (*UniongveChallengeFinishResp) Descriptor() ([]byte, []int) {
|
||||
return file_uniongve_uniongve_msg_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishResp) GetBattleConfId() int32 {
|
||||
func (x *UniongveChallengeFinishResp) GetUnionid() string {
|
||||
if x != nil {
|
||||
return x.BattleConfId
|
||||
return x.Unionid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishResp) GetBoosid() int32 {
|
||||
if x != nil {
|
||||
return x.Boosid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishResp) GetReport() *BattleReport {
|
||||
func (x *UniongveChallengeFinishResp) GetAward() []*UserAssets {
|
||||
if x != nil {
|
||||
return x.Report
|
||||
return x.Award
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UniongveChallengeFinishResp) GetEfficient() bool {
|
||||
if x != nil {
|
||||
return x.Efficient
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
//工会战 信息变化
|
||||
type UniongveInfoChangePush struct {
|
||||
state protoimpl.MessageState
|
||||
@ -941,34 +965,37 @@ var file_uniongve_uniongve_msg_proto_rawDesc = []byte{
|
||||
0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62,
|
||||
0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x61, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67,
|
||||
0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x75, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67,
|
||||
0x76, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
|
||||
0x68, 0x52, 0x65, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74,
|
||||
0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x1b, 0x55, 0x6e, 0x69,
|
||||
0x6f, 0x6e, 0x67, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x46, 0x69,
|
||||
0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74,
|
||||
0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
|
||||
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06,
|
||||
0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42,
|
||||
0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70,
|
||||
0x6f, 0x72, 0x74, 0x22, 0x39, 0x0a, 0x16, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a,
|
||||
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42,
|
||||
0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3a,
|
||||
0x0a, 0x17, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66,
|
||||
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f,
|
||||
0x6e, 0x47, 0x76, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x16, 0x55, 0x6e,
|
||||
0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x42, 0x6f, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x52,
|
||||
0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76,
|
||||
0x65, 0x52, 0x6f, 0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50,
|
||||
0x75, 0x73, 0x68, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x68, 0x52, 0x65, 0x70, 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, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x90, 0x01,
|
||||
0x0a, 0x1b, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65,
|
||||
0x6e, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 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, 0x62, 0x6f, 0x6f, 0x73, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x73, 0x69, 0x64, 0x12,
|
||||
0x21, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b,
|
||||
0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x61, 0x77, 0x61,
|
||||
0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74,
|
||||
0x22, 0x39, 0x0a, 0x16, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69,
|
||||
0x6f, 0x6e, 0x47, 0x76, 0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3a, 0x0a, 0x17, 0x55,
|
||||
0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, 0x43, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76,
|
||||
0x65, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x39, 0x0a, 0x16, 0x55, 0x6e, 0x69, 0x6f, 0x6e,
|
||||
0x67, 0x76, 0x65, 0x42, 0x6f, 0x6f, 0x73, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73,
|
||||
0x68, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0b, 0x2e, 0x44, 0x42, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x47, 0x76, 0x65, 0x52, 0x04, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x67, 0x76, 0x65, 0x52, 0x6f,
|
||||
0x75, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x73, 0x68,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -1014,8 +1041,8 @@ var file_uniongve_uniongve_msg_proto_depIdxs = []int32{
|
||||
18, // 2: UniongveRouletteResp.award:type_name -> UserAssets
|
||||
19, // 3: UniongveChallengeReq.battle:type_name -> BattleFormation
|
||||
20, // 4: UniongveChallengeResp.info:type_name -> BattleInfo
|
||||
20, // 5: UniongveChallengeFinishRep.info:type_name -> BattleInfo
|
||||
21, // 6: UniongveChallengeFinishResp.report:type_name -> BattleReport
|
||||
21, // 5: UniongveChallengeFinishRep.report:type_name -> BattleReport
|
||||
18, // 6: UniongveChallengeFinishResp.award:type_name -> UserAssets
|
||||
17, // 7: UniongveInfoChangePush.info:type_name -> DBUnionGve
|
||||
17, // 8: UniongveStageChangePush.info:type_name -> DBUnionGve
|
||||
17, // 9: UniongveBoosChangePush.info:type_name -> DBUnionGve
|
||||
|
@ -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]
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,8 @@ import "errors"
|
||||
type GamePayGiftpackData struct {
|
||||
Id int32
|
||||
Type int32
|
||||
Type2 int32
|
||||
Day int32
|
||||
RepeatNum int32
|
||||
Refreshtime int32
|
||||
Packagetype string
|
||||
@ -31,6 +33,8 @@ func (*GamePayGiftpackData) GetTypeId() int32 {
|
||||
func (_v *GamePayGiftpackData)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["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type2"].(float64); !_ok_ { err = errors.New("type2 error"); return }; _v.Type2 = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["day"].(float64); !_ok_ { err = errors.New("day error"); return }; _v.Day = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["repeat_num"].(float64); !_ok_ { err = errors.New("repeat_num error"); return }; _v.RepeatNum = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["refreshtime"].(float64); !_ok_ { err = errors.New("refreshtime error"); return }; _v.Refreshtime = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Packagetype, _ok_ = _buf["packagetype"].(string); !_ok_ { err = errors.New("packagetype error"); return } }
|
||||
|
@ -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