Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
b882a2fbc5
@ -23,7 +23,7 @@
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"t": "gold",
|
||||
"n": 10000
|
||||
}
|
||||
]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"system": 7,
|
||||
"id": 7,
|
||||
"battletask_testing_id": [
|
||||
101102
|
||||
]
|
||||
|
@ -39,7 +39,7 @@
|
||||
"tipstxt": "Lack of experience"
|
||||
},
|
||||
{
|
||||
"key": "friend",
|
||||
"key": "friendPoint",
|
||||
"name": "Friendship point",
|
||||
"color": 1,
|
||||
"effects": "",
|
||||
@ -154,5 +154,18 @@
|
||||
"ico": "wp_icon_0002",
|
||||
"intr": "Currency used to purchase goods",
|
||||
"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"
|
||||
}
|
||||
]
|
@ -139,8 +139,10 @@
|
||||
{
|
||||
"id": 10008,
|
||||
"scene": "leveldemo_fcamer_1_8",
|
||||
"levelname": "Moon Hill",
|
||||
"passformatList": [],
|
||||
"levelname": "Save the holy tree",
|
||||
"passformatList": [
|
||||
720013
|
||||
],
|
||||
"passdroplist": [
|
||||
10301,
|
||||
10302
|
||||
@ -148,7 +150,7 @@
|
||||
"award": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "exp",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
|
@ -338,5 +338,22 @@
|
||||
"clickstory": 100002,
|
||||
"formatList": [],
|
||||
"award": []
|
||||
},
|
||||
{
|
||||
"id": 720013,
|
||||
"type": 1,
|
||||
"sencenstory": [],
|
||||
"time": 3,
|
||||
"clickstory": 0,
|
||||
"formatList": [
|
||||
720013
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1650
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -88,7 +88,7 @@
|
||||
"key": "strategy_text1",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55005,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -198,7 +198,7 @@
|
||||
"key": "strategy_text1",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55005,
|
||||
"boss": [
|
||||
301014,
|
||||
301015,
|
||||
@ -308,7 +308,7 @@
|
||||
"key": "strategy_text1",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55005,
|
||||
"boss": [
|
||||
301017,
|
||||
301018,
|
||||
@ -418,7 +418,7 @@
|
||||
"key": "strategy_text1",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55005,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -528,7 +528,7 @@
|
||||
"key": "strategy_text1",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55005,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -638,7 +638,7 @@
|
||||
"key": "strategy_text1",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55005,
|
||||
"boss": [
|
||||
301014,
|
||||
301015,
|
||||
@ -748,7 +748,7 @@
|
||||
"key": "strategy_text1",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55005,
|
||||
"boss": [
|
||||
301017,
|
||||
301018,
|
||||
@ -773,8 +773,8 @@
|
||||
"id": 201,
|
||||
"bossid": 2,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1002",
|
||||
"text": "冰霜泰坦"
|
||||
},
|
||||
"grade": "SSS",
|
||||
"score_low": 6666667,
|
||||
@ -858,7 +858,7 @@
|
||||
"key": "strategy_text2",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55006,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -883,8 +883,8 @@
|
||||
"id": 202,
|
||||
"bossid": 2,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1002",
|
||||
"text": "冰霜泰坦"
|
||||
},
|
||||
"grade": "SS",
|
||||
"score_low": 3500001,
|
||||
@ -968,7 +968,7 @@
|
||||
"key": "strategy_text2",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55006,
|
||||
"boss": [
|
||||
301014,
|
||||
301015,
|
||||
@ -993,8 +993,8 @@
|
||||
"id": 203,
|
||||
"bossid": 2,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1002",
|
||||
"text": "冰霜泰坦"
|
||||
},
|
||||
"grade": "S",
|
||||
"score_low": 1800001,
|
||||
@ -1078,7 +1078,7 @@
|
||||
"key": "strategy_text2",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55006,
|
||||
"boss": [
|
||||
301017,
|
||||
301018,
|
||||
@ -1103,8 +1103,8 @@
|
||||
"id": 204,
|
||||
"bossid": 2,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1002",
|
||||
"text": "冰霜泰坦"
|
||||
},
|
||||
"grade": "A+",
|
||||
"score_low": 800001,
|
||||
@ -1188,7 +1188,7 @@
|
||||
"key": "strategy_text2",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55006,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -1213,8 +1213,8 @@
|
||||
"id": 205,
|
||||
"bossid": 2,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1002",
|
||||
"text": "冰霜泰坦"
|
||||
},
|
||||
"grade": "A",
|
||||
"score_low": 350001,
|
||||
@ -1298,7 +1298,7 @@
|
||||
"key": "strategy_text2",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55006,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -1323,8 +1323,8 @@
|
||||
"id": 206,
|
||||
"bossid": 2,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1002",
|
||||
"text": "冰霜泰坦"
|
||||
},
|
||||
"grade": "B",
|
||||
"score_low": 100001,
|
||||
@ -1408,7 +1408,7 @@
|
||||
"key": "strategy_text2",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55006,
|
||||
"boss": [
|
||||
301014,
|
||||
301015,
|
||||
@ -1433,8 +1433,8 @@
|
||||
"id": 207,
|
||||
"bossid": 2,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1002",
|
||||
"text": "冰霜泰坦"
|
||||
},
|
||||
"grade": "C",
|
||||
"score_low": 0,
|
||||
@ -1518,7 +1518,7 @@
|
||||
"key": "strategy_text2",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55006,
|
||||
"boss": [
|
||||
301017,
|
||||
301018,
|
||||
@ -1543,8 +1543,8 @@
|
||||
"id": 301,
|
||||
"bossid": 3,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1003",
|
||||
"text": "森林泰坦"
|
||||
},
|
||||
"grade": "SSS",
|
||||
"score_low": 6666667,
|
||||
@ -1628,7 +1628,7 @@
|
||||
"key": "strategy_text3",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55007,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -1653,8 +1653,8 @@
|
||||
"id": 302,
|
||||
"bossid": 3,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1003",
|
||||
"text": "森林泰坦"
|
||||
},
|
||||
"grade": "SS",
|
||||
"score_low": 3500001,
|
||||
@ -1738,7 +1738,7 @@
|
||||
"key": "strategy_text3",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55007,
|
||||
"boss": [
|
||||
301014,
|
||||
301015,
|
||||
@ -1763,8 +1763,8 @@
|
||||
"id": 303,
|
||||
"bossid": 3,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1003",
|
||||
"text": "森林泰坦"
|
||||
},
|
||||
"grade": "S",
|
||||
"score_low": 1800001,
|
||||
@ -1848,7 +1848,7 @@
|
||||
"key": "strategy_text3",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55007,
|
||||
"boss": [
|
||||
301017,
|
||||
301018,
|
||||
@ -1873,8 +1873,8 @@
|
||||
"id": 304,
|
||||
"bossid": 3,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1003",
|
||||
"text": "森林泰坦"
|
||||
},
|
||||
"grade": "A+",
|
||||
"score_low": 800001,
|
||||
@ -1958,7 +1958,7 @@
|
||||
"key": "strategy_text3",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55007,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -1983,8 +1983,8 @@
|
||||
"id": 305,
|
||||
"bossid": 3,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1003",
|
||||
"text": "森林泰坦"
|
||||
},
|
||||
"grade": "A",
|
||||
"score_low": 350001,
|
||||
@ -2068,7 +2068,7 @@
|
||||
"key": "strategy_text3",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55007,
|
||||
"boss": [
|
||||
301011,
|
||||
301012,
|
||||
@ -2093,8 +2093,8 @@
|
||||
"id": 306,
|
||||
"bossid": 3,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1003",
|
||||
"text": "森林泰坦"
|
||||
},
|
||||
"grade": "B",
|
||||
"score_low": 100001,
|
||||
@ -2178,7 +2178,7 @@
|
||||
"key": "strategy_text3",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55007,
|
||||
"boss": [
|
||||
301014,
|
||||
301015,
|
||||
@ -2203,8 +2203,8 @@
|
||||
"id": 307,
|
||||
"bossid": 3,
|
||||
"name": {
|
||||
"key": "viking_boss_1001",
|
||||
"text": "火焰泰坦"
|
||||
"key": "viking_boss_1003",
|
||||
"text": "森林泰坦"
|
||||
},
|
||||
"grade": "C",
|
||||
"score_low": 0,
|
||||
@ -2288,7 +2288,7 @@
|
||||
"key": "strategy_text3",
|
||||
"text": "BOSS攻略描述"
|
||||
},
|
||||
"boss_skill": 51004,
|
||||
"boss_skill": 55007,
|
||||
"boss": [
|
||||
301017,
|
||||
301018,
|
||||
|
@ -522,6 +522,8 @@
|
||||
"t": "100006",
|
||||
"n": 1
|
||||
},
|
||||
"GuildBoss_MaxBuyNum": 5
|
||||
"GuildBoss_MaxBuyNum": 5,
|
||||
"GuildBoss_troop2": 45,
|
||||
"GuildBoss_troop3": 60
|
||||
}
|
||||
]
|
@ -19,16 +19,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "103",
|
||||
"var": [
|
||||
{
|
||||
"a": "hero",
|
||||
"t": "34006",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "104",
|
||||
"var": [
|
||||
|
@ -2877,6 +2877,44 @@
|
||||
"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",
|
||||
"name": {
|
||||
|
@ -82222,5 +82222,65 @@
|
||||
"atkpro": 1,
|
||||
"defpro": 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
@ -34,7 +34,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": "platlv",
|
||||
"param": 3
|
||||
"param": 5
|
||||
},
|
||||
{
|
||||
"key": "maxmapid",
|
||||
@ -224,7 +224,7 @@
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
"wkqbx": 1,
|
||||
"wkqbx": 2,
|
||||
"kqbx": 0,
|
||||
"img": "zc_icon_01",
|
||||
"prompt": {
|
||||
@ -320,7 +320,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": "platlv",
|
||||
"param": 1
|
||||
"param": 10
|
||||
},
|
||||
{
|
||||
"key": "maxmapid",
|
||||
@ -710,7 +710,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": "platlv",
|
||||
"param": 1
|
||||
"param": 10
|
||||
},
|
||||
{
|
||||
"key": "maxmapid",
|
||||
@ -736,7 +736,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": "platlv",
|
||||
"param": 1
|
||||
"param": 10
|
||||
},
|
||||
{
|
||||
"key": "maxmapid",
|
||||
@ -1126,7 +1126,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": "platlv",
|
||||
"param": 2
|
||||
"param": 20
|
||||
},
|
||||
{
|
||||
"key": "maxmapid",
|
||||
@ -1204,7 +1204,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": "platlv",
|
||||
"param": 1
|
||||
"param": 10
|
||||
},
|
||||
{
|
||||
"key": "maxmapid",
|
||||
@ -1212,7 +1212,7 @@
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
"wkqbx": 1,
|
||||
"wkqbx": 2,
|
||||
"kqbx": 0,
|
||||
"img": "zc_icon_01",
|
||||
"prompt": {
|
||||
@ -1390,5 +1390,253 @@
|
||||
"text": "功能暂未开启"
|
||||
},
|
||||
"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
|
||||
}
|
||||
]
|
@ -908,6 +908,33 @@
|
||||
"data4": 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,
|
||||
"type": 24,
|
||||
|
@ -8,7 +8,7 @@
|
||||
"access": 0,
|
||||
"position": "",
|
||||
"sex": 1,
|
||||
"resources": "45003_exhibition"
|
||||
"resources": "10000_Mexplore"
|
||||
},
|
||||
{
|
||||
"id": 100002,
|
||||
@ -19,7 +19,7 @@
|
||||
"access": 0,
|
||||
"position": "",
|
||||
"sex": 1,
|
||||
"resources": "45003_exhibition"
|
||||
"resources": "10000_Mexplore"
|
||||
},
|
||||
{
|
||||
"id": 100003,
|
||||
@ -30,7 +30,7 @@
|
||||
"access": 0,
|
||||
"position": "",
|
||||
"sex": 1,
|
||||
"resources": "45003_exhibition"
|
||||
"resources": "10000_Mexplore"
|
||||
},
|
||||
{
|
||||
"id": 200001,
|
||||
@ -41,7 +41,7 @@
|
||||
"access": 0,
|
||||
"position": "",
|
||||
"sex": 2,
|
||||
"resources": "45003_exhibition"
|
||||
"resources": "10000_Mexplore"
|
||||
},
|
||||
{
|
||||
"id": 200002,
|
||||
@ -52,7 +52,7 @@
|
||||
"access": 0,
|
||||
"position": "",
|
||||
"sex": 2,
|
||||
"resources": "45003_exhibition"
|
||||
"resources": "10000_Mexplore"
|
||||
},
|
||||
{
|
||||
"id": 200003,
|
||||
@ -63,6 +63,6 @@
|
||||
"access": 0,
|
||||
"position": "",
|
||||
"sex": 2,
|
||||
"resources": "45003_exhibition"
|
||||
"resources": "10000_Mexplore"
|
||||
}
|
||||
]
|
@ -22541,7 +22541,7 @@
|
||||
{
|
||||
"Id": 200004001,
|
||||
"EmitPR": 1000,
|
||||
"From": 1,
|
||||
"From": 3,
|
||||
"Where": [],
|
||||
"Order": "",
|
||||
"Limit": 10,
|
||||
|
@ -1761,7 +1761,7 @@
|
||||
"Target": 2,
|
||||
"ChildSkill": {
|
||||
"Id": [
|
||||
234006251
|
||||
234006241
|
||||
]
|
||||
},
|
||||
"Desc": {
|
||||
@ -2041,7 +2041,7 @@
|
||||
"Target": 2,
|
||||
"ChildSkill": {
|
||||
"Id": [
|
||||
934006251
|
||||
934006241
|
||||
]
|
||||
},
|
||||
"Desc": {
|
||||
@ -3879,7 +3879,7 @@
|
||||
235001311,
|
||||
235001312,
|
||||
235001313,
|
||||
235001344
|
||||
235001334
|
||||
]
|
||||
},
|
||||
"Desc": {
|
||||
|
@ -23,7 +23,7 @@
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "diamond",
|
||||
"t": "gold",
|
||||
"n": 10000
|
||||
}
|
||||
]
|
||||
|
@ -251,7 +251,7 @@
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"0新手引导-杰克-中轴城",
|
||||
"0新手引导-杰克-中轴城常驻待机",
|
||||
"150"
|
||||
],
|
||||
"getafter_event": [
|
||||
@ -273,13 +273,13 @@
|
||||
"key": 20011,
|
||||
"lock": 1,
|
||||
"ontxe": 20010,
|
||||
"id_after": 20020,
|
||||
"id_after": 20012,
|
||||
"group": 2,
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"0新手引导-杰克-中轴城",
|
||||
"0新手引导-杰克-中轴城常驻待机",
|
||||
"150"
|
||||
],
|
||||
"getafter_event": [
|
||||
@ -288,14 +288,14 @@
|
||||
],
|
||||
"completetask": 0,
|
||||
"auto_accept": 0,
|
||||
"overtips": 0,
|
||||
"overtips": 1,
|
||||
"reword": []
|
||||
},
|
||||
{
|
||||
"key": 20020,
|
||||
"key": 20012,
|
||||
"lock": 1,
|
||||
"ontxe": 20011,
|
||||
"id_after": 20030,
|
||||
"id_after": 20020,
|
||||
"group": 2,
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
@ -314,21 +314,21 @@
|
||||
"reword": []
|
||||
},
|
||||
{
|
||||
"key": 20030,
|
||||
"key": 20020,
|
||||
"lock": 1,
|
||||
"ontxe": 20020,
|
||||
"ontxe": 20012,
|
||||
"id_after": 20040,
|
||||
"group": 2,
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"0新手引导-杰克-中轴城",
|
||||
"1.新手引导-花朵-中轴城",
|
||||
"150"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
405
|
||||
404
|
||||
],
|
||||
"completetask": 0,
|
||||
"auto_accept": 1,
|
||||
@ -338,14 +338,14 @@
|
||||
{
|
||||
"key": 20040,
|
||||
"lock": 1,
|
||||
"ontxe": 20030,
|
||||
"ontxe": 20020,
|
||||
"id_after": 20050,
|
||||
"group": 2,
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"0新手引导-杰克-中轴城",
|
||||
"0新手引导-杰克-中轴城常驻待机",
|
||||
"150"
|
||||
],
|
||||
"getafter_event": [
|
||||
@ -438,16 +438,16 @@
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"scenes_kongfupanda_01",
|
||||
"新手引导-波比-右屏圣树2",
|
||||
"153"
|
||||
"718"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
422
|
||||
411
|
||||
],
|
||||
"completetask": 0,
|
||||
"auto_accept": 0,
|
||||
"auto_accept": 1,
|
||||
"overtips": 1,
|
||||
"reword": []
|
||||
},
|
||||
@ -460,18 +460,24 @@
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"新手引导-瓜哥-右屏圣树",
|
||||
"153"
|
||||
"scenes_kongfupanda_01",
|
||||
"新手引导-豺狼人-右屏圣树",
|
||||
"718"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
412
|
||||
],
|
||||
"completetask": 174,
|
||||
"auto_accept": 0,
|
||||
"auto_accept": 1,
|
||||
"overtips": 1,
|
||||
"reword": []
|
||||
"reword": [
|
||||
{
|
||||
"a": "hero",
|
||||
"t": "34006",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": 20100,
|
||||
@ -482,9 +488,9 @@
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"新手引导-瓜哥-右屏圣树",
|
||||
"153"
|
||||
"scenes_kongfupanda_01",
|
||||
"新手引导-豺狼人-右屏圣树",
|
||||
"718"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
@ -504,16 +510,16 @@
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"scenes_kongfupanda_01",
|
||||
"新手引导-圣树下的黑洞",
|
||||
"153"
|
||||
"718"
|
||||
],
|
||||
"getafter_event": [
|
||||
5,
|
||||
10008
|
||||
],
|
||||
"completetask": 198,
|
||||
"auto_accept": 0,
|
||||
"auto_accept": 1,
|
||||
"overtips": 1,
|
||||
"reword": []
|
||||
},
|
||||
@ -526,16 +532,16 @@
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"新手引导-圣树下的犀牛守卫",
|
||||
"153"
|
||||
"scenes_kongfupanda_01",
|
||||
"新手引导-波比-犀牛守卫",
|
||||
"718"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
416
|
||||
],
|
||||
"completetask": 0,
|
||||
"auto_accept": 0,
|
||||
"auto_accept": 1,
|
||||
"overtips": 1,
|
||||
"reword": []
|
||||
},
|
||||
@ -548,17 +554,17 @@
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"新手引导-波比-右屏圣树2",
|
||||
"153"
|
||||
"scenes_kongfupanda_01",
|
||||
"新手引导-波比-右屏圣树3",
|
||||
"718"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
420
|
||||
9,
|
||||
0
|
||||
],
|
||||
"completetask": 0,
|
||||
"auto_accept": 0,
|
||||
"overtips": 1,
|
||||
"auto_accept": 1,
|
||||
"overtips": 0,
|
||||
"reword": []
|
||||
},
|
||||
{
|
||||
@ -570,16 +576,16 @@
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"0新手引导-杰克-中轴城",
|
||||
"153"
|
||||
"scenes_kongfupanda_01",
|
||||
"新手引导-波比-右屏圣树3",
|
||||
"718"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
422
|
||||
420
|
||||
],
|
||||
"completetask": 0,
|
||||
"auto_accept": 0,
|
||||
"auto_accept": 1,
|
||||
"overtips": 1,
|
||||
"reword": []
|
||||
},
|
||||
@ -593,14 +599,14 @@
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"0新手引导-杰克-中轴城",
|
||||
"153"
|
||||
"0新手引导-杰克-中轴城常驻待机",
|
||||
"150"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
423
|
||||
422
|
||||
],
|
||||
"completetask": 118,
|
||||
"completetask": 0,
|
||||
"auto_accept": 0,
|
||||
"overtips": 1,
|
||||
"reword": []
|
||||
@ -615,15 +621,15 @@
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"新手引导-布兰奇-中轴城",
|
||||
"153"
|
||||
"0新手引导-杰克-中轴城常驻待机",
|
||||
"150"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
425
|
||||
423
|
||||
],
|
||||
"completetask": 0,
|
||||
"auto_accept": 0,
|
||||
"auto_accept": 1,
|
||||
"overtips": 1,
|
||||
"reword": []
|
||||
},
|
||||
@ -637,12 +643,12 @@
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"0新手引导-杰克-中轴城",
|
||||
"153"
|
||||
"0新手引导-杰克-中轴城常驻待机",
|
||||
"150"
|
||||
],
|
||||
"getafter_event": [
|
||||
2,
|
||||
426
|
||||
425
|
||||
],
|
||||
"completetask": 0,
|
||||
"auto_accept": 0,
|
||||
@ -653,14 +659,36 @@
|
||||
"key": 20180,
|
||||
"lock": 1,
|
||||
"ontxe": 20170,
|
||||
"id_after": 0,
|
||||
"id_after": 20190,
|
||||
"group": 2,
|
||||
"des": 2,
|
||||
"icon": "",
|
||||
"npc": [
|
||||
"scenes_boundary_01_recordtask",
|
||||
"新手引导-波比-右屏圣树2",
|
||||
"153"
|
||||
"0新手引导-杰克-中轴城常驻待机",
|
||||
"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": [
|
||||
2,
|
||||
@ -670,5 +698,93 @@
|
||||
"auto_accept": 0,
|
||||
"overtips": 1,
|
||||
"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": []
|
||||
}
|
||||
]
|
@ -10,6 +10,7 @@ import (
|
||||
"go_dreamfactory/modules/hero"
|
||||
"go_dreamfactory/modules/sociaty"
|
||||
"go_dreamfactory/pb"
|
||||
"time"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/container"
|
||||
@ -22,16 +23,30 @@ import (
|
||||
type SociatyBossView struct {
|
||||
BaseformView
|
||||
|
||||
itemList common.ItemList
|
||||
heroListFlag bool
|
||||
teamFlag bool
|
||||
heroList func()
|
||||
sociatyId string
|
||||
teams map[int32]*pb.ChallengeTeam
|
||||
itemList common.ItemList
|
||||
rankItemList common.ItemList //排行榜
|
||||
heroListFlag bool
|
||||
teamFlag bool
|
||||
bossFlag bool
|
||||
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 {
|
||||
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() {
|
||||
if err := service.GetPttService().SendToClient(
|
||||
@ -45,14 +60,31 @@ func (s *SociatyBossView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
}
|
||||
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)
|
||||
challengestartBtn := widget.NewButton("开始挑战", s.challengestart)
|
||||
challengefinishBtn := widget.NewButton("挑战结束", s.challengefinish)
|
||||
ticketBuyBtn := widget.NewButton("挑战券", s.buy)
|
||||
btns := container.NewHBox(buzhenBtn, challengestartBtn, challengefinishBtn, ticketBuyBtn)
|
||||
c := container.NewBorder(btns, nil, nil, nil)
|
||||
rankBtn := widget.NewButton("排行榜", s.rank)
|
||||
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.listenBossmain()
|
||||
return c
|
||||
}
|
||||
|
||||
@ -77,7 +109,7 @@ func (s *SociatyBossView) listenTeams() {
|
||||
|
||||
if rsp.Sociaty != nil {
|
||||
s.sociatyId = rsp.Sociaty.Id
|
||||
s.teams = rsp.Teams
|
||||
// s.teams = rsp.Teams
|
||||
}
|
||||
|
||||
},
|
||||
@ -85,6 +117,44 @@ func (s *SociatyBossView) listenTeams() {
|
||||
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() {
|
||||
if err := service.GetPttService().SendToClient(
|
||||
@ -107,8 +177,8 @@ func (s *SociatyBossView) challengefinish() {
|
||||
&pb.SociatyBChallengeFinishReq{
|
||||
Ptype: pb.PlayType_sociaty,
|
||||
Report: &pb.BattleReport{
|
||||
Costtime: 180,
|
||||
Harm: 180300,
|
||||
Costtime: 180, //游戏耗时
|
||||
Harm: 180300, //伤害值
|
||||
},
|
||||
},
|
||||
); err != nil {
|
||||
@ -277,6 +347,61 @@ func (s *SociatyBossView) buzhen() {
|
||||
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() {
|
||||
if this.heroListFlag {
|
||||
return
|
||||
|
@ -304,7 +304,7 @@ func (this *SociatyMineView) dataListener(item *entryItem) {
|
||||
|
||||
this.sociaty = rsp.Sociaty
|
||||
this.master = rsp.Master
|
||||
this.ticket = rsp.Ticket
|
||||
// this.ticket = rsp.Ticket
|
||||
|
||||
//设置成员职位
|
||||
for _, m := range rsp.Sociaty.Members {
|
||||
|
@ -184,7 +184,7 @@ const (
|
||||
// 公会日志
|
||||
TableSociatyLog = "sociatylog"
|
||||
// 公会BOSS
|
||||
TableSociatyBoss = "sociatybsoss"
|
||||
TableSociatyBoss = "sociatyboss"
|
||||
|
||||
///充值数据表
|
||||
TablePay = "payorder"
|
||||
@ -705,8 +705,8 @@ const (
|
||||
)
|
||||
const (
|
||||
MainStarType1 = 1 //成功通关
|
||||
MainStarType2 = 1 //死亡人数不超过{0}人
|
||||
MainStarType3 = 1 //不超过{0}回合通关
|
||||
MainStarType2 = 2 //死亡人数不超过{0}人
|
||||
MainStarType3 = 3 //不超过{0}回合通关
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -73,14 +73,15 @@ func Test_Main(t *testing.T) {
|
||||
|
||||
var star1, star2, star3 int32
|
||||
var rst int32
|
||||
star1 = 1 << 2
|
||||
star1 = 1 << 0
|
||||
star2 = 1 << 1
|
||||
star3 = 1 << 0
|
||||
star3 = 1 << 2
|
||||
|
||||
//rst = star1 ^ star2 ^ star3 // 三星
|
||||
//rst = star1 ^ star2 // 2星
|
||||
rst ^= star1
|
||||
rst ^= star2
|
||||
rst ^= star2
|
||||
// 校验星
|
||||
b1 := (rst&star1 == star1)
|
||||
b2 := (rst&star2 == star2)
|
||||
|
@ -693,12 +693,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
|
||||
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)
|
||||
if err != nil {
|
||||
@ -714,18 +709,17 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
|
||||
hero.Lv = maxLv
|
||||
hero.Star = maxStar
|
||||
hero.JuexingLv = int32(maxJux)
|
||||
hero.ResonateNum = maxGongm
|
||||
hero.SameCount = 1
|
||||
this.modelHero.PropertyCompute(hero) // 重新计算属性
|
||||
_heroMap := map[string]interface{}{
|
||||
"lv": hero.Lv,
|
||||
"star": hero.Star,
|
||||
"juexingLv": hero.JuexingLv,
|
||||
"resonateNum": hero.ResonateNum,
|
||||
"isOverlying": false,
|
||||
"sameCount": 1,
|
||||
"normalSkill": hero.NormalSkill,
|
||||
"talentProperty": hero.TalentProperty,
|
||||
"property": hero.Property,
|
||||
}
|
||||
|
||||
// 保存数据
|
||||
|
@ -78,36 +78,53 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
var star1, star2, star3 int32
|
||||
star1 = 1 << 2
|
||||
star2 = 1 << 1
|
||||
star3 = 1 << 0
|
||||
|
||||
var szStar []int32
|
||||
szStar = append(szStar, 1<<0)
|
||||
szStar = append(szStar, 1<<1)
|
||||
szStar = append(szStar, 1<<2)
|
||||
for i, v := range stageConf.StarType {
|
||||
if v == comm.MainStarType1 {
|
||||
//star += stageConf.Star[i]
|
||||
star ^= star1
|
||||
star ^= szStar[i]
|
||||
} else if v == comm.MainStarType2 {
|
||||
if req.Report.Death <= stageConf.StarValue[i] {
|
||||
//star += stageConf.Star[i]
|
||||
star ^= star2
|
||||
star ^= szStar[i]
|
||||
}
|
||||
} else if v == comm.MainStarType3 {
|
||||
if req.Report.Round <= stageConf.StarValue[i] {
|
||||
//star += stageConf.Star[i]
|
||||
star ^= star3
|
||||
star ^= szStar[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 判断是不是首通
|
||||
if _, ok := curChapter.Star[req.StageId]; !ok {
|
||||
first = true
|
||||
curChapter.Star[req.StageId] = 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 // 清空预扣体力值
|
||||
update["ps"] = curChapter.Ps
|
||||
|
||||
|
@ -3,7 +3,6 @@ package mline
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
"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) {
|
||||
var (
|
||||
curChapter *pb.DBMline // 当前章节信息
|
||||
stageConf *cfg.GameMainStageData
|
||||
update map[string]interface{}
|
||||
rsp *pb.MlineGetRewardResp
|
||||
)
|
||||
rsp = &pb.MlineGetRewardResp{}
|
||||
update = make(map[string]interface{})
|
||||
if code = this.GetRewardCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
if stageConf = this.module.configure.GetMainStageConf(req.CId); stageConf == nil { // 配置文件校验
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
mLineConf := this.module.configure.GetMainChapterConf(stageConf.Chapterid)
|
||||
|
||||
mLineConf := this.module.configure.GetMainChapterConf(req.CId)
|
||||
if mLineConf == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
list, _ := this.module.modelMline.getMainlineList(session.GetUserId())
|
||||
for _, v := range list {
|
||||
if stageConf.Chapterid == v.ChapterId {
|
||||
if req.CId == v.ChapterId {
|
||||
curChapter = v
|
||||
break
|
||||
}
|
||||
@ -54,7 +50,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MlineGetReward
|
||||
}
|
||||
|
||||
curChapter.Award[req.Star] = true
|
||||
update["awared"] = curChapter.Award
|
||||
update["award"] = curChapter.Award
|
||||
awardConf := this.module.configure.GetMainStarRewardConf(mLineConf.Starreward)
|
||||
for _, v := range awardConf {
|
||||
if v.Starnum == req.Star {
|
||||
|
@ -317,13 +317,13 @@ func (this *Privilege) SendDailyMail(session comm.IUserSession, cId string, coun
|
||||
N: v.N,
|
||||
})
|
||||
}
|
||||
|
||||
if pType == 1 {
|
||||
this.mail.SendMailByCid(session, comm.Yueka_1, res)
|
||||
} else if pType == 2 {
|
||||
this.mail.SendMailByCid(session, comm.Yueka_1, res)
|
||||
for i := 0; i < int(count); i++ {
|
||||
if pType == 1 {
|
||||
this.mail.SendMailByCid(session, comm.Yueka_1, res)
|
||||
} else if pType == 2 {
|
||||
this.mail.SendMailByCid(session, comm.Yueka_1, res)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (this *Privilege) CheckAllPrivilege(session comm.IUserSession) map[int32]*pb.PrivilegeList {
|
||||
|
@ -34,6 +34,7 @@ const (
|
||||
SociatySubTypeLog = "log"
|
||||
SociatySubTypeAgreePush = "agree"
|
||||
SociatySubTypeRecord = "record"
|
||||
SociatySubTypeBossmain = "bossmain"
|
||||
SociatySubTypeFormation = "formation"
|
||||
SociatySubTypeChallengestart = "challengestart"
|
||||
SociatySubTypeChallengefinish = "challengefinish"
|
||||
|
@ -19,8 +19,37 @@ func (this *apiComp) Formation(session comm.IUserSession, req *pb.SociatyBFormat
|
||||
}
|
||||
|
||||
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)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -21,7 +21,7 @@ func (this *apiComp) Accuse(session comm.IUserSession, req *pb.SociatyAccuseReq)
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -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) {
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -23,7 +23,7 @@ func (this *apiComp) Activityreceive(session comm.IUserSession, req *pb.SociatyA
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -25,7 +25,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -31,7 +31,7 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) (
|
||||
uid := session.GetUserId()
|
||||
|
||||
sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("公会未找到", log.Field{Key: "uid", Value: uid}, log.Field{Key: "sociatyId", Value: req.SociatyId})
|
||||
return
|
||||
|
@ -24,7 +24,7 @@ func (this *apiComp) ApplyList(session comm.IUserSession, req *pb.SociatyApplyLi
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("公会未找到",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
|
@ -31,7 +31,7 @@ func (this *apiComp) Assign(session comm.IUserSession, req *pb.SociatyAssignReq)
|
||||
}
|
||||
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
75
modules/sociaty/api_cross_bossmain.go
Normal file
75
modules/sociaty/api_cross_bossmain.go
Normal 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
|
||||
}
|
@ -20,7 +20,7 @@ func (this *apiComp) Brank(session comm.IUserSession, req *pb.SociatyBRankReq) (
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
@ -28,7 +28,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.SociatyBuyReq) (code
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -19,14 +19,34 @@ func (this *apiComp) Challengefinish(session comm.IUserSession, req *pb.SociatyB
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
}
|
||||
|
||||
userEx, err := this.module.ModuleUser.GetUserExpand(uid)
|
||||
if err != nil {
|
||||
this.module.Error("GetRemoteUserExpand",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
code = pb.ErrorCode_UserSessionNobeing
|
||||
return
|
||||
}
|
||||
|
||||
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{
|
||||
Integral: this.module.modelSociatyBoss.transIntegral(req.Report.Harm),
|
||||
|
@ -1,6 +1,7 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
@ -20,14 +21,43 @@ func (this *apiComp) Challengestart(session comm.IUserSession, req *pb.SociatyBC
|
||||
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
}
|
||||
//校验挑战券
|
||||
userEx, err := this.module.ModuleUser.GetUserExpand(uid)
|
||||
if err != nil {
|
||||
this.module.Error("GetRemoteUserExpand",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
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{
|
||||
SociatyId: sociaty.Id,
|
||||
|
@ -25,7 +25,7 @@ func (this *apiComp) Discharge(session comm.IUserSession, req *pb.SociatyDischar
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -25,7 +25,7 @@ func (this *apiComp) Dismiss(session comm.IUserSession, req *pb.SociatyDismissRe
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -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) {
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -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) {
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -30,9 +30,7 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.SociatyMineReq) (co
|
||||
return
|
||||
}
|
||||
|
||||
rsp := &pb.SociatyMineResp{
|
||||
Ticket: userEx.SociatyTicket,
|
||||
}
|
||||
rsp := &pb.SociatyMineResp{}
|
||||
|
||||
// 未加入公会
|
||||
if userEx.SociatyId == "" {
|
||||
@ -42,7 +40,7 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.SociatyMineReq) (co
|
||||
|
||||
// 获取公会
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
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.Master = master
|
||||
|
||||
|
@ -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) {
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -24,7 +24,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.SociatyReceiveRe
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -24,7 +24,7 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.SociatyRefuseReq)
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -24,7 +24,7 @@ func (this *apiComp) Search(session comm.IUserSession, req *pb.SociatySearchReq)
|
||||
|
||||
rsp := &pb.SociatySearchResp{}
|
||||
sociaty := this.module.modelSociaty.findByName(req.Name)
|
||||
if sociaty != nil && sociaty.Id != "" {
|
||||
if sociaty == nil {
|
||||
rsp.List = append(rsp.List, sociaty)
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ func (this *apiComp) Setting(session comm.IUserSession, req *pb.SociatySettingRe
|
||||
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -24,7 +24,7 @@ func (this *apiComp) SettingJob(session comm.IUserSession, req *pb.SociatySettin
|
||||
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil{
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -20,7 +20,7 @@ func (this *apiComp) Sign(session comm.IUserSession, req *pb.SociatySignReq) (co
|
||||
uid := session.GetUserId()
|
||||
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil && sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -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) {
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty.Id == "" {
|
||||
if sociaty == nil {
|
||||
code = pb.ErrorCode_SociatyNoFound
|
||||
this.module.Error("当前玩家所在的公会未找到", log.Field{Key: "uid", Value: uid})
|
||||
return
|
||||
|
@ -91,9 +91,7 @@ func (this *ModelSociaty) isNameExist(name string) error {
|
||||
// 公会列表
|
||||
func (this *ModelSociaty) list(uid string, filter pb.SociatyListFilter) (list []*pb.DBSociaty) {
|
||||
user := this.module.ModuleUser.GetUser(uid)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
|
||||
if user == nil {
|
||||
return
|
||||
}
|
||||
@ -169,7 +167,10 @@ func (this *ModelSociaty) getSociaty(sociatyId string) (sociaty *pb.DBSociaty) {
|
||||
sociaty = &pb.DBSociaty{}
|
||||
if err := this.GetListObj(comm.RDS_EMPTY, sociatyId, sociaty); err != nil {
|
||||
log.Error("GetListObj", log.Field{Key: "sociatyId", Value: sociatyId})
|
||||
return
|
||||
return nil
|
||||
}
|
||||
if sociaty.Id == "" {
|
||||
return nil
|
||||
}
|
||||
return
|
||||
}
|
||||
@ -202,7 +203,7 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
|
||||
}
|
||||
if userEx.SociatyId != "" {
|
||||
sociaty = this.getSociaty(userEx.SociatyId)
|
||||
if sociaty.Id != "" {
|
||||
if sociaty != nil {
|
||||
//验证是否解散
|
||||
if this.isDismiss(sociaty) {
|
||||
sociaty.Id = ""
|
||||
@ -404,9 +405,9 @@ func (this *ModelSociaty) addMember(uid string, sociaty *pb.DBSociaty) error {
|
||||
return comm.NewCustomError(pb.ErrorCode_SociatyMemberCountLimit)
|
||||
}
|
||||
sociaty.Members = append(sociaty.Members, &pb.SociatyMember{
|
||||
Uid: uid,
|
||||
Job: pb.SociatyJob_MEMBER,
|
||||
Ctime: configure.Now().Unix(),
|
||||
Uid: uid,
|
||||
Job: pb.SociatyJob_MEMBER,
|
||||
Ctime: configure.Now().Unix(),
|
||||
})
|
||||
update := map[string]interface{}{
|
||||
"members": sociaty.Members,
|
||||
|
@ -2,15 +2,28 @@ package sociaty
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
rn "go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/lego/sys/redis/pipe"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go_dreamfactory/lego/sys/redis/pipe"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/utils"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"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 {
|
||||
@ -27,6 +40,120 @@ func (this *ModelSociatyBoss) Init(service core.IService, module core.IModule, c
|
||||
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 {
|
||||
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 {
|
||||
//阵容
|
||||
//组装阵容数据
|
||||
var formations []*pb.BattleFormation
|
||||
m := s.moduleSociaty.modelSociaty.getMemberInfo(sociaty, session.GetUserId())
|
||||
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 {
|
||||
b.CreatePvbBattle(session, &pb.BattlePVBReq{
|
||||
if code, _ := b.CreatePvbBattle(session, &pb.BattlePVBReq{
|
||||
Ptype: pb.PlayType_sociaty,
|
||||
Title: "公会BOSS",
|
||||
Format: formations,
|
||||
})
|
||||
}); code != pb.ErrorCode_Success {
|
||||
return comm.NewCustomError(code)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -79,36 +208,99 @@ func (s *ModelSociatyBoss) challengefinish(sociaty *pb.DBSociaty, uid string, re
|
||||
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{
|
||||
Uid: uid,
|
||||
SociatyId: sociaty.Id,
|
||||
Integral: s.transIntegral(report.Harm),
|
||||
Duration: report.Costtime,
|
||||
}); err != nil {
|
||||
record := &pb.ChallengeRecord{
|
||||
Teams: sm.Teams,
|
||||
Integral: s.transIntegral(report.Harm),
|
||||
Duration: report.Costtime,
|
||||
Rtime: configure.Now().Unix(),
|
||||
}
|
||||
if err := s.updateChallengeRecord(uid, sociaty.Id, record); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s.addSociatyBossUser(uid)
|
||||
return nil
|
||||
}
|
||||
|
||||
// 添加参赛玩家
|
||||
func (s *ModelSociatyBoss) addSociatyBossUser(uid string) {
|
||||
sports := s.getSociatyBossSports()
|
||||
if sports == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if len(sports.Uids) == 0 {
|
||||
sports.Uids = append(sports.Uids, uid)
|
||||
} else {
|
||||
if _, ok := utils.Findx(sports.Uids, uid); !ok {
|
||||
sports.Uids = append(sports.Uids, uid)
|
||||
}
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"uids": sports.Uids,
|
||||
}
|
||||
if err := s.Change(BOSS_SPORTS, update); err != nil {
|
||||
s.moduleSociaty.Error("添加参赛玩家", log.Field{Key: "err", Value: err.Error()})
|
||||
}
|
||||
}
|
||||
|
||||
// 获取玩家赛季挑战记录
|
||||
func (s *ModelSociatyBoss) getChallengeRecord(uid string) *pb.DBSociatyBossRecord {
|
||||
his := &pb.DBSociatyBossRecord{}
|
||||
if err := s.Get(uid, his); err != nil {
|
||||
return nil
|
||||
}
|
||||
if his.Uid == "" {
|
||||
return nil
|
||||
}
|
||||
return his
|
||||
}
|
||||
|
||||
// 挑战记录 作为阵容推荐的依据;
|
||||
func (s *ModelSociatyBoss) addChallengeRecord(uid string, record *pb.DBSociatyBossRecord) error {
|
||||
id := primitive.NewObjectID().Hex()
|
||||
if err := s.AddList(uid, id, record); err != nil {
|
||||
return err
|
||||
func (s *ModelSociatyBoss) updateChallengeRecord(uid, sociatyId string, record *pb.ChallengeRecord) error {
|
||||
his := &pb.DBSociatyBossRecord{}
|
||||
if err := s.Get(uid, his); err != nil {
|
||||
if err == rn.RedisNil || err == mongo.ErrNoDocuments {
|
||||
if err := s.Add(uid, &pb.DBSociatyBossRecord{
|
||||
Uid: uid,
|
||||
SociatyId: sociatyId,
|
||||
Record: []*pb.ChallengeRecord{record},
|
||||
}); err != nil {
|
||||
return comm.NewCustomError(pb.ErrorCode_DBError)
|
||||
}
|
||||
} else {
|
||||
return comm.NewCustomError(pb.ErrorCode_DBError)
|
||||
}
|
||||
}
|
||||
|
||||
//更新挑战记录
|
||||
his.Record = append(his.Record, record)
|
||||
update := map[string]interface{}{
|
||||
"record": his.Record,
|
||||
}
|
||||
if err := s.Change(uid, update); err != nil {
|
||||
return comm.NewCustomError(pb.ErrorCode_DBError)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 记入排行
|
||||
func (s *ModelSociatyBoss) addRank(uid string, integral int32) error {
|
||||
func (s *ModelSociatyBoss) addRank(uid string, integral int64) error {
|
||||
var (
|
||||
pipe *pipe.RedisPipe = s.Redis.RedisPipe(context.TODO())
|
||||
m *redis.Z
|
||||
)
|
||||
m = &redis.Z{Score: float64(integral), Member: uid}
|
||||
if cmd := pipe.ZAdd(s.TableName, m); cmd != nil {
|
||||
if cmd := pipe.ZAdd(fmt.Sprintf("%s:%s", s.TableName, BOSS_RANK), m); cmd != nil {
|
||||
_, err := cmd.Result()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -192,8 +384,92 @@ func (s *ModelSociatyBoss) rank(sociatyName string, rankType int32) (res []*pb.S
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
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
|
||||
}
|
||||
|
@ -85,6 +85,9 @@ func (this *Sociaty) Start() (err error) {
|
||||
if this.sociatySignConf, err = this.configure.getSociatySignCfg(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 初始化公会BOSS赛季开始时间
|
||||
this.modelSociatyBoss.initSports()
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.TrollGetListReq)
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
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})
|
||||
return
|
||||
}
|
||||
|
@ -84,9 +84,9 @@ func (this *configureComp) GetTrollRule(id int32) int32 {
|
||||
if configure, ok := v.(*cfg.GameTrollRule); ok {
|
||||
return configure.Get(id).Quantity
|
||||
}
|
||||
} else {
|
||||
log.Errorf("get GameTrollRuleData conf err:%v", err)
|
||||
}
|
||||
log.Errorf("get GetTrollRule conf err:%d", id)
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
|
@ -146,9 +146,7 @@ func (this *Troll) TrollAI(session comm.IUserSession, troll *pb.DBTrollTrain) (c
|
||||
this.Errorf("玩家 uid:%s 金币不足,获得金币%d", session.GetUserId(), buyGold)
|
||||
}
|
||||
}
|
||||
|
||||
totalGold += buyGold
|
||||
|
||||
}
|
||||
} else { // 超过当前时间
|
||||
refreshTime -= int64(sz[index])
|
||||
|
@ -223,19 +223,18 @@ func (this *User) SearchRmoteUser(nickname string) ([]*pb.DBUser, error) {
|
||||
//查询用户属性值 例如 金币 经验
|
||||
func (this *User) QueryAttributeValue(uid string, attr string) (value int64) {
|
||||
var (
|
||||
user *pb.DBUser
|
||||
err error
|
||||
user *pb.DBUser
|
||||
userEx *pb.DBUserExpand
|
||||
err error
|
||||
)
|
||||
if this.IsCross() {
|
||||
user, err = this.getRemoteUser(uid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
user = this.modelUser.GetUser(uid)
|
||||
|
||||
user = this.modelUser.GetUser(uid)
|
||||
userEx, err = this.GetUserExpand(uid)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if user == nil {
|
||||
if user == nil || userEx == nil {
|
||||
return
|
||||
}
|
||||
switch attr {
|
||||
@ -251,6 +250,12 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int64) {
|
||||
return user.Diamond
|
||||
case comm.ResPs:
|
||||
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
|
||||
}
|
||||
@ -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: "add", Value: add},
|
||||
)
|
||||
// code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
|
||||
@ -280,7 +284,7 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
return
|
||||
}
|
||||
|
||||
if user == nil {
|
||||
if user == nil || userEx == nil {
|
||||
code = pb.ErrorCode_UserSessionNobeing
|
||||
return
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
|
||||
}
|
||||
|
||||
if curTaskConf.Group != req.GroupId {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
code = pb.ErrorCode_WorldtaskGroupIdNosame
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -786,7 +786,7 @@ func (x *DBSociatyRank) GetCtime() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// 挑战队伍
|
||||
// 阵容明细
|
||||
type ChallengeTeamInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -834,6 +834,7 @@ func (x *ChallengeTeamInfo) GetHeroId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// 阵容
|
||||
type ChallengeTeam struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -881,24 +882,160 @@ func (x *ChallengeTeam) GetFormation() *BattleFormation {
|
||||
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 {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
|
||||
Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral" bson:"integral"` //公会BOSS挑战积分
|
||||
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"` //挑战队伍
|
||||
Duration int32 `protobuf:"varint,5,opt,name=duration,proto3" json:"duration" bson:"duration"` //战斗耗时
|
||||
Rtime int64 `protobuf:"varint,6,opt,name=rtime,proto3" json:"rtime" bson:"rtime"` //记录时间
|
||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //玩家ID
|
||||
SociatyId string `protobuf:"bytes,2,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"` //公会ID
|
||||
Record []*ChallengeRecord `protobuf:"bytes,4,rep,name=record,proto3" json:"record" bson:"record"` //赛季挑战记录
|
||||
Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total" bson:"total"` //赛季总积分(前三积分和)
|
||||
Integrals []int64 `protobuf:"varint,6,rep,packed,name=integrals,proto3" json:"integrals" bson:"integrals"` //赛季中最高积分
|
||||
Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status"` //@go_tags(`bson:"status"`)0当前赛季记录 1归档赛季记录
|
||||
}
|
||||
|
||||
func (x *DBSociatyBossRecord) Reset() {
|
||||
*x = DBSociatyBossRecord{}
|
||||
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.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -911,7 +1048,7 @@ func (x *DBSociatyBossRecord) String() string {
|
||||
func (*DBSociatyBossRecord) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -924,14 +1061,7 @@ func (x *DBSociatyBossRecord) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DBSociatyBossRecord.ProtoReflect.Descriptor instead.
|
||||
func (*DBSociatyBossRecord) Descriptor() ([]byte, []int) {
|
||||
return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *DBSociatyBossRecord) GetSociatyId() string {
|
||||
if x != nil {
|
||||
return x.SociatyId
|
||||
}
|
||||
return ""
|
||||
return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *DBSociatyBossRecord) GetUid() string {
|
||||
@ -941,30 +1071,37 @@ func (x *DBSociatyBossRecord) GetUid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBSociatyBossRecord) GetIntegral() int64 {
|
||||
func (x *DBSociatyBossRecord) GetSociatyId() string {
|
||||
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 {
|
||||
return x.Teams
|
||||
return x.Record
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBSociatyBossRecord) GetDuration() int32 {
|
||||
func (x *DBSociatyBossRecord) GetTotal() int64 {
|
||||
if x != nil {
|
||||
return x.Duration
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBSociatyBossRecord) GetRtime() int64 {
|
||||
func (x *DBSociatyBossRecord) GetIntegrals() []int64 {
|
||||
if x != nil {
|
||||
return x.Rtime
|
||||
return x.Integrals
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBSociatyBossRecord) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
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,
|
||||
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,
|
||||
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x02, 0x0a, 0x13, 0x44, 0x42, 0x53, 0x6f,
|
||||
0x63, 0x69, 0x61, 0x74, 0x79, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x05, 0x74,
|
||||
0x65, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x44, 0x42, 0x53,
|
||||
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x65, 0x61,
|
||||
0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x1a, 0x48, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x54,
|
||||
0x65, 0x61, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 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,
|
||||
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6b, 0x0a, 0x13, 0x44, 0x42, 0x53, 0x6f, 0x63,
|
||||
0x69, 0x61, 0x74, 0x79, 0x42, 0x6f, 0x73, 0x73, 0x53, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x74, 0x74,
|
||||
0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x0e, 0x73, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x75, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04,
|
||||
0x75, 0x69, 0x64, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e,
|
||||
0x67, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x31, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65,
|
||||
0x6e, 0x67, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69,
|
||||
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69,
|
||||
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x48, 0x0a, 0x0a, 0x54, 0x65, 0x61,
|
||||
0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x43, 0x68, 0x61, 0x6c, 0x6c,
|
||||
0x65, 0x6e, 0x67, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||
0x02, 0x38, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x13, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
|
||||
0x79, 0x42, 0x6f, 0x73, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a,
|
||||
0x09, 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 (
|
||||
@ -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_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_sociaty_sociaty_db_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||
var file_sociaty_sociaty_db_proto_goTypes = []interface{}{
|
||||
(SociatyJob)(0), // 0: SociatyJob
|
||||
(*DBSociaty)(nil), // 1: DBSociaty
|
||||
@ -1125,28 +1278,31 @@ var file_sociaty_sociaty_db_proto_goTypes = []interface{}{
|
||||
(*DBSociatyRank)(nil), // 9: DBSociatyRank
|
||||
(*ChallengeTeamInfo)(nil), // 10: ChallengeTeamInfo
|
||||
(*ChallengeTeam)(nil), // 11: ChallengeTeam
|
||||
(*DBSociatyBossRecord)(nil), // 12: DBSociatyBossRecord
|
||||
nil, // 13: SociatyMember.TeamsEntry
|
||||
nil, // 14: DBSociatyBossRecord.TeamsEntry
|
||||
(*BattleFormation)(nil), // 15: BattleFormation
|
||||
(*DBSociatyBossSports)(nil), // 12: DBSociatyBossSports
|
||||
(*ChallengeRecord)(nil), // 13: ChallengeRecord
|
||||
(*DBSociatyBossRecord)(nil), // 14: DBSociatyBossRecord
|
||||
nil, // 15: SociatyMember.TeamsEntry
|
||||
nil, // 16: ChallengeRecord.TeamsEntry
|
||||
(*BattleFormation)(nil), // 17: BattleFormation
|
||||
}
|
||||
var file_sociaty_sociaty_db_proto_depIdxs = []int32{
|
||||
2, // 0: DBSociaty.applyRecord:type_name -> ApplyRecord
|
||||
3, // 1: DBSociaty.members:type_name -> SociatyMember
|
||||
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
|
||||
7, // 5: DBSociatyTask.taskList:type_name -> SociatyTask
|
||||
8, // 6: DBSociatyTask.activityList:type_name -> SociatyActivity
|
||||
15, // 7: ChallengeTeam.formation:type_name -> BattleFormation
|
||||
14, // 8: DBSociatyBossRecord.teams:type_name -> DBSociatyBossRecord.TeamsEntry
|
||||
11, // 9: SociatyMember.TeamsEntry.value:type_name -> ChallengeTeam
|
||||
11, // 10: DBSociatyBossRecord.TeamsEntry.value:type_name -> ChallengeTeam
|
||||
11, // [11:11] is the sub-list for method output_type
|
||||
11, // [11:11] is the sub-list for method input_type
|
||||
11, // [11:11] is the sub-list for extension type_name
|
||||
11, // [11:11] is the sub-list for extension extendee
|
||||
0, // [0:11] is the sub-list for field type_name
|
||||
17, // 7: ChallengeTeam.formation:type_name -> BattleFormation
|
||||
16, // 8: ChallengeRecord.teams:type_name -> ChallengeRecord.TeamsEntry
|
||||
13, // 9: DBSociatyBossRecord.record:type_name -> ChallengeRecord
|
||||
11, // 10: SociatyMember.TeamsEntry.value:type_name -> ChallengeTeam
|
||||
11, // 11: ChallengeRecord.TeamsEntry.value:type_name -> ChallengeTeam
|
||||
12, // [12:12] is the sub-list for method output_type
|
||||
12, // [12:12] is the sub-list for method input_type
|
||||
12, // [12:12] is the sub-list for extension 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() }
|
||||
@ -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{} {
|
||||
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 {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -1307,7 +1487,7 @@ func file_sociaty_sociaty_db_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_sociaty_sociaty_db_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 14,
|
||||
NumMessages: 16,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ func NewGameBattletasktesting(_buf []map[string]interface{}) (*GameBattletasktes
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.System] = _v
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameBattletasktesting{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
|
@ -11,7 +11,7 @@ package cfg
|
||||
import "errors"
|
||||
|
||||
type GameBattletasktestingData struct {
|
||||
System int32
|
||||
Id int32
|
||||
BattletaskTestingId []int32
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ func (*GameBattletasktestingData) GetTypeId() int32 {
|
||||
}
|
||||
|
||||
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 _ok_ bool
|
||||
|
@ -166,6 +166,8 @@ type GameGlobalData struct {
|
||||
GuildBossInitialNum int32
|
||||
GuildBossBuyGet *Gameatn
|
||||
GuildBossMaxBuyNum int32
|
||||
GuildBossTroop2 int32
|
||||
GuildBossTroop3 int32
|
||||
}
|
||||
|
||||
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 _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_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
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,14 @@ func MatrixingHour(beginTime string) (t time.Time) {
|
||||
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 {
|
||||
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 {
|
||||
return -1
|
||||
return -1
|
||||
}
|
||||
|
||||
if t1> t2 {
|
||||
t1,t2 = t2,t1
|
||||
if t1 > t2 {
|
||||
t1, t2 = t2, t1
|
||||
}
|
||||
|
||||
secOfDay:= 3600*24
|
||||
diffDays:=0
|
||||
secDiff:= t2 - t1
|
||||
secOfDay := 3600 * 24
|
||||
diffDays := 0
|
||||
secDiff := t2 - t1
|
||||
if secDiff > int64(secOfDay) {
|
||||
tmpDays:=int(secDiff / int64(secOfDay))
|
||||
t1+=int64(tmpDays) * int64(secOfDay)
|
||||
diffDays +=tmpDays
|
||||
tmpDays := int(secDiff / int64(secOfDay))
|
||||
t1 += int64(tmpDays) * int64(secOfDay)
|
||||
diffDays += tmpDays
|
||||
}
|
||||
st:= time.Unix(t1,0)
|
||||
et:= time.Unix(t2,0)
|
||||
dateformat:="20060102"
|
||||
if st.Format(dateformat)!= et.Format(dateformat){
|
||||
diffDays+=1
|
||||
st := time.Unix(t1, 0)
|
||||
et := time.Unix(t2, 0)
|
||||
dateformat := "20060102"
|
||||
if st.Format(dateformat) != et.Format(dateformat) {
|
||||
diffDays += 1
|
||||
}
|
||||
return diffDays
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user