This commit is contained in:
liwei1dao 2023-01-14 21:45:52 +08:00
commit b882a2fbc5
67 changed files with 2299 additions and 2759 deletions

View File

@ -23,7 +23,7 @@
}, },
{ {
"a": "attr", "a": "attr",
"t": "diamond", "t": "gold",
"n": 10000 "n": 10000
} }
] ]

View File

@ -1,6 +1,6 @@
[ [
{ {
"system": 7, "id": 7,
"battletask_testing_id": [ "battletask_testing_id": [
101102 101102
] ]

View File

@ -39,7 +39,7 @@
"tipstxt": "Lack of experience" "tipstxt": "Lack of experience"
}, },
{ {
"key": "friend", "key": "friendPoint",
"name": "Friendship point", "name": "Friendship point",
"color": 1, "color": 1,
"effects": "", "effects": "",
@ -154,5 +154,18 @@
"ico": "wp_icon_0002", "ico": "wp_icon_0002",
"intr": "Currency used to purchase goods", "intr": "Currency used to purchase goods",
"tipstxt": "Lack of experience" "tipstxt": "Lack of experience"
},
{
"key": "heroexp",
"name": "heroexp",
"color": 3,
"effects": "",
"access": 0,
"star": 0,
"race": 0,
"img": "wp_icon_10009",
"ico": "wp_icon_10009",
"intr": "Currency used to purchase goods",
"tipstxt": "Lack of experience"
} }
] ]

View File

@ -139,8 +139,10 @@
{ {
"id": 10008, "id": 10008,
"scene": "leveldemo_fcamer_1_8", "scene": "leveldemo_fcamer_1_8",
"levelname": "Moon Hill", "levelname": "Save the holy tree",
"passformatList": [], "passformatList": [
720013
],
"passdroplist": [ "passdroplist": [
10301, 10301,
10302 10302
@ -148,7 +150,7 @@
"award": [ "award": [
{ {
"a": "attr", "a": "attr",
"t": "exp", "t": "gold",
"n": 1000 "n": 1000
} }
], ],

View File

@ -338,5 +338,22 @@
"clickstory": 100002, "clickstory": 100002,
"formatList": [], "formatList": [],
"award": [] "award": []
},
{
"id": 720013,
"type": 1,
"sencenstory": [],
"time": 3,
"clickstory": 0,
"formatList": [
720013
],
"award": [
{
"a": "attr",
"t": "gold",
"n": 1650
}
]
} }
] ]

View File

@ -88,7 +88,7 @@
"key": "strategy_text1", "key": "strategy_text1",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55005,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -198,7 +198,7 @@
"key": "strategy_text1", "key": "strategy_text1",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55005,
"boss": [ "boss": [
301014, 301014,
301015, 301015,
@ -308,7 +308,7 @@
"key": "strategy_text1", "key": "strategy_text1",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55005,
"boss": [ "boss": [
301017, 301017,
301018, 301018,
@ -418,7 +418,7 @@
"key": "strategy_text1", "key": "strategy_text1",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55005,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -528,7 +528,7 @@
"key": "strategy_text1", "key": "strategy_text1",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55005,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -638,7 +638,7 @@
"key": "strategy_text1", "key": "strategy_text1",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55005,
"boss": [ "boss": [
301014, 301014,
301015, 301015,
@ -748,7 +748,7 @@
"key": "strategy_text1", "key": "strategy_text1",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55005,
"boss": [ "boss": [
301017, 301017,
301018, 301018,
@ -773,8 +773,8 @@
"id": 201, "id": 201,
"bossid": 2, "bossid": 2,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1002",
"text": "火焰泰坦" "text": "冰霜泰坦"
}, },
"grade": "SSS", "grade": "SSS",
"score_low": 6666667, "score_low": 6666667,
@ -858,7 +858,7 @@
"key": "strategy_text2", "key": "strategy_text2",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55006,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -883,8 +883,8 @@
"id": 202, "id": 202,
"bossid": 2, "bossid": 2,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1002",
"text": "火焰泰坦" "text": "冰霜泰坦"
}, },
"grade": "SS", "grade": "SS",
"score_low": 3500001, "score_low": 3500001,
@ -968,7 +968,7 @@
"key": "strategy_text2", "key": "strategy_text2",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55006,
"boss": [ "boss": [
301014, 301014,
301015, 301015,
@ -993,8 +993,8 @@
"id": 203, "id": 203,
"bossid": 2, "bossid": 2,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1002",
"text": "火焰泰坦" "text": "冰霜泰坦"
}, },
"grade": "S", "grade": "S",
"score_low": 1800001, "score_low": 1800001,
@ -1078,7 +1078,7 @@
"key": "strategy_text2", "key": "strategy_text2",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55006,
"boss": [ "boss": [
301017, 301017,
301018, 301018,
@ -1103,8 +1103,8 @@
"id": 204, "id": 204,
"bossid": 2, "bossid": 2,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1002",
"text": "火焰泰坦" "text": "冰霜泰坦"
}, },
"grade": "A+", "grade": "A+",
"score_low": 800001, "score_low": 800001,
@ -1188,7 +1188,7 @@
"key": "strategy_text2", "key": "strategy_text2",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55006,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -1213,8 +1213,8 @@
"id": 205, "id": 205,
"bossid": 2, "bossid": 2,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1002",
"text": "火焰泰坦" "text": "冰霜泰坦"
}, },
"grade": "A", "grade": "A",
"score_low": 350001, "score_low": 350001,
@ -1298,7 +1298,7 @@
"key": "strategy_text2", "key": "strategy_text2",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55006,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -1323,8 +1323,8 @@
"id": 206, "id": 206,
"bossid": 2, "bossid": 2,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1002",
"text": "火焰泰坦" "text": "冰霜泰坦"
}, },
"grade": "B", "grade": "B",
"score_low": 100001, "score_low": 100001,
@ -1408,7 +1408,7 @@
"key": "strategy_text2", "key": "strategy_text2",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55006,
"boss": [ "boss": [
301014, 301014,
301015, 301015,
@ -1433,8 +1433,8 @@
"id": 207, "id": 207,
"bossid": 2, "bossid": 2,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1002",
"text": "火焰泰坦" "text": "冰霜泰坦"
}, },
"grade": "C", "grade": "C",
"score_low": 0, "score_low": 0,
@ -1518,7 +1518,7 @@
"key": "strategy_text2", "key": "strategy_text2",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55006,
"boss": [ "boss": [
301017, 301017,
301018, 301018,
@ -1543,8 +1543,8 @@
"id": 301, "id": 301,
"bossid": 3, "bossid": 3,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1003",
"text": "火焰泰坦" "text": "森林泰坦"
}, },
"grade": "SSS", "grade": "SSS",
"score_low": 6666667, "score_low": 6666667,
@ -1628,7 +1628,7 @@
"key": "strategy_text3", "key": "strategy_text3",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55007,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -1653,8 +1653,8 @@
"id": 302, "id": 302,
"bossid": 3, "bossid": 3,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1003",
"text": "火焰泰坦" "text": "森林泰坦"
}, },
"grade": "SS", "grade": "SS",
"score_low": 3500001, "score_low": 3500001,
@ -1738,7 +1738,7 @@
"key": "strategy_text3", "key": "strategy_text3",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55007,
"boss": [ "boss": [
301014, 301014,
301015, 301015,
@ -1763,8 +1763,8 @@
"id": 303, "id": 303,
"bossid": 3, "bossid": 3,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1003",
"text": "火焰泰坦" "text": "森林泰坦"
}, },
"grade": "S", "grade": "S",
"score_low": 1800001, "score_low": 1800001,
@ -1848,7 +1848,7 @@
"key": "strategy_text3", "key": "strategy_text3",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55007,
"boss": [ "boss": [
301017, 301017,
301018, 301018,
@ -1873,8 +1873,8 @@
"id": 304, "id": 304,
"bossid": 3, "bossid": 3,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1003",
"text": "火焰泰坦" "text": "森林泰坦"
}, },
"grade": "A+", "grade": "A+",
"score_low": 800001, "score_low": 800001,
@ -1958,7 +1958,7 @@
"key": "strategy_text3", "key": "strategy_text3",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55007,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -1983,8 +1983,8 @@
"id": 305, "id": 305,
"bossid": 3, "bossid": 3,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1003",
"text": "火焰泰坦" "text": "森林泰坦"
}, },
"grade": "A", "grade": "A",
"score_low": 350001, "score_low": 350001,
@ -2068,7 +2068,7 @@
"key": "strategy_text3", "key": "strategy_text3",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55007,
"boss": [ "boss": [
301011, 301011,
301012, 301012,
@ -2093,8 +2093,8 @@
"id": 306, "id": 306,
"bossid": 3, "bossid": 3,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1003",
"text": "火焰泰坦" "text": "森林泰坦"
}, },
"grade": "B", "grade": "B",
"score_low": 100001, "score_low": 100001,
@ -2178,7 +2178,7 @@
"key": "strategy_text3", "key": "strategy_text3",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55007,
"boss": [ "boss": [
301014, 301014,
301015, 301015,
@ -2203,8 +2203,8 @@
"id": 307, "id": 307,
"bossid": 3, "bossid": 3,
"name": { "name": {
"key": "viking_boss_1001", "key": "viking_boss_1003",
"text": "火焰泰坦" "text": "森林泰坦"
}, },
"grade": "C", "grade": "C",
"score_low": 0, "score_low": 0,
@ -2288,7 +2288,7 @@
"key": "strategy_text3", "key": "strategy_text3",
"text": "BOSS攻略描述" "text": "BOSS攻略描述"
}, },
"boss_skill": 51004, "boss_skill": 55007,
"boss": [ "boss": [
301017, 301017,
301018, 301018,

View File

@ -522,6 +522,8 @@
"t": "100006", "t": "100006",
"n": 1 "n": 1
}, },
"GuildBoss_MaxBuyNum": 5 "GuildBoss_MaxBuyNum": 5,
"GuildBoss_troop2": 45,
"GuildBoss_troop3": 60
} }
] ]

View File

@ -19,16 +19,6 @@
} }
] ]
}, },
{
"index": "103",
"var": [
{
"a": "hero",
"t": "34006",
"n": 1
}
]
},
{ {
"index": "104", "index": "104",
"var": [ "var": [

View File

@ -2877,6 +2877,44 @@
"text": "阵营挑战券不足" "text": "阵营挑战券不足"
} }
}, },
{
"id": "100006",
"name": {
"key": "itemname_100006",
"text": "公会挑战券"
},
"usetype": 10,
"color": 3,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
"access": [
107
],
"use_skip": 107,
"upper_limit": -1,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "wp_icon_jjcq",
"ico": "wp_icon_jjcq",
"intr": {
"key": "itemdesc_100006",
"text": "进入公会BOSS的凭证"
},
"sale": [],
"synthetize_deplete": [],
"decompose_deplete": [],
"tipstxt": {
"key": "itemtipstxt_100006",
"text": "公会挑战券不足"
}
},
{ {
"id": "100100", "id": "100100",
"name": { "name": {

View File

@ -82222,5 +82222,65 @@
"atkpro": 1, "atkpro": 1,
"defpro": 1, "defpro": 1,
"modelsize": 1 "modelsize": 1
},
{
"Id": 720013,
"pos": 1,
"captainId": 0,
"IsBoss": 0,
"monster": 510043,
"lv": 1,
"hppro": 1,
"atkpro": 1,
"defpro": 1,
"modelsize": 1
},
{
"Id": 720013,
"pos": 2,
"captainId": 0,
"IsBoss": 0,
"monster": 510043,
"lv": 1,
"hppro": 1,
"atkpro": 1,
"defpro": 1,
"modelsize": 1
},
{
"Id": 720013,
"pos": 3,
"captainId": 0,
"IsBoss": 0,
"monster": -1,
"lv": 1,
"hppro": 1,
"atkpro": 1,
"defpro": 1,
"modelsize": 1
},
{
"Id": 720013,
"pos": 4,
"captainId": 0,
"IsBoss": 0,
"monster": 510054,
"lv": 1,
"hppro": 1,
"atkpro": 1,
"defpro": 1,
"modelsize": 1
},
{
"Id": 720013,
"pos": 5,
"captainId": 0,
"IsBoss": 0,
"monster": -1,
"lv": 1,
"hppro": 1,
"atkpro": 1,
"defpro": 1,
"modelsize": 1
} }
] ]

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@
"main": [ "main": [
{ {
"key": "platlv", "key": "platlv",
"param": 3 "param": 5
}, },
{ {
"key": "maxmapid", "key": "maxmapid",
@ -224,7 +224,7 @@
} }
], ],
"optional": "", "optional": "",
"wkqbx": 1, "wkqbx": 2,
"kqbx": 0, "kqbx": 0,
"img": "zc_icon_01", "img": "zc_icon_01",
"prompt": { "prompt": {
@ -320,7 +320,7 @@
"main": [ "main": [
{ {
"key": "platlv", "key": "platlv",
"param": 1 "param": 10
}, },
{ {
"key": "maxmapid", "key": "maxmapid",
@ -710,7 +710,7 @@
"main": [ "main": [
{ {
"key": "platlv", "key": "platlv",
"param": 1 "param": 10
}, },
{ {
"key": "maxmapid", "key": "maxmapid",
@ -736,7 +736,7 @@
"main": [ "main": [
{ {
"key": "platlv", "key": "platlv",
"param": 1 "param": 10
}, },
{ {
"key": "maxmapid", "key": "maxmapid",
@ -1126,7 +1126,7 @@
"main": [ "main": [
{ {
"key": "platlv", "key": "platlv",
"param": 2 "param": 20
}, },
{ {
"key": "maxmapid", "key": "maxmapid",
@ -1204,7 +1204,7 @@
"main": [ "main": [
{ {
"key": "platlv", "key": "platlv",
"param": 1 "param": 10
}, },
{ {
"key": "maxmapid", "key": "maxmapid",
@ -1212,7 +1212,7 @@
} }
], ],
"optional": "", "optional": "",
"wkqbx": 1, "wkqbx": 2,
"kqbx": 0, "kqbx": 0,
"img": "zc_icon_01", "img": "zc_icon_01",
"prompt": { "prompt": {
@ -1390,5 +1390,253 @@
"text": "功能暂未开启" "text": "功能暂未开启"
}, },
"uiid": 0 "uiid": 0
},
{
"id": "mail",
"name": {
"key": "num_3001",
"text": "邮件"
},
"main": [
{
"key": "platlv",
"param": 5
},
{
"key": "maxmapid",
"param": 1
}
],
"optional": "",
"wkqbx": 2,
"kqbx": 0,
"img": "zc_icon_01",
"prompt": {
"key": "opencond_prompt_mail",
"text": "功能暂未开启"
},
"uiid": 0
},
{
"id": "teacher",
"name": {
"key": "num_3002",
"text": "联盟学院"
},
"main": [
{
"key": "platlv",
"param": 10
},
{
"key": "maxmapid",
"param": 1
}
],
"optional": "",
"wkqbx": 2,
"kqbx": 0,
"img": "zc_icon_01",
"prompt": {
"key": "opencond_prompt_teacher",
"text": "功能暂未开启"
},
"uiid": 0
},
{
"id": "world_task",
"name": {
"key": "num_3003",
"text": "世界任务"
},
"main": [
{
"key": "platlv",
"param": 1
},
{
"key": "maxmapid",
"param": 1
}
],
"optional": "",
"wkqbx": 2,
"kqbx": 0,
"img": "zc_icon_01",
"prompt": {
"key": "opencond_prompt_world_task",
"text": "功能暂未开启"
},
"uiid": 0
},
{
"id": "battle_pass",
"name": {
"key": "num_3004",
"text": "战令"
},
"main": [
{
"key": "platlv",
"param": 10
},
{
"key": "maxmapid",
"param": 1
}
],
"optional": "",
"wkqbx": 2,
"kqbx": 0,
"img": "zc_icon_01",
"prompt": {
"key": "opencond_prompt_battle_pass",
"text": "功能暂未开启"
},
"uiid": 0
},
{
"id": "enchant_boss",
"name": {
"key": "num_3005",
"text": "附魔副本"
},
"main": [
{
"key": "platlv",
"param": 10
},
{
"key": "maxmapid",
"param": 1
}
],
"optional": "",
"wkqbx": 1,
"kqbx": 0,
"img": "zc_icon_01",
"prompt": {
"key": "opencond_prompt_enchant_boss",
"text": "功能暂未开启"
},
"uiid": 0
},
{
"id": "vikingexpedition_entrance",
"name": {
"key": "num_3006",
"text": "维京远征总入口"
},
"main": [
{
"key": "platlv",
"param": 10
},
{
"key": "maxmapid",
"param": 1
}
],
"optional": "",
"wkqbx": 1,
"kqbx": 0,
"img": "zc_icon_01",
"prompt": {
"key": "opencond_prompt_vikingexpedition_entrance",
"text": "功能暂未开启"
},
"uiid": 0
},
{
"id": "GuildBoss",
"name": {
"key": "num_3007",
"text": "公会BOSS入口"
},
"main": [
{
"key": "platlv",
"param": 30
},
{
"key": "maxmapid",
"param": 1
}
],
"optional": "",
"wkqbx": 1,
"kqbx": 0,
"img": "zc_icon_01",
"prompt": {
"key": "opencond_prompt_GuildBoss",
"text": "功能暂未开启"
},
"uiid": 0
},
{
"id": "slidescreen_up",
"name": {
"key": "",
"text": ""
},
"main": [
{
"key": "worldtaskid",
"param": 20060
}
],
"optional": "",
"wkqbx": 0,
"kqbx": 0,
"img": "",
"prompt": {
"key": "",
"text": ""
},
"uiid": 0
},
{
"id": "slidescreen_left",
"name": {
"key": "",
"text": ""
},
"main": [
{
"key": "worldtaskid",
"param": 20060
}
],
"optional": "",
"wkqbx": 0,
"kqbx": 0,
"img": "",
"prompt": {
"key": "",
"text": ""
},
"uiid": 0
},
{
"id": "slidescreen_right",
"name": {
"key": "",
"text": ""
},
"main": [
{
"key": "worldtaskid",
"param": 20060
}
],
"optional": "",
"wkqbx": 0,
"kqbx": 0,
"img": "",
"prompt": {
"key": "",
"text": ""
},
"uiid": 0
} }
] ]

View File

@ -908,6 +908,33 @@
"data4": 0, "data4": 0,
"data5": 0 "data5": 0
}, },
{
"id": 301,
"type": 61,
"data1": 101,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 302,
"type": 61,
"data1": 104,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{
"id": 303,
"type": 61,
"data1": 108,
"data2": 0,
"data3": 0,
"data4": 0,
"data5": 0
},
{ {
"id": 10001, "id": 10001,
"type": 24, "type": 24,

View File

@ -8,7 +8,7 @@
"access": 0, "access": 0,
"position": "", "position": "",
"sex": 1, "sex": 1,
"resources": "45003_exhibition" "resources": "10000_Mexplore"
}, },
{ {
"id": 100002, "id": 100002,
@ -19,7 +19,7 @@
"access": 0, "access": 0,
"position": "", "position": "",
"sex": 1, "sex": 1,
"resources": "45003_exhibition" "resources": "10000_Mexplore"
}, },
{ {
"id": 100003, "id": 100003,
@ -30,7 +30,7 @@
"access": 0, "access": 0,
"position": "", "position": "",
"sex": 1, "sex": 1,
"resources": "45003_exhibition" "resources": "10000_Mexplore"
}, },
{ {
"id": 200001, "id": 200001,
@ -41,7 +41,7 @@
"access": 0, "access": 0,
"position": "", "position": "",
"sex": 2, "sex": 2,
"resources": "45003_exhibition" "resources": "10000_Mexplore"
}, },
{ {
"id": 200002, "id": 200002,
@ -52,7 +52,7 @@
"access": 0, "access": 0,
"position": "", "position": "",
"sex": 2, "sex": 2,
"resources": "45003_exhibition" "resources": "10000_Mexplore"
}, },
{ {
"id": 200003, "id": 200003,
@ -63,6 +63,6 @@
"access": 0, "access": 0,
"position": "", "position": "",
"sex": 2, "sex": 2,
"resources": "45003_exhibition" "resources": "10000_Mexplore"
} }
] ]

View File

@ -22541,7 +22541,7 @@
{ {
"Id": 200004001, "Id": 200004001,
"EmitPR": 1000, "EmitPR": 1000,
"From": 1, "From": 3,
"Where": [], "Where": [],
"Order": "", "Order": "",
"Limit": 10, "Limit": 10,

View File

@ -1761,7 +1761,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
234006251 234006241
] ]
}, },
"Desc": { "Desc": {
@ -2041,7 +2041,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
934006251 934006241
] ]
}, },
"Desc": { "Desc": {
@ -3879,7 +3879,7 @@
235001311, 235001311,
235001312, 235001312,
235001313, 235001313,
235001344 235001334
] ]
}, },
"Desc": { "Desc": {

View File

@ -23,7 +23,7 @@
}, },
{ {
"a": "attr", "a": "attr",
"t": "diamond", "t": "gold",
"n": 10000 "n": 10000
} }
] ]

View File

@ -251,7 +251,7 @@
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城", "0新手引导-杰克-中轴城常驻待机",
"150" "150"
], ],
"getafter_event": [ "getafter_event": [
@ -273,13 +273,13 @@
"key": 20011, "key": 20011,
"lock": 1, "lock": 1,
"ontxe": 20010, "ontxe": 20010,
"id_after": 20020, "id_after": 20012,
"group": 2, "group": 2,
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城", "0新手引导-杰克-中轴城常驻待机",
"150" "150"
], ],
"getafter_event": [ "getafter_event": [
@ -288,14 +288,14 @@
], ],
"completetask": 0, "completetask": 0,
"auto_accept": 0, "auto_accept": 0,
"overtips": 0, "overtips": 1,
"reword": [] "reword": []
}, },
{ {
"key": 20020, "key": 20012,
"lock": 1, "lock": 1,
"ontxe": 20011, "ontxe": 20011,
"id_after": 20030, "id_after": 20020,
"group": 2, "group": 2,
"des": 2, "des": 2,
"icon": "", "icon": "",
@ -314,21 +314,21 @@
"reword": [] "reword": []
}, },
{ {
"key": 20030, "key": 20020,
"lock": 1, "lock": 1,
"ontxe": 20020, "ontxe": 20012,
"id_after": 20040, "id_after": 20040,
"group": 2, "group": 2,
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城", "1.新手引导-花朵-中轴城",
"150" "150"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
405 404
], ],
"completetask": 0, "completetask": 0,
"auto_accept": 1, "auto_accept": 1,
@ -338,14 +338,14 @@
{ {
"key": 20040, "key": 20040,
"lock": 1, "lock": 1,
"ontxe": 20030, "ontxe": 20020,
"id_after": 20050, "id_after": 20050,
"group": 2, "group": 2,
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城", "0新手引导-杰克-中轴城常驻待机",
"150" "150"
], ],
"getafter_event": [ "getafter_event": [
@ -438,16 +438,16 @@
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_kongfupanda_01",
"新手引导-波比-右屏圣树2", "新手引导-波比-右屏圣树2",
"153" "718"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
422 411
], ],
"completetask": 0, "completetask": 0,
"auto_accept": 0, "auto_accept": 1,
"overtips": 1, "overtips": 1,
"reword": [] "reword": []
}, },
@ -460,18 +460,24 @@
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_kongfupanda_01",
"新手引导-瓜哥-右屏圣树", "新手引导-豺狼人-右屏圣树",
"153" "718"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
412 412
], ],
"completetask": 174, "completetask": 174,
"auto_accept": 0, "auto_accept": 1,
"overtips": 1, "overtips": 1,
"reword": [] "reword": [
{
"a": "hero",
"t": "34006",
"n": 1
}
]
}, },
{ {
"key": 20100, "key": 20100,
@ -482,9 +488,9 @@
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_kongfupanda_01",
"新手引导-瓜哥-右屏圣树", "新手引导-豺狼人-右屏圣树",
"153" "718"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
@ -504,16 +510,16 @@
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_kongfupanda_01",
"新手引导-圣树下的黑洞", "新手引导-圣树下的黑洞",
"153" "718"
], ],
"getafter_event": [ "getafter_event": [
5, 5,
10008 10008
], ],
"completetask": 198, "completetask": 198,
"auto_accept": 0, "auto_accept": 1,
"overtips": 1, "overtips": 1,
"reword": [] "reword": []
}, },
@ -526,16 +532,16 @@
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_kongfupanda_01",
"新手引导-圣树下的犀牛守卫", "新手引导-波比-犀牛守卫",
"153" "718"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
416 416
], ],
"completetask": 0, "completetask": 0,
"auto_accept": 0, "auto_accept": 1,
"overtips": 1, "overtips": 1,
"reword": [] "reword": []
}, },
@ -548,17 +554,17 @@
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_kongfupanda_01",
"新手引导-波比-右屏圣树2", "新手引导-波比-右屏圣树3",
"153" "718"
], ],
"getafter_event": [ "getafter_event": [
2, 9,
420 0
], ],
"completetask": 0, "completetask": 0,
"auto_accept": 0, "auto_accept": 1,
"overtips": 1, "overtips": 0,
"reword": [] "reword": []
}, },
{ {
@ -570,16 +576,16 @@
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_kongfupanda_01",
"0新手引导-杰克-中轴城", "新手引导-波比-右屏圣树3",
"153" "718"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
422 420
], ],
"completetask": 0, "completetask": 0,
"auto_accept": 0, "auto_accept": 1,
"overtips": 1, "overtips": 1,
"reword": [] "reword": []
}, },
@ -593,14 +599,14 @@
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城", "0新手引导-杰克-中轴城常驻待机",
"153" "150"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
423 422
], ],
"completetask": 118, "completetask": 0,
"auto_accept": 0, "auto_accept": 0,
"overtips": 1, "overtips": 1,
"reword": [] "reword": []
@ -615,15 +621,15 @@
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_boundary_01_recordtask",
"新手引导-布兰奇-中轴城", "0新手引导-杰克-中轴城常驻待机",
"153" "150"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
425 423
], ],
"completetask": 0, "completetask": 0,
"auto_accept": 0, "auto_accept": 1,
"overtips": 1, "overtips": 1,
"reword": [] "reword": []
}, },
@ -637,12 +643,12 @@
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城", "0新手引导-杰克-中轴城常驻待机",
"153" "150"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
426 425
], ],
"completetask": 0, "completetask": 0,
"auto_accept": 0, "auto_accept": 0,
@ -653,14 +659,36 @@
"key": 20180, "key": 20180,
"lock": 1, "lock": 1,
"ontxe": 20170, "ontxe": 20170,
"id_after": 0, "id_after": 20190,
"group": 2, "group": 2,
"des": 2, "des": 2,
"icon": "", "icon": "",
"npc": [ "npc": [
"scenes_boundary_01_recordtask", "scenes_boundary_01_recordtask",
"新手引导-波比-右屏圣树2", "0新手引导-杰克-中轴城常驻待机",
"153" "150"
],
"getafter_event": [
2,
426
],
"completetask": 0,
"auto_accept": 1,
"overtips": 1,
"reword": []
},
{
"key": 20190,
"lock": 1,
"ontxe": 20180,
"id_after": 20200,
"group": 2,
"des": 2,
"icon": "",
"npc": [
"scenes_smithy_01",
"暴夫纳特铁匠铺",
"139"
], ],
"getafter_event": [ "getafter_event": [
2, 2,
@ -670,5 +698,93 @@
"auto_accept": 0, "auto_accept": 0,
"overtips": 1, "overtips": 1,
"reword": [] "reword": []
},
{
"key": 20200,
"lock": 1,
"ontxe": 20190,
"id_after": 20210,
"group": 2,
"des": 2,
"icon": "",
"npc": [
"scenes_smithy_01",
"暴夫纳特铁匠铺",
"139"
],
"getafter_event": [
2,
427
],
"completetask": 0,
"auto_accept": 0,
"overtips": 1,
"reword": []
},
{
"key": 20210,
"lock": 1,
"ontxe": 20200,
"id_after": 20220,
"group": 2,
"des": 2,
"icon": "",
"npc": [
"scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城常驻待机",
"150"
],
"getafter_event": [
2,
427
],
"completetask": 301,
"auto_accept": 0,
"overtips": 1,
"reword": []
},
{
"key": 20220,
"lock": 1,
"ontxe": 20210,
"id_after": 20230,
"group": 2,
"des": 2,
"icon": "",
"npc": [
"scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城常驻待机",
"150"
],
"getafter_event": [
2,
427
],
"completetask": 302,
"auto_accept": 0,
"overtips": 1,
"reword": []
},
{
"key": 20230,
"lock": 1,
"ontxe": 20220,
"id_after": 0,
"group": 2,
"des": 2,
"icon": "",
"npc": [
"scenes_boundary_01_recordtask",
"0新手引导-杰克-中轴城常驻待机",
"150"
],
"getafter_event": [
2,
427
],
"completetask": 303,
"auto_accept": 0,
"overtips": 1,
"reword": []
} }
] ]

View File

@ -10,6 +10,7 @@ import (
"go_dreamfactory/modules/hero" "go_dreamfactory/modules/hero"
"go_dreamfactory/modules/sociaty" "go_dreamfactory/modules/sociaty"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"time"
"fyne.io/fyne/v2" "fyne.io/fyne/v2"
"fyne.io/fyne/v2/container" "fyne.io/fyne/v2/container"
@ -22,16 +23,30 @@ import (
type SociatyBossView struct { type SociatyBossView struct {
BaseformView BaseformView
itemList common.ItemList itemList common.ItemList
heroListFlag bool rankItemList common.ItemList //排行榜
teamFlag bool heroListFlag bool
heroList func() teamFlag bool
sociatyId string bossFlag bool
teams map[int32]*pb.ChallengeTeam rankFlag bool
heroList func()
rankList func()
sociatyId string
teams map[int32]*pb.ChallengeTeam
endTimeLabel *widget.Label // 赛季结束时间
settleTimeLabel *widget.Label // 赛季结算时间
sociatyRankingLabel *widget.Label // 公会排名
personRankingLabel *widget.Label // 个人排名
ticketLabel *widget.Label //挑战券
} }
func (s *SociatyBossView) CreateView(t *model.TestCase) fyne.CanvasObject { func (s *SociatyBossView) CreateView(t *model.TestCase) fyne.CanvasObject {
s.teams = make(map[int32]*pb.ChallengeTeam) s.teams = make(map[int32]*pb.ChallengeTeam)
s.endTimeLabel = widget.NewLabel("")
s.settleTimeLabel = widget.NewLabel("")
s.sociatyRankingLabel = widget.NewLabel("")
s.personRankingLabel = widget.NewLabel("")
s.ticketLabel = widget.NewLabel("")
loadSociaty := func() { loadSociaty := func() {
if err := service.GetPttService().SendToClient( if err := service.GetPttService().SendToClient(
@ -45,14 +60,31 @@ func (s *SociatyBossView) CreateView(t *model.TestCase) fyne.CanvasObject {
} }
defer loadSociaty() defer loadSociaty()
loadSociatyBoss := func() {
if err := service.GetPttService().SendToClient(
t.MainType,
sociaty.SociatySubTypeBossmain,
&pb.SociatyBMainReq{},
); err != nil {
logrus.Error(err)
return
}
}
defer loadSociatyBoss()
buzhenBtn := widget.NewButton("布阵", s.buzhen) buzhenBtn := widget.NewButton("布阵", s.buzhen)
challengestartBtn := widget.NewButton("开始挑战", s.challengestart) challengestartBtn := widget.NewButton("开始挑战", s.challengestart)
challengefinishBtn := widget.NewButton("挑战结束", s.challengefinish) challengefinishBtn := widget.NewButton("挑战结束", s.challengefinish)
ticketBuyBtn := widget.NewButton("挑战券", s.buy) ticketBuyBtn := widget.NewButton("挑战券", s.buy)
btns := container.NewHBox(buzhenBtn, challengestartBtn, challengefinishBtn, ticketBuyBtn) rankBtn := widget.NewButton("排行榜", s.rank)
c := container.NewBorder(btns, nil, nil, nil) btns := container.NewHBox(buzhenBtn, challengestartBtn, challengefinishBtn, ticketBuyBtn, rankBtn)
bottomLabels := container.NewHBox(
s.ticketLabel, s.settleTimeLabel, s.endTimeLabel,
)
c := container.NewBorder(btns, bottomLabels, nil, nil)
s.listenTeams() s.listenTeams()
s.listenBossmain()
return c return c
} }
@ -77,7 +109,7 @@ func (s *SociatyBossView) listenTeams() {
if rsp.Sociaty != nil { if rsp.Sociaty != nil {
s.sociatyId = rsp.Sociaty.Id s.sociatyId = rsp.Sociaty.Id
s.teams = rsp.Teams // s.teams = rsp.Teams
} }
}, },
@ -85,6 +117,44 @@ func (s *SociatyBossView) listenTeams() {
s.teamFlag = true s.teamFlag = true
} }
func (s *SociatyBossView) listenBossmain() {
if s.bossFlag {
return
}
s.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string(comm.ModuleSociaty) &&
data.SubType == sociaty.SociatySubTypeBossmain) {
return
}
rsp := &pb.SociatyBMainResp{}
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
return
}
s.teams = rsp.Teams
s.endTimeLabel.SetText(
fmt.Sprintf("结束:%s", time.Unix(int64(rsp.EndTime), 0).Format("01-02 15:04:05")),
)
s.endTimeLabel.Refresh()
s.settleTimeLabel.SetText(
fmt.Sprintf("结算:%s", time.Unix(int64(rsp.SettlementTime), 0).Format("01-02 15:04:05")),
)
s.settleTimeLabel.Refresh()
s.ticketLabel.SetText(
fmt.Sprintf("挑战券:%d", rsp.Ticket),
)
s.ticketLabel.Refresh()
},
})
s.bossFlag = true
}
// 挑战开始 // 挑战开始
func (s *SociatyBossView) challengestart() { func (s *SociatyBossView) challengestart() {
if err := service.GetPttService().SendToClient( if err := service.GetPttService().SendToClient(
@ -107,8 +177,8 @@ func (s *SociatyBossView) challengefinish() {
&pb.SociatyBChallengeFinishReq{ &pb.SociatyBChallengeFinishReq{
Ptype: pb.PlayType_sociaty, Ptype: pb.PlayType_sociaty,
Report: &pb.BattleReport{ Report: &pb.BattleReport{
Costtime: 180, Costtime: 180, //游戏耗时
Harm: 180300, Harm: 180300, //伤害值
}, },
}, },
); err != nil { ); err != nil {
@ -277,6 +347,61 @@ func (s *SociatyBossView) buzhen() {
dconf.Show() dconf.Show()
} }
// 排行榜
func (s *SociatyBossView) rank() {
s.rankItemList = *common.NewItemList()
s.rankItemList.ItemList = s.itemList.CreateList()
s.rankList = func() {
if err := service.GetPttService().SendToClient(string(comm.ModuleSociaty), "brank", &pb.SociatyBRankReq{
RankType: 1,
}); err != nil {
logrus.Error(err)
return
}
}
defer s.rankList()
layout := container.NewBorder(nil, nil, nil, nil, s.rankItemList.ItemList)
dconf := dialog.NewCustom("排行榜", "关闭", layout, s.w)
dconf.Resize(fyne.NewSize(800, 500))
dconf.Show()
s.listenRank()
}
func (this *SociatyBossView) listenRank() {
if this.rankFlag {
return
}
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
if !(data.MainType == string(comm.ModuleSociaty) &&
data.SubType == sociaty.SociatySubTypeBrank) {
return
}
rsp := &pb.SociatyBRankResp{}
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
return
}
for _, v := range rsp.Rank {
item := common.Item{
Text: fmt.Sprintf("%d 昵称:%v 公会:%s Lv:%d 积分:%d",
v.Ranking, v.Name, v.SociatyName, v.Lv, v.Integral),
}
this.itemList.AddItem(item)
}
},
})
this.rankFlag = true
}
func (this *SociatyBossView) HeroDataListener() { func (this *SociatyBossView) HeroDataListener() {
if this.heroListFlag { if this.heroListFlag {
return return

View File

@ -304,7 +304,7 @@ func (this *SociatyMineView) dataListener(item *entryItem) {
this.sociaty = rsp.Sociaty this.sociaty = rsp.Sociaty
this.master = rsp.Master this.master = rsp.Master
this.ticket = rsp.Ticket // this.ticket = rsp.Ticket
//设置成员职位 //设置成员职位
for _, m := range rsp.Sociaty.Members { for _, m := range rsp.Sociaty.Members {

View File

@ -184,7 +184,7 @@ const (
// 公会日志 // 公会日志
TableSociatyLog = "sociatylog" TableSociatyLog = "sociatylog"
// 公会BOSS // 公会BOSS
TableSociatyBoss = "sociatybsoss" TableSociatyBoss = "sociatyboss"
///充值数据表 ///充值数据表
TablePay = "payorder" TablePay = "payorder"
@ -705,8 +705,8 @@ const (
) )
const ( const (
MainStarType1 = 1 //成功通关 MainStarType1 = 1 //成功通关
MainStarType2 = 1 //死亡人数不超过{0}人 MainStarType2 = 2 //死亡人数不超过{0}人
MainStarType3 = 1 //不超过{0}回合通关 MainStarType3 = 3 //不超过{0}回合通关
) )
const ( const (

View File

@ -73,14 +73,15 @@ func Test_Main(t *testing.T) {
var star1, star2, star3 int32 var star1, star2, star3 int32
var rst int32 var rst int32
star1 = 1 << 2 star1 = 1 << 0
star2 = 1 << 1 star2 = 1 << 1
star3 = 1 << 0 star3 = 1 << 2
//rst = star1 ^ star2 ^ star3 // 三星 //rst = star1 ^ star2 ^ star3 // 三星
//rst = star1 ^ star2 // 2星 //rst = star1 ^ star2 // 2星
rst ^= star1 rst ^= star1
rst ^= star2 rst ^= star2
rst ^= star2
// 校验星 // 校验星
b1 := (rst&star1 == star1) b1 := (rst&star1 == star1)
b2 := (rst&star2 == star2) b2 := (rst&star2 == star2)

View File

@ -693,12 +693,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
break break
} }
} }
var maxGongm int32
conf := this.configure.GetHeroResonanceConfig(cid, v.Star)
if conf != nil {
maxGongm = int32(conf.Maxnum)
}
this.modelHero.moduleHero.Debugf("%d", maxStar, maxLv, maxJux, maxGongm)
// 开始创建英雄 // 开始创建英雄
hero, err := this.modelHero.createOneHero(session.GetUserId(), v.Hid) hero, err := this.modelHero.createOneHero(session.GetUserId(), v.Hid)
if err != nil { if err != nil {
@ -714,18 +709,17 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
hero.Lv = maxLv hero.Lv = maxLv
hero.Star = maxStar hero.Star = maxStar
hero.JuexingLv = int32(maxJux) hero.JuexingLv = int32(maxJux)
hero.ResonateNum = maxGongm
hero.SameCount = 1 hero.SameCount = 1
this.modelHero.PropertyCompute(hero) // 重新计算属性 this.modelHero.PropertyCompute(hero) // 重新计算属性
_heroMap := map[string]interface{}{ _heroMap := map[string]interface{}{
"lv": hero.Lv, "lv": hero.Lv,
"star": hero.Star, "star": hero.Star,
"juexingLv": hero.JuexingLv, "juexingLv": hero.JuexingLv,
"resonateNum": hero.ResonateNum,
"isOverlying": false, "isOverlying": false,
"sameCount": 1, "sameCount": 1,
"normalSkill": hero.NormalSkill, "normalSkill": hero.NormalSkill,
"talentProperty": hero.TalentProperty, "talentProperty": hero.TalentProperty,
"property": hero.Property,
} }
// 保存数据 // 保存数据

View File

@ -78,36 +78,53 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
var star1, star2, star3 int32
star1 = 1 << 2 var szStar []int32
star2 = 1 << 1 szStar = append(szStar, 1<<0)
star3 = 1 << 0 szStar = append(szStar, 1<<1)
szStar = append(szStar, 1<<2)
for i, v := range stageConf.StarType { for i, v := range stageConf.StarType {
if v == comm.MainStarType1 { if v == comm.MainStarType1 {
//star += stageConf.Star[i] star ^= szStar[i]
star ^= star1
} else if v == comm.MainStarType2 { } else if v == comm.MainStarType2 {
if req.Report.Death <= stageConf.StarValue[i] { if req.Report.Death <= stageConf.StarValue[i] {
//star += stageConf.Star[i] star ^= szStar[i]
star ^= star2
} }
} else if v == comm.MainStarType3 { } else if v == comm.MainStarType3 {
if req.Report.Round <= stageConf.StarValue[i] { if req.Report.Round <= stageConf.StarValue[i] {
//star += stageConf.Star[i] star ^= szStar[i]
star ^= star3
} }
} }
} }
// 判断是不是首通 // 判断是不是首通
if _, ok := curChapter.Star[req.StageId]; !ok { if _, ok := curChapter.Star[req.StageId]; !ok {
first = true first = true
curChapter.Star[req.StageId] = star // 星级赋值 curChapter.Star[req.StageId] = star // 星级赋值
update["star"] = curChapter.Star update["star"] = curChapter.Star
} }
if curChapter.Star[req.StageId] > star { // 给最高星
curChapter.Star[req.StageId] = star // 判断星数
update["star"] = curChapter.Star var (
totalStar int32
preStar int32
)
if curChapter.Star[req.StageId] != star {
for _, v := range szStar {
if star&v == v {
totalStar++
}
if curChapter.Star[req.StageId]&v == v {
preStar++
}
}
if totalStar >= preStar { // 给最高星
curChapter.Star[req.StageId] = star
update["star"] = curChapter.Star
}
} }
curChapter.Ps[req.StageId] = 0 // 清空预扣体力值 curChapter.Ps[req.StageId] = 0 // 清空预扣体力值
update["ps"] = curChapter.Ps update["ps"] = curChapter.Ps

View File

@ -3,7 +3,6 @@ package mline
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )
@ -20,26 +19,23 @@ func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.MlineGetR
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MlineGetRewardReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MlineGetRewardReq) (code pb.ErrorCode, data proto.Message) {
var ( var (
curChapter *pb.DBMline // 当前章节信息 curChapter *pb.DBMline // 当前章节信息
stageConf *cfg.GameMainStageData
update map[string]interface{} update map[string]interface{}
rsp *pb.MlineGetRewardResp rsp *pb.MlineGetRewardResp
) )
rsp = &pb.MlineGetRewardResp{}
update = make(map[string]interface{}) update = make(map[string]interface{})
if code = this.GetRewardCheck(session, req); code != pb.ErrorCode_Success { if code = this.GetRewardCheck(session, req); code != pb.ErrorCode_Success {
return return
} }
if stageConf = this.module.configure.GetMainStageConf(req.CId); stageConf == nil { // 配置文件校验
code = pb.ErrorCode_MainlineNotFindChapter mLineConf := this.module.configure.GetMainChapterConf(req.CId)
return
}
mLineConf := this.module.configure.GetMainChapterConf(stageConf.Chapterid)
if mLineConf == nil { if mLineConf == nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
list, _ := this.module.modelMline.getMainlineList(session.GetUserId()) list, _ := this.module.modelMline.getMainlineList(session.GetUserId())
for _, v := range list { for _, v := range list {
if stageConf.Chapterid == v.ChapterId { if req.CId == v.ChapterId {
curChapter = v curChapter = v
break break
} }
@ -54,7 +50,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MlineGetReward
} }
curChapter.Award[req.Star] = true curChapter.Award[req.Star] = true
update["awared"] = curChapter.Award update["award"] = curChapter.Award
awardConf := this.module.configure.GetMainStarRewardConf(mLineConf.Starreward) awardConf := this.module.configure.GetMainStarRewardConf(mLineConf.Starreward)
for _, v := range awardConf { for _, v := range awardConf {
if v.Starnum == req.Star { if v.Starnum == req.Star {

View File

@ -317,13 +317,13 @@ func (this *Privilege) SendDailyMail(session comm.IUserSession, cId string, coun
N: v.N, N: v.N,
}) })
} }
for i := 0; i < int(count); i++ {
if pType == 1 { if pType == 1 {
this.mail.SendMailByCid(session, comm.Yueka_1, res) this.mail.SendMailByCid(session, comm.Yueka_1, res)
} else if pType == 2 { } else if pType == 2 {
this.mail.SendMailByCid(session, comm.Yueka_1, res) this.mail.SendMailByCid(session, comm.Yueka_1, res)
}
} }
} }
func (this *Privilege) CheckAllPrivilege(session comm.IUserSession) map[int32]*pb.PrivilegeList { func (this *Privilege) CheckAllPrivilege(session comm.IUserSession) map[int32]*pb.PrivilegeList {

View File

@ -34,6 +34,7 @@ const (
SociatySubTypeLog = "log" SociatySubTypeLog = "log"
SociatySubTypeAgreePush = "agree" SociatySubTypeAgreePush = "agree"
SociatySubTypeRecord = "record" SociatySubTypeRecord = "record"
SociatySubTypeBossmain = "bossmain"
SociatySubTypeFormation = "formation" SociatySubTypeFormation = "formation"
SociatySubTypeChallengestart = "challengestart" SociatySubTypeChallengestart = "challengestart"
SociatySubTypeChallengefinish = "challengefinish" SociatySubTypeChallengefinish = "challengefinish"

View File

@ -19,8 +19,37 @@ func (this *apiComp) Formation(session comm.IUserSession, req *pb.SociatyBFormat
} }
uid := session.GetUserId() uid := session.GetUserId()
user := this.module.ModuleUser.GetUser(uid)
if user == nil {
this.module.Error("GetRemoteUser",
log.Field{Key: "uid", Value: uid},
)
code = pb.ErrorCode_UserSessionNobeing
return
}
ggd := this.module.configure.GetGlobalConf()
if ggd == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
//检验第二队或第三队是否达到解锁条件
if _, ok := req.Teams[2]; ok {
if user.Lv < ggd.GuildBossTroop2 {
code = pb.ErrorCode_SociatyTeamUnlock
return
}
}
if _, ok := req.Teams[3]; ok {
if user.Lv < ggd.GuildBossTroop3 {
code = pb.ErrorCode_SociatyTeamUnlock
return
}
}
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -21,7 +21,7 @@ func (this *apiComp) Accuse(session comm.IUserSession, req *pb.SociatyAccuseReq)
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -17,7 +17,7 @@ func (this *apiComp) ActivitylistCheck(session comm.IUserSession, req *pb.Sociat
func (this *apiComp) Activitylist(session comm.IUserSession, req *pb.SociatyActivityListReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) Activitylist(session comm.IUserSession, req *pb.SociatyActivityListReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -23,7 +23,7 @@ func (this *apiComp) Activityreceive(session comm.IUserSession, req *pb.SociatyA
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -25,7 +25,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -31,7 +31,7 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) (
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getSociaty(req.SociatyId) sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("公会未找到", log.Field{Key: "uid", Value: uid}, log.Field{Key: "sociatyId", Value: req.SociatyId}) this.module.Error("公会未找到", log.Field{Key: "uid", Value: uid}, log.Field{Key: "sociatyId", Value: req.SociatyId})
return return

View File

@ -24,7 +24,7 @@ func (this *apiComp) ApplyList(session comm.IUserSession, req *pb.SociatyApplyLi
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getSociaty(req.SociatyId) sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("公会未找到", this.module.Error("公会未找到",
log.Field{Key: "uid", Value: uid}, log.Field{Key: "uid", Value: uid},

View File

@ -31,7 +31,7 @@ func (this *apiComp) Assign(session comm.IUserSession, req *pb.SociatyAssignReq)
} }
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -0,0 +1,75 @@
package sociaty
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
// 公会BOSS入口
func (this *apiComp) BossmainCheck(session comm.IUserSession, req *pb.SociatyBMainReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Bossmain(session comm.IUserSession, req *pb.SociatyBMainReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId()
ggd := this.module.configure.GetGlobalConf()
if ggd == nil {
code = pb.ErrorCode_ConfigNoFound
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()},
)
code = pb.ErrorCode_UserSessionNobeing
return
}
rsp := &pb.SociatyBMainResp{
Ticket: userEx.SociatyTicket,
}
// 未参赛(恢复挑战券)
if !this.module.modelSociatyBoss.IsSports(uid) {
userEx.SociatyTicket = ggd.GuildBossInitialNum
update := map[string]interface{}{
"sociatyTicket": userEx.SociatyTicket,
}
if err := this.module.ModuleUser.ChangeUserExpand(uid, update); err != nil {
code = pb.ErrorCode_DBError
return
}
}
sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return
}
// 赛季信息
dbs := this.module.modelSociatyBoss.getSociatyBossSports()
if dbs == nil {
code = pb.ErrorCode_SociatySportsNoinit
return
}
rsp.EndTime = dbs.EndTime
rsp.SettlementTime = dbs.SettlementTime
if sm := this.module.modelSociaty.getMemberInfo(sociaty, uid); sm != nil {
rsp.Teams = sm.Teams
}
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeBossmain, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -20,7 +20,7 @@ func (this *apiComp) Brank(session comm.IUserSession, req *pb.SociatyBRankReq) (
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -28,7 +28,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.SociatyBuyReq) (code
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -19,14 +19,34 @@ func (this *apiComp) Challengefinish(session comm.IUserSession, req *pb.SociatyB
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return 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()},
)
code = pb.ErrorCode_UserSessionNobeing
return
}
this.module.modelSociatyBoss.challengefinish(sociaty, uid, req.Report) this.module.modelSociatyBoss.challengefinish(sociaty, uid, req.Report)
//TODO 扣除挑战券 //扣除挑战券
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{ rsp := &pb.SociatyBChallengeFinishResp{
Integral: this.module.modelSociatyBoss.transIntegral(req.Report.Harm), Integral: this.module.modelSociatyBoss.transIntegral(req.Report.Harm),

View File

@ -1,6 +1,7 @@
package sociaty package sociaty
import ( import (
"errors"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -20,14 +21,43 @@ func (this *apiComp) Challengestart(session comm.IUserSession, req *pb.SociatyBC
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return 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()},
)
code = pb.ErrorCode_UserSessionNobeing
return
}
if userEx.SociatyTicket <= 0 {
code = pb.ErrorCode_SociatyTicketsNoEnough
return
}
//TODO 校验挑战券 //校验赛季时间
this.module.modelSociatyBoss.challengestart(session, sociaty) if this.module.modelSociatyBoss.sportsIsFinished() {
code = pb.ErrorCode_SociatySportsEnd
return
}
// 开始挑战
if err := this.module.modelSociatyBoss.challengestart(session, sociaty); err != nil {
var customErr = new(comm.CustomError)
if errors.As(err, &customErr) {
code = customErr.Code
// if code == pb.ErrorCode_SociatyNoFormation {
// return
// }
return
}
}
rsp := &pb.SociatyBChallengeStartResp{ rsp := &pb.SociatyBChallengeStartResp{
SociatyId: sociaty.Id, SociatyId: sociaty.Id,

View File

@ -25,7 +25,7 @@ func (this *apiComp) Discharge(session comm.IUserSession, req *pb.SociatyDischar
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -25,7 +25,7 @@ func (this *apiComp) Dismiss(session comm.IUserSession, req *pb.SociatyDismissRe
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -17,7 +17,7 @@ func (this *apiComp) LogCheck(session comm.IUserSession, req *pb.SociatyLogReq)
func (this *apiComp) Log(session comm.IUserSession, req *pb.SociatyLogReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) Log(session comm.IUserSession, req *pb.SociatyLogReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -17,7 +17,7 @@ func (this *apiComp) MembersCheck(session comm.IUserSession, req *pb.SociatyMemb
func (this *apiComp) Members(session comm.IUserSession, req *pb.SociatyMembersReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) Members(session comm.IUserSession, req *pb.SociatyMembersReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -30,9 +30,7 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.SociatyMineReq) (co
return return
} }
rsp := &pb.SociatyMineResp{ rsp := &pb.SociatyMineResp{}
Ticket: userEx.SociatyTicket,
}
// 未加入公会 // 未加入公会
if userEx.SociatyId == "" { if userEx.SociatyId == "" {
@ -42,7 +40,7 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.SociatyMineReq) (co
// 获取公会 // 获取公会
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return
@ -93,10 +91,6 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.SociatyMineReq) (co
} }
} }
if sm := this.module.modelSociaty.getMemberInfo(sociaty, uid); sm != nil {
rsp.Teams = sm.Teams
}
rsp.Sociaty = sociaty rsp.Sociaty = sociaty
rsp.Master = master rsp.Master = master

View File

@ -18,7 +18,7 @@ func (this *apiComp) QuitCheck(session comm.IUserSession, req *pb.SociatyQuitReq
func (this *apiComp) Quit(session comm.IUserSession, req *pb.SociatyQuitReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) Quit(session comm.IUserSession, req *pb.SociatyQuitReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -24,7 +24,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.SociatyReceiveRe
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -24,7 +24,7 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.SociatyRefuseReq)
} }
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -24,7 +24,7 @@ func (this *apiComp) Search(session comm.IUserSession, req *pb.SociatySearchReq)
rsp := &pb.SociatySearchResp{} rsp := &pb.SociatySearchResp{}
sociaty := this.module.modelSociaty.findByName(req.Name) sociaty := this.module.modelSociaty.findByName(req.Name)
if sociaty != nil && sociaty.Id != "" { if sociaty == nil {
rsp.List = append(rsp.List, sociaty) rsp.List = append(rsp.List, sociaty)
} }

View File

@ -25,7 +25,7 @@ func (this *apiComp) Setting(session comm.IUserSession, req *pb.SociatySettingRe
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -24,7 +24,7 @@ func (this *apiComp) SettingJob(session comm.IUserSession, req *pb.SociatySettin
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil{
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -20,7 +20,7 @@ func (this *apiComp) Sign(session comm.IUserSession, req *pb.SociatySignReq) (co
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty != nil && sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -17,7 +17,7 @@ func (this *apiComp) TaskListCheck(session comm.IUserSession, req *pb.SociatyTas
func (this *apiComp) TaskList(session comm.IUserSession, req *pb.SociatyTaskListReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) TaskList(session comm.IUserSession, req *pb.SociatyTaskListReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId() uid := session.GetUserId()
sociaty := this.module.modelSociaty.getUserSociaty(uid) sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" { if sociaty == nil {
code = pb.ErrorCode_SociatyNoFound code = pb.ErrorCode_SociatyNoFound
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid}) this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
return return

View File

@ -91,9 +91,7 @@ func (this *ModelSociaty) isNameExist(name string) error {
// 公会列表 // 公会列表
func (this *ModelSociaty) list(uid string, filter pb.SociatyListFilter) (list []*pb.DBSociaty) { func (this *ModelSociaty) list(uid string, filter pb.SociatyListFilter) (list []*pb.DBSociaty) {
user := this.module.ModuleUser.GetUser(uid) user := this.module.ModuleUser.GetUser(uid)
// if err != nil {
// return
// }
if user == nil { if user == nil {
return return
} }
@ -169,7 +167,10 @@ func (this *ModelSociaty) getSociaty(sociatyId string) (sociaty *pb.DBSociaty) {
sociaty = &pb.DBSociaty{} sociaty = &pb.DBSociaty{}
if err := this.GetListObj(comm.RDS_EMPTY, sociatyId, sociaty); err != nil { if err := this.GetListObj(comm.RDS_EMPTY, sociatyId, sociaty); err != nil {
log.Error("GetListObj", log.Field{Key: "sociatyId", Value: sociatyId}) log.Error("GetListObj", log.Field{Key: "sociatyId", Value: sociatyId})
return return nil
}
if sociaty.Id == "" {
return nil
} }
return return
} }
@ -202,7 +203,7 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
} }
if userEx.SociatyId != "" { if userEx.SociatyId != "" {
sociaty = this.getSociaty(userEx.SociatyId) sociaty = this.getSociaty(userEx.SociatyId)
if sociaty.Id != "" { if sociaty != nil {
//验证是否解散 //验证是否解散
if this.isDismiss(sociaty) { if this.isDismiss(sociaty) {
sociaty.Id = "" sociaty.Id = ""
@ -404,9 +405,9 @@ func (this *ModelSociaty) addMember(uid string, sociaty *pb.DBSociaty) error {
return comm.NewCustomError(pb.ErrorCode_SociatyMemberCountLimit) return comm.NewCustomError(pb.ErrorCode_SociatyMemberCountLimit)
} }
sociaty.Members = append(sociaty.Members, &pb.SociatyMember{ sociaty.Members = append(sociaty.Members, &pb.SociatyMember{
Uid: uid, Uid: uid,
Job: pb.SociatyJob_MEMBER, Job: pb.SociatyJob_MEMBER,
Ctime: configure.Now().Unix(), Ctime: configure.Now().Unix(),
}) })
update := map[string]interface{}{ update := map[string]interface{}{
"members": sociaty.Members, "members": sociaty.Members,

View File

@ -2,15 +2,28 @@ package sociaty
import ( import (
"context" "context"
"errors"
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "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/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"go_dreamfactory/lego/sys/redis/pipe" "go_dreamfactory/utils"
"sort"
"time"
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo"
)
var (
BOSS_SPORTS = "sports"
BOSS_RANK = "rank"
SPORTS_HOUR = 3 * 24 //赛季周期
) )
type ModelSociatyBoss struct { type ModelSociatyBoss struct {
@ -27,6 +40,120 @@ func (this *ModelSociatyBoss) Init(service core.IService, module core.IModule, c
return 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.reset()
// 更新下一赛季周期结束时间
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 { func (s *ModelSociatyBoss) setFormation(sociaty *pb.DBSociaty, uid string, teams map[int32]*pb.ChallengeTeam) error {
if !s.moduleSociaty.modelSociaty.isMember(uid, sociaty) { if !s.moduleSociaty.modelSociaty.isMember(uid, sociaty) {
@ -46,7 +173,7 @@ func (s *ModelSociatyBoss) setFormation(sociaty *pb.DBSociaty, uid string, teams
//挑战开始 //挑战开始
func (s *ModelSociatyBoss) challengestart(session comm.IUserSession, sociaty *pb.DBSociaty) error { func (s *ModelSociatyBoss) challengestart(session comm.IUserSession, sociaty *pb.DBSociaty) error {
//阵容 //组装阵容数据
var formations []*pb.BattleFormation var formations []*pb.BattleFormation
m := s.moduleSociaty.modelSociaty.getMemberInfo(sociaty, session.GetUserId()) m := s.moduleSociaty.modelSociaty.getMemberInfo(sociaty, session.GetUserId())
for _, v := range m.Teams { for _, v := range m.Teams {
@ -63,11 +190,13 @@ func (s *ModelSociatyBoss) challengestart(session comm.IUserSession, sociaty *pb
} }
if b, y := iBattle.(comm.IBattle); y { if b, y := iBattle.(comm.IBattle); y {
b.CreatePvbBattle(session, &pb.BattlePVBReq{ if code, _ := b.CreatePvbBattle(session, &pb.BattlePVBReq{
Ptype: pb.PlayType_sociaty, Ptype: pb.PlayType_sociaty,
Title: "公会BOSS", Title: "公会BOSS",
Format: formations, Format: formations,
}) }); code != pb.ErrorCode_Success {
return comm.NewCustomError(code)
}
} }
return nil return nil
} }
@ -79,36 +208,99 @@ func (s *ModelSociatyBoss) challengefinish(sociaty *pb.DBSociaty, uid string, re
return nil 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)
}
//保存挑战记录 //保存挑战记录
if err := s.addChallengeRecord(uid, &pb.DBSociatyBossRecord{ record := &pb.ChallengeRecord{
Uid: uid, Teams: sm.Teams,
SociatyId: sociaty.Id, Integral: s.transIntegral(report.Harm),
Integral: s.transIntegral(report.Harm), Duration: report.Costtime,
Duration: report.Costtime, Rtime: configure.Now().Unix(),
}); err != nil { }
if err := s.updateChallengeRecord(uid, sociaty.Id, record); err != nil {
return err return err
} }
s.addSociatyBossUser(uid)
return nil 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) addChallengeRecord(uid string, record *pb.DBSociatyBossRecord) error { func (s *ModelSociatyBoss) updateChallengeRecord(uid, sociatyId string, record *pb.ChallengeRecord) error {
id := primitive.NewObjectID().Hex() his := &pb.DBSociatyBossRecord{}
if err := s.AddList(uid, id, record); err != nil { if err := s.Get(uid, his); err != nil {
return err 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 return nil
} }
// 记入排行 // 记入排行
func (s *ModelSociatyBoss) addRank(uid string, integral int32) error { func (s *ModelSociatyBoss) addRank(uid string, integral int64) error {
var ( var (
pipe *pipe.RedisPipe = s.Redis.RedisPipe(context.TODO()) pipe *pipe.RedisPipe = s.Redis.RedisPipe(context.TODO())
m *redis.Z m *redis.Z
) )
m = &redis.Z{Score: float64(integral), Member: uid} m = &redis.Z{Score: float64(integral), Member: uid}
if cmd := pipe.ZAdd(s.TableName, m); cmd != nil { if cmd := pipe.ZAdd(fmt.Sprintf("%s:%s", s.TableName, BOSS_RANK), m); cmd != nil {
_, err := cmd.Result() _, err := cmd.Result()
if err != nil { if err != nil {
return err return err
@ -192,8 +384,92 @@ func (s *ModelSociatyBoss) rank(sociatyName string, rankType int32) (res []*pb.S
} }
} }
} }
return nil return nil
} }
// 公会BOSS重置数据
func (s *ModelSociatyBoss) reset() 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 {
update := map[string]interface{}{
"status": 1, //归档
}
if err := s.Change(BOSS_SPORTS, update); err != nil {
s.moduleSociaty.Error("归档玩家赛事记录", log.Field{Key: "uid", Value: v.Uid}, log.Field{Key: "err", Value: err.Error()})
}
}
}
// 清理排行榜
if err := s.Del(BOSS_RANK); err != nil {
s.moduleSociaty.Error("清理排行榜", log.Field{Key: "err", Value: err.Error()})
}
return nil
}
// 是否参赛
func (s *ModelSociatyBoss) IsSports(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
}
}
// 更新玩家赛季信息
cr.Total = total
cr.Integrals = highScore
update := map[string]interface{}{
"total": total,
"integrals": highScore,
}
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.addRank(uid, total)
s.moduleSociaty.Debug("结算:", log.Field{Key: "uid", Value: uid})
}
return nil
}

View File

@ -85,6 +85,9 @@ func (this *Sociaty) Start() (err error) {
if this.sociatySignConf, err = this.configure.getSociatySignCfg(); err != nil { if this.sociatySignConf, err = this.configure.getSociatySignCfg(); err != nil {
return err return err
} }
// 初始化公会BOSS赛季开始时间
this.modelSociatyBoss.initSports()
return return
} }

View File

@ -67,7 +67,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.TrollGetListReq)
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
if int32(configure.Now().Unix()-trolltrain.RefreshTime) < szTrain[trolltrain.TarinPos-1] { if configure.Now().Unix()-trolltrain.RefreshTime < int64(szTrain[trolltrain.TarinPos-1]) {
//session.SendMsg(string(this.module.GetType()), TrollGetListResp, &pb.TrollGetListResp{Data: trolltrain}) //session.SendMsg(string(this.module.GetType()), TrollGetListResp, &pb.TrollGetListResp{Data: trolltrain})
return return
} }

View File

@ -84,9 +84,9 @@ func (this *configureComp) GetTrollRule(id int32) int32 {
if configure, ok := v.(*cfg.GameTrollRule); ok { if configure, ok := v.(*cfg.GameTrollRule); ok {
return configure.Get(id).Quantity return configure.Get(id).Quantity
} }
} else {
log.Errorf("get GameTrollRuleData conf err:%v", err)
} }
log.Errorf("get GetTrollRule conf err:%d", id)
return 1 return 1
} }

View File

@ -146,9 +146,7 @@ func (this *Troll) TrollAI(session comm.IUserSession, troll *pb.DBTrollTrain) (c
this.Errorf("玩家 uid:%s 金币不足,获得金币%d", session.GetUserId(), buyGold) this.Errorf("玩家 uid:%s 金币不足,获得金币%d", session.GetUserId(), buyGold)
} }
} }
totalGold += buyGold totalGold += buyGold
} }
} else { // 超过当前时间 } else { // 超过当前时间
refreshTime -= int64(sz[index]) refreshTime -= int64(sz[index])

View File

@ -223,19 +223,18 @@ func (this *User) SearchRmoteUser(nickname string) ([]*pb.DBUser, error) {
//查询用户属性值 例如 金币 经验 //查询用户属性值 例如 金币 经验
func (this *User) QueryAttributeValue(uid string, attr string) (value int64) { func (this *User) QueryAttributeValue(uid string, attr string) (value int64) {
var ( var (
user *pb.DBUser user *pb.DBUser
err error userEx *pb.DBUserExpand
err error
) )
if this.IsCross() {
user, err = this.getRemoteUser(uid) user = this.modelUser.GetUser(uid)
if err != nil { userEx, err = this.GetUserExpand(uid)
return if err != nil {
} return
} else {
user = this.modelUser.GetUser(uid)
} }
if user == nil { if user == nil || userEx == nil {
return return
} }
switch attr { switch attr {
@ -251,6 +250,12 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int64) {
return user.Diamond return user.Diamond
case comm.ResPs: case comm.ResPs:
return int64(user.Ps) return int64(user.Ps)
case comm.SociatyCoin:
return int64(userEx.Guildcoin)
case comm.ArenaCoin:
return int64(userEx.Arenacoin)
case comm.ResFriend:
return int64(userEx.FriendPoint)
} }
return return
} }
@ -262,7 +267,6 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
log.Field{Key: "attr", Value: attr}, log.Field{Key: "attr", Value: attr},
log.Field{Key: "add", Value: add}, log.Field{Key: "add", Value: add},
) )
// code = pb.ErrorCode_ReqParameterError
return return
} }
@ -280,7 +284,7 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
return return
} }
if user == nil { if user == nil || userEx == nil {
code = pb.ErrorCode_UserSessionNobeing code = pb.ErrorCode_UserSessionNobeing
return return
} }

View File

@ -45,7 +45,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
} }
if curTaskConf.Group != req.GroupId { if curTaskConf.Group != req.GroupId {
code = pb.ErrorCode_ReqParameterError code = pb.ErrorCode_WorldtaskGroupIdNosame
return return
} }

View File

@ -786,7 +786,7 @@ func (x *DBSociatyRank) GetCtime() int64 {
return 0 return 0
} }
// 挑战队伍 // 阵容明细
type ChallengeTeamInfo struct { type ChallengeTeamInfo struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -834,6 +834,7 @@ func (x *ChallengeTeamInfo) GetHeroId() string {
return "" return ""
} }
// 阵容
type ChallengeTeam struct { type ChallengeTeam struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -881,24 +882,160 @@ func (x *ChallengeTeam) GetFormation() *BattleFormation {
return nil return nil
} }
// 成员公会BOSS历史记录 // 赛季信息
type DBSociatyBossSports struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
EndTime int64 `protobuf:"varint,1,opt,name=endTime,proto3" json:"endTime" bson:"endTime"` //公会BOSS赛季结束时间
SettlementTime int64 `protobuf:"varint,2,opt,name=settlementTime,proto3" json:"settlementTime" bson:"settlementTime"` //赛季结算时间
Uids []string `protobuf:"bytes,3,rep,name=uids,proto3" json:"uids" bson:"uids"` //参赛玩家
}
func (x *DBSociatyBossSports) Reset() {
*x = DBSociatyBossSports{}
if protoimpl.UnsafeEnabled {
mi := &file_sociaty_sociaty_db_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBSociatyBossSports) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBSociatyBossSports) ProtoMessage() {}
func (x *DBSociatyBossSports) ProtoReflect() protoreflect.Message {
mi := &file_sociaty_sociaty_db_proto_msgTypes[11]
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 DBSociatyBossSports.ProtoReflect.Descriptor instead.
func (*DBSociatyBossSports) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{11}
}
func (x *DBSociatyBossSports) GetEndTime() int64 {
if x != nil {
return x.EndTime
}
return 0
}
func (x *DBSociatyBossSports) GetSettlementTime() int64 {
if x != nil {
return x.SettlementTime
}
return 0
}
func (x *DBSociatyBossSports) GetUids() []string {
if x != nil {
return x.Uids
}
return nil
}
// 玩家每次挑战的记录
type ChallengeRecord struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Teams map[int32]*ChallengeTeam `protobuf:"bytes,1,rep,name=teams,proto3" json:"teams" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"teams"` //挑战队伍
Integral int64 `protobuf:"varint,2,opt,name=integral,proto3" json:"integral" bson:"integral"` //公会BOSS挑战积分
Duration int32 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration" bson:"duration"` //战斗耗时
Rtime int64 `protobuf:"varint,4,opt,name=rtime,proto3" json:"rtime" bson:"rtime"` //记录时间
}
func (x *ChallengeRecord) Reset() {
*x = ChallengeRecord{}
if protoimpl.UnsafeEnabled {
mi := &file_sociaty_sociaty_db_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChallengeRecord) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChallengeRecord) ProtoMessage() {}
func (x *ChallengeRecord) ProtoReflect() protoreflect.Message {
mi := &file_sociaty_sociaty_db_proto_msgTypes[12]
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 ChallengeRecord.ProtoReflect.Descriptor instead.
func (*ChallengeRecord) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{12}
}
func (x *ChallengeRecord) GetTeams() map[int32]*ChallengeTeam {
if x != nil {
return x.Teams
}
return nil
}
func (x *ChallengeRecord) GetIntegral() int64 {
if x != nil {
return x.Integral
}
return 0
}
func (x *ChallengeRecord) GetDuration() int32 {
if x != nil {
return x.Duration
}
return 0
}
func (x *ChallengeRecord) GetRtime() int64 {
if x != nil {
return x.Rtime
}
return 0
}
// 成员公会BOSS挑战历史记录
type DBSociatyBossRecord struct { type DBSociatyBossRecord struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID SociatyId string `protobuf:"bytes,2,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID
Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral" bson:"integral"` //公会BOSS挑战积分 Record []*ChallengeRecord `protobuf:"bytes,4,rep,name=record,proto3" json:"record" bson:"record"` //赛季挑战记录
Teams map[int32]*ChallengeTeam `protobuf:"bytes,4,rep,name=teams,proto3" json:"teams" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"teams"` //挑战队伍 Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total" bson:"total"` //赛季总积分(前三积分和)
Duration int32 `protobuf:"varint,5,opt,name=duration,proto3" json:"duration" bson:"duration"` //战斗耗时 Integrals []int64 `protobuf:"varint,6,rep,packed,name=integrals,proto3" json:"integrals" bson:"integrals"` //赛季中最高积分
Rtime int64 `protobuf:"varint,6,opt,name=rtime,proto3" json:"rtime" bson:"rtime"` //记录时间 Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status"` //@go_tags(`bson:"status"`)0当前赛季记录 1归档赛季记录
} }
func (x *DBSociatyBossRecord) Reset() { func (x *DBSociatyBossRecord) Reset() {
*x = DBSociatyBossRecord{} *x = DBSociatyBossRecord{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_sociaty_sociaty_db_proto_msgTypes[11] mi := &file_sociaty_sociaty_db_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -911,7 +1048,7 @@ func (x *DBSociatyBossRecord) String() string {
func (*DBSociatyBossRecord) ProtoMessage() {} func (*DBSociatyBossRecord) ProtoMessage() {}
func (x *DBSociatyBossRecord) ProtoReflect() protoreflect.Message { func (x *DBSociatyBossRecord) ProtoReflect() protoreflect.Message {
mi := &file_sociaty_sociaty_db_proto_msgTypes[11] mi := &file_sociaty_sociaty_db_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -924,14 +1061,7 @@ func (x *DBSociatyBossRecord) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBSociatyBossRecord.ProtoReflect.Descriptor instead. // Deprecated: Use DBSociatyBossRecord.ProtoReflect.Descriptor instead.
func (*DBSociatyBossRecord) Descriptor() ([]byte, []int) { func (*DBSociatyBossRecord) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{11} return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{13}
}
func (x *DBSociatyBossRecord) GetSociatyId() string {
if x != nil {
return x.SociatyId
}
return ""
} }
func (x *DBSociatyBossRecord) GetUid() string { func (x *DBSociatyBossRecord) GetUid() string {
@ -941,30 +1071,37 @@ func (x *DBSociatyBossRecord) GetUid() string {
return "" return ""
} }
func (x *DBSociatyBossRecord) GetIntegral() int64 { func (x *DBSociatyBossRecord) GetSociatyId() string {
if x != nil { if x != nil {
return x.Integral return x.SociatyId
} }
return 0 return ""
} }
func (x *DBSociatyBossRecord) GetTeams() map[int32]*ChallengeTeam { func (x *DBSociatyBossRecord) GetRecord() []*ChallengeRecord {
if x != nil { if x != nil {
return x.Teams return x.Record
} }
return nil return nil
} }
func (x *DBSociatyBossRecord) GetDuration() int32 { func (x *DBSociatyBossRecord) GetTotal() int64 {
if x != nil { if x != nil {
return x.Duration return x.Total
} }
return 0 return 0
} }
func (x *DBSociatyBossRecord) GetRtime() int64 { func (x *DBSociatyBossRecord) GetIntegrals() []int64 {
if x != nil { if x != nil {
return x.Rtime return x.Integrals
}
return nil
}
func (x *DBSociatyBossRecord) GetStatus() int32 {
if x != nil {
return x.Status
} }
return 0 return 0
} }
@ -1072,30 +1209,46 @@ var file_sociaty_sociaty_db_proto_rawDesc = []byte{
0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x2e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x2e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x6f, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x02, 0x0a, 0x13, 0x44, 0x42, 0x53, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6b, 0x0a, 0x13, 0x44, 0x42, 0x53, 0x6f, 0x63,
0x63, 0x69, 0x61, 0x74, 0x79, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x69, 0x61, 0x74, 0x79, 0x42, 0x6f, 0x73, 0x73, 0x53, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x18,
0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x74,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x52, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65,
0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x05, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04,
0x65, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x44, 0x42, 0x53, 0x75, 0x69, 0x64, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e,
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x67, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x31, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d,
0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x65, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65,
0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45,
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69,
0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69,
0x74, 0x69, 0x6d, 0x65, 0x1a, 0x48, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01,
0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x48, 0x0a, 0x0a, 0x54, 0x65, 0x61,
0x65, 0x61, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x50, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x09, 0x0a, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x4e, 0x4f, 0x4a, 0x4f, 0x42, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c,
0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x0a, 0x0d, 0x56, 0x49, 0x43, 0x45, 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x38, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x13, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x03, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x79, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a,
0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x43, 0x68,
0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x05,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69,
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09,
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x2a, 0x50, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x12,
0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4a, 0x4f, 0x42, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45,
0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10,
0x02, 0x12, 0x11, 0x0a, 0x0d, 0x56, 0x49, 0x43, 0x45, 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45,
0x4e, 0x54, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e,
0x54, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
} }
var ( var (
@ -1111,7 +1264,7 @@ func file_sociaty_sociaty_db_proto_rawDescGZIP() []byte {
} }
var file_sociaty_sociaty_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sociaty_sociaty_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_sociaty_sociaty_db_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_sociaty_sociaty_db_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_sociaty_sociaty_db_proto_goTypes = []interface{}{ var file_sociaty_sociaty_db_proto_goTypes = []interface{}{
(SociatyJob)(0), // 0: SociatyJob (SociatyJob)(0), // 0: SociatyJob
(*DBSociaty)(nil), // 1: DBSociaty (*DBSociaty)(nil), // 1: DBSociaty
@ -1125,28 +1278,31 @@ var file_sociaty_sociaty_db_proto_goTypes = []interface{}{
(*DBSociatyRank)(nil), // 9: DBSociatyRank (*DBSociatyRank)(nil), // 9: DBSociatyRank
(*ChallengeTeamInfo)(nil), // 10: ChallengeTeamInfo (*ChallengeTeamInfo)(nil), // 10: ChallengeTeamInfo
(*ChallengeTeam)(nil), // 11: ChallengeTeam (*ChallengeTeam)(nil), // 11: ChallengeTeam
(*DBSociatyBossRecord)(nil), // 12: DBSociatyBossRecord (*DBSociatyBossSports)(nil), // 12: DBSociatyBossSports
nil, // 13: SociatyMember.TeamsEntry (*ChallengeRecord)(nil), // 13: ChallengeRecord
nil, // 14: DBSociatyBossRecord.TeamsEntry (*DBSociatyBossRecord)(nil), // 14: DBSociatyBossRecord
(*BattleFormation)(nil), // 15: BattleFormation nil, // 15: SociatyMember.TeamsEntry
nil, // 16: ChallengeRecord.TeamsEntry
(*BattleFormation)(nil), // 17: BattleFormation
} }
var file_sociaty_sociaty_db_proto_depIdxs = []int32{ var file_sociaty_sociaty_db_proto_depIdxs = []int32{
2, // 0: DBSociaty.applyRecord:type_name -> ApplyRecord 2, // 0: DBSociaty.applyRecord:type_name -> ApplyRecord
3, // 1: DBSociaty.members:type_name -> SociatyMember 3, // 1: DBSociaty.members:type_name -> SociatyMember
0, // 2: SociatyMember.job:type_name -> SociatyJob 0, // 2: SociatyMember.job:type_name -> SociatyJob
13, // 3: SociatyMember.teams:type_name -> SociatyMember.TeamsEntry 15, // 3: SociatyMember.teams:type_name -> SociatyMember.TeamsEntry
4, // 4: DBSociatyLog.list:type_name -> SociatyLog 4, // 4: DBSociatyLog.list:type_name -> SociatyLog
7, // 5: DBSociatyTask.taskList:type_name -> SociatyTask 7, // 5: DBSociatyTask.taskList:type_name -> SociatyTask
8, // 6: DBSociatyTask.activityList:type_name -> SociatyActivity 8, // 6: DBSociatyTask.activityList:type_name -> SociatyActivity
15, // 7: ChallengeTeam.formation:type_name -> BattleFormation 17, // 7: ChallengeTeam.formation:type_name -> BattleFormation
14, // 8: DBSociatyBossRecord.teams:type_name -> DBSociatyBossRecord.TeamsEntry 16, // 8: ChallengeRecord.teams:type_name -> ChallengeRecord.TeamsEntry
11, // 9: SociatyMember.TeamsEntry.value:type_name -> ChallengeTeam 13, // 9: DBSociatyBossRecord.record:type_name -> ChallengeRecord
11, // 10: DBSociatyBossRecord.TeamsEntry.value:type_name -> ChallengeTeam 11, // 10: SociatyMember.TeamsEntry.value:type_name -> ChallengeTeam
11, // [11:11] is the sub-list for method output_type 11, // 11: ChallengeRecord.TeamsEntry.value:type_name -> ChallengeTeam
11, // [11:11] is the sub-list for method input_type 12, // [12:12] is the sub-list for method output_type
11, // [11:11] is the sub-list for extension type_name 12, // [12:12] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension extendee 12, // [12:12] is the sub-list for extension type_name
0, // [0:11] is the sub-list for field type_name 12, // [12:12] is the sub-list for extension extendee
0, // [0:12] is the sub-list for field type_name
} }
func init() { file_sociaty_sociaty_db_proto_init() } func init() { file_sociaty_sociaty_db_proto_init() }
@ -1289,6 +1445,30 @@ func file_sociaty_sociaty_db_proto_init() {
} }
} }
file_sociaty_sociaty_db_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_sociaty_sociaty_db_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBSociatyBossSports); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_sociaty_sociaty_db_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChallengeRecord); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_sociaty_sociaty_db_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBSociatyBossRecord); i { switch v := v.(*DBSociatyBossRecord); i {
case 0: case 0:
return &v.state return &v.state
@ -1307,7 +1487,7 @@ func file_sociaty_sociaty_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_sociaty_sociaty_db_proto_rawDesc, RawDescriptor: file_sociaty_sociaty_db_proto_rawDesc,
NumEnums: 1, NumEnums: 1,
NumMessages: 14, NumMessages: 16,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@ func NewGameBattletasktesting(_buf []map[string]interface{}) (*GameBattletasktes
return nil, err2 return nil, err2
} else { } else {
_dataList = append(_dataList, _v) _dataList = append(_dataList, _v)
dataMap[_v.System] = _v dataMap[_v.Id] = _v
} }
} }
return &GameBattletasktesting{_dataList:_dataList, _dataMap:dataMap}, nil return &GameBattletasktesting{_dataList:_dataList, _dataMap:dataMap}, nil

View File

@ -11,7 +11,7 @@ package cfg
import "errors" import "errors"
type GameBattletasktestingData struct { type GameBattletasktestingData struct {
System int32 Id int32
BattletaskTestingId []int32 BattletaskTestingId []int32
} }
@ -22,7 +22,7 @@ func (*GameBattletasktestingData) GetTypeId() int32 {
} }
func (_v *GameBattletasktestingData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameBattletasktestingData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["system"].(float64); !_ok_ { err = errors.New("system error"); return }; _v.System = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ {
var _arr_ []interface{} var _arr_ []interface{}
var _ok_ bool var _ok_ bool

View File

@ -166,6 +166,8 @@ type GameGlobalData struct {
GuildBossInitialNum int32 GuildBossInitialNum int32
GuildBossBuyGet *Gameatn GuildBossBuyGet *Gameatn
GuildBossMaxBuyNum int32 GuildBossMaxBuyNum int32
GuildBossTroop2 int32
GuildBossTroop3 int32
} }
const TypeId_GameGlobalData = 477542761 const TypeId_GameGlobalData = 477542761
@ -694,6 +696,8 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["GuildBoss_InitialNum"].(float64); !_ok_ { err = errors.New("GuildBoss_InitialNum error"); return }; _v.GuildBossInitialNum = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["GuildBoss_InitialNum"].(float64); !_ok_ { err = errors.New("GuildBoss_InitialNum error"); return }; _v.GuildBossInitialNum = int32(_tempNum_) }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["GuildBoss_BuyGet"].(map[string]interface{}); !_ok_ { err = errors.New("GuildBoss_BuyGet error"); return }; if _v.GuildBossBuyGet, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["GuildBoss_BuyGet"].(map[string]interface{}); !_ok_ { err = errors.New("GuildBoss_BuyGet error"); return }; if _v.GuildBossBuyGet, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["GuildBoss_MaxBuyNum"].(float64); !_ok_ { err = errors.New("GuildBoss_MaxBuyNum error"); return }; _v.GuildBossMaxBuyNum = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["GuildBoss_MaxBuyNum"].(float64); !_ok_ { err = errors.New("GuildBoss_MaxBuyNum error"); return }; _v.GuildBossMaxBuyNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["GuildBoss_troop2"].(float64); !_ok_ { err = errors.New("GuildBoss_troop2 error"); return }; _v.GuildBossTroop2 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["GuildBoss_troop3"].(float64); !_ok_ { err = errors.New("GuildBoss_troop3 error"); return }; _v.GuildBossTroop3 = int32(_tempNum_) }
return return
} }

View File

@ -84,6 +84,14 @@ func MatrixingHour(beginTime string) (t time.Time) {
return return
} }
// 时间戳格式化字符串日期
func FormatStr(timestamp int64, format string) string {
if format == "" {
format = "2006-01-02 15:04:05"
}
return time.Unix(timestamp, 0).Format(format)
}
func AddHour(hour int) time.Time { func AddHour(hour int) time.Time {
return configure.Now().Add(time.Duration(hour) * time.Hour) return configure.Now().Add(time.Duration(hour) * time.Hour)
} }
@ -118,28 +126,28 @@ func GetTodayZeroTime(curTime int64) int64 {
} }
// 计算自然天数 // 计算自然天数
func DiffDays(t1,t2 int64) int{ func DiffDays(t1, t2 int64) int {
if t1 == t2 { if t1 == t2 {
return -1 return -1
} }
if t1> t2 { if t1 > t2 {
t1,t2 = t2,t1 t1, t2 = t2, t1
} }
secOfDay:= 3600*24 secOfDay := 3600 * 24
diffDays:=0 diffDays := 0
secDiff:= t2 - t1 secDiff := t2 - t1
if secDiff > int64(secOfDay) { if secDiff > int64(secOfDay) {
tmpDays:=int(secDiff / int64(secOfDay)) tmpDays := int(secDiff / int64(secOfDay))
t1+=int64(tmpDays) * int64(secOfDay) t1 += int64(tmpDays) * int64(secOfDay)
diffDays +=tmpDays diffDays += tmpDays
} }
st:= time.Unix(t1,0) st := time.Unix(t1, 0)
et:= time.Unix(t2,0) et := time.Unix(t2, 0)
dateformat:="20060102" dateformat := "20060102"
if st.Format(dateformat)!= et.Format(dateformat){ if st.Format(dateformat) != et.Format(dateformat) {
diffDays+=1 diffDays += 1
} }
return diffDays return diffDays
} }