Compare commits
62 Commits
56fb4612c7
...
a67c747a46
Author | SHA1 | Date |
---|---|---|
|
a67c747a46 | |
|
3d80c1b9bb | |
|
57bc29a2d6 | |
|
808a2458fe | |
|
9a6ced171b | |
|
5c9fec6e36 | |
|
b067f07b2c | |
|
44ff58675d | |
|
7146df070c | |
|
2b75df2e38 | |
|
d4d8816a8b | |
|
70768089da | |
|
d6a15311f7 | |
|
8d8031759d | |
|
7688583735 | |
|
291b1cee4f | |
|
bdbf908e36 | |
|
235082c338 | |
|
7786aeac9c | |
|
606aff2240 | |
|
ead0abf6b6 | |
|
fa581628f3 | |
|
0c0f270762 | |
|
32323aa1e8 | |
|
0eb4b826a5 | |
|
c763d90325 | |
|
b9ef093b18 | |
|
ae0ac2dbaf | |
|
bc3be9673d | |
|
0d11c2a79f | |
|
c2a7fa3834 | |
|
79e207ebf9 | |
|
670726980e | |
|
9b50471d61 | |
|
c845dcad4e | |
|
20ebed0347 | |
|
3a60afc0d0 | |
|
1edaac6773 | |
|
523ed5b296 | |
|
09aa018fec | |
|
e0f2f76322 | |
|
5058d2aba1 | |
|
754f94abbd | |
|
96599507b8 | |
|
f771238b5e | |
|
77b8fdf0e9 | |
|
ac76712485 | |
|
fdd5e3889e | |
|
0c846595eb | |
|
42efa82c2f | |
|
7ae4392784 | |
|
9ed4f708bc | |
|
9ef37b0bce | |
|
7d98b14f5b | |
|
8eb9a7c7a1 | |
|
f24d6c740b | |
|
7e05717d2e | |
|
da249ec436 | |
|
11d78d2386 | |
|
c61c88266b | |
|
a6d76b3f94 | |
|
6985bc0437 |
|
@ -272,6 +272,10 @@ const (
|
|||
GainWayBuyItem = 86 // 商城购买道具
|
||||
GainWayBuyWeekCard = 87 // 商城购买周卡
|
||||
GainWayVipBuyCoin = 88 // vip商城购买金币
|
||||
GainWaySign7Con = 89 // 累计签到进阶奖励消耗
|
||||
GainWay_PigrankGainDiamond = 90 //存钱罐打开获取钻石
|
||||
GainWaySign7Add = 91 // 累计签到进阶奖励获得
|
||||
GainWayItemChange = 92 //背包内使用道具兑换话费
|
||||
)
|
||||
|
||||
// 后台选择 金币变化类型 的充值 类型id号起始
|
||||
|
@ -602,6 +606,8 @@ const (
|
|||
ItemTypeShopScore = 11 //积分
|
||||
ItemTypeInteract = 12 // 互动表情
|
||||
ItemTypeExpireTime = 15 // 时效类道具
|
||||
ItemTypeObjective = 16 // 目标类道具
|
||||
ItemTypeChange = 17 // 兑换话费
|
||||
)
|
||||
|
||||
func GetKeyNoviceGameId(gameId int) string {
|
||||
|
@ -660,15 +666,16 @@ const (
|
|||
TaskTypePay = 7 // 充值金额
|
||||
TaskTypeWinOrLose = 8 // 游戏输赢金币数量
|
||||
TaskTypeTienlenCount = 9 // tienlen游戏场次
|
||||
TaskTypeBindInviter = 10 // 绑定邀请人数量
|
||||
TaskTypeBindInviter = 10 // 绑定邀请人数量*
|
||||
TaskTypeWinCoin = 11 // 赢取金币数量
|
||||
TaskTypeTienlenWinTimes = 12 // tienlen游戏赢取次数
|
||||
TaskTypeInviteScore = 13 // 邀请积分
|
||||
TaskTypeInviteScore = 13 // 邀请积分*
|
||||
TaskTypeActivityScore = 14 // 周活跃积分数量
|
||||
TaskTypeFirstLogin = 15 // 每日首次登录
|
||||
TaskTypeInviteNum = 16 // 邀请绑定数量
|
||||
TaskTypeInviteNum = 16 // 邀请绑定数量*
|
||||
TaskTypeTurnplate = 17 // 转盘抽奖次数
|
||||
TaskTypeInviteRecharge = 18 // 被邀请人充值金额
|
||||
TaskTypeInviteRecharge = 18 // 被邀请人充值金额*
|
||||
TaskTypeLoseCoin = 19 // 输的金币数量
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -689,17 +696,13 @@ const (
|
|||
const HeadRange = 3 // 机器人头像id范围
|
||||
|
||||
const (
|
||||
InviteScoreTypeBind = 1 // 绑定邀请码
|
||||
InviteScoreTypeLogin = 2 // 每日登录
|
||||
InviteScoreTypePlayTimes = 3 // 每日参与任意游戏
|
||||
InviteScoreTypeRecharge = 4 // 充值
|
||||
InviteScoreTypeGameTimes = 5 // 每局游戏
|
||||
InviteScoreCheckWeek = -1 // 跨周
|
||||
InviteScoreTypeBind = 1 // 绑定邀请码
|
||||
InviteScoreTypePay = 2 // 充值
|
||||
InviteScoreTypeRecharge = 3 // 充值完成
|
||||
InviteScoreTypePayMe = 4 // 充值(给自己)
|
||||
)
|
||||
|
||||
const TaskIDInvitePlayGame = 1000001
|
||||
const TaskIDInviteRecharge = 1000002
|
||||
const TaskIDInviteFirstLogin = 1000003
|
||||
|
||||
func InMatchChannel(ls []string, n string) bool {
|
||||
if n == "" || len(ls) == 0 {
|
||||
return false
|
||||
|
@ -749,10 +752,6 @@ const (
|
|||
|
||||
var PetIDs = []int32{PetIDChicken}
|
||||
|
||||
const (
|
||||
InviteScoreRecharge = 10000 // 用户每充值$1邀请人获得积分
|
||||
)
|
||||
|
||||
const (
|
||||
ChannelSwitchExchange = 1
|
||||
ChannelSwitchDropItem = 2
|
||||
|
|
|
@ -76,17 +76,15 @@ func InSameWeek(tNow, tPre time.Time) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
preYear, preWeek := tPre.ISOWeek()
|
||||
nowYear, nowWeek := tNow.ISOWeek()
|
||||
if preYear == nowYear && preWeek == nowWeek {
|
||||
if GetWeekStartTs(tNow.Unix()) == GetWeekStartTs(tPre.Unix()) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func TsInSameWeek(tsNow, tsPre int64) bool {
|
||||
tNow := time.Unix(tsNow, 0)
|
||||
tPre := time.Unix(tsPre, 0)
|
||||
tNow := time.Unix(tsNow, 0).Local()
|
||||
tPre := time.Unix(tsPre, 0).Local()
|
||||
return InSameWeek(tNow, tPre)
|
||||
}
|
||||
|
||||
|
@ -143,3 +141,33 @@ func InTimeRange(beginHour, beginMinute, endHour, endMinute, checkHour, checkMin
|
|||
checkTime := checkHour*100 + checkMinute
|
||||
return beginTime <= checkTime && checkTime <= endTime
|
||||
}
|
||||
|
||||
// GetWeekStartTs 获取本周开始的时间戳,周一为周的开始
|
||||
func GetWeekStartTs(ts int64) int64 {
|
||||
now := time.Unix(ts, 0).Local()
|
||||
year, month, day := now.Date()
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
||||
n := today.Weekday()
|
||||
if today.Weekday() == 0 {
|
||||
n = 7
|
||||
}
|
||||
st := today.AddDate(0, 0, -int(n-1)).Unix()
|
||||
return st
|
||||
}
|
||||
|
||||
func GetMonthTimestamp() []int64 {
|
||||
now := time.Now().Local()
|
||||
year, month, _ := now.Date()
|
||||
// 本月起始日期
|
||||
st := time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
|
||||
// 计算下个月的年和月
|
||||
if month == time.December {
|
||||
year = year + 1
|
||||
month = time.January
|
||||
} else {
|
||||
month = month + 1
|
||||
}
|
||||
// 构建下个月的第一天的时间
|
||||
et := time.Date(year, month, 1, 0, 0, 0, 0, now.Location()).Unix()
|
||||
return []int64{st, et}
|
||||
}
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -1,56 +1,55 @@
|
|||
|
||||
Ð ±ê(2
|
||||
ˆ' ±ê(J2
|
||||
<10>N ±ê(•2
|
||||
˜u ±ê(ß2
|
||||
œ ±ê(©2
|
||||
¨Ã ±ê(ó2
|
||||
°ê ±ê(¾2
|
||||
¸‘ ±ê(ˆ2
|
||||
À¸ ±ê(Ò2
|
||||
Ð ±ê(2
|
||||
ˆ' ±ê(12
|
||||
<10>N ±ê(c2
|
||||
˜u ±ê(•2
|
||||
œ ±ê(Æ2
|
||||
¨Ã ±ê(÷2
|
||||
°ê ±ê(©2
|
||||
¸‘ ±ê(Û2
|
||||
À¸ ±ê(Œ2
|
||||
|
||||
Èß ±ê(œ2
|
||||
І ±ê(ç2
|
||||
Ø ±ê(±2
|
||||
àÔ ±ê(û2
|
||||
èû ±ê(Å2
|
||||
𢠱ê(<28>2
|
||||
øÉ ±ê(Ú2
|
||||
€ñ ±ê(¤ 2
|
||||
ˆ˜ ±ê(î 2
|
||||
<10>¿ ±ê(¹
|
||||
2
|
||||
˜æ ±ê(ƒ2
|
||||
<> ±ê(Í2
|
||||
ð“ ±ê(´2
|
||||
Àš ±ê(š2
|
||||
<10>¡ ±ê(<28>2
|
||||
à§ ±ê(ç"2
|
||||
°® ±ê(Î(2
|
||||
€µ ±ê(´.2
|
||||
л ±ê(›42
|
||||
 ±ê(<28>:2
|
||||
ðÈ! ±ê(è?2
|
||||
ÀÏ$ ±ê(ÎE2
|
||||
<10>Ö' ±ê(µK2
|
||||
!àÜ* ±ê(<28>N2
|
||||
"°ã- ±ê(<28>N2
|
||||
#€ê0 ±ê(<28>N2
|
||||
$Ðð3 ±ê(<28>N2
|
||||
% ÷6 ±ê(<28>N2
|
||||
&ðý9 ±ê(<28>N2
|
||||
'À„= ±ê(<28>N2
|
||||
(€‰z ±ê(<28>N2
|
||||
)À–± ±ê(<28>N2
|
||||
*€â ±ê(<28>N2
|
||||
+ÀÓ ±ê(<28>N2
|
||||
,€ÚÄ ±ê(<28>N2
|
||||
-Àðõ ±ê(<28>N2#'
|
||||
.€‡§ ±ê(<28>N2+/
|
||||
/À<>Ø ±ê(<28>N226
|
||||
0€´‰ ±ê(<28>N29=
|
||||
1Àʺ ±ê(<28>N2AE
|
||||
2€áë ±ê(<28>N2HL
|
||||
3€Â×/ ±ê(<28>N2“—
|
||||
4€£ÃG ±ê(<28>N2Ýá
|
||||
5€„¯_ ±ê(<28>N2§«
|
||||
Èß ±ê(½2
|
||||
І ±ê(ï2
|
||||
Ø ±ê(¡2
|
||||
àÔ ±ê(Ò2
|
||||
èû ±ê(ƒ2
|
||||
𢠱ê(µ2
|
||||
øÉ ±ê(ç2
|
||||
€ñ ±ê(˜2
|
||||
ˆ˜ ±ê(É2
|
||||
<10>¿ ±ê(û2
|
||||
˜æ ±ê(2
|
||||
<> ±ê(Þ2
|
||||
ð“ ±ê(Í2
|
||||
Àš ±ê(¼2
|
||||
<10>¡ ±ê(«2
|
||||
à§ ±ê(š2
|
||||
°® ±ê(‰2
|
||||
€µ ±ê(ø2
|
||||
л ±ê(ç"2
|
||||
 ±ê(Ö&2
|
||||
ðÈ! ±ê(Å*2
|
||||
ÀÏ$ ±ê(´.2
|
||||
<10>Ö' ±ê(£22
|
||||
!àÜ* ±ê(ë32
|
||||
"°ã- ±ê(³52
|
||||
#€ê0 ±ê(û62
|
||||
$Ðð3 ±ê(Ã82
|
||||
% ÷6 ±ê(‹:2
|
||||
&ðý9 ±ê(Ó;2
|
||||
'À„= ±ê(›=2
|
||||
(€‰z ±ê(ã>2
|
||||
)À–± ±ê(«@2
|
||||
*€â ±ê(<28>N2
|
||||
+ÀÓ ±ê(<28>N2
|
||||
,€ÚÄ ±ê(<28>N2
|
||||
-Àðõ ±ê(<28>N2
|
||||
.€‡§ ±ê(<28>N2$
|
||||
/À<>Ø ±ê(<28>N2$*
|
||||
0€´‰ ±ê(<28>N2)0
|
||||
1Àʺ ±ê(<28>N2.6
|
||||
2€áë ±ê(<28>N23<
|
||||
3€Â×/ ±ê(<28>N2e{
|
||||
4€£ÃG ±ê(<28>N2–¤
|
||||
5€„¯_ ±ê(<28>N2Çö
|
|
@ -4,7 +4,7 @@
|
|||
"Id": 1,
|
||||
"Bet": 2000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 30,
|
||||
"Rate1": 20,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -14,7 +14,7 @@
|
|||
"Id": 2,
|
||||
"Bet": 5000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 74,
|
||||
"Rate1": 49,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -24,7 +24,7 @@
|
|||
"Id": 3,
|
||||
"Bet": 10000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 149,
|
||||
"Rate1": 99,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -34,7 +34,7 @@
|
|||
"Id": 4,
|
||||
"Bet": 15000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 223,
|
||||
"Rate1": 149,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -44,7 +44,7 @@
|
|||
"Id": 5,
|
||||
"Bet": 20000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 297,
|
||||
"Rate1": 198,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -54,7 +54,7 @@
|
|||
"Id": 6,
|
||||
"Bet": 25000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 371,
|
||||
"Rate1": 247,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -64,7 +64,7 @@
|
|||
"Id": 7,
|
||||
"Bet": 30000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 446,
|
||||
"Rate1": 297,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -74,7 +74,7 @@
|
|||
"Id": 8,
|
||||
"Bet": 35000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 520,
|
||||
"Rate1": 347,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -84,7 +84,7 @@
|
|||
"Id": 9,
|
||||
"Bet": 40000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 594,
|
||||
"Rate1": 396,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -94,7 +94,7 @@
|
|||
"Id": 10,
|
||||
"Bet": 45000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 668,
|
||||
"Rate1": 445,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -104,7 +104,7 @@
|
|||
"Id": 11,
|
||||
"Bet": 50000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 743,
|
||||
"Rate1": 495,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -114,7 +114,7 @@
|
|||
"Id": 12,
|
||||
"Bet": 55000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 817,
|
||||
"Rate1": 545,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -124,7 +124,7 @@
|
|||
"Id": 13,
|
||||
"Bet": 60000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 891,
|
||||
"Rate1": 594,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -134,7 +134,7 @@
|
|||
"Id": 14,
|
||||
"Bet": 65000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 965,
|
||||
"Rate1": 643,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -144,7 +144,7 @@
|
|||
"Id": 15,
|
||||
"Bet": 70000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 1040,
|
||||
"Rate1": 693,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -154,7 +154,7 @@
|
|||
"Id": 16,
|
||||
"Bet": 75000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 1114,
|
||||
"Rate1": 743,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -164,7 +164,7 @@
|
|||
"Id": 17,
|
||||
"Bet": 80000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 1188,
|
||||
"Rate1": 792,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -174,7 +174,7 @@
|
|||
"Id": 18,
|
||||
"Bet": 85000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 1262,
|
||||
"Rate1": 841,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -184,7 +184,7 @@
|
|||
"Id": 19,
|
||||
"Bet": 90000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 1337,
|
||||
"Rate1": 891,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -194,7 +194,7 @@
|
|||
"Id": 20,
|
||||
"Bet": 95000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 1411,
|
||||
"Rate1": 941,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -204,7 +204,7 @@
|
|||
"Id": 21,
|
||||
"Bet": 100000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 1485,
|
||||
"Rate1": 990,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -214,7 +214,7 @@
|
|||
"Id": 22,
|
||||
"Bet": 150000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 2228,
|
||||
"Rate1": 1485,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -224,7 +224,7 @@
|
|||
"Id": 23,
|
||||
"Bet": 200000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 2970,
|
||||
"Rate1": 1980,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -234,7 +234,7 @@
|
|||
"Id": 24,
|
||||
"Bet": 250000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 3713,
|
||||
"Rate1": 2475,
|
||||
"Amount1": [
|
||||
1,
|
||||
1
|
||||
|
@ -244,170 +244,170 @@
|
|||
"Id": 25,
|
||||
"Bet": 300000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 4455,
|
||||
"Rate1": 2970,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 26,
|
||||
"Bet": 350000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 5198,
|
||||
"Rate1": 3465,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 27,
|
||||
"Bet": 400000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 5940,
|
||||
"Rate1": 3960,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 28,
|
||||
"Bet": 450000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 6683,
|
||||
"Rate1": 4455,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 29,
|
||||
"Bet": 500000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 7425,
|
||||
"Rate1": 4950,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 30,
|
||||
"Bet": 550000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 8168,
|
||||
"Rate1": 5445,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 31,
|
||||
"Bet": 600000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 8910,
|
||||
"Rate1": 5940,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 32,
|
||||
"Bet": 650000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 9653,
|
||||
"Rate1": 6435,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 33,
|
||||
"Bet": 700000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 6635,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 34,
|
||||
"Bet": 750000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 6835,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 35,
|
||||
"Bet": 800000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 7035,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 36,
|
||||
"Bet": 850000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 7235,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 37,
|
||||
"Bet": 900000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 7435,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 38,
|
||||
"Bet": 950000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 7635,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 39,
|
||||
"Bet": 1000000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 7835,
|
||||
"Amount1": [
|
||||
1,
|
||||
2
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 40,
|
||||
"Bet": 2000000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 8035,
|
||||
"Amount1": [
|
||||
1,
|
||||
5
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 41,
|
||||
"Bet": 5000000,
|
||||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Rate1": 8235,
|
||||
"Amount1": [
|
||||
5,
|
||||
9
|
||||
4,
|
||||
6
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -416,8 +416,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
13,
|
||||
17
|
||||
11,
|
||||
13
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -426,8 +426,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
20,
|
||||
24
|
||||
16,
|
||||
18
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -436,8 +436,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
28,
|
||||
32
|
||||
21,
|
||||
24
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -446,8 +446,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
35,
|
||||
39
|
||||
24,
|
||||
29
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -456,8 +456,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
43,
|
||||
47
|
||||
31,
|
||||
36
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -466,8 +466,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
50,
|
||||
54
|
||||
36,
|
||||
42
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -476,8 +476,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
57,
|
||||
61
|
||||
41,
|
||||
48
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -486,8 +486,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
65,
|
||||
69
|
||||
46,
|
||||
54
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -496,8 +496,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
72,
|
||||
76
|
||||
51,
|
||||
60
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -506,8 +506,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
147,
|
||||
151
|
||||
101,
|
||||
123
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -516,8 +516,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
221,
|
||||
225
|
||||
150,
|
||||
164
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -526,8 +526,8 @@
|
|||
"ItemId1": 30001,
|
||||
"Rate1": 10000,
|
||||
"Amount1": [
|
||||
295,
|
||||
299
|
||||
199,
|
||||
246
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,124 @@
|
|||
{
|
||||
"Arr": [
|
||||
{
|
||||
"Id": 1,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 1,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{5}概率完全免疫",
|
||||
"SKillValue": "5",
|
||||
"ItemConsum": {
|
||||
"100013": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 2,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{6}概率完全免疫",
|
||||
"SKillValue": "6",
|
||||
"ItemConsum": {
|
||||
"100013": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 3,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{7}概率完全免疫",
|
||||
"SKillValue": "7",
|
||||
"ItemConsum": {
|
||||
"100013": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 4,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{8}概率完全免疫",
|
||||
"SKillValue": "8",
|
||||
"ItemConsum": {
|
||||
"100013": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 5,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{9}概率完全免疫",
|
||||
"SKillValue": "9",
|
||||
"ItemConsum": {
|
||||
"100013": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 6,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{10}概率完全免疫",
|
||||
"SKillValue": "10",
|
||||
"ItemConsum": {
|
||||
"100013": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 7,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{11}概率完全免疫",
|
||||
"SKillValue": "11",
|
||||
"ItemConsum": {
|
||||
"100013": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 8,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{12}概率完全免疫",
|
||||
"SKillValue": "12",
|
||||
"ItemConsum": {
|
||||
"100013": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 9,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{13}概率完全免疫",
|
||||
"SKillValue": "13",
|
||||
"ItemConsum": {
|
||||
"100013": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
"SkillId": 10001,
|
||||
"PetId": 1000001,
|
||||
"SkillLevel": 10,
|
||||
"SkillName": "金鸡守卫",
|
||||
"SkillDes": "在被炸弹明确攻击时{14}概率完全免疫",
|
||||
"SKillValue": "14",
|
||||
"ItemConsum": {
|
||||
"100013": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
|
||||
(
|
||||
<18>チラ/ 2
|
||||
(Ђв0–8Ўи;@dH–Pc
|
||||
((Ђв0¬8ўи;@dH¬PЗ
|
||||
яБЧ/ 2(Ђв0о8Ји;@dHоPу
|
|
@ -4,19 +4,37 @@
|
|||
"Id": 1,
|
||||
"BuyCountMin": 1,
|
||||
"BuyCountMax": 1,
|
||||
"CostDiamond": 30
|
||||
"CostDiamond": 30,
|
||||
"MaxGold": 10000000,
|
||||
"MaxDiamond": 150,
|
||||
"DiamondId": 980001,
|
||||
"CoinPrice": 100,
|
||||
"DiamondPrice": 150,
|
||||
"DiamondNowPrice": 99
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"BuyCountMin": 2,
|
||||
"BuyCountMax": 2,
|
||||
"CostDiamond": 40
|
||||
"CostDiamond": 40,
|
||||
"MaxGold": 10000000,
|
||||
"MaxDiamond": 300,
|
||||
"DiamondId": 980002,
|
||||
"CoinPrice": 100,
|
||||
"DiamondPrice": 300,
|
||||
"DiamondNowPrice": 199
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"BuyCountMin": 3,
|
||||
"BuyCountMax": 99999999,
|
||||
"CostDiamond": 50
|
||||
"CostDiamond": 50,
|
||||
"MaxGold": 10000000,
|
||||
"MaxDiamond": 750,
|
||||
"DiamondId": 980003,
|
||||
"CoinPrice": 100,
|
||||
"DiamondPrice": 750,
|
||||
"DiamondNowPrice": 499
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
|
||||
BankMaxCoinۉ
|
||||
WinCoinRate
|
||||
LoseCoinRate
|
||||
WinCoinRate
|
||||
LoseCoinRate
|
||||
|
||||
DayBuyMaxCnt
|
||||
DayBuyMaxCnt
|
||||
WinCoinRateDiamond
|
||||
LoseCoinRateDiamond
|
||||
|
||||
DayBuyMaxCntDiamond
|
|
@ -2,23 +2,33 @@
|
|||
"Arr": [
|
||||
{
|
||||
"Id": 1,
|
||||
"PorpName": "BankMaxCoin",
|
||||
"PropValue": 10000000
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"PorpName": "WinCoinRate",
|
||||
"PropValue": 5
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Id": 2,
|
||||
"PorpName": "LoseCoinRate",
|
||||
"PropValue": 10
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Id": 3,
|
||||
"PorpName": "DayBuyMaxCnt",
|
||||
"PropValue": 3
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"PorpName": "WinCoinRateDiamond",
|
||||
"PropValue": 5
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"PorpName": "LoseCoinRateDiamond",
|
||||
"PropValue": 10
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"PorpName": "DayBuyMaxCntDiamond",
|
||||
"PropValue": 3
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
@ -146,8 +146,8 @@
|
|||
"TargetTimes": 1,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -158,8 +158,8 @@
|
|||
"TargetTimes": 10,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -171,7 +171,7 @@
|
|||
"TargetTimes": 10000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000
|
||||
"100001": 100000
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -182,8 +182,8 @@
|
|||
"TargetTimes": 10,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -195,8 +195,8 @@
|
|||
"TargetTimes": 3,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"100002": 10
|
||||
"100001": 1000000,
|
||||
"100002": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -207,7 +207,7 @@
|
|||
"TargetTimes": 10,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 250000,
|
||||
"100001": 25000,
|
||||
"50001": 1
|
||||
}
|
||||
},
|
||||
|
@ -219,7 +219,7 @@
|
|||
"TargetTimes": 5,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2500000,
|
||||
"100001": 250000,
|
||||
"50001": 2
|
||||
}
|
||||
},
|
||||
|
@ -231,7 +231,7 @@
|
|||
"TargetTimes": 10,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 5000000,
|
||||
"100001": 500000,
|
||||
"50001": 4
|
||||
}
|
||||
},
|
||||
|
@ -243,7 +243,7 @@
|
|||
"TargetTimes": 100,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2500000,
|
||||
"100001": 250000,
|
||||
"50001": 2
|
||||
}
|
||||
},
|
||||
|
@ -255,7 +255,7 @@
|
|||
"TargetTimes": 500,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 12500000,
|
||||
"100001": 1250000,
|
||||
"50001": 10
|
||||
}
|
||||
},
|
||||
|
@ -267,7 +267,7 @@
|
|||
"TargetTimes": 1000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 25000000,
|
||||
"100001": 2500000,
|
||||
"50001": 20
|
||||
}
|
||||
},
|
||||
|
@ -279,8 +279,8 @@
|
|||
"TargetTimes": 10000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 20
|
||||
"100001": 100000,
|
||||
"100002": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -291,8 +291,8 @@
|
|||
"TargetTimes": 50000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"100002": 20
|
||||
"100001": 1000000,
|
||||
"100002": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -303,8 +303,8 @@
|
|||
"TargetTimes": 200000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 20000000,
|
||||
"100002": 50
|
||||
"100001": 2000000,
|
||||
"100002": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -315,8 +315,8 @@
|
|||
"TargetTimes": 1000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 50000000,
|
||||
"100002": 100
|
||||
"100001": 5000000,
|
||||
"100002": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -327,8 +327,8 @@
|
|||
"TargetTimes": 100000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -340,8 +340,8 @@
|
|||
"TargetTimes": 1000000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
"100001": 200000,
|
||||
"100002": 2
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -353,8 +353,8 @@
|
|||
"TargetTimes": 10000000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 3000000,
|
||||
"100002": 30
|
||||
"100001": 300000,
|
||||
"100002": 3
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -366,8 +366,8 @@
|
|||
"TargetTimes": 100000000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 5000000,
|
||||
"100002": 50
|
||||
"100001": 500000,
|
||||
"100002": 5
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -379,8 +379,8 @@
|
|||
"TargetTimes": 500000000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"100002": 100
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -392,8 +392,8 @@
|
|||
"TargetTimes": 1000000000000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 20000000,
|
||||
"100002": 200
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -405,8 +405,8 @@
|
|||
"TargetTimes": 100,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -418,8 +418,8 @@
|
|||
"TargetTimes": 1000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
"100001": 200000,
|
||||
"100002": 2
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -431,8 +431,8 @@
|
|||
"TargetTimes": 5000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 3000000,
|
||||
"100002": 30
|
||||
"100001": 300000,
|
||||
"100002": 3
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -444,8 +444,8 @@
|
|||
"TargetTimes": 10000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 5000000,
|
||||
"100002": 50
|
||||
"100001": 500000,
|
||||
"100002": 5
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -457,8 +457,8 @@
|
|||
"TargetTimes": 50000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"100002": 100
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -470,8 +470,8 @@
|
|||
"TargetTimes": 100000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 20000000,
|
||||
"100002": 200
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -483,8 +483,8 @@
|
|||
"TargetTimes": 100,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -496,8 +496,8 @@
|
|||
"TargetTimes": 1000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
"100001": 200000,
|
||||
"100002": 2
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -509,8 +509,8 @@
|
|||
"TargetTimes": 5000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 3000000,
|
||||
"100002": 30
|
||||
"100001": 300000,
|
||||
"100002": 3
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -522,8 +522,8 @@
|
|||
"TargetTimes": 10000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 5000000,
|
||||
"100002": 50
|
||||
"100001": 500000,
|
||||
"100002": 5
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -535,8 +535,8 @@
|
|||
"TargetTimes": 50000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"100002": 100
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -548,8 +548,8 @@
|
|||
"TargetTimes": 100000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 20000000,
|
||||
"100002": 200
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -561,8 +561,8 @@
|
|||
"TargetTimes": 100,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -574,8 +574,8 @@
|
|||
"TargetTimes": 1000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
"100001": 200000,
|
||||
"100002": 2
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -587,8 +587,8 @@
|
|||
"TargetTimes": 5000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 3000000,
|
||||
"100002": 30
|
||||
"100001": 300000,
|
||||
"100002": 3
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -600,8 +600,8 @@
|
|||
"TargetTimes": 10000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 5000000,
|
||||
"100002": 50
|
||||
"100001": 500000,
|
||||
"100002": 5
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -613,8 +613,8 @@
|
|||
"TargetTimes": 50000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"100002": 100
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -626,8 +626,8 @@
|
|||
"TargetTimes": 100000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 20000000,
|
||||
"100002": 200
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
},
|
||||
"GameType": 1
|
||||
},
|
||||
|
@ -639,8 +639,8 @@
|
|||
"TargetTimes": 10,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
|
@ -655,8 +655,8 @@
|
|||
"TargetTimes": 100,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
"100001": 200000,
|
||||
"100002": 2
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
|
@ -671,8 +671,8 @@
|
|||
"TargetTimes": 1000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 3000000,
|
||||
"100002": 30
|
||||
"100001": 300000,
|
||||
"100002": 3
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
|
@ -687,8 +687,8 @@
|
|||
"TargetTimes": 10000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 5000000,
|
||||
"100002": 50
|
||||
"100001": 500000,
|
||||
"100002": 5
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
|
@ -703,8 +703,8 @@
|
|||
"TargetTimes": 50000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"100002": 100
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
|
@ -719,8 +719,8 @@
|
|||
"TargetTimes": 100000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 20000000,
|
||||
"100002": 200
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
},
|
||||
"Position": [
|
||||
1,
|
||||
|
@ -735,8 +735,8 @@
|
|||
"TargetTimes": 10,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
"100001": 100000,
|
||||
"100002": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -747,8 +747,8 @@
|
|||
"TargetTimes": 20,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
"100001": 200000,
|
||||
"100002": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -759,8 +759,8 @@
|
|||
"TargetTimes": 50,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 3000000,
|
||||
"100002": 30
|
||||
"100001": 300000,
|
||||
"100002": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -771,8 +771,8 @@
|
|||
"TargetTimes": 100,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 5000000,
|
||||
"100002": 50
|
||||
"100001": 500000,
|
||||
"100002": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -783,8 +783,8 @@
|
|||
"TargetTimes": 500,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 10000000,
|
||||
"100002": 100
|
||||
"100001": 1000000,
|
||||
"100002": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -795,8 +795,8 @@
|
|||
"TargetTimes": 1000,
|
||||
"FinishTimes": 1,
|
||||
"Award": {
|
||||
"100001": 20000000,
|
||||
"100002": 200
|
||||
"100001": 2000000,
|
||||
"100002": 20
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
BIN
data/DB_VIP.dat
BIN
data/DB_VIP.dat
Binary file not shown.
|
@ -52,7 +52,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
2
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 1
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
|
@ -81,7 +82,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
2
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 2
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
|
@ -110,7 +112,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
3
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 3
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
|
@ -139,7 +142,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
3
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 4
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
|
@ -168,7 +172,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
4
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 5
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
|
@ -197,7 +202,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
4
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 6
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
|
@ -226,7 +232,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
3
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 7
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
|
@ -255,7 +262,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
3
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 8
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
|
@ -284,7 +292,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
4
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 9
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
|
@ -313,7 +322,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
4
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 10
|
||||
},
|
||||
{
|
||||
"Id": 11,
|
||||
|
@ -342,7 +352,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
0
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 11
|
||||
},
|
||||
{
|
||||
"Id": 12,
|
||||
|
@ -371,7 +382,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
0
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 12
|
||||
},
|
||||
{
|
||||
"Id": 13,
|
||||
|
@ -400,7 +412,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
0
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 13
|
||||
},
|
||||
{
|
||||
"Id": 14,
|
||||
|
@ -429,7 +442,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
0
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 14
|
||||
},
|
||||
{
|
||||
"Id": 15,
|
||||
|
@ -458,7 +472,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
0
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 15
|
||||
},
|
||||
{
|
||||
"Id": 16,
|
||||
|
@ -487,7 +502,8 @@
|
|||
],
|
||||
"RewardOutlineID": [
|
||||
0
|
||||
]
|
||||
],
|
||||
"MatchFreeTimes": 16
|
||||
},
|
||||
{}
|
||||
]
|
||||
|
|
|
@ -23,5 +23,5 @@
|
|||
"ClosePreCreateRoom": true,
|
||||
"AgoraAddress": "http://47.105.78.29:8081",
|
||||
"InviteUrl": "http://47.105.78.29:8000/",
|
||||
"RankTimeout": 5
|
||||
"RankTimeout": 2
|
||||
}
|
|
@ -2,65 +2,205 @@ package mq
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/cache"
|
||||
"mongo.games.com/goserver/core/broker"
|
||||
"mongo.games.com/goserver/core/broker/rabbitmq"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/dbproxy/svc"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/mq"
|
||||
rankproto "mongo.games.com/game/protocol/rank"
|
||||
)
|
||||
|
||||
var InviteNumCache = cache.NewMemoryCache()
|
||||
|
||||
func init() {
|
||||
mq.RegisterSubscriber(model.EvtBindInvite, func(e broker.Event) (err error) {
|
||||
mq.RegisterSubscriber(model.EvtInvite, func(e broker.Event) (err error) {
|
||||
msg := e.Message()
|
||||
if msg != nil {
|
||||
defer func() {
|
||||
e.Ack()
|
||||
}()
|
||||
|
||||
var log model.BindInvite
|
||||
var log model.EvtInviteMsg
|
||||
err = json.Unmarshal(msg.Body, &log)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite json.Unmarshal error:%v msg:%v", err, string(msg.Body))
|
||||
return
|
||||
}
|
||||
logger.Logger.Tracef("EvtInvite log:%+v", log)
|
||||
|
||||
// 绑定
|
||||
err = svc.BindInviteSnId(log.Platform, log.SnId, log.InviteSnId, log.Ts)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("BindInviteSnId error:%v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
name := fmt.Sprintf("%v", log.InviteSnId)
|
||||
b := InviteNumCache.Get(name)
|
||||
n, _ := b.(int32)
|
||||
if n > 0 {
|
||||
n++
|
||||
} else {
|
||||
n, err = svc.GetInviteNum(log.Platform, log.InviteSnId, int32(rankproto.RankInvite_InviteType_Total))
|
||||
var addRechargeScore bool
|
||||
if log.Tp != common.InviteScoreCheckWeek {
|
||||
addRechargeScore, err = svc.CheckInviteScore(&log.InviteScore)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("BindInviteSnId error:%v", err)
|
||||
logger.Logger.Errorf("EvtInvite SaveInviteScore error:%v msg:%+v %+v", err, log.InviteScore, log)
|
||||
return err
|
||||
}
|
||||
}
|
||||
InviteNumCache.Put(name, n, int64(time.Hour.Seconds()))
|
||||
|
||||
// 更新绑定数量
|
||||
mq.Send(model.AckBindNum, &model.BindNum{
|
||||
SnId: log.InviteSnId,
|
||||
Num: n,
|
||||
})
|
||||
now := time.Unix(log.Ts, 0).Local() // 数据创建时间
|
||||
|
||||
return
|
||||
get := func(snid int32) (*model.EvtInviteAckMsg, error) {
|
||||
if snid == 0 {
|
||||
return nil, errors.New("not found")
|
||||
}
|
||||
n := new(model.EvtInviteAckMsg)
|
||||
n.Platform = log.Platform
|
||||
n.Snid = snid
|
||||
n.Score, n.Num, n.Money, _, err = svc.GetInviteData(log.Platform, snid)
|
||||
return n, err
|
||||
}
|
||||
|
||||
// 重置积分
|
||||
reset := func(snid int32) error {
|
||||
if snid == 0 {
|
||||
return nil
|
||||
}
|
||||
_, _, _, ts, err := svc.GetInviteData(log.Platform, snid) // 上次更新时间
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite GetInviteData error:%v snid:%v", err, snid)
|
||||
return err
|
||||
}
|
||||
inSameWeek := common.InSameWeek(ts, now)
|
||||
if !inSameWeek {
|
||||
err = svc.ClearInviteScore(log.Platform, snid, now)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite ClearInviteScore error:%v snid:%v", err, snid)
|
||||
return err
|
||||
}
|
||||
msg, err := get(snid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite get error:%v snid:%v", err, snid)
|
||||
return err
|
||||
}
|
||||
msg.Score = 0
|
||||
mq.Send(model.EvtInviteAck, msg)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 当前玩家积分是否跨周重置
|
||||
tmpSnid := log.SnId
|
||||
for i := 0; i < 6; i++ {
|
||||
if tmpSnid > 0 {
|
||||
err = reset(tmpSnid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite reset %v error:%v snid:%v", i, err, tmpSnid)
|
||||
return err
|
||||
}
|
||||
}
|
||||
if tmpSnid > 0 {
|
||||
tmpSnid, err = svc.GetPSnId(log.Platform, tmpSnid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite GetPSnId %v error:%v snid:%v", i, err, tmpSnid)
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 增加积分
|
||||
add := func(psnid, snid, level, tp int32, score, money, rate int64, addMoney bool) error {
|
||||
if psnid <= 0 {
|
||||
return nil
|
||||
}
|
||||
err = svc.AddInviteScore(log.Platform, psnid, snid, level, tp, score*rate/10000, rate, money, now, addMoney)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite add error:%v psnid:%v score:%v rate:%v", err, psnid, score, rate)
|
||||
return err
|
||||
}
|
||||
msg, err := get(psnid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite add find error:%v psnid:%v score:%v rate:%v", err, psnid, score, rate)
|
||||
return err
|
||||
}
|
||||
mq.Send(model.EvtInviteAck, msg)
|
||||
return nil
|
||||
}
|
||||
|
||||
switch log.Tp {
|
||||
case common.InviteScoreTypeBind:
|
||||
// 更新绑定数量
|
||||
// 更新邀请积分
|
||||
// 1.邀请人增加积分
|
||||
add(log.InviteSnId, log.SnId, 0, log.Tp, log.Score, log.Money, 10000, false)
|
||||
// 2.上级增加积分
|
||||
var psnid int32
|
||||
if len(log.Rate) > 0 {
|
||||
psnid, err = svc.GetPSnId(log.Platform, log.InviteSnId)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite GetPSnId 2 error:%v snid:%v", err, log.InviteSnId)
|
||||
return err
|
||||
}
|
||||
if psnid > 0 {
|
||||
add(psnid, log.InviteSnId, 1, log.Tp, log.Score, log.Money, log.Rate[0], false)
|
||||
}
|
||||
}
|
||||
if len(log.Rate) > 1 && psnid > 0 {
|
||||
psnid, err = svc.GetPSnId(log.Platform, psnid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite GetPSnId 2 error:%v snid:%v", err, log.InviteSnId)
|
||||
return err
|
||||
}
|
||||
if psnid > 0 {
|
||||
add(psnid, log.InviteSnId, 2, log.Tp, log.Score, log.Money, log.Rate[1], false)
|
||||
}
|
||||
}
|
||||
if len(log.Rate) > 2 && psnid > 0 {
|
||||
psnid, err = svc.GetPSnId(log.Platform, psnid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite GetPSnId 3 error:%v snid:%v", err, log.InviteSnId)
|
||||
return err
|
||||
}
|
||||
if psnid > 0 {
|
||||
add(psnid, log.InviteSnId, 3, log.Tp, log.Score, log.Money, log.Rate[2], false)
|
||||
}
|
||||
}
|
||||
|
||||
case common.InviteScoreTypePay:
|
||||
// 更新充值积分,上级积分增加
|
||||
add(log.SnId, 0, 0, common.InviteScoreTypePayMe, log.Score, log.Money, 10000, false)
|
||||
var psnid int32
|
||||
if len(log.Rate) > 0 {
|
||||
add(log.InviteSnId, log.SnId, 1, log.Tp, log.Score, log.Money, log.Rate[0], true)
|
||||
psnid, err = svc.GetPSnId(log.Platform, log.InviteSnId)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite GetPSnId 3 error:%v snid:%v", err, log.InviteSnId)
|
||||
return err
|
||||
}
|
||||
}
|
||||
if len(log.Rate) > 1 && psnid > 0 {
|
||||
add(psnid, log.SnId, 2, log.Tp, log.Score, log.Money, log.Rate[1], false)
|
||||
psnid, err = svc.GetPSnId(log.Platform, psnid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("EvtInvite GetPSnId 4 error:%v snid:%v", err, psnid)
|
||||
return err
|
||||
}
|
||||
}
|
||||
if len(log.Rate) > 2 && psnid > 0 {
|
||||
add(psnid, log.SnId, 3, log.Tp, log.Score, log.Money, log.Rate[2], false)
|
||||
}
|
||||
if addRechargeScore {
|
||||
add(log.InviteSnId, log.SnId, 1, common.InviteScoreTypeRecharge, log.RechargeScore, log.Money, 10000, true)
|
||||
}
|
||||
|
||||
case common.InviteScoreTypeRecharge:
|
||||
// 更新自己的积分
|
||||
if addRechargeScore {
|
||||
add(log.InviteSnId, log.SnId, 1, log.Tp, log.RechargeScore, log.Money, 10000, true)
|
||||
} else {
|
||||
// 只增加充值金额
|
||||
add(log.InviteSnId, log.SnId, 0, log.Tp, 0, log.Money, 10000, true)
|
||||
}
|
||||
|
||||
case common.InviteScoreCheckWeek:
|
||||
|
||||
default:
|
||||
logger.Logger.Errorf("EvtInvite tp error, %v", log.Tp)
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}, broker.Queue(model.EvtBindInvite), broker.DisableAutoAck(), rabbitmq.DurableQueue())
|
||||
}, broker.Queue(model.EvtInvite), broker.DisableAutoAck(), rabbitmq.DurableQueue())
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ func DbShopLogCollection(plt string) *mongo.Collection {
|
|||
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"pageid"}, Background: true, Sparse: true})
|
||||
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"state"}, Background: true, Sparse: true})
|
||||
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"shopid"}, Background: true, Sparse: true})
|
||||
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
||||
dbShopRec.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
|
||||
}
|
||||
return dbShopRec
|
||||
}
|
||||
|
|
|
@ -0,0 +1,291 @@
|
|||
package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/rpc"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
"mongo.games.com/game/model"
|
||||
)
|
||||
|
||||
var (
|
||||
InviteScoreDBName = "log"
|
||||
InviteScoreCollName = "log_invitescore"
|
||||
InviteScoreColError = errors.New("InviteScore collection open failed")
|
||||
)
|
||||
|
||||
func InviteScoreCollection(plt string) *mongo.Collection {
|
||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, InviteScoreDBName)
|
||||
if s != nil {
|
||||
c, first := s.DB().C(InviteScoreCollName)
|
||||
if first {
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"upsnid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"downsnid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"level"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"tp"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"money"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"score"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type BindScoreSvc struct {
|
||||
}
|
||||
|
||||
func CheckInviteScore(req *model.InviteScore) (b bool, err error) {
|
||||
logger.Logger.Tracef("SaveInviteScore req:%+v", *req)
|
||||
if req.InviteSnId == 0 || req.SnId == 0 {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
u := PlayerDataCollection(req.Platform)
|
||||
if u == nil {
|
||||
return false, PlayerColError
|
||||
}
|
||||
|
||||
// 不能重复绑定
|
||||
//if req.Tp == common.InviteScoreTypeBind {
|
||||
// psnid, err := GetPSnId(req.Platform, req.SnId)
|
||||
// if err == nil && psnid > 0 {
|
||||
// // 已经绑定
|
||||
// return false, errors.New("already bind")
|
||||
// }
|
||||
//}
|
||||
|
||||
// 必须已经绑定
|
||||
if req.Tp != common.InviteScoreTypeBind {
|
||||
psnid, err := GetPSnId(req.Platform, req.SnId)
|
||||
if err != nil || psnid == 0 {
|
||||
// 还没有绑定上级
|
||||
logger.Logger.Errorf("not bind error:%v", err)
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
|
||||
// 充值成功记录
|
||||
if req.Tp == common.InviteScoreTypePay || req.Tp == common.InviteScoreTypeRecharge {
|
||||
// 是否已经记录过
|
||||
c := InviteScoreCollection(req.Platform)
|
||||
if c == nil {
|
||||
return false, InviteScoreColError
|
||||
}
|
||||
a := &model.LogInviteScore{}
|
||||
err = c.Find(bson.M{"downsnid": req.SnId, "upsnid": req.InviteSnId, "tp": common.InviteScoreTypeRecharge}).One(a)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
return false, errors.New("find error")
|
||||
}
|
||||
if err == nil && a.UpSnid > 0 {
|
||||
|
||||
} else {
|
||||
b = true
|
||||
}
|
||||
}
|
||||
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// GetInviteRankList 获取周榜
|
||||
func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs, ret *model.FindPlayerRankInviteListReply) error {
|
||||
c := RankInviteCollection(req.Platform)
|
||||
if c == nil {
|
||||
return RankInviteColError
|
||||
}
|
||||
|
||||
ret.RankType = req.RankType
|
||||
|
||||
var st int64
|
||||
switch req.RankType {
|
||||
case 1: //todo 总榜
|
||||
return nil
|
||||
case 2: // 本周榜
|
||||
st = common.GetWeekStartTs(time.Now().Unix())
|
||||
case 3: //todo 月榜
|
||||
return nil
|
||||
case 4: // 上周榜
|
||||
st = common.GetWeekStartTs(time.Now().Unix())
|
||||
st -= 7 * 24 * 3600
|
||||
}
|
||||
var list []*model.RankInvite
|
||||
err := c.Find(bson.M{"week": st}).Sort("-score").Limit(int(model.GameParamData.RankInviteMaxNum)).All(&list)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("GetInviteRankList error: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
var conds []int32
|
||||
if len(list) > 0 {
|
||||
type PInfo struct {
|
||||
SnId int32
|
||||
Name string // 昵称
|
||||
Roles *model.RolePetInfo
|
||||
}
|
||||
var retPlayerList []PInfo
|
||||
cplayerdata := PlayerDataCollection(req.Platform)
|
||||
if cplayerdata == nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for i := 0; i < len(list); i++ {
|
||||
conds = append(conds, list[i].SnId)
|
||||
}
|
||||
|
||||
selecter := bson.M{"snid": bson.M{"$in": conds}}
|
||||
err = cplayerdata.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&retPlayerList)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetInviteRankList find player is error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
for _, inviteInfo := range list {
|
||||
for _, playerData := range retPlayerList {
|
||||
if inviteInfo.SnId == playerData.SnId {
|
||||
var RankInvite model.PlayerRankInvite
|
||||
RankInvite.Name = playerData.Name
|
||||
RankInvite.Score = inviteInfo.Score
|
||||
RankInvite.SnId = inviteInfo.SnId
|
||||
|
||||
// 头像模型ID
|
||||
roleId := common.DefaultRoleId
|
||||
if playerData.Roles != nil {
|
||||
roleId = int(playerData.Roles.ModId)
|
||||
}
|
||||
RankInvite.ModId = int32(roleId)
|
||||
|
||||
RankInvite.InviteNum = int32(inviteInfo.Num)
|
||||
ret.List = append(ret.List, &RankInvite)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetInviteScoreByType 获取玩家排行信息
|
||||
func (b *BindScoreSvc) GetInviteScoreByType(req *model.FindPlayerRankInviteScoreArgs, ret *model.FindPlayerRankInviteScoreReply) error {
|
||||
c := RankInviteCollection(req.Platform)
|
||||
if c == nil {
|
||||
return RankInviteColError
|
||||
}
|
||||
|
||||
ret.RankType = req.RankType
|
||||
|
||||
var st int64
|
||||
switch req.RankType {
|
||||
case 1: //todo 总榜
|
||||
return nil
|
||||
case 2: // 本周榜
|
||||
st = common.GetWeekStartTs(time.Now().Unix())
|
||||
case 3: //todo 月榜
|
||||
return nil
|
||||
case 4: // 上周榜
|
||||
st = common.GetWeekStartTs(time.Now().Unix())
|
||||
st -= 7 * 24 * 3600
|
||||
}
|
||||
res := new(model.RankInvite)
|
||||
err := c.Find(bson.M{"week": st, "snid": req.SnId}).One(res)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
logger.Logger.Warnf("GetInviteScoreByType error: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
type PInfo struct {
|
||||
SnId int32
|
||||
Name string // 昵称
|
||||
Roles *model.RolePetInfo
|
||||
}
|
||||
|
||||
var retPlayer PInfo
|
||||
u := PlayerDataCollection(req.Platform)
|
||||
if u == nil {
|
||||
return PlayerColError
|
||||
}
|
||||
err = u.Find(bson.M{"snid": req.SnId}).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).One(&retPlayer)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetInviteScoreByType find player is error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
// 头像模型ID
|
||||
roleId := common.DefaultRoleId
|
||||
if retPlayer.Roles != nil {
|
||||
roleId = int(retPlayer.Roles.ModId)
|
||||
}
|
||||
ret.Data = model.PlayerRankInvite{
|
||||
SnId: req.SnId,
|
||||
Score: res.Score,
|
||||
InviteNum: int32(res.Num),
|
||||
Name: retPlayer.Name,
|
||||
ModId: int32(roleId),
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetInviteList 获取邀请列表
|
||||
func (b *BindScoreSvc) GetInviteList(req *model.InviteLisArgs, ret *model.InviteListRet) error {
|
||||
c := PlayerDataCollection(req.Platform)
|
||||
if c == nil {
|
||||
return InviteScoreColError
|
||||
}
|
||||
|
||||
type M struct {
|
||||
Name string
|
||||
Roles *model.RolePetInfo
|
||||
CreateTime time.Time
|
||||
SnId int32
|
||||
IScore int64
|
||||
IScoreTs time.Time
|
||||
}
|
||||
|
||||
var res []*M
|
||||
|
||||
err := c.Find(bson.M{"psnid": req.SnId}).Select(bson.M{"snid": 1, "iscore": 1, "iscorets": 1, "name": 1, "createtime": 1, "roles": 1}).All(&res)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("GetInviteList error:%v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
now := time.Now().Local()
|
||||
for _, v := range res {
|
||||
if !common.InSameWeek(now, v.IScoreTs.Local()) {
|
||||
v.IScore = 0
|
||||
}
|
||||
roleId := common.DefaultRoleId
|
||||
if v.Roles != nil && v.Roles.ModId != 0 {
|
||||
roleId = int(v.Roles.ModId)
|
||||
}
|
||||
ret.List = append(ret.List, &model.InviteInfo{
|
||||
Name: v.Name,
|
||||
SnId: v.SnId,
|
||||
CreateTs: v.CreateTime.Unix(),
|
||||
Score: v.IScore,
|
||||
ModId: int32(roleId),
|
||||
})
|
||||
}
|
||||
sort.Slice(ret.List, func(i, j int) bool {
|
||||
return ret.List[i].Score > ret.List[j].Score
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
//todo 每周清理数据,绑定关系不能删除
|
||||
|
||||
var GlobalBindScoreSvc = new(BindScoreSvc)
|
||||
|
||||
func init() {
|
||||
rpc.Register(GlobalBindScoreSvc)
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
"mongo.games.com/game/model"
|
||||
)
|
||||
|
||||
var (
|
||||
RankInviteDBName = "log"
|
||||
RankInviteCollName = "log_rankinvite"
|
||||
RankInviteColError = errors.New("RankInvite collection open failed")
|
||||
)
|
||||
|
||||
func RankInviteCollection(plt string) *mongo.Collection {
|
||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, RankInviteDBName)
|
||||
if s != nil {
|
||||
c, first := s.DB().C(RankInviteCollName)
|
||||
if first {
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"num"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"-score"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"score"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"week", "-score"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func SaveRankInvite(data *model.RankInvite) error {
|
||||
c := RankInviteCollection(data.Platform)
|
||||
if c == nil {
|
||||
return RankInviteColError
|
||||
}
|
||||
|
||||
data.Week = common.GetWeekStartTs(data.Ts)
|
||||
|
||||
_, err := c.Upsert(bson.M{"snid": data.SnId, "week": data.Week}, data)
|
||||
if err != nil {
|
||||
logger.Logger.Tracef("SaveRankInvite error:%v", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//todo 每周清理数据
|
|
@ -23,7 +23,7 @@ func RankPlayerCoinCollection(plt string) *mongo.Collection {
|
|||
c, first := s.DB().C(RankPlayerCoinCollName)
|
||||
if first {
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"coin"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"-coin"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ func RankPlayerLevelCollection(plt string) *mongo.Collection {
|
|||
c, first := s.DB().C(RankPlayerLevelCollName)
|
||||
if first {
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"exp"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"-exp"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ func RankSeasonCollection(plt string, rankType int32) *mongo.Collection {
|
|||
c, first := s.DB().C(fmt.Sprintf("%s_%d", RankSeasonCollName, rankType))
|
||||
if first {
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"isrobot", "seasonid", "score"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"isrobot", "seasonid", "-score"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
|
||||
var (
|
||||
InviteCodeDBName = "user"
|
||||
InviteCodeCollName = "user_invitecode"
|
||||
InviteCodeCollName = "user_icode"
|
||||
InviteCodeColError = errors.New("InviteCode collection open failed")
|
||||
InviteCodeMutex = sync.Mutex{}
|
||||
)
|
||||
|
@ -105,6 +105,19 @@ func (i *InviteCodeSvc) GetSnIdByCode(req *model.InviteSnIdReq, ret *model.Invit
|
|||
return nil
|
||||
}
|
||||
|
||||
func GetCodeBySnId(platform string, snid int32) (string, error) {
|
||||
c := InviteCodeCollection(platform)
|
||||
if c == nil {
|
||||
return "", InviteCodeColError
|
||||
}
|
||||
col := new(model.InviteCode)
|
||||
err := c.Find(bson.M{"snid": snid}).One(col)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
return "", err
|
||||
}
|
||||
return col.Code, err
|
||||
}
|
||||
|
||||
func init() {
|
||||
rpc.Register(new(InviteCodeSvc))
|
||||
}
|
||||
|
|
|
@ -1,429 +0,0 @@
|
|||
package svc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/rpc"
|
||||
"time"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
"mongo.games.com/game/model"
|
||||
rankproto "mongo.games.com/game/protocol/rank"
|
||||
)
|
||||
|
||||
var (
|
||||
InviteScoreDBName = "user"
|
||||
InviteScoreCollName = "user_invitescore"
|
||||
InviteScoreColError = errors.New("InviteScore collection open failed")
|
||||
)
|
||||
|
||||
func InviteScoreCollection(plt string) *mongo.Collection {
|
||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, InviteScoreDBName)
|
||||
if s != nil {
|
||||
c, first := s.DB().C(InviteScoreCollName)
|
||||
if first {
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"tp"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"weekindex"}, Background: true, Sparse: true})
|
||||
c.EnsureIndex(mgo.Index{Key: []string{"monthindex"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type BindScoreSvc struct {
|
||||
}
|
||||
|
||||
func (b *BindScoreSvc) GetInviteScore(req *model.InviteScoreReq, ret *model.InviteScoreRet) error {
|
||||
c := InviteScoreCollection(req.Platform)
|
||||
if c == nil {
|
||||
return InviteScoreColError
|
||||
}
|
||||
|
||||
type M struct {
|
||||
Score int64
|
||||
Money int64
|
||||
}
|
||||
|
||||
var tc []M
|
||||
err := c.Pipe([]bson.M{
|
||||
{"$match": bson.M{
|
||||
"invitesnid": req.SnId,
|
||||
}},
|
||||
{"$group": bson.M{
|
||||
"_id": nil,
|
||||
"score": bson.M{"$sum": "$score"},
|
||||
"money": bson.M{"$sum": "$money"},
|
||||
}},
|
||||
}).AllowDiskUse().All(&tc)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetInviteScore AllowDiskUse is error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
if len(tc) > 0 {
|
||||
ret.Score = tc[0].Score
|
||||
ret.Money = tc[0].Money
|
||||
c := PlayerDataCollection(req.Platform)
|
||||
if c == nil {
|
||||
return PlayerColError
|
||||
}
|
||||
err = c.Update(bson.M{"snid": req.SnId}, bson.M{"$set": bson.M{"invitescore": tc[0].Score}})
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetInviteScore update invitescore is error", err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
tc = tc[:0]
|
||||
err = c.Pipe([]bson.M{
|
||||
{"$match": bson.M{
|
||||
"invitesnid": req.SnId,
|
||||
"score": bson.M{"$gt": 0},
|
||||
}},
|
||||
{"$group": bson.M{
|
||||
"_id": nil,
|
||||
"score": bson.M{"$sum": "$score"},
|
||||
}},
|
||||
}).AllowDiskUse().All(&tc)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetInviteScore z AllowDiskUse is error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
if len(tc) > 0 {
|
||||
ret.ZScore = tc[0].Score
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *BindScoreSvc) SaveInviteScore(req *model.InviteScore, ret *bool) error {
|
||||
logger.Logger.Tracef("SaveInviteScore req:%+v", *req)
|
||||
if req.InviteSnId == 0 {
|
||||
return nil
|
||||
}
|
||||
req.Id = bson.NewObjectId()
|
||||
u := PlayerDataCollection(req.Platform)
|
||||
if u == nil {
|
||||
return PlayerColError
|
||||
}
|
||||
|
||||
type M struct {
|
||||
InviteScore int64
|
||||
}
|
||||
r := new(M)
|
||||
err := u.Find(bson.M{"snid": req.InviteSnId}).Select(bson.M{"invitescore": 1}).One(r)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
logger.Logger.Errorf("GetInviteScore Find error:%v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
if req.Score < 0 {
|
||||
if -req.Score > r.InviteScore {
|
||||
req.Score = -r.InviteScore
|
||||
}
|
||||
}
|
||||
|
||||
c := InviteScoreCollection(req.Platform)
|
||||
if c == nil {
|
||||
return InviteScoreColError
|
||||
}
|
||||
|
||||
ts := req.Ts
|
||||
if req.Tp != common.InviteScoreTypeBind {
|
||||
a := &model.InviteScore{}
|
||||
err = c.Find(bson.M{"snid": req.SnId, "tp": common.InviteScoreTypeBind}).One(a)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
logger.Logger.Errorf("GetInviteScore Find BindTime error:%v", err)
|
||||
return err
|
||||
}
|
||||
ts = a.Ts
|
||||
}
|
||||
|
||||
bindTime := time.Unix(0, ts).Local()
|
||||
year, month, day := bindTime.Date()
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
||||
// 本周起始日期(周日)
|
||||
req.WeekIndex = today.AddDate(0, 0, -int(today.Weekday())).Unix()
|
||||
// 本月起始日期
|
||||
req.MonthIndex = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
|
||||
|
||||
err = c.Insert(req)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("SaveInviteScore Insert error:%v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
err = u.Update(bson.M{"snid": req.InviteSnId}, bson.M{"$inc": bson.M{"invitescore": req.Score}})
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("inc InviteScore error:%v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
*ret = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs, ret *model.FindPlayerRankInviteListReply) error {
|
||||
c := InviteScoreCollection(req.Platform)
|
||||
if c == nil {
|
||||
return InviteScoreColError
|
||||
}
|
||||
|
||||
matchParam := bson.M{
|
||||
"score": bson.M{"$gt": 0},
|
||||
}
|
||||
now := time.Now().Local()
|
||||
startTime := now.AddDate(-100, 0, 0).UnixNano()
|
||||
year, month, day := now.Date()
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
||||
if req.RankType == int32(rankproto.RankInvite_InviteType_Week) {
|
||||
// 本周起始日期(周日)
|
||||
matchParam["weekindex"] = today.AddDate(0, 0, -int(today.Weekday())).Unix()
|
||||
} else if req.RankType == int32(rankproto.RankInvite_InviteType_Month) {
|
||||
// 本月起始日期
|
||||
matchParam["monthindex"] = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
|
||||
} else {
|
||||
matchParam["ts"] = bson.M{"$gte": startTime, "$lte": now.UnixNano()}
|
||||
}
|
||||
|
||||
type M struct {
|
||||
InviteSnId int32 // 邀请人id
|
||||
Score int64 // 积分
|
||||
}
|
||||
|
||||
var tc []M
|
||||
err := c.Pipe([]bson.M{
|
||||
{"$match": matchParam},
|
||||
{"$group": bson.M{
|
||||
"_id": bson.M{
|
||||
"invitesnid": "$invitesnid",
|
||||
},
|
||||
"invitesnid": bson.M{"$first": "$invitesnid"},
|
||||
"score": bson.M{"$sum": "$score"},
|
||||
}},
|
||||
{
|
||||
"$sort": bson.M{"ts": -1},
|
||||
},
|
||||
{
|
||||
"$sort": bson.M{"score": -1},
|
||||
},
|
||||
{
|
||||
"$limit": model.GameParamData.RankInviteMaxNum,
|
||||
},
|
||||
}).AllowDiskUse().All(&tc)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetInviteRankList z AllowDiskUse is error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
var conds []int32
|
||||
if len(tc) > 0 {
|
||||
|
||||
type PInfo struct {
|
||||
SnId int32
|
||||
Name string // 昵称
|
||||
Roles *model.RolePetInfo
|
||||
}
|
||||
|
||||
var retPlayerList []PInfo
|
||||
|
||||
cplayerdata := PlayerDataCollection(req.Platform)
|
||||
if cplayerdata == nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for i := 0; i < len(tc); i++ {
|
||||
conds = append(conds, tc[i].InviteSnId)
|
||||
}
|
||||
|
||||
selecter := bson.M{"snid": bson.M{"$in": conds}}
|
||||
//err = cplayerdata.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&retPlayerList)
|
||||
err = cplayerdata.Find(selecter).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).All(&retPlayerList)
|
||||
if err != nil {
|
||||
logger.Logger.Error("svc.FindInvitePlayerList is error", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, inviteInfo := range tc {
|
||||
for _, playerData := range retPlayerList {
|
||||
if inviteInfo.InviteSnId == playerData.SnId {
|
||||
var RankInvite model.PlayerRankInvite
|
||||
RankInvite.Name = playerData.Name
|
||||
RankInvite.Score = inviteInfo.Score
|
||||
RankInvite.SnId = inviteInfo.InviteSnId
|
||||
|
||||
// 头像模型ID
|
||||
roleId := common.DefaultRoleId
|
||||
if playerData.Roles != nil {
|
||||
roleId = int(playerData.Roles.ModId)
|
||||
}
|
||||
RankInvite.ModId = int32(roleId)
|
||||
|
||||
RankInvite.InviteNum, _ = GetInviteNum(req.Platform, inviteInfo.InviteSnId, req.RankType)
|
||||
ret.List = append(ret.List, &RankInvite)
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
ret.RankType = req.RankType
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *BindScoreSvc) GetInviteScoreByType(req *model.FindPlayerRankInviteScoreArgs, ret *model.FindPlayerRankInviteScoreReply) error {
|
||||
c := InviteScoreCollection(req.Platform)
|
||||
if c == nil {
|
||||
return InviteScoreColError
|
||||
}
|
||||
|
||||
matchParam := bson.M{
|
||||
"invitesnid": req.SnId,
|
||||
"score": bson.M{"$gt": 0},
|
||||
}
|
||||
now := time.Now().Local()
|
||||
startTime := now.AddDate(-100, 0, 0).UnixNano()
|
||||
year, month, day := now.Date()
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
||||
if req.RankType == int32(rankproto.RankInvite_InviteType_Week) {
|
||||
// 本周起始日期(周日)
|
||||
matchParam["weekindex"] = today.AddDate(0, 0, -int(today.Weekday())).Unix()
|
||||
} else if req.RankType == int32(rankproto.RankInvite_InviteType_Month) {
|
||||
// 本月起始日期
|
||||
matchParam["monthindex"] = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
|
||||
} else {
|
||||
matchParam["ts"] = bson.M{"$gte": startTime, "$lte": now.UnixNano()}
|
||||
}
|
||||
|
||||
type M struct {
|
||||
InviteSnId int32 // 邀请人id
|
||||
Score int64 // 积分
|
||||
}
|
||||
|
||||
var tc []M
|
||||
err := c.Pipe([]bson.M{
|
||||
{"$match": matchParam},
|
||||
{"$group": bson.M{
|
||||
"_id": nil,
|
||||
"invitesnid": bson.M{"$first": "$invitesnid"},
|
||||
"score": bson.M{"$sum": "$score"},
|
||||
}},
|
||||
}).AllowDiskUse().All(&tc)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetInviteScoreByType z AllowDiskUse is error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
type PInfo struct {
|
||||
SnId int32
|
||||
Name string // 昵称
|
||||
Roles *model.RolePetInfo
|
||||
}
|
||||
|
||||
var retPlayer PInfo
|
||||
u := PlayerDataCollection(req.Platform)
|
||||
if u == nil {
|
||||
return err
|
||||
}
|
||||
err = u.Find(bson.M{"snid": req.SnId}).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).One(&retPlayer)
|
||||
if err != nil {
|
||||
logger.Logger.Error("svc.GetInviteScoreByType is error", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
var rankInvite model.PlayerRankInvite
|
||||
rankInvite.Name = retPlayer.Name
|
||||
if len(tc) > 0 {
|
||||
rankInvite.Score = tc[0].Score
|
||||
}
|
||||
rankInvite.SnId = req.SnId
|
||||
// 头像模型ID
|
||||
roleId := common.DefaultRoleId
|
||||
if retPlayer.Roles != nil {
|
||||
roleId = int(retPlayer.Roles.ModId)
|
||||
}
|
||||
rankInvite.ModId = int32(roleId)
|
||||
rankInvite.InviteNum, _ = GetInviteNum(req.Platform, req.SnId, req.RankType)
|
||||
ret.Data = rankInvite
|
||||
|
||||
ret.RankType = req.RankType
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *BindScoreSvc) GetInviteList(req *model.InviteLisArgs, ret *model.InviteListRet) error {
|
||||
c := InviteScoreCollection(req.Platform)
|
||||
if c == nil {
|
||||
return InviteScoreColError
|
||||
}
|
||||
|
||||
type M struct {
|
||||
SnId int32
|
||||
Score int64
|
||||
}
|
||||
|
||||
var tc []M
|
||||
err := c.Pipe([]bson.M{
|
||||
{"$match": bson.M{
|
||||
"invitesnid": req.SnId,
|
||||
}},
|
||||
{"$group": bson.M{
|
||||
"_id": bson.M{
|
||||
"snid": "$snid",
|
||||
},
|
||||
"snid": bson.M{"$first": "$snid"},
|
||||
"score": bson.M{"$sum": "$score"},
|
||||
}},
|
||||
{
|
||||
"$sort": bson.M{
|
||||
"score": -1,
|
||||
},
|
||||
},
|
||||
}).AllowDiskUse().All(&tc)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetInviteList AllowDiskUse is error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
u := PlayerDataCollection(req.Platform)
|
||||
if u == nil {
|
||||
return PlayerColError
|
||||
}
|
||||
|
||||
for _, v := range tc {
|
||||
d := &model.PlayerBaseInfo2{}
|
||||
err = u.Find(bson.M{"snid": v.SnId}).Select(bson.M{"name": 1, "createtime": 1, "roles": 1}).One(d)
|
||||
if err != nil {
|
||||
logger.Logger.Warnf("GetInviteList Find player is error:%v", err)
|
||||
}
|
||||
roleId := common.DefaultRoleId
|
||||
if d.Roles != nil && d.Roles.ModId != 0 {
|
||||
roleId = int(d.Roles.ModId)
|
||||
}
|
||||
ret.List = append(ret.List, &model.InviteInfo{
|
||||
Name: d.Name,
|
||||
SnId: v.SnId,
|
||||
CreateTs: d.CreateTime.Unix(),
|
||||
Score: v.Score,
|
||||
ModId: int32(roleId),
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
rpc.Register(new(BindScoreSvc))
|
||||
}
|
|
@ -21,7 +21,6 @@ import (
|
|||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
"mongo.games.com/game/model"
|
||||
rankproto "mongo.games.com/game/protocol/rank"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -40,12 +39,12 @@ func PlayerDataCollection(plt string) *mongo.Collection {
|
|||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"snid"}, Unique: true, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"channel"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"tel"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"invitecode"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"name"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"createtime"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"-createtime"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"othercode"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"icode"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"psnid"}, Background: true, Sparse: true})
|
||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"pcode"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c_playerdata
|
||||
}
|
||||
|
@ -247,7 +246,7 @@ func (svc *PlayerDataSvc) CreatePlayerDataByThird(args *model.CreatePlayer, ret
|
|||
func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg, ret *model.PlayerDataRet) (err error) {
|
||||
cplayerdata := PlayerDataCollection(args.Plt)
|
||||
if cplayerdata == nil {
|
||||
return
|
||||
return PlayerColError
|
||||
}
|
||||
acc := args.AccId
|
||||
pd := &model.PlayerData{}
|
||||
|
@ -267,13 +266,13 @@ func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg,
|
|||
|
||||
if !bson.IsObjectIdHex(acc) {
|
||||
logger.Logger.Warn("NewPlayer failed: acc is illeage ", acc)
|
||||
return
|
||||
return errors.New("acc is illeage")
|
||||
}
|
||||
var a *model.Account
|
||||
a, err = _AccountSvc.getAccount(args.Plt, args.AccId)
|
||||
if err != nil {
|
||||
logger.Logger.Warnf("_AccountSvc.getAccount(%v,%v) failed:%v", args.Plt, args.AccId, err)
|
||||
return
|
||||
return err
|
||||
}
|
||||
|
||||
id := a.SnId
|
||||
|
@ -281,7 +280,7 @@ func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg,
|
|||
id, err = GetOnePlayerIdFromBucket()
|
||||
if err != nil {
|
||||
logger.Logger.Warn("NewPlayer failed:", err)
|
||||
return
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -298,21 +297,26 @@ func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg,
|
|||
dataParams.Ip, int64(args.AddCoin), "", a.DeviceInfo, a.TagKey, a.AccountType)
|
||||
pd.HeadUrl = args.HeadUrl
|
||||
if pd != nil {
|
||||
if pd.ICode == "" {
|
||||
code, _ := GetInviteCode(pd.Platform, pd.SnId)
|
||||
pd.ICode = code
|
||||
pd.IScoreTs = time.Now()
|
||||
}
|
||||
err = cplayerdata.Insert(pd)
|
||||
if err != nil {
|
||||
logger.Logger.Trace("CreatePlayerDataOnRegister Insert failed:", err)
|
||||
return
|
||||
return err
|
||||
}
|
||||
ret.Pd = pd
|
||||
ret.IsNew = true
|
||||
return
|
||||
return nil
|
||||
}
|
||||
return
|
||||
return nil
|
||||
}
|
||||
if CorrectData(pd) {
|
||||
}
|
||||
ret.Pd = pd
|
||||
return
|
||||
return nil
|
||||
}
|
||||
|
||||
func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArgs, ret *model.PlayerDataRet) (err error) {
|
||||
|
@ -321,6 +325,30 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
|
|||
return nil
|
||||
}
|
||||
|
||||
f := func(p *model.PlayerData) {
|
||||
// 更新一下绑定关系
|
||||
if p.PSnId > 0 && p.PCode != "" {
|
||||
return
|
||||
}
|
||||
c := InviteScoreCollection(args.Plt)
|
||||
if c == nil {
|
||||
return
|
||||
}
|
||||
res := new(model.LogInviteScore)
|
||||
c.Find(bson.M{"downsnid": args.SnId, "tp": common.InviteScoreTypeBind}).One(res)
|
||||
param := bson.M{}
|
||||
if res.UpSnid > 0 {
|
||||
p.PSnId = int32(res.UpSnid)
|
||||
param["psnid"] = p.PSnId
|
||||
code, _ := GetCodeBySnId(args.Plt, p.PSnId)
|
||||
if code != "" {
|
||||
p.PCode = code
|
||||
param["pcode"] = code
|
||||
}
|
||||
cplayerdata.Update(bson.M{"snid": args.SnId}, bson.M{"$set": param})
|
||||
}
|
||||
}
|
||||
|
||||
var code string
|
||||
err = cplayerdata.Find(bson.M{"snid": args.SnId}).One(&ret.Pd)
|
||||
if err != nil {
|
||||
|
@ -346,15 +374,16 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
|
|||
pd := model.NewPlayerData(a.AccountId.Hex(), name, a.SnId, a.Channel, a.Platform, a.Params,
|
||||
a.Tel, a.PackegeTag, dataParams.Ip, 0, dataParams.UnionId, a.DeviceInfo, a.TagKey, a.AccountType)
|
||||
if pd != nil {
|
||||
if pd.ICode == "" {
|
||||
code, _ = GetInviteCode(pd.Platform, pd.SnId)
|
||||
pd.ICode = code
|
||||
pd.IScoreTs = time.Now()
|
||||
}
|
||||
err = cplayerdata.Insert(pd)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("GetPlayerDataBySnId Insert err:%v acc:%v snid:%v", err, a.AccountId.Hex(), a.SnId)
|
||||
return err
|
||||
}
|
||||
if pd.InviteCode == "" {
|
||||
code, err = GetInviteCode(pd.Platform, pd.SnId)
|
||||
pd.InviteCode = code
|
||||
}
|
||||
ret.IsNew = true
|
||||
ret.Pd = pd
|
||||
return nil
|
||||
|
@ -362,10 +391,13 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
|
|||
}
|
||||
return err
|
||||
}
|
||||
if ret.Pd.InviteCode == "" {
|
||||
code, err = GetInviteCode(ret.Pd.Platform, ret.Pd.SnId)
|
||||
ret.Pd.InviteCode = code
|
||||
if ret.Pd.ICode == "" {
|
||||
code, _ = GetInviteCode(ret.Pd.Platform, ret.Pd.SnId)
|
||||
ret.Pd.ICode = code
|
||||
ret.Pd.IScoreTs = time.Now()
|
||||
cplayerdata.Update(bson.M{"snid": args.SnId}, bson.M{"$set": bson.M{"icode": code, "iscorets": ret.Pd.IScoreTs}})
|
||||
}
|
||||
f(ret.Pd)
|
||||
if args.CorrectData && ret.Pd != nil {
|
||||
CorrectData(ret.Pd)
|
||||
}
|
||||
|
@ -459,6 +491,12 @@ func SavePlayerData(pd *model.PlayerData) (err error) {
|
|||
}
|
||||
if pd != nil {
|
||||
model.RecalcuPlayerCheckSum(pd)
|
||||
//todo 排除字段更新,有没有更新好的方法
|
||||
pd.IScore, pd.INum, pd.IMoney, pd.IScoreTs, err = GetInviteData(pd.Platform, pd.SnId)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("model.SavePlayerData GetInviteData %v err:%v", pd.SnId, err)
|
||||
return
|
||||
}
|
||||
_, err = cplayerdata.Upsert(bson.M{"_id": pd.Id}, pd)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("model.SavePlayerData %v err:%v", pd.SnId, err)
|
||||
|
@ -1495,87 +1533,167 @@ func (svc *PlayerDataSvc) GetPlayerInviteSnid(req *model.PlayerIsExistBySnIdArgs
|
|||
}
|
||||
|
||||
type t struct {
|
||||
InviteSnId int32
|
||||
PSnId int32
|
||||
}
|
||||
|
||||
res := &t{}
|
||||
|
||||
err := c.Find(bson.M{"snid": req.SnId}).Select(bson.M{"invitesnid": 1}).One(res)
|
||||
if err != nil && errors.Is(err, mgo.ErrNotFound) {
|
||||
err := c.Find(bson.M{"snid": req.SnId}).Select(bson.M{"psnid": 1}).One(res)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
return err
|
||||
}
|
||||
|
||||
*resp = res.InviteSnId
|
||||
*resp = res.PSnId
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (svc *PlayerDataSvc) GetInviteNum(req *model.PlayerIsExistBySnIdArgs, resp *int32) error {
|
||||
n, err := GetInviteNum(req.Plt, req.SnId, int32(rankproto.RankInvite_InviteType_Total))
|
||||
func (svc *PlayerDataSvc) BindInviteSnId(args *model.BindArgs, ret *bool) error {
|
||||
err := BindInviteSnId(args.Platform, args.SnId, args.PSnId, args.PCode)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*resp = n
|
||||
*ret = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetInviteNum(platform string, snId int32, rankType int32) (int32, error) {
|
||||
var err error
|
||||
var n int
|
||||
switch rankType {
|
||||
case int32(rankproto.RankInvite_InviteType_Week), int32(rankproto.RankInvite_InviteType_Month):
|
||||
matchParam := bson.M{
|
||||
"invitesnid": snId,
|
||||
"tp": common.InviteScoreTypeBind,
|
||||
}
|
||||
now := time.Now().Local()
|
||||
year, month, day := now.Date()
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
||||
if rankType == int32(rankproto.RankInvite_InviteType_Week) {
|
||||
// 本周起始日期(周日)
|
||||
matchParam["weekindex"] = today.AddDate(0, 0, -int(today.Weekday())).Unix()
|
||||
} else if rankType == int32(rankproto.RankInvite_InviteType_Month) {
|
||||
// 本月起始日期
|
||||
matchParam["monthindex"] = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
|
||||
}
|
||||
c := InviteScoreCollection(platform)
|
||||
if c == nil {
|
||||
return 0, InviteScoreColError
|
||||
}
|
||||
n, err = c.Find(matchParam).Count()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
default:
|
||||
c := PlayerDataCollection(platform)
|
||||
if c == nil {
|
||||
return 0, PlayerColError
|
||||
}
|
||||
n, err = c.Find(bson.M{"invitesnid": snId}).Count()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
|
||||
return int32(n), nil
|
||||
}
|
||||
|
||||
func BindInviteSnId(platform string, snId, inviteSnId int32, ts int64) error {
|
||||
func BindInviteSnId(platform string, snId, inviteSnId int32, code string) error {
|
||||
c := PlayerDataCollection(platform)
|
||||
if c == nil {
|
||||
return PlayerColError
|
||||
}
|
||||
|
||||
err := c.Update(bson.M{"snid": snId}, bson.M{"$set": bson.M{"invitesnid": inviteSnId}})
|
||||
err := c.Update(bson.M{"snid": snId}, bson.M{"$set": bson.M{"psnid": inviteSnId, "pcode": code}})
|
||||
if err != nil {
|
||||
logger.Logger.Error("BindInviteSnId error ", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ClearInviteScore(platform string, snId int32, now time.Time) error {
|
||||
c := PlayerDataCollection(platform)
|
||||
if c == nil {
|
||||
return PlayerColError
|
||||
}
|
||||
|
||||
err := c.Update(bson.M{"snid": snId}, bson.M{"$set": bson.M{"iscore": 0, "iscorets": now}})
|
||||
if err != nil {
|
||||
logger.Logger.Error("ClearInviteScore error ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func AddInviteScore(platform string, psnId, snid, level, tp int32, num, rate, money int64, now time.Time, addMoney bool) error {
|
||||
logger.Logger.Tracef("AddInviteScore ==> platform %v, psnId %v, snid %v, level %v, tp %v, num %v, rate %v, money %v, now %v, addMoney %v",
|
||||
platform, psnId, snid, level, tp, num, rate, money, now, addMoney)
|
||||
i := InviteScoreCollection(platform)
|
||||
if i == nil {
|
||||
return InviteScoreColError
|
||||
}
|
||||
|
||||
id := bson.NewObjectId()
|
||||
err := i.Insert(&model.LogInviteScore{
|
||||
Id: id,
|
||||
Platform: platform,
|
||||
UpSnid: psnId,
|
||||
DownSnid: snid,
|
||||
Level: level,
|
||||
Tp: tp,
|
||||
Rate: rate,
|
||||
Score: num,
|
||||
Money: money,
|
||||
Ts: now.Unix(),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
logger.Logger.Error("AddInviteScore LogInviteScore error ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
c := PlayerDataCollection(platform)
|
||||
if c == nil {
|
||||
return PlayerColError
|
||||
}
|
||||
|
||||
myMoney := money
|
||||
if !addMoney {
|
||||
myMoney = 0
|
||||
}
|
||||
|
||||
addNum := int64(0)
|
||||
if level == 0 && tp == common.InviteScoreTypeBind {
|
||||
addNum = 1
|
||||
}
|
||||
|
||||
err = c.Update(bson.M{"snid": psnId}, bson.M{"$inc": bson.M{"iscore": num, "imoney": myMoney, "inum": addNum}, "$set": bson.M{"iscorets": now}})
|
||||
if err != nil {
|
||||
i.RemoveId(id)
|
||||
logger.Logger.Error("AddInviteScore error ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
// 更新排行榜
|
||||
type m struct {
|
||||
IScore int64
|
||||
INum int64
|
||||
}
|
||||
res := &m{}
|
||||
err = c.Find(bson.M{"snid": psnId}).Select(bson.M{"iscore": 1, "inum": 1}).One(res)
|
||||
if err != nil {
|
||||
logger.Logger.Error("AddInviteScore find error ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
SaveRankInvite(&model.RankInvite{
|
||||
Platform: platform,
|
||||
SnId: psnId,
|
||||
Num: res.INum,
|
||||
Score: res.IScore,
|
||||
Ts: now.Unix(),
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetInviteData(platform string, snId int32) (iscore, inum, imoney int64, iscorets time.Time, err error) {
|
||||
c := PlayerDataCollection(platform)
|
||||
if c == nil {
|
||||
err = PlayerColError
|
||||
return
|
||||
}
|
||||
type M struct {
|
||||
IScore, Imoney, Inum int64
|
||||
IScoreTs time.Time
|
||||
}
|
||||
res := &M{}
|
||||
err = c.Find(bson.M{"snid": snId}).Select(bson.M{"iscore": 1, "inum": 1, "imoney": 1, "iscorets": 1}).One(res)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
return
|
||||
}
|
||||
res.IScoreTs = res.IScoreTs.Local()
|
||||
return res.IScore, res.Inum, res.Imoney, res.IScoreTs, nil
|
||||
}
|
||||
|
||||
func GetPSnId(platform string, snId int32) (psnId int32, err error) {
|
||||
c := PlayerDataCollection(platform)
|
||||
if c == nil {
|
||||
err = PlayerColError
|
||||
return
|
||||
}
|
||||
type M struct {
|
||||
PSnId int32
|
||||
}
|
||||
res := &M{}
|
||||
err = c.Find(bson.M{"snid": snId}).Select(bson.M{"psnid": 1}).One(res)
|
||||
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
|
||||
return 0, err
|
||||
}
|
||||
return res.PSnId, nil
|
||||
}
|
||||
|
||||
func CorrectData(pd *model.PlayerData) bool {
|
||||
//var coinTotal int64
|
||||
dirty := false
|
||||
|
|
|
@ -31,4 +31,5 @@ const (
|
|||
ETCDKEY_GAME_CONFIG = "/game/plt/gameconfig/" // 游戏管理/全局配置
|
||||
ETCDKEY_ACT_PHONELOTTERY = "/game/act_phoneLottery"
|
||||
ETCDKEY_ChannelSwitch = "/game/channel/switch" // 渠道开关
|
||||
ETCDKEY_ACT_Invite = "/game/act_invite" // 邀请活动配置
|
||||
)
|
||||
|
|
|
@ -1325,8 +1325,13 @@ func (this *Player) UpdatePigBankCoin(gainTexCoin int64) {
|
|||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
BankCoinMax := fGetPropValue("BankMaxCoin")
|
||||
BankCoinMax := int64(0)
|
||||
for _, data := range srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() {
|
||||
if this.WelfData.PigBank.DayBuyTimes+1 >= data.BuyCountMin && this.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
BankCoinMax = int64(data.MaxGold)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
pack := &player.SCPigBankCoin{}
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ func NewBagInfo(sid int32, plt string) *BagInfo {
|
|||
return &BagInfo{BagId: bson.NewObjectId(), SnId: sid, Platform: plt, BagItem: make(map[int32]*Item)}
|
||||
}
|
||||
|
||||
func GetBagInfo(sid int32, plt string) *BagInfo {
|
||||
func GetBagInfo(sid int32, plt string) (*BagInfo, error) {
|
||||
if rpcCli == nil {
|
||||
return nil
|
||||
return nil, ErrRPClientNoConn
|
||||
}
|
||||
ret := &BagInfo{}
|
||||
args := &GetBagInfoArgs{
|
||||
|
@ -41,9 +41,9 @@ func GetBagInfo(sid int32, plt string) *BagInfo {
|
|||
err := rpcCli.CallWithTimeout("BagSvc.GetBagItem", args, ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetBagInfo err:%v SnId:%v ", err, args.SnId)
|
||||
return nil
|
||||
return nil, err
|
||||
}
|
||||
return ret
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func UpBagItem(args *BagInfo) error {
|
||||
|
|
|
@ -117,6 +117,8 @@ type AllConfig struct {
|
|||
ShopInfos map[int32]*ShopInfo // 商品id:商品信息
|
||||
// 渠道开关
|
||||
ChannelSwitch map[int32]*webapi.ChannelSwitchConfig
|
||||
// 邀请活动
|
||||
*webapi.ActInviteConfig
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
|
|
|
@ -24,6 +24,7 @@ type InviteSnIdRet struct {
|
|||
SnId int32
|
||||
}
|
||||
|
||||
// GetSnIdByCode 根据邀请码获取被邀请人id
|
||||
func GetSnIdByCode(platform string, code string) (int32, error) {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Warnf("rpcCli is nil")
|
||||
|
@ -46,82 +47,30 @@ func GetSnIdByCode(platform string, code string) (int32, error) {
|
|||
|
||||
// InviteScore 积分记录
|
||||
type InviteScore struct {
|
||||
Id bson.ObjectId `bson:"_id"`
|
||||
Platform string // 平台id
|
||||
SnId int32 // 被邀请人id
|
||||
InviteSnId int32 // 邀请人id
|
||||
Tp int32 // 积分类型 common.InviteScoreType~
|
||||
Score int64 // 积分
|
||||
Ts int64 // 时间戳
|
||||
Money int64 // 充值金额
|
||||
WeekIndex int64 // 所在周
|
||||
MonthIndex int64 // 所在月
|
||||
Platform string // 平台id
|
||||
SnId int32 // 被邀请人id
|
||||
InviteSnId int32 // 邀请人id
|
||||
Tp int32 // 积分类型 common.InviteScoreType ~
|
||||
Score int64 // 积分
|
||||
Ts int64 // 时间戳
|
||||
Money int64 // 充值金额
|
||||
Rate []int64 // 返佣比例
|
||||
}
|
||||
|
||||
type InviteScoreReq struct {
|
||||
// 邀请消息
|
||||
const EvtInvite = "evt_invite" // 绑定邀请人 worldsrv -> dbproxy
|
||||
type EvtInviteMsg struct {
|
||||
InviteScore
|
||||
RechargeScore int64 // 充值成功积分
|
||||
}
|
||||
|
||||
const EvtInviteAck = "evt_invite_ack" // 绑定邀请人 dbproxy -> worldsrv
|
||||
type EvtInviteAckMsg struct {
|
||||
Platform string
|
||||
SnId int32
|
||||
}
|
||||
|
||||
type InviteScoreRet struct {
|
||||
Score int64 // 包含扣积分
|
||||
ZScore int64 // 只包含大于0的积分
|
||||
Money int64 // 充值金额
|
||||
}
|
||||
|
||||
// GetInviteScore 查询总积分
|
||||
// 下级玩家所有积分
|
||||
// 返回 包含扣积分,只包含大于0的积分,充值金额
|
||||
func GetInviteScore(plt string, snid int32) (int64, int64, int64, error) {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Warnf("rpcCli is nil")
|
||||
return 0, 0, 0, errors.New("rpcCli is nil")
|
||||
}
|
||||
|
||||
req := &InviteScoreReq{
|
||||
Platform: plt,
|
||||
SnId: snid,
|
||||
}
|
||||
ret := &InviteScoreRet{}
|
||||
err := rpcCli.CallWithTimeout("BindScoreSvc.GetInviteScore", req, ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Warnf("GetInviteScore err:%v", err)
|
||||
return 0, 0, 0, err
|
||||
}
|
||||
|
||||
return ret.Score, ret.ZScore, ret.Money, err
|
||||
}
|
||||
|
||||
// SaveInviteScore 保存积分变更记录
|
||||
func SaveInviteScore(b *InviteScore) error {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Warnf("rpcCli is nil")
|
||||
return errors.New("rpcCli is nil")
|
||||
}
|
||||
|
||||
ret := false
|
||||
err := rpcCli.CallWithTimeout("BindScoreSvc.SaveInviteScore", b, &ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Warnf("SaveInviteScore err:%v", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
const EvtBindInvite = "evt_bind_invite"
|
||||
const AckBindNum = "ack_bind_num"
|
||||
const EvtInviteScore = "evt_invitescore"
|
||||
|
||||
type BindInvite struct {
|
||||
Platform string
|
||||
SnId int32
|
||||
InviteSnId int32
|
||||
Ts int64
|
||||
}
|
||||
|
||||
type BindNum struct {
|
||||
SnId int32
|
||||
Num int32
|
||||
Snid int32
|
||||
Score int64
|
||||
Money int64
|
||||
Num int64
|
||||
}
|
||||
|
||||
type InviteLisArgs struct {
|
||||
|
@ -141,6 +90,7 @@ type InviteListRet struct {
|
|||
List []*InviteInfo
|
||||
}
|
||||
|
||||
// GetInviteList 获取邀请人列表
|
||||
func GetInviteList(platform string, snid int32) ([]*InviteInfo, error) {
|
||||
if rpcCli == nil {
|
||||
logger.Logger.Error("model.GetInviteList rpcCli == nil")
|
||||
|
@ -159,3 +109,25 @@ func GetInviteList(platform string, snid int32) ([]*InviteInfo, error) {
|
|||
}
|
||||
return ret.List, nil
|
||||
}
|
||||
|
||||
type RankInvite struct {
|
||||
Platform string `bson:"-"`
|
||||
SnId int32
|
||||
Num int64
|
||||
Score int64
|
||||
Ts int64
|
||||
Week int64
|
||||
}
|
||||
|
||||
type LogInviteScore struct {
|
||||
Id bson.ObjectId `bson:"_id"`
|
||||
Platform string `bson:"-"` // 平台id
|
||||
UpSnid int32 // 上级代理
|
||||
DownSnid int32 // 下级代理
|
||||
Level int32 // 代理层级 例如 1:DownSnid 是 UpSnid 的 1 级代理; 2: DownSnid 是 UpSnid 的 2 级代理
|
||||
Tp int32 // 返佣类型
|
||||
Rate int64 // 返佣比例
|
||||
Score int64 // 积分
|
||||
Money int64 // 充值金额
|
||||
Ts int64 // 时间戳
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ const (
|
|||
MSGTYPE_MATCH_SHOPERETURN //积分商城兑换退还
|
||||
MSGTYPE_ITEM //获取道具
|
||||
MSGTYPE_RANK_REWARD //排行榜奖励
|
||||
MSGTYPE_ITEM_CHANGE //背包使用兑换
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -104,6 +104,11 @@ const (
|
|||
SystemFreeGive_GiveType_MailSystemGive //邮件系统赠送
|
||||
SystemFreeGive_GiveType_RankMatch //段位奖励
|
||||
SystemFreeGive_GiveType_BindTel // 绑定手机号奖励
|
||||
SystemFreeGive_GiveType_TaskInvite // 邀请任务
|
||||
SystemFreeGive_GiveType_TaskNewPlayer // 新手任务
|
||||
SystemFreeGive_GiveType_TaskAchievement // 成就任务
|
||||
SystemFreeGive_GiveType_TaskEveryDay // 每日任务
|
||||
SystemFreeGive_GiveType_TaskWeekActive // 周活跃奖励
|
||||
)
|
||||
const (
|
||||
SystemFreeGive_CoinType_Coin int32 = iota //金币
|
||||
|
@ -449,25 +454,29 @@ type PlayerData struct {
|
|||
LotteryCount int32 //抽奖次数
|
||||
InitLotteryStatus bool //抽奖初始化状态
|
||||
Delete int // 是否删除
|
||||
InviteCode string // 邀请码
|
||||
InviteSnId int32 // 邀请人
|
||||
InviteScore int64 // 邀请积分
|
||||
OtherCode string // 绑定的邀请码
|
||||
WeekCardTime map[int32]int64 // 周卡结束时间 key:类型 value:结束时间
|
||||
WeekCardAward map[int32]bool // 周卡奖励领取状态false-未领取,true已领取
|
||||
ItemRecExpireTime int64 // 记牌器到期时间
|
||||
RequestAddFriend map[int32]int64 // 玩家申请好友记录
|
||||
IsTakeExpireItem bool // 是否领取
|
||||
LastChannel string // 最后包类型
|
||||
ICode string // 邀请码
|
||||
IScore int64 // 邀请积分
|
||||
PSnId int32 // 邀请人
|
||||
PCode string // 绑定的邀请码
|
||||
INum int64 // 邀请人数
|
||||
IMoney int64 // 邀请人充值金额
|
||||
IScoreTs time.Time // 邀请积分更新时间
|
||||
}
|
||||
|
||||
// 七日签到数据
|
||||
type NewSignData struct {
|
||||
SignIndex int32 //签到次数
|
||||
SignTickets int64 //签到时间 时间戳
|
||||
AddupIndex []int32 //领取累计奖励
|
||||
TurnplateIdx []int32 //领取转盘下标
|
||||
VideoTicket int64 // 领取视频奖励时间戳
|
||||
SignIndex int32 //签到次数
|
||||
SignTickets int64 //签到时间 时间戳
|
||||
AddupIndex []int32 //领取累计奖励
|
||||
TurnplateIdx []int32 //领取转盘下标
|
||||
VideoTicket int64 // 领取视频奖励时间戳
|
||||
Addup2Data map[int32]map[int32]int64 // 进阶奖励key1 - day key2-次数 value-结束领取时间戳(-1代表已领取)
|
||||
|
||||
}
|
||||
|
||||
|
@ -477,9 +486,16 @@ type TaskData struct {
|
|||
}
|
||||
|
||||
type PigBankData struct {
|
||||
TakeTimes int32
|
||||
BankCoin int64
|
||||
DayBuyTimes int32
|
||||
TakeTimes int32 //一共领取次数
|
||||
BankCoin int64 //当前金币数量
|
||||
DayBuyTimes int32 //当天领取次数
|
||||
}
|
||||
|
||||
// 钻石储存罐数据
|
||||
type DiamondBankData struct {
|
||||
TakeTimes int32 //一共领取次数
|
||||
BankDiamond float64 //当前钻石数量
|
||||
DayBuyTimes int32 //当天领取次数
|
||||
}
|
||||
|
||||
type WelfareData struct {
|
||||
|
@ -495,6 +511,8 @@ type WelfareData struct {
|
|||
Task map[int32]*TaskData // 任务
|
||||
PhoneLotteryTask map[int32]*TaskData // 抽手机任务
|
||||
PigBank *PigBankData // 存钱罐
|
||||
DiamondBank *DiamondBankData // 钻石储存罐
|
||||
|
||||
}
|
||||
|
||||
func NewWelfareData() *WelfareData {
|
||||
|
@ -504,6 +522,7 @@ func NewWelfareData() *WelfareData {
|
|||
Task: make(map[int32]*TaskData),
|
||||
PhoneLotteryTask: make(map[int32]*TaskData),
|
||||
PigBank: &PigBankData{},
|
||||
DiamondBank: &DiamondBankData{},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -655,9 +674,9 @@ func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData {
|
|||
pdfw.VipExp = param.VipExp
|
||||
pdfw.ShopId = common.IntSliceToInt32(param.ShopID)
|
||||
pdfw.Delete = int64(param.Delete)
|
||||
pdfw.InviteCode = param.InviteCode
|
||||
pdfw.InviteSnId = param.InviteSnId
|
||||
pdfw.InviteScore = param.InviteScore
|
||||
pdfw.InviteCode = param.ICode
|
||||
pdfw.InviteSnId = param.PSnId
|
||||
pdfw.InviteScore = param.IScore
|
||||
pdfw.Channel = param.Channel
|
||||
pdfw.LastChannel = param.LastChannel
|
||||
for _, v := range param.Items {
|
||||
|
@ -1061,6 +1080,7 @@ func GetPlayerDataBySnId(plt string, snid int32, correctData, createIfNotExist b
|
|||
ret.Pd.CreateTime = ret.Pd.CreateTime.Local()
|
||||
ret.Pd.LastLoginTime = ret.Pd.LastLoginTime.Local()
|
||||
ret.Pd.LastLogoutTime = ret.Pd.LastLogoutTime.Local()
|
||||
ret.Pd.IScoreTs = ret.Pd.IScoreTs.Local()
|
||||
|
||||
return ret.Pd, ret.IsNew
|
||||
}
|
||||
|
@ -2685,23 +2705,6 @@ func GetPlayerInviteSnid(plt string, snid int32) (int32, error) {
|
|||
return ret, nil
|
||||
}
|
||||
|
||||
func GetInviteNum(plt string, snid int32) (int32, error) {
|
||||
if rpcCli == nil {
|
||||
return 0, errors.New("rpcCli is nil")
|
||||
}
|
||||
args := &PlayerIsExistBySnIdArgs{
|
||||
Plt: plt,
|
||||
SnId: snid,
|
||||
}
|
||||
var ret int32
|
||||
err := rpcCli.CallWithTimeout("PlayerDataSvc.GetInviteNum", args, &ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Error("model.GetPlayerInviteSnid error ", err)
|
||||
return 0, err
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
// 所有游戏都要加上当天统计数据
|
||||
func (this *PlayerData) GetDaliyGameData(id int) (*PlayerGameStatics, *PlayerGameStatics) {
|
||||
gameId := strconv.Itoa(id)
|
||||
|
@ -2938,3 +2941,31 @@ func (this *PlayerData) GetRoleId() int32 {
|
|||
}
|
||||
return common.DefaultRoleId
|
||||
}
|
||||
|
||||
type BindArgs struct {
|
||||
Platform string
|
||||
PSnId, SnId int32
|
||||
PCode string
|
||||
}
|
||||
|
||||
func BindInviteSnId(platform string, snId, pSnId int32, code string) error {
|
||||
if rpcCli == nil {
|
||||
return fmt.Errorf("db may be close")
|
||||
}
|
||||
var args = &BindArgs{
|
||||
Platform: platform,
|
||||
PSnId: pSnId,
|
||||
SnId: snId,
|
||||
PCode: code,
|
||||
}
|
||||
var ret bool
|
||||
err := rpcCli.CallWithTimeout("PlayerDataSvc.BindInviteSnId", args, &ret, time.Second*30)
|
||||
if err != nil {
|
||||
logger.Logger.Warnf("BindInviteSnId error:%v", err)
|
||||
return err
|
||||
}
|
||||
if ret {
|
||||
return nil
|
||||
}
|
||||
return errors.New("bind error")
|
||||
}
|
||||
|
|
|
@ -131,11 +131,11 @@ type PlayerRankInvite struct {
|
|||
|
||||
type FindPlayerRankInviteListArgs struct {
|
||||
Platform string
|
||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
|
||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜 上周榜
|
||||
}
|
||||
|
||||
type FindPlayerRankInviteListReply struct {
|
||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
|
||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜 上周榜
|
||||
List []*PlayerRankInvite
|
||||
}
|
||||
|
||||
|
@ -156,12 +156,12 @@ func FindPlayerRankInviteList(args *FindPlayerRankInviteListArgs) (*FindPlayerRa
|
|||
|
||||
type FindPlayerRankInviteScoreArgs struct {
|
||||
Platform string
|
||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
|
||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜 上周榜
|
||||
SnId int32
|
||||
}
|
||||
|
||||
type FindPlayerRankInviteScoreReply struct {
|
||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
|
||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜 上周榜
|
||||
Data PlayerRankInvite
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ const (
|
|||
BackBankrupt = "log_bankrupt"
|
||||
BackClientLog = "log_clientlog_mysql"
|
||||
BackGameRecord = "evt_gamerec"
|
||||
BackInviteScore = "evt_invitescore"
|
||||
BackLogin = "evt_login"
|
||||
BackOnline = "evt_online"
|
||||
BackPhoneLottery = "evt_phonelottery"
|
||||
|
|
|
@ -31,6 +31,7 @@ const (
|
|||
OpResultCode_OPRC_DbErr OpResultCode = 4 //存储出错
|
||||
OpResultCode_OPRC_BagFull OpResultCode = 5 //背包已满
|
||||
OpResultCode_OPRC_NotPlayer OpResultCode = 6 //找不到玩家
|
||||
OpResultCode_OPRC_NotChange OpResultCode = 7 //不可兑换
|
||||
)
|
||||
|
||||
// Enum value maps for OpResultCode.
|
||||
|
@ -43,6 +44,7 @@ var (
|
|||
4: "OPRC_DbErr",
|
||||
5: "OPRC_BagFull",
|
||||
6: "OPRC_NotPlayer",
|
||||
7: "OPRC_NotChange",
|
||||
}
|
||||
OpResultCode_value = map[string]int32{
|
||||
"OPRC_Sucess": 0,
|
||||
|
@ -52,6 +54,7 @@ var (
|
|||
"OPRC_DbErr": 4,
|
||||
"OPRC_BagFull": 5,
|
||||
"OPRC_NotPlayer": 6,
|
||||
"OPRC_NotChange": 7,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -86,11 +89,12 @@ func (OpResultCode) EnumDescriptor() ([]byte, []int) {
|
|||
type SPacketID int32
|
||||
|
||||
const (
|
||||
SPacketID_PACKET_BAG_ZERO SPacketID = 0 // 弃用消息号
|
||||
SPacketID_PACKET_ALL_BAG_INFO SPacketID = 2530 //请求背包数据
|
||||
SPacketID_PACKET_ALL_BAG_USE SPacketID = 2531 //使用背包道具
|
||||
SPacketID_PACKET_SC_SYNCBAGDATA SPacketID = 2532 //背包数据更新
|
||||
SPacketID_PACKET_ALL_BAG_END SPacketID = 2549 //最大消息号
|
||||
SPacketID_PACKET_BAG_ZERO SPacketID = 0 // 弃用消息号
|
||||
SPacketID_PACKET_ALL_BAG_INFO SPacketID = 2530 //请求背包数据
|
||||
SPacketID_PACKET_ALL_BAG_USE SPacketID = 2531 //使用背包道具
|
||||
SPacketID_PACKET_SC_SYNCBAGDATA SPacketID = 2532 //背包数据更新
|
||||
SPacketID_PACKET_SC_ITEM_EXCHANGE_RES SPacketID = 2533 //背包道具兑换返回
|
||||
SPacketID_PACKET_ALL_BAG_END SPacketID = 2549 //最大消息号
|
||||
//3000~3099
|
||||
SPacketID_PACKET_PropExchange SPacketID = 3000 // 道具兑换
|
||||
SPacketID_PACKET_ExchangeList SPacketID = 3001 // 兑换列表
|
||||
|
@ -103,18 +107,20 @@ var (
|
|||
2530: "PACKET_ALL_BAG_INFO",
|
||||
2531: "PACKET_ALL_BAG_USE",
|
||||
2532: "PACKET_SC_SYNCBAGDATA",
|
||||
2533: "PACKET_SC_ITEM_EXCHANGE_RES",
|
||||
2549: "PACKET_ALL_BAG_END",
|
||||
3000: "PACKET_PropExchange",
|
||||
3001: "PACKET_ExchangeList",
|
||||
}
|
||||
SPacketID_value = map[string]int32{
|
||||
"PACKET_BAG_ZERO": 0,
|
||||
"PACKET_ALL_BAG_INFO": 2530,
|
||||
"PACKET_ALL_BAG_USE": 2531,
|
||||
"PACKET_SC_SYNCBAGDATA": 2532,
|
||||
"PACKET_ALL_BAG_END": 2549,
|
||||
"PACKET_PropExchange": 3000,
|
||||
"PACKET_ExchangeList": 3001,
|
||||
"PACKET_BAG_ZERO": 0,
|
||||
"PACKET_ALL_BAG_INFO": 2530,
|
||||
"PACKET_ALL_BAG_USE": 2531,
|
||||
"PACKET_SC_SYNCBAGDATA": 2532,
|
||||
"PACKET_SC_ITEM_EXCHANGE_RES": 2533,
|
||||
"PACKET_ALL_BAG_END": 2549,
|
||||
"PACKET_PropExchange": 3000,
|
||||
"PACKET_ExchangeList": 3001,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -351,10 +357,11 @@ type CSUpBagInfo struct {
|
|||
|
||||
ItemId int32 `protobuf:"varint,1,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //物品ID
|
||||
ItemNum int32 `protobuf:"varint,2,opt,name=ItemNum,proto3" json:"ItemNum,omitempty"` //物品数量
|
||||
Opt int32 `protobuf:"varint,3,opt,name=Opt,proto3" json:"Opt,omitempty"` //操作 0.使用 1.赠送 2.出售
|
||||
Opt int32 `protobuf:"varint,3,opt,name=Opt,proto3" json:"Opt,omitempty"` //操作 0.使用 1.赠送 2.出售 3.兑换
|
||||
AcceptSnId int32 `protobuf:"varint,4,opt,name=AcceptSnId,proto3" json:"AcceptSnId,omitempty"` //被赠送玩家id
|
||||
NowEffect int32 `protobuf:"varint,5,opt,name=NowEffect,proto3" json:"NowEffect,omitempty"` //0.竖版 1.横版
|
||||
ShowId int64 `protobuf:"varint,6,opt,name=ShowId,proto3" json:"ShowId,omitempty"` // 邮件显示位置 0 所有大厅都显示 1 主大厅显示 2 len大厅显示 4 fish大厅显示
|
||||
CardType int32 `protobuf:"varint,7,opt,name=CardType,proto3" json:"CardType,omitempty"` //类型
|
||||
}
|
||||
|
||||
func (x *CSUpBagInfo) Reset() {
|
||||
|
@ -431,6 +438,13 @@ func (x *CSUpBagInfo) GetShowId() int64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *CSUpBagInfo) GetCardType() int32 {
|
||||
if x != nil {
|
||||
return x.CardType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
//PACKET_ALL_BAG_USE
|
||||
type SCUpBagInfo struct {
|
||||
state protoimpl.MessageState
|
||||
|
@ -521,6 +535,55 @@ func (x *SCUpBagInfo) GetInfos() []*ItemInfo {
|
|||
return nil
|
||||
}
|
||||
|
||||
//背包使用兑换返回结果
|
||||
//PACKET_SC_ITEM_EXCHANGE_RES
|
||||
type SCItemExChangeRes struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RetCode OpResultCode `protobuf:"varint,1,opt,name=RetCode,proto3,enum=bag.OpResultCode" json:"RetCode,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SCItemExChangeRes) Reset() {
|
||||
*x = SCItemExChangeRes{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCItemExChangeRes) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCItemExChangeRes) ProtoMessage() {}
|
||||
|
||||
func (x *SCItemExChangeRes) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[5]
|
||||
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 SCItemExChangeRes.ProtoReflect.Descriptor instead.
|
||||
func (*SCItemExChangeRes) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *SCItemExChangeRes) GetRetCode() OpResultCode {
|
||||
if x != nil {
|
||||
return x.RetCode
|
||||
}
|
||||
return OpResultCode_OPRC_Sucess
|
||||
}
|
||||
|
||||
//PACKET_SC_SYNCBAGDATA
|
||||
type SCSyncBagData struct {
|
||||
state protoimpl.MessageState
|
||||
|
@ -533,7 +596,7 @@ type SCSyncBagData struct {
|
|||
func (x *SCSyncBagData) Reset() {
|
||||
*x = SCSyncBagData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[5]
|
||||
mi := &file_bag_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -546,7 +609,7 @@ func (x *SCSyncBagData) String() string {
|
|||
func (*SCSyncBagData) ProtoMessage() {}
|
||||
|
||||
func (x *SCSyncBagData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[5]
|
||||
mi := &file_bag_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -559,7 +622,7 @@ func (x *SCSyncBagData) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCSyncBagData.ProtoReflect.Descriptor instead.
|
||||
func (*SCSyncBagData) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{5}
|
||||
return file_bag_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *SCSyncBagData) GetInfos() []*ItemInfo {
|
||||
|
@ -581,7 +644,7 @@ type PropInfo struct {
|
|||
func (x *PropInfo) Reset() {
|
||||
*x = PropInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[6]
|
||||
mi := &file_bag_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -594,7 +657,7 @@ func (x *PropInfo) String() string {
|
|||
func (*PropInfo) ProtoMessage() {}
|
||||
|
||||
func (x *PropInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[6]
|
||||
mi := &file_bag_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -607,7 +670,7 @@ func (x *PropInfo) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use PropInfo.ProtoReflect.Descriptor instead.
|
||||
func (*PropInfo) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{6}
|
||||
return file_bag_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *PropInfo) GetItemId() int32 {
|
||||
|
@ -636,7 +699,7 @@ type CSPropExchange struct {
|
|||
func (x *CSPropExchange) Reset() {
|
||||
*x = CSPropExchange{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[7]
|
||||
mi := &file_bag_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -649,7 +712,7 @@ func (x *CSPropExchange) String() string {
|
|||
func (*CSPropExchange) ProtoMessage() {}
|
||||
|
||||
func (x *CSPropExchange) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[7]
|
||||
mi := &file_bag_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -662,7 +725,7 @@ func (x *CSPropExchange) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CSPropExchange.ProtoReflect.Descriptor instead.
|
||||
func (*CSPropExchange) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{7}
|
||||
return file_bag_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *CSPropExchange) GetId() int32 {
|
||||
|
@ -685,7 +748,7 @@ type SCPropExchange struct {
|
|||
func (x *SCPropExchange) Reset() {
|
||||
*x = SCPropExchange{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[8]
|
||||
mi := &file_bag_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -698,7 +761,7 @@ func (x *SCPropExchange) String() string {
|
|||
func (*SCPropExchange) ProtoMessage() {}
|
||||
|
||||
func (x *SCPropExchange) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[8]
|
||||
mi := &file_bag_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -711,7 +774,7 @@ func (x *SCPropExchange) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCPropExchange.ProtoReflect.Descriptor instead.
|
||||
func (*SCPropExchange) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{8}
|
||||
return file_bag_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *SCPropExchange) GetRetCode() OpResultCode {
|
||||
|
@ -748,7 +811,7 @@ type ExchangeInfo struct {
|
|||
func (x *ExchangeInfo) Reset() {
|
||||
*x = ExchangeInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[9]
|
||||
mi := &file_bag_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -761,7 +824,7 @@ func (x *ExchangeInfo) String() string {
|
|||
func (*ExchangeInfo) ProtoMessage() {}
|
||||
|
||||
func (x *ExchangeInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[9]
|
||||
mi := &file_bag_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -774,7 +837,7 @@ func (x *ExchangeInfo) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use ExchangeInfo.ProtoReflect.Descriptor instead.
|
||||
func (*ExchangeInfo) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{9}
|
||||
return file_bag_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *ExchangeInfo) GetId() int32 {
|
||||
|
@ -810,7 +873,7 @@ type CSExchangeList struct {
|
|||
func (x *CSExchangeList) Reset() {
|
||||
*x = CSExchangeList{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[10]
|
||||
mi := &file_bag_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -823,7 +886,7 @@ func (x *CSExchangeList) String() string {
|
|||
func (*CSExchangeList) ProtoMessage() {}
|
||||
|
||||
func (x *CSExchangeList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[10]
|
||||
mi := &file_bag_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -836,7 +899,7 @@ func (x *CSExchangeList) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CSExchangeList.ProtoReflect.Descriptor instead.
|
||||
func (*CSExchangeList) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{10}
|
||||
return file_bag_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *CSExchangeList) GetTp() int32 {
|
||||
|
@ -858,7 +921,7 @@ type SCExchangeList struct {
|
|||
func (x *SCExchangeList) Reset() {
|
||||
*x = SCExchangeList{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_bag_proto_msgTypes[11]
|
||||
mi := &file_bag_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -871,7 +934,7 @@ func (x *SCExchangeList) String() string {
|
|||
func (*SCExchangeList) ProtoMessage() {}
|
||||
|
||||
func (x *SCExchangeList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_bag_proto_msgTypes[11]
|
||||
mi := &file_bag_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -884,7 +947,7 @@ func (x *SCExchangeList) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SCExchangeList.ProtoReflect.Descriptor instead.
|
||||
func (*SCExchangeList) Descriptor() ([]byte, []int) {
|
||||
return file_bag_proto_rawDescGZIP(), []int{11}
|
||||
return file_bag_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *SCExchangeList) GetInfos() []*ExchangeInfo {
|
||||
|
@ -922,7 +985,7 @@ var file_bag_proto_rawDesc = []byte{
|
|||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x42, 0x61, 0x67, 0x4e, 0x75, 0x6d, 0x4d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x09, 0x42, 0x61, 0x67, 0x4e, 0x75, 0x6d, 0x4d, 0x61, 0x78, 0x22, 0xa7, 0x01, 0x0a, 0x0b, 0x43,
|
||||
0x09, 0x42, 0x61, 0x67, 0x4e, 0x75, 0x6d, 0x4d, 0x61, 0x78, 0x22, 0xc3, 0x01, 0x0a, 0x0b, 0x43,
|
||||
0x53, 0x55, 0x70, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20,
|
||||
|
@ -933,76 +996,85 @@ var file_bag_proto_rawDesc = []byte{
|
|||
0x0a, 0x09, 0x4e, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x09, 0x4e, 0x6f, 0x77, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x53, 0x68, 0x6f, 0x77, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x68,
|
||||
0x6f, 0x77, 0x49, 0x64, 0x22, 0xcb, 0x01, 0x0a, 0x0b, 0x53, 0x43, 0x55, 0x70, 0x42, 0x61, 0x67,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x4f, 0x70, 0x52, 0x65,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x6f, 0x77, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4e, 0x6f, 0x77, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x4e, 0x6f, 0x77, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0a, 0x4e, 0x6f, 0x77, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43,
|
||||
0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x23, 0x0a,
|
||||
0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62,
|
||||
0x61, 0x67, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x73, 0x22, 0x34, 0x0a, 0x0d, 0x53, 0x43, 0x53, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x67, 0x44,
|
||||
0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x3c, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x0e, 0x53, 0x43, 0x50,
|
||||
0x72, 0x6f, 0x70, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x52,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x62,
|
||||
0x61, 0x67, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52,
|
||||
0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x50, 0x72,
|
||||
0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2f, 0x0a,
|
||||
0x0b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x0b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x78,
|
||||
0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2b,
|
||||
0x0a, 0x09, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x09, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x47,
|
||||
0x61, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d,
|
||||
0x2e, 0x62, 0x61, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x47,
|
||||
0x61, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x53, 0x45, 0x78,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x22, 0x49, 0x0a, 0x0e, 0x53, 0x43,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61,
|
||||
0x67, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x02, 0x54, 0x70, 0x2a, 0x85, 0x01, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75,
|
||||
0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53,
|
||||
0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x55, 0x73, 0x65, 0x55, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x49, 0x64, 0x45, 0x72, 0x72, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x44, 0x62, 0x45, 0x72, 0x72, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x42, 0x61, 0x67, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x50, 0x52,
|
||||
0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x06, 0x2a, 0xbc, 0x01,
|
||||
0x0a, 0x09, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x13, 0x0a, 0x0f, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00,
|
||||
0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42,
|
||||
0x41, 0x47, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe2, 0x13, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x55, 0x53, 0x45,
|
||||
0x10, 0xe3, 0x13, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x5f, 0x53, 0x59, 0x4e, 0x43, 0x42, 0x41, 0x47, 0x44, 0x41, 0x54, 0x41, 0x10, 0xe4, 0x13, 0x12,
|
||||
0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x41,
|
||||
0x47, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0xf5, 0x13, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x50, 0x72, 0x6f, 0x70, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10,
|
||||
0xb8, 0x17, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x45, 0x78, 0x63,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xb9, 0x17, 0x42, 0x23, 0x5a, 0x21,
|
||||
0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x62, 0x61,
|
||||
0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6f, 0x77, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65,
|
||||
0x22, 0xcb, 0x01, 0x0a, 0x0b, 0x53, 0x43, 0x55, 0x70, 0x42, 0x61, 0x67, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x2b, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x4e, 0x6f, 0x77, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x09, 0x4e, 0x6f, 0x77, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4e,
|
||||
0x6f, 0x77, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0a, 0x4e, 0x6f, 0x77, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x43,
|
||||
0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x07, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x40,
|
||||
0x0a, 0x11, 0x53, 0x43, 0x49, 0x74, 0x65, 0x6d, 0x45, 0x78, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x52, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x22, 0x34, 0x0a, 0x0d, 0x53, 0x43, 0x53, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x67, 0x44, 0x61, 0x74,
|
||||
0x61, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x3c, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74,
|
||||
0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x4e, 0x75, 0x6d, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x45, 0x78,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x0e, 0x53, 0x43, 0x50, 0x72, 0x6f,
|
||||
0x70, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x52, 0x65, 0x74,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x67,
|
||||
0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x52,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x52,
|
||||
0x65, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x0b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x78, 0x0a, 0x0c,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x09,
|
||||
0x43, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x0d, 0x2e, 0x62, 0x61, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09,
|
||||
0x43, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x47, 0x61, 0x69,
|
||||
0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62,
|
||||
0x61, 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x47, 0x61, 0x69,
|
||||
0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x53, 0x45, 0x78, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x54, 0x70, 0x22, 0x49, 0x0a, 0x0e, 0x53, 0x43, 0x45, 0x78,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x67, 0x2e,
|
||||
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x02, 0x54, 0x70, 0x2a, 0x99, 0x01, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63,
|
||||
0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x45, 0x72,
|
||||
0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x55, 0x73,
|
||||
0x65, 0x55, 0x70, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x49, 0x64,
|
||||
0x45, 0x72, 0x72, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x44, 0x62,
|
||||
0x45, 0x72, 0x72, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x42, 0x61,
|
||||
0x67, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x50, 0x52, 0x43, 0x5f,
|
||||
0x4e, 0x6f, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x4f,
|
||||
0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0x07, 0x2a,
|
||||
0xde, 0x01, 0x0a, 0x09, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x5a, 0x45, 0x52, 0x4f,
|
||||
0x10, 0x00, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c, 0x4c,
|
||||
0x5f, 0x42, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe2, 0x13, 0x12, 0x17, 0x0a, 0x12,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x55,
|
||||
0x53, 0x45, 0x10, 0xe3, 0x13, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x43, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x42, 0x41, 0x47, 0x44, 0x41, 0x54, 0x41, 0x10, 0xe4,
|
||||
0x13, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x49,
|
||||
0x54, 0x45, 0x4d, 0x5f, 0x45, 0x58, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x53,
|
||||
0x10, 0xe5, 0x13, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x41, 0x4c,
|
||||
0x4c, 0x5f, 0x42, 0x41, 0x47, 0x5f, 0x45, 0x4e, 0x44, 0x10, 0xf5, 0x13, 0x12, 0x18, 0x0a, 0x13,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x50, 0x72, 0x6f, 0x70, 0x45, 0x78, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x10, 0xb8, 0x17, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xb9, 0x17,
|
||||
0x42, 0x23, 0x5a, 0x21, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
|
||||
0x6c, 0x2f, 0x62, 0x61, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -1018,40 +1090,42 @@ func file_bag_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_bag_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_bag_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_bag_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_bag_proto_goTypes = []interface{}{
|
||||
(OpResultCode)(0), // 0: bag.OpResultCode
|
||||
(SPacketID)(0), // 1: bag.SPacketID
|
||||
(*ItemInfo)(nil), // 2: bag.ItemInfo
|
||||
(*CSBagInfo)(nil), // 3: bag.CSBagInfo
|
||||
(*SCBagInfo)(nil), // 4: bag.SCBagInfo
|
||||
(*CSUpBagInfo)(nil), // 5: bag.CSUpBagInfo
|
||||
(*SCUpBagInfo)(nil), // 6: bag.SCUpBagInfo
|
||||
(*SCSyncBagData)(nil), // 7: bag.SCSyncBagData
|
||||
(*PropInfo)(nil), // 8: bag.PropInfo
|
||||
(*CSPropExchange)(nil), // 9: bag.CSPropExchange
|
||||
(*SCPropExchange)(nil), // 10: bag.SCPropExchange
|
||||
(*ExchangeInfo)(nil), // 11: bag.ExchangeInfo
|
||||
(*CSExchangeList)(nil), // 12: bag.CSExchangeList
|
||||
(*SCExchangeList)(nil), // 13: bag.SCExchangeList
|
||||
(OpResultCode)(0), // 0: bag.OpResultCode
|
||||
(SPacketID)(0), // 1: bag.SPacketID
|
||||
(*ItemInfo)(nil), // 2: bag.ItemInfo
|
||||
(*CSBagInfo)(nil), // 3: bag.CSBagInfo
|
||||
(*SCBagInfo)(nil), // 4: bag.SCBagInfo
|
||||
(*CSUpBagInfo)(nil), // 5: bag.CSUpBagInfo
|
||||
(*SCUpBagInfo)(nil), // 6: bag.SCUpBagInfo
|
||||
(*SCItemExChangeRes)(nil), // 7: bag.SCItemExChangeRes
|
||||
(*SCSyncBagData)(nil), // 8: bag.SCSyncBagData
|
||||
(*PropInfo)(nil), // 9: bag.PropInfo
|
||||
(*CSPropExchange)(nil), // 10: bag.CSPropExchange
|
||||
(*SCPropExchange)(nil), // 11: bag.SCPropExchange
|
||||
(*ExchangeInfo)(nil), // 12: bag.ExchangeInfo
|
||||
(*CSExchangeList)(nil), // 13: bag.CSExchangeList
|
||||
(*SCExchangeList)(nil), // 14: bag.SCExchangeList
|
||||
}
|
||||
var file_bag_proto_depIdxs = []int32{
|
||||
0, // 0: bag.SCBagInfo.RetCode:type_name -> bag.OpResultCode
|
||||
2, // 1: bag.SCBagInfo.Infos:type_name -> bag.ItemInfo
|
||||
0, // 2: bag.SCUpBagInfo.RetCode:type_name -> bag.OpResultCode
|
||||
2, // 3: bag.SCUpBagInfo.Infos:type_name -> bag.ItemInfo
|
||||
2, // 4: bag.SCSyncBagData.Infos:type_name -> bag.ItemInfo
|
||||
0, // 5: bag.SCPropExchange.RetCode:type_name -> bag.OpResultCode
|
||||
8, // 6: bag.SCPropExchange.Items:type_name -> bag.PropInfo
|
||||
8, // 7: bag.SCPropExchange.RemainItems:type_name -> bag.PropInfo
|
||||
8, // 8: bag.ExchangeInfo.CostItems:type_name -> bag.PropInfo
|
||||
8, // 9: bag.ExchangeInfo.GainItems:type_name -> bag.PropInfo
|
||||
11, // 10: bag.SCExchangeList.Infos:type_name -> bag.ExchangeInfo
|
||||
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
|
||||
0, // 4: bag.SCItemExChangeRes.RetCode:type_name -> bag.OpResultCode
|
||||
2, // 5: bag.SCSyncBagData.Infos:type_name -> bag.ItemInfo
|
||||
0, // 6: bag.SCPropExchange.RetCode:type_name -> bag.OpResultCode
|
||||
9, // 7: bag.SCPropExchange.Items:type_name -> bag.PropInfo
|
||||
9, // 8: bag.SCPropExchange.RemainItems:type_name -> bag.PropInfo
|
||||
9, // 9: bag.ExchangeInfo.CostItems:type_name -> bag.PropInfo
|
||||
9, // 10: bag.ExchangeInfo.GainItems:type_name -> bag.PropInfo
|
||||
12, // 11: bag.SCExchangeList.Infos:type_name -> bag.ExchangeInfo
|
||||
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_bag_proto_init() }
|
||||
|
@ -1121,7 +1195,7 @@ func file_bag_proto_init() {
|
|||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCSyncBagData); i {
|
||||
switch v := v.(*SCItemExChangeRes); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1133,7 +1207,7 @@ func file_bag_proto_init() {
|
|||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PropInfo); i {
|
||||
switch v := v.(*SCSyncBagData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1145,7 +1219,7 @@ func file_bag_proto_init() {
|
|||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSPropExchange); i {
|
||||
switch v := v.(*PropInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1157,7 +1231,7 @@ func file_bag_proto_init() {
|
|||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCPropExchange); i {
|
||||
switch v := v.(*CSPropExchange); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1169,7 +1243,7 @@ func file_bag_proto_init() {
|
|||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExchangeInfo); i {
|
||||
switch v := v.(*SCPropExchange); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1181,7 +1255,7 @@ func file_bag_proto_init() {
|
|||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSExchangeList); i {
|
||||
switch v := v.(*ExchangeInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -1193,6 +1267,18 @@ func file_bag_proto_init() {
|
|||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CSExchangeList); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_bag_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCExchangeList); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1211,7 +1297,7 @@ func file_bag_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_bag_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 12,
|
||||
NumMessages: 13,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -10,6 +10,7 @@ enum OpResultCode {
|
|||
OPRC_DbErr = 4; //存储出错
|
||||
OPRC_BagFull = 5; //背包已满
|
||||
OPRC_NotPlayer = 6; //找不到玩家
|
||||
OPRC_NotChange = 7; //不可兑换
|
||||
}
|
||||
// 商城
|
||||
enum SPacketID {
|
||||
|
@ -17,6 +18,7 @@ enum SPacketID {
|
|||
PACKET_ALL_BAG_INFO = 2530; //请求背包数据
|
||||
PACKET_ALL_BAG_USE = 2531; //使用背包道具
|
||||
PACKET_SC_SYNCBAGDATA = 2532;//背包数据更新
|
||||
PACKET_SC_ITEM_EXCHANGE_RES = 2533;//背包道具兑换返回
|
||||
PACKET_ALL_BAG_END = 2549; //最大消息号
|
||||
//3000~3099
|
||||
PACKET_PropExchange = 3000; // 道具兑换
|
||||
|
@ -59,10 +61,11 @@ message SCBagInfo {
|
|||
message CSUpBagInfo {
|
||||
int32 ItemId = 1;//物品ID
|
||||
int32 ItemNum = 2;//物品数量
|
||||
int32 Opt = 3;//操作 0.使用 1.赠送 2.出售
|
||||
int32 Opt = 3;//操作 0.使用 1.赠送 2.出售 3.兑换
|
||||
int32 AcceptSnId = 4;//被赠送玩家id
|
||||
int32 NowEffect = 5;//0.竖版 1.横版
|
||||
int64 ShowId = 6;// 邮件显示位置 0 所有大厅都显示 1 主大厅显示 2 len大厅显示 4 fish大厅显示
|
||||
int32 CardType = 7;//类型
|
||||
}
|
||||
//PACKET_ALL_BAG_USE
|
||||
message SCUpBagInfo {
|
||||
|
@ -75,6 +78,13 @@ message SCUpBagInfo {
|
|||
//使用道具获得的
|
||||
repeated ItemInfo Infos = 6;// 物品信息
|
||||
}
|
||||
//背包使用兑换返回结果
|
||||
//PACKET_SC_ITEM_EXCHANGE_RES
|
||||
message SCItemExChangeRes{
|
||||
OpResultCode RetCode = 1;
|
||||
}
|
||||
|
||||
|
||||
//PACKET_SC_SYNCBAGDATA
|
||||
message SCSyncBagData{
|
||||
repeated ItemInfo Infos = 1;// 物品信息
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -207,6 +207,8 @@ enum PlayerPacketID {
|
|||
PACKET_SCPigBankCoin = 2824;//存钱罐金币数量
|
||||
PACKET_CSExchangeChannel = 2825; // 开启兑换的渠道
|
||||
PACKET_SCExchangeChannel = 2826; // 开启兑换的渠道
|
||||
PACKET_CSSMSConfig = 2827; //获取运营商配置
|
||||
PACKET_SCSMSConfig = 2828; //返回运营商配置
|
||||
}
|
||||
|
||||
// 账变记录
|
||||
|
@ -1189,10 +1191,23 @@ message CSExchangeChannel{
|
|||
|
||||
message ChannelSwitch {
|
||||
repeated string OnChannelName = 1; // 开启渠道
|
||||
int32 Tp = 2; // 开关类型 1:兑换 2:v卡掉落
|
||||
int32 Tp = 2; // 开关类型 1:兑换 2:v卡掉落 3:邀请活动开关
|
||||
}
|
||||
|
||||
// PACKET_SCExchangeChannel
|
||||
message SCExchangeChannel{
|
||||
repeated ChannelSwitch Datas = 1;
|
||||
}
|
||||
|
||||
//请求运营商配置
|
||||
//PACKET_CSSMSConfig
|
||||
message CSSMSConfig{
|
||||
}
|
||||
//PACKET_SCSMSConfig
|
||||
message SCSMSConfig{
|
||||
repeated SMSInfo Info = 1;
|
||||
}
|
||||
message SMSInfo{
|
||||
int32 Id = 1;
|
||||
string SmsName = 2;
|
||||
}
|
|
@ -108,11 +108,12 @@ func (Rank) EnumDescriptor() ([]byte, []int) {
|
|||
type RankInvite int32
|
||||
|
||||
const (
|
||||
RankInvite_InviteType_None RankInvite = 0
|
||||
RankInvite_InviteType_Total RankInvite = 1 //总榜
|
||||
RankInvite_InviteType_Week RankInvite = 2 //周榜
|
||||
RankInvite_InviteType_Month RankInvite = 3 //月榜
|
||||
RankInvite_InviteType_Max RankInvite = 4
|
||||
RankInvite_InviteType_None RankInvite = 0
|
||||
RankInvite_InviteType_Total RankInvite = 1 //总榜
|
||||
RankInvite_InviteType_Week RankInvite = 2 //周榜
|
||||
RankInvite_InviteType_Month RankInvite = 3 //月榜
|
||||
RankInvite_InviteType_UpWeek RankInvite = 4 //上周榜
|
||||
RankInvite_InviteType_Max RankInvite = 5
|
||||
)
|
||||
|
||||
// Enum value maps for RankInvite.
|
||||
|
@ -122,14 +123,16 @@ var (
|
|||
1: "InviteType_Total",
|
||||
2: "InviteType_Week",
|
||||
3: "InviteType_Month",
|
||||
4: "InviteType_Max",
|
||||
4: "InviteType_UpWeek",
|
||||
5: "InviteType_Max",
|
||||
}
|
||||
RankInvite_value = map[string]int32{
|
||||
"InviteType_None": 0,
|
||||
"InviteType_Total": 1,
|
||||
"InviteType_Week": 2,
|
||||
"InviteType_Month": 3,
|
||||
"InviteType_Max": 4,
|
||||
"InviteType_None": 0,
|
||||
"InviteType_Total": 1,
|
||||
"InviteType_Week": 2,
|
||||
"InviteType_Month": 3,
|
||||
"InviteType_UpWeek": 4,
|
||||
"InviteType_Max": 5,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -1730,17 +1733,18 @@ var file_rank_proto_rawDesc = []byte{
|
|||
0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x43, 0x53, 0x4c,
|
||||
0x65, 0x76, 0x65, 0x6c, 0x10, 0x9a, 0x4e, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x52, 0x41, 0x4e, 0x4b, 0x5f, 0x53, 0x43, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x10, 0x9b,
|
||||
0x4e, 0x2a, 0x76, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12,
|
||||
0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e, 0x6f,
|
||||
0x6e, 0x65, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79,
|
||||
0x70, 0x65, 0x5f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e,
|
||||
0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x02, 0x12,
|
||||
0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x6f,
|
||||
0x6e, 0x74, 0x68, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x78, 0x10, 0x04, 0x42, 0x24, 0x5a, 0x22, 0x6d, 0x6f, 0x6e,
|
||||
0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d,
|
||||
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x72, 0x61, 0x6e, 0x6b, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x4e, 0x2a, 0x8d, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
|
||||
0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4e,
|
||||
0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x5f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49,
|
||||
0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x02,
|
||||
0x12, 0x14, 0x0a, 0x10, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d,
|
||||
0x6f, 0x6e, 0x74, 0x68, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x70, 0x57, 0x65, 0x65, 0x6b, 0x10, 0x04, 0x12, 0x12, 0x0a,
|
||||
0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4d, 0x61, 0x78, 0x10,
|
||||
0x05, 0x42, 0x24, 0x5a, 0x22, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||
0x6f, 0x6c, 0x2f, 0x72, 0x61, 0x6e, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -110,7 +110,8 @@ enum RankInvite{
|
|||
InviteType_Total = 1;//总榜
|
||||
InviteType_Week = 2; //周榜
|
||||
InviteType_Month = 3;//月榜
|
||||
InviteType_Max = 4;
|
||||
InviteType_UpWeek = 4;//上周榜
|
||||
InviteType_Max = 5;
|
||||
}
|
||||
|
||||
message GateTransmit {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1237,6 +1237,30 @@ message DB_NewPlayerArray {
|
|||
repeated DB_NewPlayer Arr = 1;
|
||||
}
|
||||
|
||||
message DB_PetSkill {
|
||||
|
||||
int32 Id = 1;
|
||||
|
||||
int32 SkillId = 2;
|
||||
|
||||
int32 PetId = 3;
|
||||
|
||||
int32 SkillLevel = 4;
|
||||
|
||||
string SkillName = 5;
|
||||
|
||||
string SkillDes = 6;
|
||||
|
||||
string SKillValue = 7;
|
||||
|
||||
map<int64, int64> ItemConsum = 8;
|
||||
|
||||
}
|
||||
|
||||
message DB_PetSkillArray {
|
||||
repeated DB_PetSkill Arr = 1;
|
||||
}
|
||||
|
||||
message DB_PhoneLottery {
|
||||
|
||||
int32 Id = 1;
|
||||
|
@ -1279,6 +1303,18 @@ message DB_PigBank_Diamond {
|
|||
|
||||
int32 CostDiamond = 4;
|
||||
|
||||
int32 MaxGold = 5;
|
||||
|
||||
int32 MaxDiamond = 6;
|
||||
|
||||
int32 DiamondId = 7;
|
||||
|
||||
int32 CoinPrice = 8;
|
||||
|
||||
int32 DiamondPrice = 9;
|
||||
|
||||
int32 DiamondNowPrice = 10;
|
||||
|
||||
}
|
||||
|
||||
message DB_PigBank_DiamondArray {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -496,11 +496,20 @@ message AddUpWelfareDate {
|
|||
int32 AddUpDay = 1; // 累计几天
|
||||
repeated WelfareDate AddUpDate = 2; // 累计奖励
|
||||
}
|
||||
message AddUpDate2TypeData {
|
||||
int32 Day = 1;
|
||||
int32 Id = 2;
|
||||
int32 Num = 3;
|
||||
}
|
||||
|
||||
|
||||
message Welfare7SignDate {
|
||||
int32 Day = 1; // 第几天
|
||||
repeated WelfareDate Date = 2; // 奖励
|
||||
repeated AddUpWelfareDate AddUpDate = 3; // 累计奖励
|
||||
repeated AddUpWelfareDate AddUpDate2 = 4; //进阶奖励
|
||||
repeated AddUpWelfareDate AddUpDate2Google = 5; //谷歌渠道进阶奖励
|
||||
repeated AddUpDate2TypeData AddUpDate2Type = 6; //进阶奖励领取条件
|
||||
}
|
||||
|
||||
|
||||
|
@ -655,7 +664,25 @@ message WelfareCollectConfig{
|
|||
|
||||
// etcd /game/channel/switch
|
||||
message ChannelSwitchConfig{
|
||||
int32 Tp = 1; // 开关类型 1.兑换 2.道具掉落
|
||||
int32 Tp = 1; // 开关类型 1.兑换 2.道具掉落 3.邀请活动开关
|
||||
string Platform = 2; // 平台id
|
||||
repeated string OnChannelName = 3; // 开启渠道
|
||||
}
|
||||
|
||||
message RankAward{
|
||||
int64 Start = 1; // 开始积分
|
||||
int64 End = 2; // 结束积分
|
||||
int64 Num = 3; // 奖励
|
||||
}
|
||||
|
||||
// etcd /game/act_invite
|
||||
message ActInviteConfig {
|
||||
string Platform = 1;
|
||||
int64 BindScore = 2; // 绑定积分
|
||||
int64 RechargeScore = 3; // 充值积分,一个玩家最多给上级贡献一次
|
||||
map<int64,int64> PayScore = 4; // 充值积分;充值金额:获得积分
|
||||
repeated int64 Rates = 5; // 返佣比例;多级按顺序给
|
||||
repeated RankAward Awards1 = 6; // 周榜奖励列表
|
||||
repeated RankAward Awards2 = 7; // 周榜奖励列表
|
||||
repeated RankAward Awards3 = 8; // 周榜奖励列表
|
||||
}
|
|
@ -7895,6 +7895,7 @@ type ASGetMatchAwardCode struct {
|
|||
Money int64 `protobuf:"varint,4,opt,name=Money,proto3" json:"Money,omitempty"` // 金额
|
||||
Tel string `protobuf:"bytes,5,opt,name=Tel,proto3" json:"Tel,omitempty"` // 手机号
|
||||
CardType int32 `protobuf:"varint,6,opt,name=CardType,proto3" json:"CardType,omitempty"` // 手机卡类型
|
||||
Remark string `protobuf:"bytes,7,opt,name=remark,proto3" json:"remark,omitempty"` //备注信息
|
||||
}
|
||||
|
||||
func (x *ASGetMatchAwardCode) Reset() {
|
||||
|
@ -7971,6 +7972,13 @@ func (x *ASGetMatchAwardCode) GetCardType() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *ASGetMatchAwardCode) GetRemark() string {
|
||||
if x != nil {
|
||||
return x.Remark
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SAGetMatchAwardCode struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -8645,6 +8653,196 @@ func (x *SAAddItemById) GetMsg() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
//获取运营商配置[/get_SMSConfig]
|
||||
type ASSMSConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台id
|
||||
SnId int32 `protobuf:"varint,2,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家id
|
||||
}
|
||||
|
||||
func (x *ASSMSConfig) Reset() {
|
||||
*x = ASSMSConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[127]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ASSMSConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ASSMSConfig) ProtoMessage() {}
|
||||
|
||||
func (x *ASSMSConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[127]
|
||||
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 ASSMSConfig.ProtoReflect.Descriptor instead.
|
||||
func (*ASSMSConfig) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{127}
|
||||
}
|
||||
|
||||
func (x *ASSMSConfig) GetPlatform() string {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ASSMSConfig) GetSnId() int32 {
|
||||
if x != nil {
|
||||
return x.SnId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SASMSConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台id
|
||||
SnId int32 `protobuf:"varint,2,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家id
|
||||
Info []*SMSInfo `protobuf:"bytes,3,rep,name=Info,proto3" json:"Info,omitempty"`
|
||||
Tag TagCode `protobuf:"varint,4,opt,name=Tag,proto3,enum=webapi.TagCode" json:"Tag,omitempty"` //错误码
|
||||
Msg string `protobuf:"bytes,5,opt,name=Msg,proto3" json:"Msg,omitempty"` //错误信息(选填)
|
||||
}
|
||||
|
||||
func (x *SASMSConfig) Reset() {
|
||||
*x = SASMSConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[128]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SASMSConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SASMSConfig) ProtoMessage() {}
|
||||
|
||||
func (x *SASMSConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[128]
|
||||
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 SASMSConfig.ProtoReflect.Descriptor instead.
|
||||
func (*SASMSConfig) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{128}
|
||||
}
|
||||
|
||||
func (x *SASMSConfig) GetPlatform() string {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SASMSConfig) GetSnId() int32 {
|
||||
if x != nil {
|
||||
return x.SnId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SASMSConfig) GetInfo() []*SMSInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SASMSConfig) GetTag() TagCode {
|
||||
if x != nil {
|
||||
return x.Tag
|
||||
}
|
||||
return TagCode_UNKNOWN
|
||||
}
|
||||
|
||||
func (x *SASMSConfig) GetMsg() string {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SMSInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
|
||||
SmsName string `protobuf:"bytes,2,opt,name=SmsName,proto3" json:"SmsName,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SMSInfo) Reset() {
|
||||
*x = SMSInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[129]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SMSInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SMSInfo) ProtoMessage() {}
|
||||
|
||||
func (x *SMSInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[129]
|
||||
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 SMSInfo.ProtoReflect.Descriptor instead.
|
||||
func (*SMSInfo) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{129}
|
||||
}
|
||||
|
||||
func (x *SMSInfo) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SMSInfo) GetSmsName() string {
|
||||
if x != nil {
|
||||
return x.SmsName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_webapi_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_webapi_proto_rawDesc = []byte{
|
||||
|
@ -9509,7 +9707,7 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67,
|
||||
0x22, 0xa1, 0x01, 0x0a, 0x13, 0x41, 0x53, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41,
|
||||
0x22, 0xb9, 0x01, 0x0a, 0x13, 0x41, 0x53, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41,
|
||||
0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
|
@ -9519,83 +9717,101 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x54, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x61, 0x72, 0x64,
|
||||
0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x61, 0x72, 0x64,
|
||||
0x54, 0x79, 0x70, 0x65, 0x22, 0x74, 0x0a, 0x13, 0x53, 0x41, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x54,
|
||||
0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x4f, 0x0a, 0x0b, 0x41, 0x53,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x54, 0x65, 0x6c, 0x22, 0x42, 0x0a, 0x0b, 0x53,
|
||||
0x41, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61,
|
||||
0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22,
|
||||
0x22, 0x0a, 0x0e, 0x41, 0x53, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x54, 0x65, 0x6c, 0x22, 0x77, 0x0a, 0x0e, 0x53, 0x41, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x67, 0x56,
|
||||
0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67,
|
||||
0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, 0x6d, 0x61,
|
||||
0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x40, 0x0a, 0x0e,
|
||||
0x41, 0x53, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e,
|
||||
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x22, 0x45,
|
||||
0x0a, 0x0e, 0x53, 0x41, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e,
|
||||
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03,
|
||||
0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x44, 0x0a, 0x12, 0x41, 0x53, 0x50, 0x6c, 0x61, 0x79, 0x65,
|
||||
0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x12, 0x53,
|
||||
0x41, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x6e,
|
||||
0x6b, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f,
|
||||
0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52,
|
||||
0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x9d, 0x01, 0x0a, 0x0d, 0x41,
|
||||
0x53, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2c, 0x0a, 0x08,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
|
||||
0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79,
|
||||
0x70, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65,
|
||||
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0x44, 0x0a, 0x0d, 0x53, 0x41,
|
||||
0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x79, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x03, 0x54,
|
||||
0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67,
|
||||
0x2a, 0xce, 0x01, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43,
|
||||
0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44,
|
||||
0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52,
|
||||
0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x44, 0x41, 0x54, 0x41,
|
||||
0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f,
|
||||
0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e,
|
||||
0x4a, 0x59, 0x42, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x06,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x79, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x58, 0x49, 0x53,
|
||||
0x54, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0x08, 0x12, 0x0c,
|
||||
0x0a, 0x08, 0x54, 0x65, 0x6c, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f,
|
||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10,
|
||||
0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x65, 0x6c, 0x4e, 0x6f, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x10,
|
||||
0x0b, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||
0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0x74, 0x0a, 0x13,
|
||||
0x53, 0x41, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f,
|
||||
0x6e, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4d, 0x6f, 0x6e, 0x65, 0x79,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d,
|
||||
0x73, 0x67, 0x22, 0x4f, 0x0a, 0x0b, 0x41, 0x53, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65,
|
||||
0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69,
|
||||
0x64, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x54, 0x65, 0x6c, 0x22, 0x42, 0x0a, 0x0b, 0x53, 0x41, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
|
||||
0x65, 0x6c, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x22, 0x0a, 0x0e, 0x41, 0x53, 0x47, 0x65, 0x74,
|
||||
0x49, 0x6d, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x54, 0x65, 0x6c, 0x22, 0x77, 0x0a, 0x0e, 0x53,
|
||||
0x41, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x67, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x21, 0x0a,
|
||||
0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x4d, 0x73, 0x67, 0x22, 0x40, 0x0a, 0x0e, 0x41, 0x53, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x22, 0x45, 0x0a, 0x0e, 0x53, 0x41, 0x50, 0x6c, 0x61, 0x79,
|
||||
0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54,
|
||||
0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d,
|
||||
0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x44, 0x0a,
|
||||
0x12, 0x41, 0x53, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c,
|
||||
0x69, 0x6e, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53,
|
||||
0x6e, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x12, 0x53, 0x41, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49,
|
||||
0x6e, 0x76, 0x69, 0x74, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x69,
|
||||
0x6e, 0x6b, 0x22, 0x9d, 0x01, 0x0a, 0x0d, 0x41, 0x53, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x42, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2c, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65,
|
||||
0x6d, 0x61, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x6d, 0x61,
|
||||
0x72, 0x6b, 0x22, 0x44, 0x0a, 0x0d, 0x53, 0x41, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x42,
|
||||
0x79, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73, 0x67, 0x22, 0x3d, 0x0a, 0x0b, 0x41, 0x53, 0x53, 0x4d,
|
||||
0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0b, 0x53, 0x41, 0x53, 0x4d,
|
||||
0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x53,
|
||||
0x4d, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x03,
|
||||
0x54, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x22, 0x33, 0x0a, 0x07, 0x53, 0x4d, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x53, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53,
|
||||
0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0xce, 0x01, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x43, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x49, 0x47, 0x4e,
|
||||
0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x4f, 0x54,
|
||||
0x4f, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x12,
|
||||
0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52,
|
||||
0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45,
|
||||
0x58, 0x49, 0x53, 0x54, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x79, 0x5f, 0x4e,
|
||||
0x6f, 0x74, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x69, 0x6d,
|
||||
0x69, 0x74, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x65, 0x6c, 0x45, 0x78, 0x69, 0x73, 0x74,
|
||||
0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x74,
|
||||
0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x65, 0x6c, 0x4e, 0x6f,
|
||||
0x74, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x0b, 0x42, 0x26, 0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f,
|
||||
0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -9611,7 +9827,7 @@ func file_webapi_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_webapi_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_webapi_proto_msgTypes = make([]protoimpl.MessageInfo, 127)
|
||||
var file_webapi_proto_msgTypes = make([]protoimpl.MessageInfo, 130)
|
||||
var file_webapi_proto_goTypes = []interface{}{
|
||||
(TagCode)(0), // 0: webapi.TagCode
|
||||
(*SAPlatformInfo)(nil), // 1: webapi.SAPlatformInfo
|
||||
|
@ -9741,92 +9957,95 @@ var file_webapi_proto_goTypes = []interface{}{
|
|||
(*SAPlayerInviteLink)(nil), // 125: webapi.SAPlayerInviteLink
|
||||
(*ASAddItemById)(nil), // 126: webapi.ASAddItemById
|
||||
(*SAAddItemById)(nil), // 127: webapi.SAAddItemById
|
||||
(*Platform)(nil), // 128: webapi.Platform
|
||||
(*PlatformGameConfig)(nil), // 129: webapi.PlatformGameConfig
|
||||
(*GameConfigGroup)(nil), // 130: webapi.GameConfigGroup
|
||||
(*GameConfigGlobal)(nil), // 131: webapi.GameConfigGlobal
|
||||
(*PlatformDbConfig)(nil), // 132: webapi.PlatformDbConfig
|
||||
(*CoinPoolSetting)(nil), // 133: webapi.CoinPoolSetting
|
||||
(*RoomInfo)(nil), // 134: webapi.RoomInfo
|
||||
(*PlayerSingleAdjust)(nil), // 135: webapi.PlayerSingleAdjust
|
||||
(*PlayerData)(nil), // 136: webapi.PlayerData
|
||||
(*HorseRaceLamp)(nil), // 137: webapi.HorseRaceLamp
|
||||
(*MessageInfo)(nil), // 138: webapi.MessageInfo
|
||||
(*ServerInfo)(nil), // 139: webapi.ServerInfo
|
||||
(*OnlineReport)(nil), // 140: webapi.OnlineReport
|
||||
(*ItemInfo)(nil), // 141: webapi.ItemInfo
|
||||
(*ExchangeShop)(nil), // 142: webapi.ExchangeShop
|
||||
(*ASSMSConfig)(nil), // 128: webapi.ASSMSConfig
|
||||
(*SASMSConfig)(nil), // 129: webapi.SASMSConfig
|
||||
(*SMSInfo)(nil), // 130: webapi.SMSInfo
|
||||
(*Platform)(nil), // 131: webapi.Platform
|
||||
(*PlatformGameConfig)(nil), // 132: webapi.PlatformGameConfig
|
||||
(*GameConfigGroup)(nil), // 133: webapi.GameConfigGroup
|
||||
(*GameConfigGlobal)(nil), // 134: webapi.GameConfigGlobal
|
||||
(*PlatformDbConfig)(nil), // 135: webapi.PlatformDbConfig
|
||||
(*CoinPoolSetting)(nil), // 136: webapi.CoinPoolSetting
|
||||
(*RoomInfo)(nil), // 137: webapi.RoomInfo
|
||||
(*PlayerSingleAdjust)(nil), // 138: webapi.PlayerSingleAdjust
|
||||
(*PlayerData)(nil), // 139: webapi.PlayerData
|
||||
(*HorseRaceLamp)(nil), // 140: webapi.HorseRaceLamp
|
||||
(*MessageInfo)(nil), // 141: webapi.MessageInfo
|
||||
(*ServerInfo)(nil), // 142: webapi.ServerInfo
|
||||
(*OnlineReport)(nil), // 143: webapi.OnlineReport
|
||||
(*ItemInfo)(nil), // 144: webapi.ItemInfo
|
||||
(*ExchangeShop)(nil), // 145: webapi.ExchangeShop
|
||||
}
|
||||
var file_webapi_proto_depIdxs = []int32{
|
||||
0, // 0: webapi.ASPlatformInfo.Tag:type_name -> webapi.TagCode
|
||||
128, // 1: webapi.ASPlatformInfo.Platforms:type_name -> webapi.Platform
|
||||
131, // 1: webapi.ASPlatformInfo.Platforms:type_name -> webapi.Platform
|
||||
0, // 2: webapi.ASGameConfig.Tag:type_name -> webapi.TagCode
|
||||
129, // 3: webapi.ASGameConfig.Configs:type_name -> webapi.PlatformGameConfig
|
||||
132, // 3: webapi.ASGameConfig.Configs:type_name -> webapi.PlatformGameConfig
|
||||
0, // 4: webapi.ASGameConfigGroup.Tag:type_name -> webapi.TagCode
|
||||
130, // 5: webapi.ASGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
133, // 5: webapi.ASGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
0, // 6: webapi.ASGameConfigGlobal.Tag:type_name -> webapi.TagCode
|
||||
131, // 7: webapi.ASGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
134, // 7: webapi.ASGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
0, // 8: webapi.ASDbConfig.Tag:type_name -> webapi.TagCode
|
||||
132, // 9: webapi.ASDbConfig.DbConfigs:type_name -> webapi.PlatformDbConfig
|
||||
128, // 10: webapi.ASUpdatePlatform.Platforms:type_name -> webapi.Platform
|
||||
135, // 9: webapi.ASDbConfig.DbConfigs:type_name -> webapi.PlatformDbConfig
|
||||
131, // 10: webapi.ASUpdatePlatform.Platforms:type_name -> webapi.Platform
|
||||
0, // 11: webapi.SAUpdatePlatform.Tag:type_name -> webapi.TagCode
|
||||
131, // 12: webapi.ASUpdateGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
134, // 12: webapi.ASUpdateGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
0, // 13: webapi.SAUpdateGameConfigGlobal.Tag:type_name -> webapi.TagCode
|
||||
129, // 14: webapi.ASUpdateGameConfig.Config:type_name -> webapi.PlatformGameConfig
|
||||
132, // 14: webapi.ASUpdateGameConfig.Config:type_name -> webapi.PlatformGameConfig
|
||||
0, // 15: webapi.SAUpdateGameConfig.Tag:type_name -> webapi.TagCode
|
||||
130, // 16: webapi.ASUpdateGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
133, // 16: webapi.ASUpdateGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
0, // 17: webapi.SAUpdateGameConfigGroup.Tag:type_name -> webapi.TagCode
|
||||
0, // 18: webapi.SAAddCoinById.Tag:type_name -> webapi.TagCode
|
||||
0, // 19: webapi.SAResetGamePool.Tag:type_name -> webapi.TagCode
|
||||
133, // 20: webapi.ASUpdateGamePool.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
136, // 20: webapi.ASUpdateGamePool.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
0, // 21: webapi.SAUpdateGamePool.Tag:type_name -> webapi.TagCode
|
||||
0, // 22: webapi.SAQueryGamePoolByGameId.Tag:type_name -> webapi.TagCode
|
||||
133, // 23: webapi.SAQueryGamePoolByGameId.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
133, // 24: webapi.CoinPoolStatesInfo.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
136, // 23: webapi.SAQueryGamePoolByGameId.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
136, // 24: webapi.CoinPoolStatesInfo.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
0, // 25: webapi.SAQueryAllGamePool.Tag:type_name -> webapi.TagCode
|
||||
26, // 26: webapi.SAQueryAllGamePool.CoinPoolStatesInfo:type_name -> webapi.CoinPoolStatesInfo
|
||||
0, // 27: webapi.SAListRoom.Tag:type_name -> webapi.TagCode
|
||||
134, // 28: webapi.SAListRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
137, // 28: webapi.SAListRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
0, // 29: webapi.SAGetRoom.Tag:type_name -> webapi.TagCode
|
||||
134, // 30: webapi.SAGetRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
137, // 30: webapi.SAGetRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
0, // 31: webapi.SADestroyRoom.Tag:type_name -> webapi.TagCode
|
||||
135, // 32: webapi.ASSinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
138, // 32: webapi.ASSinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
0, // 33: webapi.SASinglePlayerAdjust.Tag:type_name -> webapi.TagCode
|
||||
135, // 34: webapi.SASinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
138, // 34: webapi.SASinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
0, // 35: webapi.SAGetPlayerData.Tag:type_name -> webapi.TagCode
|
||||
136, // 36: webapi.SAGetPlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
139, // 36: webapi.SAGetPlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 37: webapi.SAMorePlayerData.Tag:type_name -> webapi.TagCode
|
||||
136, // 38: webapi.SAMorePlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
139, // 38: webapi.SAMorePlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 39: webapi.SAKickPlayer.Tag:type_name -> webapi.TagCode
|
||||
42, // 40: webapi.ASUpdatePlayerElement.PlayerEleArgs:type_name -> webapi.PlayerEleArgs
|
||||
0, // 41: webapi.SAUpdatePlayerElement.Tag:type_name -> webapi.TagCode
|
||||
0, // 42: webapi.SAWhiteBlackControl.Tag:type_name -> webapi.TagCode
|
||||
0, // 43: webapi.SAQueryHorseRaceLampList.Tag:type_name -> webapi.TagCode
|
||||
137, // 44: webapi.SAQueryHorseRaceLampList.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
140, // 44: webapi.SAQueryHorseRaceLampList.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
0, // 45: webapi.SACreateHorseRaceLamp.Tag:type_name -> webapi.TagCode
|
||||
0, // 46: webapi.SAGetHorseRaceLampById.Tag:type_name -> webapi.TagCode
|
||||
137, // 47: webapi.SAGetHorseRaceLampById.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
137, // 48: webapi.ASEditHorseRaceLamp.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
140, // 47: webapi.SAGetHorseRaceLampById.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
140, // 48: webapi.ASEditHorseRaceLamp.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
0, // 49: webapi.SAEditHorseRaceLamp.Tag:type_name -> webapi.TagCode
|
||||
0, // 50: webapi.SARemoveHorseRaceLampById.Tag:type_name -> webapi.TagCode
|
||||
0, // 51: webapi.SABlackBySnId.Tag:type_name -> webapi.TagCode
|
||||
0, // 52: webapi.SACreateShortMessage.Tag:type_name -> webapi.TagCode
|
||||
0, // 53: webapi.SAQueryShortMessageList.Tag:type_name -> webapi.TagCode
|
||||
138, // 54: webapi.SAQueryShortMessageList.MessageInfo:type_name -> webapi.MessageInfo
|
||||
141, // 54: webapi.SAQueryShortMessageList.MessageInfo:type_name -> webapi.MessageInfo
|
||||
0, // 55: webapi.SADeleteShortMessage.Tag:type_name -> webapi.TagCode
|
||||
0, // 56: webapi.SAQueryOnlineReportList.Tag:type_name -> webapi.TagCode
|
||||
136, // 57: webapi.SAQueryOnlineReportList.PlayerData:type_name -> webapi.PlayerData
|
||||
139, // 57: webapi.SAQueryOnlineReportList.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 58: webapi.SASrvCtrlClose.Tag:type_name -> webapi.TagCode
|
||||
0, // 59: webapi.SASrvCtrlNotice.Tag:type_name -> webapi.TagCode
|
||||
0, // 60: webapi.SASrvCtrlStartScript.Tag:type_name -> webapi.TagCode
|
||||
0, // 61: webapi.SAListServerStates.Tag:type_name -> webapi.TagCode
|
||||
139, // 62: webapi.SAListServerStates.ServerInfo:type_name -> webapi.ServerInfo
|
||||
142, // 62: webapi.SAListServerStates.ServerInfo:type_name -> webapi.ServerInfo
|
||||
0, // 63: webapi.SAServerStateSwitch.Tag:type_name -> webapi.TagCode
|
||||
0, // 64: webapi.SAResetEtcdData.Tag:type_name -> webapi.TagCode
|
||||
0, // 65: webapi.SAOnlineReportTotal.Tag:type_name -> webapi.TagCode
|
||||
140, // 66: webapi.SAOnlineReportTotal.OnlineReport:type_name -> webapi.OnlineReport
|
||||
143, // 66: webapi.SAOnlineReportTotal.OnlineReport:type_name -> webapi.OnlineReport
|
||||
0, // 67: webapi.SAAddCoinByIdAndPT.Tag:type_name -> webapi.TagCode
|
||||
141, // 68: webapi.JybInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
144, // 68: webapi.JybInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
83, // 69: webapi.ASCreateJYB.Award:type_name -> webapi.JybInfoAward
|
||||
0, // 70: webapi.SACreateJYB.Tag:type_name -> webapi.TagCode
|
||||
0, // 71: webapi.SAUpdateJYB.Tag:type_name -> webapi.TagCode
|
||||
|
@ -9838,9 +10057,9 @@ var file_webapi_proto_depIdxs = []int32{
|
|||
94, // 77: webapi.SAGetExchangeOrder.OrderList:type_name -> webapi.ExchangeOrderInfo
|
||||
0, // 78: webapi.SAUpExchangeStatus.Tag:type_name -> webapi.TagCode
|
||||
0, // 79: webapi.SAGetExchangeShop.Tag:type_name -> webapi.TagCode
|
||||
142, // 80: webapi.SAGetExchangeShop.List:type_name -> webapi.ExchangeShop
|
||||
145, // 80: webapi.SAGetExchangeShop.List:type_name -> webapi.ExchangeShop
|
||||
0, // 81: webapi.SAThdUpdatePlayerCoin.Tag:type_name -> webapi.TagCode
|
||||
141, // 82: webapi.SACreateOrder.ItemInfo:type_name -> webapi.ItemInfo
|
||||
144, // 82: webapi.SACreateOrder.ItemInfo:type_name -> webapi.ItemInfo
|
||||
0, // 83: webapi.SACallbackPayment.Tag:type_name -> webapi.TagCode
|
||||
0, // 84: webapi.SAResource.Tag:type_name -> webapi.TagCode
|
||||
0, // 85: webapi.SASendSms.Tag:type_name -> webapi.TagCode
|
||||
|
@ -9849,13 +10068,15 @@ var file_webapi_proto_depIdxs = []int32{
|
|||
0, // 88: webapi.SAGetImgVerify.Tag:type_name -> webapi.TagCode
|
||||
0, // 89: webapi.SAPlayerDelete.Tag:type_name -> webapi.TagCode
|
||||
0, // 90: webapi.SAPlayerInviteLink.Tag:type_name -> webapi.TagCode
|
||||
141, // 91: webapi.ASAddItemById.ItemInfo:type_name -> webapi.ItemInfo
|
||||
144, // 91: webapi.ASAddItemById.ItemInfo:type_name -> webapi.ItemInfo
|
||||
0, // 92: webapi.SAAddItemById.Tag:type_name -> webapi.TagCode
|
||||
93, // [93:93] is the sub-list for method output_type
|
||||
93, // [93:93] is the sub-list for method input_type
|
||||
93, // [93:93] is the sub-list for extension type_name
|
||||
93, // [93:93] is the sub-list for extension extendee
|
||||
0, // [0:93] is the sub-list for field type_name
|
||||
130, // 93: webapi.SASMSConfig.Info:type_name -> webapi.SMSInfo
|
||||
0, // 94: webapi.SASMSConfig.Tag:type_name -> webapi.TagCode
|
||||
95, // [95:95] is the sub-list for method output_type
|
||||
95, // [95:95] is the sub-list for method input_type
|
||||
95, // [95:95] is the sub-list for extension type_name
|
||||
95, // [95:95] is the sub-list for extension extendee
|
||||
0, // [0:95] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_webapi_proto_init() }
|
||||
|
@ -11389,6 +11610,42 @@ func file_webapi_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ASSMSConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SASMSConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[129].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SMSInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -11396,7 +11653,7 @@ func file_webapi_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_webapi_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 127,
|
||||
NumMessages: 130,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -859,6 +859,7 @@ message ASGetMatchAwardCode{
|
|||
int64 Money = 4; // 金额
|
||||
string Tel = 5; // 手机号
|
||||
int32 CardType = 6; // 手机卡类型
|
||||
string remark = 7; //备注信息
|
||||
}
|
||||
message SAGetMatchAwardCode{
|
||||
TagCode Tag = 1; //错误码
|
||||
|
@ -922,3 +923,19 @@ message SAAddItemById{
|
|||
TagCode Tag = 1; //错误码
|
||||
string Msg = 2; //错误信息(选填)
|
||||
}
|
||||
//获取运营商配置[/get_SMSConfig]
|
||||
message ASSMSConfig{
|
||||
string Platform = 1; // 平台id
|
||||
int32 SnId = 2; // 玩家id
|
||||
}
|
||||
message SASMSConfig{
|
||||
string Platform = 1; // 平台id
|
||||
int32 SnId = 2; // 玩家id
|
||||
repeated SMSInfo Info = 3;
|
||||
TagCode Tag = 4; //错误码
|
||||
string Msg = 5; //错误信息(选填)
|
||||
}
|
||||
message SMSInfo{
|
||||
int32 Id = 1;
|
||||
string SmsName = 2;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,6 +40,8 @@ enum SPacketID {
|
|||
PACKET_SC_WELF_CONTINPAYINFO = 2597;//连续充值信息
|
||||
PACKET_CS_WELF_CONTINPAY = 2598;//领取(购买)连续充值 后期走充值回调
|
||||
PACKET_SC_WELF_CONTINPAY = 2599;//领取连续充值
|
||||
PACKET_CS_SignDay_Addup2Award = 2600;//领取七日签到进阶奖励
|
||||
PACKET_SC_SignDay_Addup2Award = 2601;//返回七日签到进阶奖励
|
||||
|
||||
// 2900~2999
|
||||
PACKET_CSWelfRelief = 2900;//救济金信息
|
||||
|
@ -54,6 +56,12 @@ enum SPacketID {
|
|||
PACKET_SCPigbankGetInfo = 2911;// 存钱罐信息获取
|
||||
PACKET_CSPigbankTakeCoin = 2912;// 存钱罐领取金币
|
||||
PACKET_SCPigbankTakeCoin = 2913;// 存钱罐领取金币
|
||||
|
||||
PACKET_CSDiamondBankGetInfo = 2914; //钻石存钱罐信息获取
|
||||
PACKET_SCDiamondBankGetInfo = 2915; //钻石存钱罐信息返回
|
||||
PACKET_SCDiamondBankTakeDiamond = 2916; //钻石存钱罐领取返回
|
||||
|
||||
|
||||
}
|
||||
|
||||
//救济金领取
|
||||
|
@ -76,6 +84,11 @@ message WelfareDate {
|
|||
int32 Item_Id = 4; // 道具id
|
||||
}
|
||||
|
||||
message AddUp2TypeDate{
|
||||
int32 Day = 1;
|
||||
int32 Id = 2; // 1,代表观看视频 2,代表钻石类型
|
||||
int32 Num = 3; //完成次数
|
||||
}
|
||||
|
||||
//转动转盘
|
||||
//PACKET_CS_WELF_GETTURNPLATE
|
||||
|
@ -95,6 +108,8 @@ message SCGetTurnplate{
|
|||
message AddUpWelfareDate {
|
||||
int32 AddUpDay = 1; // 累计几天
|
||||
repeated WelfareDate AddUpDate = 2; // 累计奖励
|
||||
repeated WelfareDate AddUp2Date =3; //进阶奖励
|
||||
repeated AddUp2TypeDate AddUp2Type = 4; //进阶奖励领取条件
|
||||
}
|
||||
|
||||
//累计签到
|
||||
|
@ -124,6 +139,12 @@ message Welfare7SignDate {
|
|||
int32 Day = 1; // 第几天
|
||||
repeated WelfareDate Date = 2; // 奖励
|
||||
repeated AddUpWelfareDate AddUpDate = 3; // 累计奖励
|
||||
|
||||
}
|
||||
message Addup2Data{
|
||||
int32 Day = 1; //天数
|
||||
int32 Num = 2; //任务次数
|
||||
int64 EndTime = 3;//结束时间戳 -1代表已领取
|
||||
}
|
||||
|
||||
//PACKET_SC_WELF_WELFAREINFO
|
||||
|
@ -135,6 +156,19 @@ message SCWelfaredInfo{
|
|||
repeated int32 AddUpSignDay = 5; // 已领取累计奖励天数
|
||||
repeated int32 TurnplateIdx = 6; // 已领取转盘奖励下标0开始
|
||||
int32 Switch = 7; // 1.开启 2.关闭
|
||||
repeated Addup2Data Addup2 = 8; //七日签到进阶奖励数据
|
||||
}
|
||||
|
||||
//领取7日签到累计进阶奖励
|
||||
//PACKET_CS_SignDay_Addup2Award
|
||||
message CSSignDayAddup2Award{
|
||||
int32 Day = 1;
|
||||
}
|
||||
//PACKET_SC_SignDay_Addup2Award
|
||||
message SCSignDayAddup2Award{
|
||||
int32 Day = 1; //天数
|
||||
int32 Num = 2; //任务次数
|
||||
int64 EndTime = 3;//结束时间戳 -1代表已领取
|
||||
}
|
||||
|
||||
message BlindBoxData {
|
||||
|
@ -246,6 +280,13 @@ message SCWelfareRelief{
|
|||
// 邀请信息
|
||||
// PACKET_CSInviteInfo
|
||||
message CSInviteInfo{}
|
||||
|
||||
message RankAward{
|
||||
int64 Start = 1; // 开始积分
|
||||
int64 End = 2; // 结束积分
|
||||
int64 Num = 3; // 奖励
|
||||
}
|
||||
|
||||
// PACKET_SCInviteInfo
|
||||
message SCInviteInfo{
|
||||
int32 Num = 1; // 邀请人数
|
||||
|
@ -253,6 +294,13 @@ message SCInviteInfo{
|
|||
string InviteUrl = 3; // 邀请链接
|
||||
int64 Score = 4; // 邀请积分
|
||||
string OtherCode = 5; // 已绑定的邀请码
|
||||
int64 BindScore = 6; // 绑定积分
|
||||
int64 RechargeScore = 7; // 充值积分,一个玩家最多给上级贡献一次
|
||||
map<int64,int64> PayScore = 8; // 充值积分;充值金额:获得积分
|
||||
repeated int64 Rates = 9; // 返佣比例;多级按顺序给
|
||||
repeated RankAward Awards1 = 10; // 周榜奖励列表
|
||||
repeated RankAward Awards2 = 11; // 周榜奖励列表
|
||||
repeated RankAward Awards3 = 12; // 周榜奖励列表
|
||||
}
|
||||
|
||||
// 绑定邀请人
|
||||
|
@ -279,6 +327,7 @@ message SCPigbankGetInfo{
|
|||
int64 CostDiamond = 4; // 耗费钻石
|
||||
int64 BankMaxCoin = 5; // 存钱罐最储存值
|
||||
int32 DayBuyMaxCnt = 6; // 今日最大可购买次数
|
||||
int64 Price = 7; //消耗钻石原价
|
||||
}
|
||||
|
||||
|
||||
|
@ -296,5 +345,35 @@ message SCPigbankTakeCoin{
|
|||
int64 CostDiamond = 4; // 耗费钻石
|
||||
int64 BankMaxCoin = 5; // 存钱罐最储存值
|
||||
int32 DayBuyMaxCnt = 6; // 今日最大可购买次数
|
||||
int64 Price = 7; //消耗钻石原价
|
||||
}
|
||||
|
||||
// 钻石存钱罐信息
|
||||
//PACKET_CSDiamondBankGetInfo
|
||||
message CSDiamondBankGetInfo{
|
||||
}
|
||||
|
||||
// 钻石存钱罐信息
|
||||
//PACKET_SCDiamondBankGetInfo
|
||||
message SCDiamondBankGetInfo{
|
||||
OpResultCode OpRetCode = 1; //结果
|
||||
double BankDiamond = 2; // 当前已存钻石
|
||||
int32 TakeTimes = 3; // 领取次数
|
||||
int64 BankMaxCoin = 4; // 存钱罐最大储存值
|
||||
int32 DayBuyMaxCnt = 5; // 今日最大可购买次数
|
||||
int64 Price = 6; //原价
|
||||
int64 NowPrice = 7; //现价
|
||||
int32 ShopId = 8; //商城ID
|
||||
}
|
||||
// 钻石存钱罐领取金币
|
||||
//PACKET_SCDiamondBankTakeDiamond
|
||||
message SCDiamondBankTakeDiamond{
|
||||
OpResultCode OpRetCode = 1; // 结果
|
||||
double TakeDiamondNum = 2; // 领取钻石数量
|
||||
int32 TakeTimes = 3; // 领取次数
|
||||
int64 BankMaxDiamond = 4; // 存钱罐最大储存值
|
||||
int32 DayBuyMaxCnt = 5; // 今日最大可购买次数
|
||||
int64 Price = 6; //原价
|
||||
int64 NowPrice = 7; //现价
|
||||
int32 ShopId = 8; //商城ID
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
|
||||
// Code generated by xlsx2proto.
|
||||
// DO NOT EDIT!
|
||||
|
||||
package srvdata
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"mongo.games.com/game/protocol/server"
|
||||
)
|
||||
|
||||
var PBDB_PetSkillMgr = &DB_PetSkillMgr{
|
||||
Datas: &server.DB_PetSkillArray{},
|
||||
pool: make(map[int32]*server.DB_PetSkill),
|
||||
|
||||
}
|
||||
|
||||
type DB_PetSkillMgr struct {
|
||||
Datas *server.DB_PetSkillArray
|
||||
pool map[int32]*server.DB_PetSkill
|
||||
|
||||
}
|
||||
|
||||
func (this *DB_PetSkillMgr) unmarshal(data []byte) error {
|
||||
err := proto.Unmarshal(data, this.Datas)
|
||||
if err == nil {
|
||||
this.arrangeData()
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (this *DB_PetSkillMgr) reunmarshal(data []byte) error {
|
||||
newDatas := &server.DB_PetSkillArray{}
|
||||
err := proto.Unmarshal(data, newDatas)
|
||||
if err == nil {
|
||||
for _, item := range newDatas.Arr {
|
||||
existItem := this.GetData(item.GetId())
|
||||
if existItem == nil {
|
||||
this.pool[item.GetId()] = item
|
||||
this.Datas.Arr = append(this.Datas.Arr, item)
|
||||
|
||||
} else {
|
||||
*existItem = *item
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (this *DB_PetSkillMgr) arrangeData() {
|
||||
if this.Datas == nil {
|
||||
return
|
||||
}
|
||||
|
||||
dataArr := this.Datas.GetArr()
|
||||
if dataArr == nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, data := range dataArr {
|
||||
this.pool[data.GetId()] = data
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func (this *DB_PetSkillMgr) GetData(id int32) *server.DB_PetSkill {
|
||||
if data, ok := this.pool[id]; ok {
|
||||
return data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
func init() {
|
||||
DataMgr.register("DB_PetSkill.dat", &ProtobufDataLoader{dh: PBDB_PetSkillMgr})
|
||||
}
|
|
@ -96,6 +96,11 @@ func APIGetMatchAwardCode(appId string, body proto.Message) ([]byte, error) {
|
|||
return postRequest(appId, "/get_match_award_code", nil, body, "http", DEFAULT_TIMEOUT)
|
||||
}
|
||||
|
||||
// ApiSendSMS 发送短信验证码
|
||||
func ApiSMSConfig(appId string, body proto.Message) ([]byte, error) {
|
||||
return postRequest(appId, "/get_SMSConfig", nil, body, "http", DEFAULT_TIMEOUT)
|
||||
}
|
||||
|
||||
// 支付订单 商城
|
||||
func API_CreateOrder(appId, orderId string, configid, SnId, shopId int32, platform string, packageTag string, os, deviceId, shopname string,
|
||||
amount [3]int32, consumptionamount int32, itemInfo []*webapi.ItemInfo, exchangeOrderId, channel string) *webapi.ASCreateOrder {
|
||||
|
|
|
@ -284,8 +284,23 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
pack.NowItemNum = item.ItemNum
|
||||
}
|
||||
}
|
||||
case ItemCanExchange:
|
||||
logger.Logger.Trace("道具兑换", msg.ItemId)
|
||||
itemInfo := srvdata.PBDB_GameItemMgr.GetData(msg.ItemId)
|
||||
if itemInfo == nil || itemInfo.Type != common.ItemTypeChange {
|
||||
pack.RetCode = bag.OpResultCode_OPRC_NotChange
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
_, _, isF := BagMgrSingleton.AddItem(p, int64(msg.ItemId), int64(-1), 0, common.GainWayItemChange, "sys", "背包内使用兑换", 0, 0, false)
|
||||
if isF {
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Sucess
|
||||
pack.NowItemId = item.ItemId
|
||||
pack.NowItemNum = item.ItemNum
|
||||
//获取兑换码
|
||||
BagMgrSingleton.ItemExchangeCard(p, msg.ItemId, int32(itemInfo.Num), msg.CardType)
|
||||
}
|
||||
}
|
||||
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -2095,15 +2095,16 @@ func CSPlayerData(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
}
|
||||
proto.SetDefaults(scPlayerData)
|
||||
common.SendToGate(sid, int(player_proto.PlayerPacketID_PACKET_SC_PLAYERDATA), scPlayerData, s)
|
||||
logger.Logger.Tracef("SC_PLAYERDATA %v", scPlayerData)
|
||||
}
|
||||
|
||||
sid := PlayerMgrSington.EndPlayerLoading(cspl.GetAccId())
|
||||
|
||||
if pd == nil {
|
||||
send(player_proto.OpResultCode_OPRC_Login_CreateFailed)
|
||||
return
|
||||
}
|
||||
|
||||
sid := PlayerMgrSington.EndPlayerLoading(cspl.GetAccId())
|
||||
|
||||
var promoterID string
|
||||
var promoterCfg *PromoterConfig
|
||||
f := func() {
|
||||
|
@ -2848,6 +2849,45 @@ func CSADV(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// 获取运营商配置
|
||||
func CSSMSConfig(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSSMSConfig Process %v", data)
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
var res []byte
|
||||
var err error
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
param := &webapi_proto.ASSMSConfig{
|
||||
SnId: p.SnId,
|
||||
Platform: p.Platform,
|
||||
}
|
||||
res, err = webapi.ApiSMSConfig(common.GetAppId(), param)
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
if err != nil || res == nil {
|
||||
logger.Logger.Errorf("API_SmsConfig err %v", err)
|
||||
return
|
||||
}
|
||||
var info webapi_proto.SASMSConfig
|
||||
proto.Unmarshal(res, &info)
|
||||
if info.Tag == webapi_proto.TagCode_SUCCESS {
|
||||
ret := &player_proto.SCSMSConfig{}
|
||||
for _, smsInfo := range info.Info {
|
||||
infoData := &player_proto.SMSInfo{}
|
||||
infoData.Id = smsInfo.Id
|
||||
infoData.SmsName = smsInfo.SmsName
|
||||
ret.Info = append(ret.Info, infoData)
|
||||
}
|
||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCSMSConfig), ret)
|
||||
} else {
|
||||
logger.Logger.Errorf("API_SmsConfig err %v", info.Msg)
|
||||
}
|
||||
}), "API_SmsConfig").Start()
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 用户信息
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CS_PLAYERDATA), player_proto.CSPlayerData{}, CSPlayerData)
|
||||
|
@ -2873,4 +2913,6 @@ func init() {
|
|||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSADV), player_proto.CSADV{}, CSADV)
|
||||
// 渠道开关
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSExchangeChannel), player_proto.CSExchangeChannel{}, CSExchangeChannel)
|
||||
//获取运营商配置
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSSMSConfig), player_proto.CSSMSConfig{}, CSSMSConfig)
|
||||
}
|
||||
|
|
|
@ -492,6 +492,14 @@ func init() {
|
|||
Num: playerBet.GetGain(),
|
||||
})
|
||||
}
|
||||
if playerBet.GetGain() < 0 && playerBet.WinState != 1 {
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeLoseCoin, &TaskData{
|
||||
SnId: player.SnId,
|
||||
GameID: scene.gameId,
|
||||
GameFreeID: scene.dbGameFree.GetId(),
|
||||
Num: playerBet.GetGain(),
|
||||
})
|
||||
}
|
||||
}
|
||||
//tienlen 游戏场次
|
||||
if scene.dbGameFree.GameDif == common.GameDifTienlen {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/srvdata"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
|
@ -384,6 +385,24 @@ func (this *CSPayInfoHandler) Process(s *netlib.Session, packetid int, data inte
|
|||
if shopInfo.Page == ShopPageGift {
|
||||
if !p.CheckWeekCard(shopInfo.Id) {
|
||||
SendClient(shop.OpResultCode_OPRC_Error)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if shopInfo.Page == ShopPageDiamondBank {
|
||||
// 检查每日领取次数
|
||||
fGetPropValue := func(propName string) int32 {
|
||||
pool := srvdata.PBDB_Pigbank_PropMgr.Datas.GetArr()
|
||||
for _, PropItem := range pool {
|
||||
if PropItem.PorpName == propName {
|
||||
return PropItem.PropValue
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
DayBuyMaxCnt := fGetPropValue("DayBuyMaxCnt")
|
||||
if p.WelfData.DiamondBank.DayBuyTimes >= DayBuyMaxCnt {
|
||||
SendClient(shop.OpResultCode_OPRC_Error)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if shopInfo.Page == ShopPageVip {
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"mongo.games.com/goserver/core/netlib"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
taskproto "mongo.games.com/game/protocol/task"
|
||||
"mongo.games.com/game/srvdata"
|
||||
)
|
||||
|
@ -80,19 +81,37 @@ func SendReward(p *Player, m map[int64]int64, tp int32) {
|
|||
})
|
||||
}
|
||||
gain := int32(0)
|
||||
giveType := int32(-1)
|
||||
switch tp {
|
||||
case 1:
|
||||
gain = common.GainWayItemTaskEveryDay
|
||||
giveType = model.SystemFreeGive_GiveType_TaskEveryDay
|
||||
case 2:
|
||||
gain = common.GainWayItemWeekActive
|
||||
giveType = model.SystemFreeGive_GiveType_TaskWeekActive
|
||||
case 3:
|
||||
gain = common.GainWayItemTaskNewPlayer
|
||||
giveType = model.SystemFreeGive_GiveType_TaskNewPlayer
|
||||
case 4:
|
||||
gain = common.GainWayItemTaskInvite
|
||||
giveType = model.SystemFreeGive_GiveType_TaskInvite
|
||||
case 5:
|
||||
gain = common.GainWayItemTaskAchievement
|
||||
giveType = model.SystemFreeGive_GiveType_TaskAchievement
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, items, 0, gain, "system", "任务奖励", 0, 0, false)
|
||||
for _, v := range items {
|
||||
tp := int32(-1)
|
||||
if v.ItemId == common.ItemIDCoin {
|
||||
tp = model.SystemFreeGive_CoinType_Coin
|
||||
} else if v.ItemId == common.ItemIDDiamond {
|
||||
tp = model.SystemFreeGive_CoinType_Diamond
|
||||
}
|
||||
if !p.IsRob && tp >= 0 && giveType >= 0 {
|
||||
LogChannelSingleton.WriteMQData(
|
||||
model.GenerateSystemFreeGive(p.SnId, p.Name, p.Platform, p.Channel, giveType, tp, v.ItemNum))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func CSTaskList(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
@ -95,6 +96,7 @@ func (this *CSGetAddupSignHandler) Process(s *netlib.Session, packetid int, data
|
|||
}
|
||||
|
||||
WelfareMgrSington.GetAddupSign(p, msg.GetAddUpDay())
|
||||
WelfareMgrSington.UpdateAddUp2Date(p, 0, msg.GetAddUpDay(), time.Now().Unix()+3600)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -307,7 +309,7 @@ func CSInviteInfo(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
}
|
||||
link := model.GameParamData.InviteUrl
|
||||
f := func() string {
|
||||
return fmt.Sprintf("%s?user=%s", link, base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s|%d", p.Platform, p.SnId))))
|
||||
return fmt.Sprintf("%s?user=%s", link, p.ICode)
|
||||
}
|
||||
|
||||
var res []byte
|
||||
|
@ -330,12 +332,42 @@ func CSInviteInfo(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
}
|
||||
|
||||
ret := &welfare.SCInviteInfo{
|
||||
Num: p.InviteNum,
|
||||
Code: p.InviteCode,
|
||||
Num: int32(p.INum),
|
||||
Code: p.ICode,
|
||||
InviteUrl: f(),
|
||||
Score: p.InviteScore,
|
||||
OtherCode: p.OtherCode,
|
||||
Score: p.IScore,
|
||||
OtherCode: p.PCode,
|
||||
}
|
||||
|
||||
cfg := PlatformMgrSingleton.GetConfig(p.Platform).ActInviteConfig
|
||||
if cfg != nil {
|
||||
ret.BindScore = cfg.GetBindScore()
|
||||
ret.RechargeScore = cfg.GetRechargeScore()
|
||||
ret.PayScore = cfg.GetPayScore()
|
||||
for _, v := range cfg.GetAwards1() {
|
||||
ret.Awards1 = append(ret.Awards1, &welfare.RankAward{
|
||||
Start: v.GetStart(),
|
||||
End: v.GetEnd(),
|
||||
Num: v.GetNum(),
|
||||
})
|
||||
}
|
||||
for _, v := range cfg.GetAwards2() {
|
||||
ret.Awards2 = append(ret.Awards2, &welfare.RankAward{
|
||||
Start: v.GetStart(),
|
||||
End: v.GetEnd(),
|
||||
Num: v.GetNum(),
|
||||
})
|
||||
}
|
||||
for _, v := range cfg.GetAwards3() {
|
||||
ret.Awards3 = append(ret.Awards3, &welfare.RankAward{
|
||||
Start: v.GetStart(),
|
||||
End: v.GetEnd(),
|
||||
Num: v.GetNum(),
|
||||
})
|
||||
}
|
||||
ret.Rates = cfg.GetRates()
|
||||
}
|
||||
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCInviteInfo), ret)
|
||||
logger.Logger.Tracef("SCInviteInfo %v", ret)
|
||||
})).Start()
|
||||
|
@ -358,25 +390,20 @@ func CSBindInvite(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
|
||||
var inviteSnId int32
|
||||
var err error
|
||||
now := time.Now()
|
||||
cfg := PlatformMgrSingleton.GetConfig(p.Platform).ActInviteConfig
|
||||
|
||||
send := func() {
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCBindInvite), ret)
|
||||
logger.Logger.Tracef("SCBindInvite %v", ret)
|
||||
|
||||
if ret.OpRetCode == welfare.OpResultCode_OPRC_Sucess {
|
||||
// 更新绑定关系
|
||||
LogChannelSingleton.WriteLog(&model.BindInvite{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
InviteSnId: inviteSnId,
|
||||
})
|
||||
|
||||
// 玩家自己的绑定任务
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeBindInviter, &TaskData{SnId: p.SnId, Num: 1})
|
||||
p.InviteTask(common.InviteScoreTypeLogin, 0, 1)
|
||||
}
|
||||
}
|
||||
|
||||
if p.InviteSnId != 0 {
|
||||
if p.PSnId != 0 {
|
||||
ret.OpRetCode = welfare.OpResultCode_OPRC_AlreadyBind
|
||||
send()
|
||||
return nil
|
||||
|
@ -393,46 +420,52 @@ func CSBindInvite(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
return
|
||||
}
|
||||
|
||||
if inviteSnId == p.SnId {
|
||||
ret.OpRetCode = welfare.OpResultCode_OPRC_BindSelf
|
||||
send()
|
||||
return
|
||||
}
|
||||
|
||||
pp := PlayerMgrSington.GetPlayerBySnId(inviteSnId)
|
||||
if pp != nil {
|
||||
if pp.InviteSnId == p.SnId {
|
||||
ret.OpRetCode = welfare.OpResultCode_OPRC_MyInvite
|
||||
send()
|
||||
return
|
||||
}
|
||||
p.InviteSnId = pp.SnId
|
||||
p.OtherCode = pp.InviteCode
|
||||
ret.OpRetCode = welfare.OpResultCode_OPRC_Sucess
|
||||
send()
|
||||
return
|
||||
}
|
||||
|
||||
inviteSnId2 := int32(0)
|
||||
// 3级父级不能是自己
|
||||
var err error
|
||||
tmpSnId := inviteSnId
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
inviteSnId2, err = model.GetPlayerInviteSnid(p.Platform, inviteSnId)
|
||||
// todo 优化查找顶级代理
|
||||
for i := 0; i < 10000; i++ {
|
||||
if tmpSnId == p.SnId {
|
||||
ret.OpRetCode = welfare.OpResultCode_OPRC_BindSelf
|
||||
err = errors.New("bind error")
|
||||
return nil
|
||||
}
|
||||
tmpSnId, err = model.GetPlayerInviteSnid(p.Platform, tmpSnId)
|
||||
if err != nil {
|
||||
ret.OpRetCode = welfare.OpResultCode_OPRC_Error
|
||||
return nil
|
||||
}
|
||||
if tmpSnId == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
err = model.BindInviteSnId(p.Platform, p.SnId, inviteSnId, msg.Code)
|
||||
}
|
||||
if err == nil {
|
||||
SaveInviteScore(&model.InviteScore{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
InviteSnId: inviteSnId,
|
||||
Tp: common.InviteScoreTypeBind,
|
||||
Score: cfg.GetBindScore(),
|
||||
Ts: now.Unix(),
|
||||
Money: 0,
|
||||
})
|
||||
}
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
if err != nil {
|
||||
send()
|
||||
return
|
||||
}
|
||||
if inviteSnId2 == p.SnId {
|
||||
ret.OpRetCode = welfare.OpResultCode_OPRC_MyInvite
|
||||
send()
|
||||
return
|
||||
}
|
||||
p.InviteSnId = inviteSnId
|
||||
p.OtherCode = msg.GetCode()
|
||||
p.PSnId = inviteSnId
|
||||
p.PCode = msg.GetCode()
|
||||
ret.OpRetCode = welfare.OpResultCode_OPRC_Sucess
|
||||
send()
|
||||
})).Start()
|
||||
})).StartByFixExecutor("invite_score")
|
||||
})).Start()
|
||||
return nil
|
||||
}
|
||||
|
@ -487,6 +520,80 @@ func (this *CSPigBankTakeCoinHandler) Process(s *netlib.Session, packetid int, d
|
|||
return nil
|
||||
}
|
||||
|
||||
// GetAddUp2Award
|
||||
type CSSignDayAddup2AwardPacketFactory struct {
|
||||
}
|
||||
|
||||
type CSSignDayAddup2AwardHandler struct {
|
||||
}
|
||||
|
||||
func (this *CSSignDayAddup2AwardPacketFactory) CreatePacket() interface{} {
|
||||
pack := &welfare.CSSignDayAddup2Award{}
|
||||
return pack
|
||||
}
|
||||
|
||||
func (this *CSSignDayAddup2AwardHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSSignDayAddup2Award Process recv ", data)
|
||||
if msg, ok := data.(*welfare.CSSignDayAddup2Award); ok {
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warnf("CSPigBankTakeCoinHandler p == nil")
|
||||
return nil
|
||||
}
|
||||
WelfareMgrSington.GetAddUp2Award(p, msg.Day)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CSDiamondBankGetInfoPacketFactory struct {
|
||||
}
|
||||
|
||||
type CSDiamondBankGetInfoHandler struct {
|
||||
}
|
||||
|
||||
func (this *CSDiamondBankGetInfoPacketFactory) CreatePacket() interface{} {
|
||||
pack := &welfare.CSDiamondBankGetInfo{}
|
||||
return pack
|
||||
}
|
||||
|
||||
func (this *CSDiamondBankGetInfoHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSDiamondBankGetInfo Process recv ", data)
|
||||
if _, ok := data.(*welfare.CSDiamondBankGetInfo); ok {
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warnf("CSPigBankTakeCoinHandler p == nil")
|
||||
return nil
|
||||
}
|
||||
WelfareMgrSington.DiamondBankGetInfo(p)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
/*// 钻石储存罐
|
||||
type CSDiamondBankTakeDiamondPacketFactory struct {
|
||||
}
|
||||
|
||||
type CSDiamondBankTakeDiamondHandler struct {
|
||||
}
|
||||
|
||||
func (this *CSDiamondBankTakeDiamondPacketFactory) CreatePacket() interface{} {
|
||||
pack := &welfare.CSDiamondBankTakeDiamond{}
|
||||
return pack
|
||||
}
|
||||
|
||||
func (this *CSDiamondBankTakeDiamondHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSDiamondBankGetInfo Process recv ", data)
|
||||
if _, ok := data.(*welfare.CSDiamondBankTakeDiamond); ok {
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warnf("CSPigBankTakeCoinHandler p == nil")
|
||||
return nil
|
||||
}
|
||||
WelfareMgrSington.DiamondBankTakeCoin(p)
|
||||
}
|
||||
return nil
|
||||
}*/
|
||||
|
||||
func init() {
|
||||
// 领取救济金
|
||||
common.RegisterHandler(int(welfare.SPacketID_PACKET_CS_WELF_GETRELIEFFUND), &CSGetReliefFundHandler{})
|
||||
|
@ -531,4 +638,14 @@ func init() {
|
|||
//领取存钱罐金币
|
||||
common.RegisterHandler(int(welfare.SPacketID_PACKET_CSPigbankTakeCoin), &CSPigBankTakeCoinHandler{})
|
||||
netlib.RegisterFactory(int(welfare.SPacketID_PACKET_CSPigbankTakeCoin), &CSPigBankTakeCoinPacketFactory{})
|
||||
//领取七日签到进阶奖励
|
||||
common.RegisterHandler(int(welfare.SPacketID_PACKET_CS_SignDay_Addup2Award), &CSSignDayAddup2AwardHandler{})
|
||||
netlib.RegisterFactory(int(welfare.SPacketID_PACKET_CS_SignDay_Addup2Award), &CSSignDayAddup2AwardPacketFactory{})
|
||||
//钻石储存罐信息
|
||||
common.RegisterHandler(int(welfare.SPacketID_PACKET_CSDiamondBankGetInfo), &CSDiamondBankGetInfoHandler{})
|
||||
netlib.RegisterFactory(int(welfare.SPacketID_PACKET_CSDiamondBankGetInfo), &CSDiamondBankGetInfoPacketFactory{})
|
||||
|
||||
//领取钻石储存罐
|
||||
/* common.RegisterHandler(int(welfare.SPacketID_PACKET_CSDiamondBankTakeDiamond), &CSDiamondBankTakeDiamondHandler{})
|
||||
netlib.RegisterFactory(int(welfare.SPacketID_PACKET_CSDiamondBankTakeDiamond), &CSDiamondBankTakeDiamondPacketFactory{})*/
|
||||
}
|
||||
|
|
|
@ -2,7 +2,10 @@ package main
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
webapiproto "mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/game/webapi"
|
||||
"mongo.games.com/game/worldsrv/internal"
|
||||
"strconv"
|
||||
"time"
|
||||
|
@ -27,9 +30,10 @@ const (
|
|||
|
||||
// 道具功能 Function
|
||||
const (
|
||||
ItemCanUse = iota //可以使用
|
||||
ItemCanGive //可以赠送
|
||||
ItemCanSell //可以出售
|
||||
ItemCanUse = iota //可以使用
|
||||
ItemCanGive //可以赠送
|
||||
ItemCanSell //可以出售
|
||||
ItemCanExchange //可以兑换
|
||||
ItemMax
|
||||
)
|
||||
|
||||
|
@ -512,6 +516,77 @@ func (this *BagMgr) SyncBagData(snid int32, changeItemIds ...int32) {
|
|||
p.SyncBagData(itemInfos)
|
||||
}
|
||||
|
||||
// 兑换话费卡
|
||||
func (this *BagMgr) ItemExchangeCard(p *Player, itemId int32, money, cardType int32) bool {
|
||||
// 兑换码奖品
|
||||
var err error
|
||||
var newMsg *model.Message
|
||||
res := &webapiproto.SAGetMatchAwardCode{}
|
||||
pack := &bag.SCItemExChangeRes{RetCode: bag.OpResultCode_OPRC_Sucess}
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
// 获取兑换码
|
||||
pack := &webapiproto.ASGetMatchAwardCode{
|
||||
Platform: p.Platform,
|
||||
Snid: p.SnId,
|
||||
ItemID: itemId,
|
||||
Money: int64(money),
|
||||
Tel: p.Tel,
|
||||
CardType: cardType,
|
||||
Remark: "背包内使用兑换",
|
||||
}
|
||||
logger.Logger.Trace("ItemChangeCode ", pack)
|
||||
var buff []byte
|
||||
buff, err = webapi.APIGetMatchAwardCode(common.GetAppId(), pack)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = proto.Unmarshal(buff, res); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if res.GetCode() == "" || res.GetTag() != webapiproto.TagCode_SUCCESS {
|
||||
return nil
|
||||
}
|
||||
|
||||
var params []string
|
||||
for range []string{"zh", "vi", "en", "kh"} {
|
||||
params = append(params, res.GetMoney(), res.GetCode()) // 金额,兑换码
|
||||
}
|
||||
// 发送邮件
|
||||
title := i18n.Tr("languages", "MatchAwardTitle")
|
||||
content := i18n.Tr("languages", "MatchAward", params)
|
||||
newMsg = model.NewMessage("", 0, "", p.SnId, model.MSGTYPE_ITEM_CHANGE,
|
||||
title, content, 0, 0, model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", nil, p.Platform, model.HallTienlen, nil)
|
||||
err := model.InsertMessage(p.Platform, newMsg)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("发送邮件失败 snid:%v itemID:%v err:%v", p.SnId, itemId, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
if err != nil || res.GetCode() == "" || res.GetTag() != webapiproto.TagCode_SUCCESS {
|
||||
//返回道具
|
||||
items := make([]*Item, 0)
|
||||
items = append(items, &Item{
|
||||
ItemId: itemId, // 物品id
|
||||
ItemNum: 1, // 数量
|
||||
ObtainTime: time.Now().Unix(),
|
||||
})
|
||||
this.AddItems(p, items, 0, common.GainWayItemChange, "system", "背包内使用兑换失败", 0, 0, false)
|
||||
logger.Logger.Errorf("获取兑换码失败 snid:%v itemID:%v res:%v err:%v", p.SnId, itemId, res, err)
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Error
|
||||
p.SendToClient(int(bag.SPacketID_PACKET_SC_ITEM_EXCHANGE_RES), pack)
|
||||
return
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayerBySnId(p.SnId)
|
||||
if p != nil {
|
||||
p.AddMessage(newMsg)
|
||||
}
|
||||
p.SendToClient(int(bag.SPacketID_PACKET_SC_ITEM_EXCHANGE_RES), pack)
|
||||
}), fmt.Sprintf("ItemExChange%d", p.SnId)).Start()
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *BagMgr) Update() {
|
||||
}
|
||||
|
||||
|
@ -522,11 +597,11 @@ func (this *BagMgr) Shutdown() {
|
|||
//========================implement IPlayerLoad ==============================
|
||||
|
||||
func (this *BagMgr) Load(platform string, snid int32, player any) *internal.PlayerLoadReplay {
|
||||
data := model.GetBagInfo(snid, platform)
|
||||
data, err := model.GetBagInfo(snid, platform)
|
||||
return &internal.PlayerLoadReplay{
|
||||
Platform: platform,
|
||||
Snid: snid,
|
||||
Err: nil,
|
||||
Err: err,
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"time"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
)
|
||||
|
||||
|
@ -114,9 +115,9 @@ func (this *ClockMgr) Update() {
|
|||
this.LastDay = day
|
||||
this.fireDayEvent()
|
||||
|
||||
_, week := tNow.ISOWeek()
|
||||
if week != this.LastWeek {
|
||||
this.LastWeek = week
|
||||
week := common.GetWeekStartTs(tNow.Unix())
|
||||
if week != int64(this.LastWeek) {
|
||||
this.LastWeek = int(week)
|
||||
this.fireWeekEvent()
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,8 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_CHESSRANK_CFG, webapi.ChessRankcfgData{}, platformConfigEvent)
|
||||
// 手机积分
|
||||
etcd.Register(etcd.ETCDKEY_ACT_PHONELOTTERY, webapi.WelfarePhoneLotteryStatus{}, platformConfigEvent)
|
||||
// 邀请活动
|
||||
etcd.Register(etcd.ETCDKEY_ACT_Invite, webapi.ActInviteConfig{}, platformConfigEvent)
|
||||
}
|
||||
|
||||
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
@ -195,7 +197,8 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
|
|||
ChessRankMgrSington.UpdateChessRankConfig(config)
|
||||
case *webapi.WelfarePhoneLotteryStatus:
|
||||
WelfareMgrSington.UpdatePhoneLotteryStatus(config)
|
||||
|
||||
case *webapi.ActInviteConfig:
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).ActInviteConfig = config
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
}
|
||||
|
|
|
@ -1,124 +1,34 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/task"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/worldsrv/internal"
|
||||
)
|
||||
|
||||
// SaveInviteScore 保存玩家操作
|
||||
// 绑定,充值成功,充值;及产生的积分,充值金额
|
||||
func SaveInviteScore(data *model.InviteScore) {
|
||||
if data == nil {
|
||||
return
|
||||
}
|
||||
var err error
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
err = model.SaveInviteScore(data)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("SaveInviteScore error:%v", err)
|
||||
return err
|
||||
}
|
||||
// 后台统计积分记录
|
||||
data.Ts /= 1000000000 // 后台需要秒
|
||||
LogChannelSingleton.WriteLog(data)
|
||||
logger.Logger.Tracef("==> php InviteScore %+v", *data)
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
p := PlayerMgrSington.GetPlayerBySnId(data.InviteSnId)
|
||||
if err == nil && p != nil {
|
||||
if data.Score != 0 {
|
||||
if data.Score < 0 {
|
||||
if -data.Score > p.InviteScore {
|
||||
data.Score = -p.InviteScore
|
||||
}
|
||||
}
|
||||
p.InviteScore += data.Score
|
||||
p.dirty = true
|
||||
|
||||
// 更新邀请任务进度
|
||||
if data.Score > 0 {
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteScore, &TaskData{
|
||||
SnId: p.SnId,
|
||||
Num: data.Score,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if data.Money > 0 {
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteRecharge, &TaskData{
|
||||
SnId: p.SnId,
|
||||
Num: data.Money,
|
||||
})
|
||||
}
|
||||
}
|
||||
})).StartByFixExecutor(fmt.Sprintf("invite_score_%v", data.InviteSnId))
|
||||
cfg := PlatformMgrSingleton.GetConfig(data.Platform).ActInviteConfig
|
||||
data.Rate = cfg.GetRates()
|
||||
LogChannelSingleton.WriteLog(&model.EvtInviteMsg{
|
||||
InviteScore: *data,
|
||||
RechargeScore: cfg.GetRechargeScore(),
|
||||
})
|
||||
}
|
||||
|
||||
func GetInviteScore(platform string, snid int32) {
|
||||
var n, z, money int64
|
||||
var err error
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
n, z, money, err = model.GetInviteScore(platform, snid)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("GetInviteScore error:%v", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
p := PlayerMgrSington.GetPlayerBySnId(snid)
|
||||
if err == nil && p != nil {
|
||||
p.InviteScore = n
|
||||
p.dirty = true
|
||||
|
||||
// 更新邀请任务进度
|
||||
p.ResetTaskN(common.TaskTypeInviteScore)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteScore, &TaskData{
|
||||
SnId: p.SnId,
|
||||
Num: z,
|
||||
})
|
||||
|
||||
p.ResetTaskN(common.TaskTypeInviteRecharge)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteRecharge, &TaskData{
|
||||
SnId: p.SnId,
|
||||
Num: money,
|
||||
})
|
||||
}
|
||||
})).StartByFixExecutor(fmt.Sprintf("invite_score_%v", snid))
|
||||
}
|
||||
|
||||
type InviteCode struct {
|
||||
internal.BasePlayerLoader
|
||||
}
|
||||
|
||||
func (i *InviteCode) LoadAfter(platform string, snid int32) *internal.PlayerLoadReplay {
|
||||
n, err := model.GetInviteNum(platform, snid)
|
||||
return &internal.PlayerLoadReplay{
|
||||
Platform: platform,
|
||||
Snid: snid,
|
||||
Err: err,
|
||||
Data: n,
|
||||
}
|
||||
}
|
||||
|
||||
func (i *InviteCode) CallbackAfter(ret *internal.PlayerLoadReplay) {
|
||||
if ret == nil {
|
||||
return
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayerBySnId(ret.Snid)
|
||||
if p == nil {
|
||||
return
|
||||
}
|
||||
p.InviteNum = ret.Data.(int32)
|
||||
p.ResetTaskN(common.TaskTypeInviteNum)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteNum, &TaskData{SnId: p.SnId, Num: int64(p.InviteNum)})
|
||||
GetInviteScore(ret.Platform, ret.Snid)
|
||||
}
|
||||
|
||||
func init() {
|
||||
internal.RegisterPlayerLoad(new(InviteCode))
|
||||
// CheckNewWeek 每周重置积分
|
||||
func CheckNewWeek(platform string, snid int32) {
|
||||
LogChannelSingleton.WriteLog(&model.EvtInviteMsg{
|
||||
InviteScore: model.InviteScore{
|
||||
Platform: platform,
|
||||
SnId: snid,
|
||||
Tp: common.InviteScoreCheckWeek,
|
||||
Ts: time.Now().Unix(),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
@ -58,7 +58,6 @@ func init() {
|
|||
LogChannelSingleton.RegisterLogCName(model.MQRankPlayerCoin, &model.RankPlayerCoin{})
|
||||
LogChannelSingleton.RegisterLogCName(mq.BackBankrupt, &model.BankruptLog{})
|
||||
LogChannelSingleton.RegisterLogCName(mq.BackReliefund, &model.ReliefFundLog{})
|
||||
LogChannelSingleton.RegisterLogCName(model.EvtBindInvite, &model.BindInvite{})
|
||||
LogChannelSingleton.RegisterLogCName(mq.BackInviteScore, &model.InviteScore{})
|
||||
LogChannelSingleton.RegisterLogCName(model.EvtInvite, &model.EvtInviteMsg{})
|
||||
LogChannelSingleton.RegisterLogCName(model.MQRankPlayerLevel, &model.PlayerLevelInfo{})
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"mongo.games.com/goserver/core/basic"
|
||||
"mongo.games.com/goserver/core/broker"
|
||||
"mongo.games.com/goserver/core/broker/rabbitmq"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
|
@ -41,31 +42,49 @@ func init() {
|
|||
return nil
|
||||
}, broker.Queue(model.TopicProbeCoinLogAck), rabbitmq.DurableQueue())
|
||||
|
||||
// 绑定数量同步
|
||||
mq.RegisterSubscriber(model.AckBindNum, func(e broker.Event) error {
|
||||
// 邀请数据同步
|
||||
mq.RegisterSubscriber(model.EvtInviteAck, func(e broker.Event) error {
|
||||
msg := e.Message()
|
||||
if msg != nil {
|
||||
defer func() {
|
||||
e.Ack()
|
||||
}()
|
||||
|
||||
var log model.BindNum
|
||||
var log model.EvtInviteAckMsg
|
||||
err := json.Unmarshal(msg.Body, &log)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
logger.Logger.Tracef("EvtInviteAckMsg: %+v", log)
|
||||
|
||||
//通知主线程执行后续操作
|
||||
core.CoreObject().SendCommand(basic.CommandWrapper(func(o *basic.Object) error {
|
||||
player := PlayerMgrSington.GetPlayerBySnId(log.SnId)
|
||||
player := PlayerMgrSington.GetPlayerBySnId(log.Snid)
|
||||
if player != nil {
|
||||
player.InviteNum = log.Num
|
||||
// 邀请数量
|
||||
player.INum = log.Num
|
||||
player.ResetTaskN(common.TaskTypeInviteNum)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteNum, &TaskData{SnId: player.SnId, Num: int64(player.InviteNum)})
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteNum, &TaskData{SnId: player.SnId, Num: player.INum})
|
||||
|
||||
// 邀请积分
|
||||
player.IScore = log.Score
|
||||
player.ResetTaskN(common.TaskTypeInviteScore)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteScore, &TaskData{
|
||||
SnId: player.SnId,
|
||||
Num: log.Score,
|
||||
})
|
||||
// 充值金额
|
||||
player.IMoney = log.Money
|
||||
player.ResetTaskN(common.TaskTypeInviteRecharge)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypeInviteRecharge, &TaskData{
|
||||
SnId: player.SnId,
|
||||
Num: log.Money,
|
||||
})
|
||||
}
|
||||
return nil
|
||||
}), true)
|
||||
}
|
||||
return nil
|
||||
}, broker.Queue(model.AckBindNum), rabbitmq.DurableQueue())
|
||||
}, broker.Queue(model.EvtInviteAck), rabbitmq.DurableQueue())
|
||||
}
|
||||
|
|
|
@ -146,7 +146,6 @@ type Player struct {
|
|||
// 最后玩的游戏id
|
||||
LastGameId int
|
||||
GameID []int32 // 最近三天玩的游戏
|
||||
InviteNum int32 // 邀请人数
|
||||
ApplyList []int32 //玩家申请好友记录
|
||||
}
|
||||
|
||||
|
@ -2222,8 +2221,6 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) {
|
|||
for _, v := range srvdata.TaskMgr.GetActivityType(common.TaskActivityTypeEveryDay) {
|
||||
this.WelfData.Task[v.GetId()] = &model.TaskData{}
|
||||
}
|
||||
this.WelfData.Task[common.TaskIDInvitePlayGame] = &model.TaskData{}
|
||||
this.WelfData.Task[common.TaskIDInviteFirstLogin] = &model.TaskData{}
|
||||
}
|
||||
}
|
||||
//周卡数据更新
|
||||
|
@ -2272,6 +2269,7 @@ func (this *Player) OnMonthTimer() {
|
|||
}
|
||||
|
||||
func (this *Player) OnWeekTimer() {
|
||||
logger.Logger.Tracef("OnWeekTimer %v", time.Now())
|
||||
//判断是否一天即可过滤0点多次切换
|
||||
if common.InSameDayNoZero(time.Now().Local(), this.lastOnWeekChange) {
|
||||
return
|
||||
|
@ -2312,6 +2310,8 @@ func (this *Player) OnWeekTimer() {
|
|||
}
|
||||
}
|
||||
// 重置周任务
|
||||
// 重置邀请积分
|
||||
CheckNewWeek(this.Platform, this.SnId)
|
||||
}
|
||||
|
||||
func (this *Player) GetName() string {
|
||||
|
@ -2452,10 +2452,10 @@ func (this *Player) SendDiffData() {
|
|||
pack.UpdateField += UpdateField_PhoneScore
|
||||
}
|
||||
// 邀请积分
|
||||
if this.diffData.InviteScore != this.InviteScore {
|
||||
if this.diffData.InviteScore != this.IScore {
|
||||
dirty = true
|
||||
pack.InviteScore = this.InviteScore
|
||||
this.diffData.InviteScore = this.InviteScore
|
||||
pack.InviteScore = this.IScore
|
||||
this.diffData.InviteScore = this.IScore
|
||||
pack.UpdateField += UpdateField_InviteScore
|
||||
}
|
||||
//总充值金额
|
||||
|
@ -3849,66 +3849,77 @@ func (this *Player) GetPayGoodsInfo() {
|
|||
if data != nil {
|
||||
infos := data.([]*model.DbShop)
|
||||
for _, info := range infos {
|
||||
var itemInfo []*player_proto.PayItem
|
||||
var items []*Item
|
||||
if len(info.Amount) > 0 {
|
||||
this.AddCoin(int64(info.Amount[0]), 0, info.GainWay, "Callback_login", info.Remark)
|
||||
this.AddDiamond(int64(info.Amount[1]), 0, info.GainWay, "Callback_login", info.Remark)
|
||||
}
|
||||
this.AddMoneyPayTotal(int64(info.ConsumeNum))
|
||||
if info.ItemInfo != nil {
|
||||
for _, v := range info.ItemInfo {
|
||||
items = append(items, &Item{ItemId: v.ItemId, ItemNum: v.ItemNum})
|
||||
itemInfo = append(itemInfo, &player_proto.PayItem{
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
})
|
||||
switch info.PageId {
|
||||
case ShopPageBackend:
|
||||
logger.Logger.Tracef("GetPayGoodsInfo ShopPageBackend %+v", *info)
|
||||
default:
|
||||
var itemInfo []*player_proto.PayItem
|
||||
var items []*Item
|
||||
if len(info.Amount) > 0 {
|
||||
this.AddCoin(int64(info.Amount[0]), 0, info.GainWay, "Callback_login", info.Remark)
|
||||
this.AddDiamond(int64(info.Amount[1]), 0, info.GainWay, "Callback_login", info.Remark)
|
||||
}
|
||||
}
|
||||
switch info.Remark {
|
||||
case "BlindBox":
|
||||
if len(info.OtherParams) > 0 {
|
||||
this.WelfData.BlindBoxId = info.OtherParams[0]
|
||||
} else {
|
||||
logger.Logger.Errorf("GetPayGoodsInfo BlindBox OtherParams is nil")
|
||||
this.AddMoneyPayTotal(int64(info.ConsumeNum))
|
||||
if info.ItemInfo != nil {
|
||||
for _, v := range info.ItemInfo {
|
||||
items = append(items, &Item{ItemId: v.ItemId, ItemNum: v.ItemNum})
|
||||
itemInfo = append(itemInfo, &player_proto.PayItem{
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
})
|
||||
}
|
||||
}
|
||||
case "FirstRecharge":
|
||||
if len(info.OtherParams) > 0 {
|
||||
|
||||
this.WelfData.FirstPayDay = info.OtherParams[0]
|
||||
this.WelfData.FirstPayTickets = info.Ts
|
||||
} else {
|
||||
logger.Logger.Errorf("GetPayGoodsInfo FirstRecharge OtherParams is nil")
|
||||
//钻石存储罐
|
||||
if info.PageId == ShopPageDiamondBank {
|
||||
WelfareMgrSington.DiamondBankTakeCoin(this)
|
||||
}
|
||||
case "ContinuousPay":
|
||||
if len(info.OtherParams) > 0 {
|
||||
switch info.Remark {
|
||||
case "BlindBox":
|
||||
if len(info.OtherParams) > 0 {
|
||||
this.WelfData.BlindBoxId = info.OtherParams[0]
|
||||
} else {
|
||||
logger.Logger.Errorf("GetPayGoodsInfo BlindBox OtherParams is nil")
|
||||
}
|
||||
case "FirstRecharge":
|
||||
if len(info.OtherParams) > 0 {
|
||||
|
||||
this.WelfData.ContinuousPayDay = info.OtherParams[0]
|
||||
this.WelfData.ContinuousPayTickets = info.Ts
|
||||
} else {
|
||||
logger.Logger.Errorf("GetPayGoodsInfo ContinuousPay OtherParams is nil")
|
||||
this.WelfData.FirstPayDay = info.OtherParams[0]
|
||||
this.WelfData.FirstPayTickets = info.Ts
|
||||
} else {
|
||||
logger.Logger.Errorf("GetPayGoodsInfo FirstRecharge OtherParams is nil")
|
||||
}
|
||||
case "ContinuousPay":
|
||||
if len(info.OtherParams) > 0 {
|
||||
|
||||
this.WelfData.ContinuousPayDay = info.OtherParams[0]
|
||||
this.WelfData.ContinuousPayTickets = info.Ts
|
||||
} else {
|
||||
logger.Logger.Errorf("GetPayGoodsInfo ContinuousPay OtherParams is nil")
|
||||
}
|
||||
}
|
||||
this.UpdatePlayerVipBag(info.ShopId)
|
||||
this.UpdateShopID(info.ShopId)
|
||||
|
||||
this.dirty = true
|
||||
this.SendDiffData()
|
||||
|
||||
info.Amount[2] = this.GetVIPExpByPay(info.ConsumeNum)
|
||||
|
||||
BagMgrSingleton.AddItems(this, items, 0, info.GainWay, info.Operator, info.Remark, 0, 0, false)
|
||||
|
||||
PayGoodsInfo := &player_proto.SCPayGoodsInfo{
|
||||
Gold: info.Amount,
|
||||
Item: itemInfo,
|
||||
}
|
||||
proto.SetDefaults(PayGoodsInfo)
|
||||
this.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_PAYGOODSINFO), PayGoodsInfo)
|
||||
}
|
||||
this.UpdatePlayerVipBag(info.ShopId)
|
||||
this.UpdateShopID(info.ShopId)
|
||||
|
||||
this.dirty = true
|
||||
this.SendDiffData()
|
||||
|
||||
info.Amount[2] = this.GetVIPExpByPay(info.ConsumeNum)
|
||||
|
||||
BagMgrSingleton.AddItems(this, items, 0, info.GainWay, info.Operator, info.Remark, 0, 0, false)
|
||||
|
||||
PayGoodsInfo := &player_proto.SCPayGoodsInfo{
|
||||
Gold: info.Amount,
|
||||
Item: itemInfo,
|
||||
if info.ConsumeNum > 0 {
|
||||
TaskSubjectSingleton.Touch(common.TaskTypePay, &TaskData{
|
||||
SnId: this.SnId,
|
||||
Num: int64(info.ConsumeNum),
|
||||
})
|
||||
}
|
||||
proto.SetDefaults(PayGoodsInfo)
|
||||
this.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_PAYGOODSINFO), PayGoodsInfo)
|
||||
TaskSubjectSingleton.Touch(common.TaskTypePay, &TaskData{
|
||||
SnId: this.SnId,
|
||||
Num: int64(info.ConsumeNum),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4371,98 +4382,38 @@ func (this *Player) PhoneLotteryTask(taskId int32, num int64) {
|
|||
}
|
||||
}
|
||||
|
||||
func (this *Player) InviteTask(scoreType int32, gameId int32, n int64) {
|
||||
if this.InviteSnId == 0 {
|
||||
func InviteTask(platform string, psnid, snid, scoreType int32, n int64) {
|
||||
if psnid <= 0 || snid <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
if this.WelfData == nil {
|
||||
this.WelfData = model.NewWelfareData()
|
||||
}
|
||||
if this.WelfData.Task == nil {
|
||||
this.WelfData.Task = make(map[int32]*model.TaskData)
|
||||
}
|
||||
cfg := PlatformMgrSingleton.GetConfig(platform).ActInviteConfig
|
||||
|
||||
switch scoreType {
|
||||
case common.InviteScoreTypeBind:
|
||||
SaveInviteScore(&model.InviteScore{
|
||||
Platform: this.Platform,
|
||||
SnId: this.SnId,
|
||||
InviteSnId: this.InviteSnId,
|
||||
Tp: scoreType,
|
||||
Score: 5000,
|
||||
Ts: time.Now().UnixNano(),
|
||||
})
|
||||
|
||||
case common.InviteScoreTypeLogin:
|
||||
if this.WelfData.Task[common.TaskIDInviteFirstLogin] == nil {
|
||||
this.WelfData.Task[common.TaskIDInviteFirstLogin] = &model.TaskData{} // 初始化任务数据
|
||||
}
|
||||
if this.WelfData.Task[common.TaskIDInviteFirstLogin].Ts == 0 {
|
||||
this.WelfData.Task[common.TaskIDInviteFirstLogin].Ts = time.Now().Unix()
|
||||
case common.InviteScoreTypePay:
|
||||
score, ok := cfg.GetPayScore()[n]
|
||||
if ok {
|
||||
SaveInviteScore(&model.InviteScore{
|
||||
Platform: this.Platform,
|
||||
SnId: this.SnId,
|
||||
InviteSnId: this.InviteSnId,
|
||||
Platform: platform,
|
||||
SnId: snid,
|
||||
InviteSnId: psnid,
|
||||
Tp: scoreType,
|
||||
Score: 1000,
|
||||
Ts: time.Now().UnixNano(),
|
||||
Score: score,
|
||||
Ts: time.Now().Unix(),
|
||||
Money: n,
|
||||
})
|
||||
} else {
|
||||
SaveInviteScore(&model.InviteScore{
|
||||
Platform: platform,
|
||||
SnId: snid,
|
||||
InviteSnId: psnid,
|
||||
Tp: common.InviteScoreTypeRecharge,
|
||||
Score: cfg.GetRechargeScore(),
|
||||
Ts: time.Now().Unix(),
|
||||
Money: n,
|
||||
})
|
||||
}
|
||||
|
||||
case common.InviteScoreTypePlayTimes:
|
||||
if this.WelfData.Task[common.TaskIDInvitePlayGame] == nil {
|
||||
this.WelfData.Task[common.TaskIDInvitePlayGame] = &model.TaskData{} // 初始化任务数据
|
||||
}
|
||||
if this.WelfData.Task[common.TaskIDInvitePlayGame].Ts == 0 {
|
||||
this.WelfData.Task[common.TaskIDInvitePlayGame].Ts = time.Now().Unix()
|
||||
SaveInviteScore(&model.InviteScore{
|
||||
Platform: this.Platform,
|
||||
SnId: this.SnId,
|
||||
InviteSnId: this.InviteSnId,
|
||||
Tp: scoreType,
|
||||
Score: 5000,
|
||||
Ts: time.Now().UnixNano(),
|
||||
})
|
||||
}
|
||||
|
||||
case common.InviteScoreTypeRecharge:
|
||||
if this.WelfData.Task[common.TaskIDInviteRecharge] == nil {
|
||||
this.WelfData.Task[common.TaskIDInviteRecharge] = &model.TaskData{} // 初始化任务数据
|
||||
}
|
||||
this.WelfData.Task[common.TaskIDInviteRecharge].N += n
|
||||
a := this.WelfData.Task[common.TaskIDInviteRecharge].N / 100
|
||||
this.WelfData.Task[common.TaskIDInviteRecharge].N %= 100
|
||||
SaveInviteScore(&model.InviteScore{
|
||||
Platform: this.Platform,
|
||||
SnId: this.SnId,
|
||||
InviteSnId: this.InviteSnId,
|
||||
Tp: scoreType,
|
||||
Score: a * common.InviteScoreRecharge,
|
||||
Ts: time.Now().UnixNano(),
|
||||
Money: n,
|
||||
})
|
||||
|
||||
case common.InviteScoreTypeGameTimes:
|
||||
score := 0
|
||||
switch {
|
||||
case srvdata.GameFreeMgr.IsGameDif(gameId, common.GameDifTienlen):
|
||||
score = 500
|
||||
case srvdata.GameFreeMgr.IsGameDif(gameId, common.GameDifThirteen):
|
||||
score = 300
|
||||
case srvdata.GameFreeMgr.IsGameDif(gameId, common.GameDifRocket):
|
||||
score = 30
|
||||
case srvdata.GameFreeMgr.IsGameDif(gameId, common.GameDifChess):
|
||||
score = 100
|
||||
}
|
||||
SaveInviteScore(&model.InviteScore{
|
||||
Platform: this.Platform,
|
||||
SnId: this.SnId,
|
||||
InviteSnId: this.InviteSnId,
|
||||
Tp: scoreType,
|
||||
Score: int64(score),
|
||||
Ts: time.Now().UnixNano(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ const (
|
|||
ShopPagePhoneScore = 61 //手机积分商城
|
||||
ShopPagePhoneScoreGoogle = 62
|
||||
ShopPageGift = 7 //礼包页面
|
||||
ShopPageDiamondBank = 8 //钻石存储罐
|
||||
ShopPageBackend = 9 //并不是页面,是后台加币记录类型
|
||||
)
|
||||
|
||||
// 商品类型
|
||||
|
|
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"container/list"
|
||||
"math"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
|
@ -72,6 +73,7 @@ type TaskHandle struct {
|
|||
}
|
||||
|
||||
func (t *TaskHandle) TaskUpdate(id int, data any) {
|
||||
|
||||
info, ok := data.(*TaskData)
|
||||
if !ok {
|
||||
return
|
||||
|
@ -96,24 +98,22 @@ func (t *TaskHandle) TaskUpdate(id int, data any) {
|
|||
case common.TaskTypeWinTimes: // 赢游戏次数
|
||||
|
||||
case common.TaskTypePlayTimes: // 玩游戏次数
|
||||
p.InviteTask(common.InviteScoreTypePlayTimes, int32(info.GameID), num)
|
||||
p.InviteTask(common.InviteScoreTypeGameTimes, int32(info.GameID), num)
|
||||
|
||||
case common.TaskTypeRankMatchTimes: // 排位赛次数
|
||||
|
||||
case common.TaskTypePay: // 玩家充值
|
||||
p.PhoneLotteryTask(common.TaskTypePay, num)
|
||||
p.InviteTask(common.InviteScoreTypeRecharge, int32(info.GameID), num)
|
||||
|
||||
case common.TaskTypeWinOrLose: // 游戏输赢金币数量
|
||||
p.PhoneLotteryTask(common.TaskTypeWinOrLose, num)
|
||||
case common.TaskTypeTienlenCount: //tienlen游戏场次
|
||||
p.PhoneLotteryTask(common.TaskTypeTienlenCount, 1)
|
||||
case common.TaskTypeBindInviter: // 绑定邀请人数量
|
||||
p.InviteTask(common.InviteScoreTypeBind, 0, num)
|
||||
|
||||
case common.TaskTypeWinCoin: // 赢取金币数量
|
||||
|
||||
WelfareMgrSington.UpdateDiamondBankData(p, num, true)
|
||||
case common.TaskTypeLoseCoin: //输的金币数量
|
||||
WelfareMgrSington.UpdateDiamondBankData(p, int64(math.Abs(float64(num))), false)
|
||||
case common.TaskTypeTienlenWinTimes: // tienlen游戏赢取次数
|
||||
|
||||
case common.TaskTypeActivityScore: // 活跃积分数量
|
||||
|
@ -123,7 +123,6 @@ func (t *TaskHandle) TaskUpdate(id int, data any) {
|
|||
case common.TaskTypeFirstLogin:
|
||||
//抽奖次数增加
|
||||
p.PhoneLotteryTask(common.TaskTypeFirstLogin, 0)
|
||||
p.InviteTask(common.InviteScoreTypeLogin, int32(info.GameID), num)
|
||||
p.CollectTask(common.TaskTypeFirstLogin, num)
|
||||
|
||||
case common.TaskTypeInviteNum:
|
||||
|
@ -246,4 +245,5 @@ func init() {
|
|||
TaskSubjectSingleton.Attach(common.TaskTypeInviteNum, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeTurnplate, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeInviteRecharge, taskHandle)
|
||||
TaskSubjectSingleton.Attach(common.TaskTypeLoseCoin, taskHandle)
|
||||
}
|
||||
|
|
|
@ -1206,6 +1206,7 @@ func (this *Tournament) sendPromotionInfo(mc *PlayerMatchContext, sortId int64,
|
|||
Money: data.GetNum(),
|
||||
Tel: mc.p.Tel,
|
||||
CardType: mc.tm.gmd.CardType,
|
||||
Remark: "比赛场获得奖励",
|
||||
}
|
||||
logger.Logger.Trace("GetMatchAwardCode ", pack)
|
||||
var buff []byte
|
||||
|
|
|
@ -1708,6 +1708,7 @@ func init() {
|
|||
SnId: player.SnId,
|
||||
Num: money,
|
||||
})
|
||||
InviteTask(msg.Platform, player.PSnId, player.SnId, common.InviteScoreTypePay, money)
|
||||
}
|
||||
player.SendDiffData()
|
||||
}
|
||||
|
@ -1772,6 +1773,18 @@ func init() {
|
|||
logger.Logger.Errorf("model.UpdatePlayerCoin err:%v.", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
// 充值金额记录
|
||||
if money > 0 {
|
||||
err = model.InsertDbShopLog(model.NewDbShop(findPlayer.Platform, ShopPageBackend, nil, "", 0, 0, int32(money),
|
||||
0, nil, 0, "", findPlayer.SnId, 3, "后台离线加币", nil))
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("model.InsertDbShopLog err:%v.", err)
|
||||
return nil
|
||||
}
|
||||
InviteTask(msg.Platform, findPlayer.PSnId, findPlayer.SnId, common.InviteScoreTypePay, money)
|
||||
}
|
||||
|
||||
//账变记录
|
||||
err = model.InsertCoinLog(coinlogex)
|
||||
if err != nil {
|
||||
|
@ -2468,7 +2481,7 @@ func init() {
|
|||
if len(ret.List) > 0 {
|
||||
playerRankScore = ret.List[0]
|
||||
}
|
||||
playerBagInfo = model.GetBagInfo(id, platform)
|
||||
playerBagInfo, _ = model.GetBagInfo(id, platform)
|
||||
return data
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
playerData, ok := data.(*model.PlayerData)
|
||||
|
@ -2559,7 +2572,7 @@ func init() {
|
|||
for _, v := range ret.List {
|
||||
playerRankScore[v.SnId] = v
|
||||
//todo 优化
|
||||
items := model.GetBagInfo(v.SnId, msg.GetPlatform())
|
||||
items, _ := model.GetBagInfo(v.SnId, msg.GetPlatform())
|
||||
playerItems[v.SnId] = items
|
||||
}
|
||||
|
||||
|
@ -4060,6 +4073,7 @@ func init() {
|
|||
|
||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/pay/CallbackPayment", WebAPIHandlerWrapper(
|
||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||
logger.Logger.Tracef("api /api/pay/CallbackPayment")
|
||||
msg := &webapiproto.ASCallbackPayment{}
|
||||
pack := &webapiproto.SACallbackPayment{}
|
||||
err := proto.Unmarshal(params, msg)
|
||||
|
@ -4078,6 +4092,7 @@ func init() {
|
|||
if info == nil {
|
||||
return errors.New("info is nil")
|
||||
}
|
||||
logger.Logger.Tracef("/api/pay/CallbackPayment ShopLog %+v", *info)
|
||||
if info.State != 0 {
|
||||
return errors.New("the order state not 0 " + info.LogId.Hex())
|
||||
}
|
||||
|
@ -4105,6 +4120,10 @@ func init() {
|
|||
}
|
||||
}
|
||||
BagMgrSingleton.AddItems(player, items, 0, info.GainWay, "Callback", info.Remark, 0, 0, false)
|
||||
//钻石存储罐
|
||||
if info.PageId == ShopPageDiamondBank {
|
||||
WelfareMgrSington.DiamondBankTakeCoin(player)
|
||||
}
|
||||
switch info.Remark {
|
||||
case "BlindBox":
|
||||
if len(info.OtherParams) > 0 {
|
||||
|
@ -4143,10 +4162,17 @@ func init() {
|
|||
SnId: player.SnId,
|
||||
Num: int64(info.ConsumeNum),
|
||||
})
|
||||
InviteTask(msg.Platform, player.PSnId, player.SnId, common.InviteScoreTypePay, int64(info.ConsumeNum))
|
||||
} else {
|
||||
if state == 1 {
|
||||
state = 3
|
||||
}
|
||||
psnid, err := model.GetPlayerInviteSnid(msg.Platform, info.SnId)
|
||||
if err != nil {
|
||||
logger.Logger.Error("UpdateDbShopState.err:", err)
|
||||
return err
|
||||
}
|
||||
InviteTask(msg.Platform, psnid, info.SnId, common.InviteScoreTypePay, int64(info.ConsumeNum))
|
||||
}
|
||||
err := model.UpdateDbShopState(msg.Platform, msg.OrderId, state)
|
||||
if err != nil {
|
||||
|
|
|
@ -2,6 +2,8 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
@ -288,6 +290,8 @@ func (this *WelfareMgr) MonitorWelfData(player *Player) {
|
|||
player.WelfData.VIPBag = make(map[int32]map[int32]int32)
|
||||
} else if player.WelfData.PigBank == nil {
|
||||
player.WelfData.PigBank = &model.PigBankData{}
|
||||
} else if player.WelfData.DiamondBank == nil {
|
||||
player.WelfData.DiamondBank = &model.DiamondBankData{}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -354,6 +358,8 @@ func (this *WelfareMgr) GetTurnplate(p *Player) {
|
|||
p.WelfData.Sign7.SignTickets = ts // 签到
|
||||
if len(p.WelfData.Sign7.TurnplateIdx) >= len(turnplate.RateList) {
|
||||
p.WelfData.Sign7.TurnplateIdx = nil
|
||||
p.WelfData.Sign7.Addup2Data = make(map[int32]map[int32]int64)
|
||||
p.WelfData.Sign7.AddupIndex = []int32{}
|
||||
}
|
||||
p.WelfData.Sign7.TurnplateIdx = append(p.WelfData.Sign7.TurnplateIdx, int32(idx)) // 获取领取转盘下标
|
||||
p.WelfData.Sign7.SignIndex += 1
|
||||
|
@ -454,6 +460,9 @@ func (this *WelfareMgr) GetTurnplteVideo(p *Player) {
|
|||
// 可以领取
|
||||
p.WelfData.Sign7.VideoTicket = ts
|
||||
index := p.WelfData.Sign7.SignIndex % int32(len(turn.RateList))
|
||||
if index == 0 {
|
||||
index = 7
|
||||
}
|
||||
var drawdates []*webapi_proto.WelfareDate
|
||||
for _, v := range sign7.List {
|
||||
if v.Day == index { // 找到对应天数
|
||||
|
@ -635,6 +644,13 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
|||
info := this.GetConfig(p.Platform)
|
||||
turnplate := info.WelfareTurnplateDateList
|
||||
sign7 := info.Welfare7SignDateList
|
||||
//第8天 清除数据
|
||||
|
||||
if p.WelfData.Sign7.SignIndex%int32(len(turnplate.RateList)) == 0 && (time.Now().Unix()-p.WelfData.Sign7.SignTickets)/86400 >= 1 {
|
||||
p.WelfData.Sign7.Addup2Data = make(map[int32]map[int32]int64)
|
||||
p.WelfData.Sign7.AddupIndex = []int32{}
|
||||
}
|
||||
|
||||
if turnplate != nil && sign7 != nil {
|
||||
pack.Switch = turnplate.Switch
|
||||
if turnplate.Switch != model.WelfareClose {
|
||||
|
@ -665,6 +681,7 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
|||
data := &welfare.Welfare7SignDate{
|
||||
Day: v.Day,
|
||||
}
|
||||
ad := &welfare.AddUpWelfareDate{}
|
||||
for _, d := range v.Date {
|
||||
data.Date = append(data.Date, &welfare.WelfareDate{
|
||||
Grade: d.Grade,
|
||||
|
@ -674,9 +691,7 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
|||
})
|
||||
}
|
||||
for _, d := range v.AddUpDate { // 累计奖励
|
||||
ad := &welfare.AddUpWelfareDate{
|
||||
AddUpDay: d.AddUpDay,
|
||||
}
|
||||
ad.AddUpDay = d.AddUpDay
|
||||
for _, d1 := range d.AddUpDate {
|
||||
ad.AddUpDate = append(ad.AddUpDate, &welfare.WelfareDate{
|
||||
Grade: d1.Grade,
|
||||
|
@ -685,8 +700,42 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
|||
Item_Id: d1.Item_Id,
|
||||
})
|
||||
}
|
||||
data.AddUpDate = append(data.AddUpDate, ad)
|
||||
}
|
||||
//进阶数据
|
||||
if p.AppChannel == common.ChannelGooglePlay {
|
||||
for _, d2 := range v.AddUpDate2Google {
|
||||
for _, value := range d2.AddUpDate {
|
||||
ad.AddUp2Date = append(ad.AddUp2Date, &welfare.WelfareDate{
|
||||
Grade: value.Grade,
|
||||
Type: value.Type,
|
||||
Name: value.Name,
|
||||
Item_Id: value.Item_Id,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
for _, d2 := range v.AddUpDate2 {
|
||||
for _, value := range d2.AddUpDate {
|
||||
ad.AddUp2Date = append(ad.AddUp2Date, &welfare.WelfareDate{
|
||||
Grade: value.Grade,
|
||||
Type: value.Type,
|
||||
Name: value.Name,
|
||||
Item_Id: value.Item_Id,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//进阶奖励领取条件
|
||||
for _, value := range v.AddUpDate2Type {
|
||||
ad.AddUp2Type = append(ad.AddUp2Type, &welfare.AddUp2TypeDate{
|
||||
Day: value.Day,
|
||||
Id: value.Id,
|
||||
Num: value.Num,
|
||||
})
|
||||
}
|
||||
data.AddUpDate = append(data.AddUpDate, ad)
|
||||
pack.Slist = append(pack.Slist, data)
|
||||
}
|
||||
pack.TurnplateIdx = append(pack.TurnplateIdx, p.WelfData.Sign7.TurnplateIdx...)
|
||||
|
@ -699,11 +748,134 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
|||
pack.SignDay = signIndex
|
||||
pack.AddUpSignDay = append(pack.AddUpSignDay, p.WelfData.Sign7.AddupIndex...)
|
||||
}
|
||||
//七日签到进阶奖励数据
|
||||
// 进阶奖励key1 - day key2-次数 value-结束领取时间戳(-1代表已领取)
|
||||
for day, value := range p.WelfData.Sign7.Addup2Data {
|
||||
addUp2 := &welfare.Addup2Data{}
|
||||
addUp2.Day = day
|
||||
for num, endTime := range value {
|
||||
addUp2.Num = num
|
||||
addUp2.EndTime = endTime
|
||||
}
|
||||
pack.Addup2 = append(pack.Addup2, addUp2)
|
||||
}
|
||||
}
|
||||
logger.Logger.Tracef("WelfaredInfo snid: %v pack: %v", p.SnId, pack)
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_WELFAREINFO), pack)
|
||||
}
|
||||
|
||||
// 更新进阶奖励时间
|
||||
func (this *WelfareMgr) UpdateAddUp2Date(p *Player, count, day int32, endTime int64) {
|
||||
if p.WelfData.Sign7.Addup2Data == nil {
|
||||
p.WelfData.Sign7.Addup2Data = make(map[int32]map[int32]int64)
|
||||
}
|
||||
//p.WelfData.Sign7.Addup2Data[day][1] = time.Now().Unix() + 3600
|
||||
info := this.GetConfig(p.Platform)
|
||||
if info == nil {
|
||||
return
|
||||
}
|
||||
sign7 := info.Welfare7SignDateList
|
||||
if sign7 == nil {
|
||||
return
|
||||
}
|
||||
list := sign7.List
|
||||
if list == nil {
|
||||
return
|
||||
}
|
||||
addUpDate2Type := list[day-1].AddUpDate2Type
|
||||
if addUpDate2Type == nil {
|
||||
return
|
||||
}
|
||||
p.WelfData.Sign7.Addup2Data[day] = make(map[int32]int64)
|
||||
p.WelfData.Sign7.Addup2Data[day][count] = endTime
|
||||
//通知客户端
|
||||
pack := &welfare.SCSignDayAddup2Award{}
|
||||
pack.Day = day
|
||||
pack.Num = count
|
||||
pack.EndTime = p.WelfData.Sign7.Addup2Data[day][count]
|
||||
logger.Logger.Trace("通知客户端更新进阶奖励时间!!!!!!!!")
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SC_SignDay_Addup2Award), pack)
|
||||
if !this.Welfareturnplate(p, 0) {
|
||||
p.SendShowRed(hall_proto.ShowRedCode_Welfare, 0, 1) // 0 轮盘红点
|
||||
}
|
||||
}
|
||||
|
||||
// 领取进阶奖励
|
||||
func (this *WelfareMgr) GetAddUp2Award(p *Player, day int32) {
|
||||
// 判断是否已经领取
|
||||
Num := int32(0)
|
||||
EndTime := int64(0)
|
||||
if p.WelfData.Sign7.Addup2Data[day] == nil {
|
||||
return
|
||||
}
|
||||
for num, endTime := range p.WelfData.Sign7.Addup2Data[day] {
|
||||
if endTime == -1 {
|
||||
return
|
||||
}
|
||||
if endTime < time.Now().Unix() {
|
||||
return
|
||||
}
|
||||
Num = num
|
||||
EndTime = endTime
|
||||
}
|
||||
//获取配置
|
||||
info := this.GetConfig(p.Platform)
|
||||
if info == nil {
|
||||
return
|
||||
}
|
||||
sign7 := info.Welfare7SignDateList
|
||||
if sign7 == nil {
|
||||
return
|
||||
}
|
||||
list := sign7.List
|
||||
if list == nil {
|
||||
return
|
||||
}
|
||||
addUpDate2 := list[day-1].AddUpDate2
|
||||
if p.AppChannel == common.ChannelGooglePlay {
|
||||
addUpDate2 = list[day-1].AddUpDate2Google
|
||||
}
|
||||
addUpDate2Type := list[day-1].AddUpDate2Type
|
||||
if addUpDate2Type == nil {
|
||||
return
|
||||
}
|
||||
typeId := addUpDate2Type[0].Id
|
||||
addUpDate2Num := addUpDate2Type[0].Num
|
||||
if typeId == 1 {
|
||||
Num += 1
|
||||
} else {
|
||||
//扣除钻石
|
||||
if p.Diamond < int64(addUpDate2Num) {
|
||||
return
|
||||
}
|
||||
p.AddDiamond(int64(-addUpDate2Num), 0, common.GainWaySign7Con, "system", "累计签到进阶奖励钻石消耗")
|
||||
logger.Logger.Trace("累计签到进阶奖励,扣除钻石uid = ", p.SnId)
|
||||
EndTime = -1
|
||||
}
|
||||
p.WelfData.Sign7.Addup2Data[day] = make(map[int32]int64)
|
||||
p.WelfData.Sign7.Addup2Data[day][Num+1] = EndTime
|
||||
if typeId == 1 && Num >= addUpDate2Num {
|
||||
EndTime = -1
|
||||
}
|
||||
if EndTime == -1 {
|
||||
//发奖
|
||||
var items []*Item
|
||||
for _, d2 := range addUpDate2 {
|
||||
for _, value := range d2.AddUpDate {
|
||||
item := &Item{
|
||||
ItemId: value.Item_Id,
|
||||
ItemNum: int64(value.Grade),
|
||||
}
|
||||
items = append(items, item)
|
||||
}
|
||||
}
|
||||
BagMgrSingleton.AddItems(p, items, 0, common.GainWaySign7Add, "system", "累计签到进阶奖励获得", 0, 0, false)
|
||||
}
|
||||
//通知客户端
|
||||
this.UpdateAddUp2Date(p, Num, day, EndTime)
|
||||
|
||||
}
|
||||
|
||||
// WelfareSwitch 通知活动开关状态
|
||||
func (this *WelfareMgr) WelfareSwitch(p *Player, platform string, op int) {
|
||||
pack := &player_proto.SCEasyWelfaredInfo{}
|
||||
|
@ -851,7 +1023,15 @@ func (this *WelfareMgr) Welfareturnplate(p *Player, op int32) bool { // 0 红点
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//进阶奖励key1 - day key2-次数 value-结束领取时间戳(-1代表已领取)
|
||||
for _, data := range p.WelfData.Sign7.Addup2Data {
|
||||
for _, endTime := range data {
|
||||
if time.Now().Unix() < endTime && endTime != -1 {
|
||||
isShow = false // 有未领取进阶奖励
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return isShow
|
||||
}
|
||||
|
@ -1477,7 +1657,7 @@ func (this *WelfareMgr) PigbankGetInfo(p *Player) {
|
|||
return 0
|
||||
}
|
||||
|
||||
fGetCostDiamond := func(taketimes int32) int64 {
|
||||
/* fGetCostDiamond := func(taketimes int32) int64 {
|
||||
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
|
||||
for _, data := range pool {
|
||||
if taketimes >= data.BuyCountMin && taketimes <= data.BuyCountMax {
|
||||
|
@ -1485,16 +1665,31 @@ func (this *WelfareMgr) PigbankGetInfo(p *Player) {
|
|||
}
|
||||
}
|
||||
return 0
|
||||
}*/
|
||||
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
|
||||
infoData := pool[0]
|
||||
for _, data := range pool {
|
||||
if p.WelfData.PigBank.DayBuyTimes+1+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
infoData = data
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
BankMaxCoin := int64(0)
|
||||
for _, data := range srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() {
|
||||
if p.WelfData.PigBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
BankMaxCoin = int64(data.MaxGold)
|
||||
break
|
||||
}
|
||||
}
|
||||
if p.WelfData != nil && p.WelfData.PigBank != nil {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_Sucess
|
||||
pack.BankCoin = p.WelfData.PigBank.BankCoin
|
||||
pack.TakeTimes = p.WelfData.PigBank.DayBuyTimes
|
||||
pack.CostDiamond = fGetCostDiamond(p.WelfData.PigBank.DayBuyTimes + 1)
|
||||
pack.BankMaxCoin = int64(fGetPropValue("BankMaxCoin"))
|
||||
pack.CostDiamond = int64(infoData.CostDiamond)
|
||||
pack.BankMaxCoin = BankMaxCoin
|
||||
pack.DayBuyMaxCnt = fGetPropValue("DayBuyMaxCnt")
|
||||
|
||||
pack.Price = int64(infoData.CoinPrice)
|
||||
logger.Logger.Tracef("PigbankGetInfo snid: %v pack: %v", p.SnId, pack)
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPigbankGetInfo), pack)
|
||||
}
|
||||
|
@ -1516,7 +1711,7 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) {
|
|||
return 0
|
||||
}
|
||||
|
||||
fGetCostDiamond := func(taketimes int32) int64 {
|
||||
/* fGetCostDiamond := func(taketimes int32) int64 {
|
||||
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
|
||||
for _, data := range pool {
|
||||
if taketimes >= data.BuyCountMin && taketimes <= data.BuyCountMax {
|
||||
|
@ -1524,14 +1719,29 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) {
|
|||
}
|
||||
}
|
||||
return 0
|
||||
}*/
|
||||
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
|
||||
infoData := pool[0]
|
||||
for _, data := range pool {
|
||||
if p.WelfData.PigBank.DayBuyTimes+1+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
infoData = data
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
BankMaxCoin := int64(0)
|
||||
for _, data := range srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() {
|
||||
if p.WelfData.PigBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
BankMaxCoin = int64(data.MaxGold)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
BankMaxCoin := int64(fGetPropValue("BankMaxCoin"))
|
||||
DayBuyMaxCnt := fGetPropValue("DayBuyMaxCnt")
|
||||
|
||||
if p.WelfData != nil && p.WelfData.PigBank != nil {
|
||||
|
||||
pack.CostDiamond = fGetCostDiamond(p.WelfData.PigBank.DayBuyTimes + 1)
|
||||
pack.CostDiamond = int64(infoData.CostDiamond)
|
||||
pack.BankMaxCoin = BankMaxCoin
|
||||
|
||||
// 检查每日领取次数
|
||||
|
@ -1543,15 +1753,15 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) {
|
|||
}
|
||||
|
||||
// 检查存钱罐是否满
|
||||
if p.WelfData.PigBank.BankCoin < BankMaxCoin {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_PigbankNotFull
|
||||
logger.Logger.Trace("存钱罐没有满")
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPigbankTakeCoin), pack)
|
||||
return
|
||||
}
|
||||
/* if p.WelfData.PigBank.BankCoin < BankMaxCoin {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_PigbankNotFull
|
||||
logger.Logger.Trace("存钱罐没有满")
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPigbankTakeCoin), pack)
|
||||
return
|
||||
}*/
|
||||
|
||||
// 先扣钻石
|
||||
costDiamond := fGetCostDiamond(p.WelfData.PigBank.DayBuyTimes + 1)
|
||||
costDiamond := int64(infoData.CostDiamond)
|
||||
if p.Diamond >= costDiamond {
|
||||
logger.Logger.Trace("开存钱罐消耗钻石", costDiamond)
|
||||
p.AddDiamond(-costDiamond, 0, common.GainWay_PigrankTakeCoin, "system", "-开存钱罐消耗钻石")
|
||||
|
@ -1563,23 +1773,25 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) {
|
|||
}
|
||||
|
||||
if p.WelfData.PigBank.BankCoin >= BankMaxCoin {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_Sucess
|
||||
pack.TakeCoinNum = BankMaxCoin
|
||||
|
||||
p.AddCoin(BankMaxCoin, 0, common.GainWay_PigrankGainCoin, "sys", "存钱罐领取金币")
|
||||
|
||||
// 领取完之后 设置为0
|
||||
p.WelfData.PigBank.BankCoin = 0
|
||||
p.WelfData.PigBank.TakeTimes++
|
||||
p.WelfData.PigBank.DayBuyTimes++
|
||||
|
||||
pack.TakeTimes = p.WelfData.PigBank.DayBuyTimes
|
||||
pack.CostDiamond = fGetCostDiamond(p.WelfData.PigBank.DayBuyTimes + 1)
|
||||
pack.DayBuyMaxCnt = DayBuyMaxCnt
|
||||
|
||||
logger.Logger.Tracef("PigbankTakeCoin snid: %v pack: %v", p.SnId, pack)
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPigbankTakeCoin), pack)
|
||||
p.WelfData.PigBank.BankCoin = BankMaxCoin
|
||||
}
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_Sucess
|
||||
pack.TakeCoinNum = p.WelfData.PigBank.BankCoin
|
||||
|
||||
p.AddCoin(p.WelfData.PigBank.BankCoin, 0, common.GainWay_PigrankGainCoin, "sys", "存钱罐领取金币")
|
||||
|
||||
// 领取完之后 设置为0
|
||||
p.WelfData.PigBank.BankCoin = 0
|
||||
p.WelfData.PigBank.TakeTimes++
|
||||
p.WelfData.PigBank.DayBuyTimes++
|
||||
|
||||
pack.TakeTimes = p.WelfData.PigBank.DayBuyTimes
|
||||
pack.CostDiamond = int64(infoData.CostDiamond)
|
||||
pack.DayBuyMaxCnt = DayBuyMaxCnt
|
||||
pack.Price = int64(infoData.CoinPrice)
|
||||
logger.Logger.Tracef("PigbankTakeCoin snid: %v pack: %v", p.SnId, pack)
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCPigbankTakeCoin), pack)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1591,6 +1803,156 @@ func (this *WelfareMgr) DayResetPigrank(p *Player) {
|
|||
|
||||
this.PigbankGetInfo(p)
|
||||
}
|
||||
if p != nil && p.WelfData != nil && p.WelfData.DiamondBank != nil {
|
||||
p.WelfData.DiamondBank.DayBuyTimes = 0
|
||||
this.DiamondBankGetInfo(p)
|
||||
}
|
||||
}
|
||||
|
||||
// 钻石储存罐信息
|
||||
func (this *WelfareMgr) DiamondBankGetInfo(p *Player) {
|
||||
pack := &welfare.SCDiamondBankGetInfo{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||
}
|
||||
fGetPropValue := func(propName string) int32 {
|
||||
pool := srvdata.PBDB_Pigbank_PropMgr.Datas.GetArr()
|
||||
for _, PropItem := range pool {
|
||||
if PropItem.PorpName == propName {
|
||||
return PropItem.PropValue
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
|
||||
infoData := pool[0]
|
||||
if p.WelfData.DiamondBank == nil {
|
||||
p.WelfData.DiamondBank = &model.DiamondBankData{}
|
||||
}
|
||||
for _, data := range pool {
|
||||
if p.WelfData.DiamondBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.DiamondBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
infoData = data
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
BankMaxCoin := infoData.MaxDiamond
|
||||
if p.WelfData != nil && p.WelfData.DiamondBank != nil {
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_Sucess
|
||||
pack.BankDiamond = p.WelfData.DiamondBank.BankDiamond
|
||||
pack.TakeTimes = p.WelfData.DiamondBank.DayBuyTimes
|
||||
pack.BankMaxCoin = int64(BankMaxCoin)
|
||||
pack.DayBuyMaxCnt = fGetPropValue("DayBuyMaxCntDiamond")
|
||||
pack.Price = int64(infoData.DiamondPrice)
|
||||
pack.NowPrice = int64(infoData.DiamondNowPrice)
|
||||
pack.ShopId = infoData.DiamondId
|
||||
logger.Logger.Tracef("DiamondBankGetInfo snid: %v pack: %v", p.SnId, pack)
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCDiamondBankGetInfo), pack)
|
||||
}
|
||||
}
|
||||
|
||||
// DiamondBankTakeCoin 钻石存钱罐领取钻石
|
||||
func (this *WelfareMgr) DiamondBankTakeCoin(p *Player) {
|
||||
pack := &welfare.SCDiamondBankTakeDiamond{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||
}
|
||||
fGetPropValue := func(propName string) int32 {
|
||||
pool := srvdata.PBDB_Pigbank_PropMgr.Datas.GetArr()
|
||||
for _, PropItem := range pool {
|
||||
if PropItem.PorpName == propName {
|
||||
return PropItem.PropValue
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
|
||||
infoData := pool[0]
|
||||
for _, data := range pool {
|
||||
if p.WelfData.DiamondBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.DiamondBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
infoData = data
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
BankMaxDiamond := int64(infoData.MaxDiamond)
|
||||
DayBuyMaxCnt := fGetPropValue("DayBuyMaxCntDiamond")
|
||||
|
||||
if p.WelfData != nil && p.WelfData.PigBank != nil {
|
||||
if p.WelfData.DiamondBank.BankDiamond >= float64(BankMaxDiamond) {
|
||||
p.WelfData.DiamondBank.BankDiamond = float64(BankMaxDiamond)
|
||||
}
|
||||
pack.OpRetCode = welfare.OpResultCode_OPRC_Sucess
|
||||
addDiamond := int64(math.Ceil(p.WelfData.DiamondBank.BankDiamond))
|
||||
p.AddDiamond(addDiamond, 0, common.GainWay_PigrankGainDiamond, "sys", "存钱罐领取钻石")
|
||||
|
||||
// 领取完之后 设置为0
|
||||
p.WelfData.DiamondBank.BankDiamond = 0.0
|
||||
p.WelfData.DiamondBank.TakeTimes++
|
||||
p.WelfData.DiamondBank.DayBuyTimes++
|
||||
|
||||
for _, data := range pool {
|
||||
if p.WelfData.DiamondBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.DiamondBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
infoData = data
|
||||
break
|
||||
}
|
||||
}
|
||||
pack.BankMaxDiamond = int64(infoData.MaxDiamond)
|
||||
pack.TakeTimes = p.WelfData.DiamondBank.DayBuyTimes
|
||||
pack.DayBuyMaxCnt = DayBuyMaxCnt
|
||||
pack.TakeDiamondNum = float64(addDiamond)
|
||||
pack.Price = int64(infoData.DiamondPrice)
|
||||
pack.NowPrice = int64(infoData.DiamondNowPrice)
|
||||
pack.ShopId = infoData.DiamondId
|
||||
logger.Logger.Tracef("DiamondBankTakeCoin snid: %v pack: %v", p.SnId, pack)
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCDiamondBankTakeDiamond), pack)
|
||||
}
|
||||
}
|
||||
|
||||
// 更新钻石存储罐数据
|
||||
func (this *WelfareMgr) UpdateDiamondBankData(p *Player, coinNum int64, isWin bool) {
|
||||
logger.Logger.Trace("更新钻石存储罐数据!!!!!!!!!!")
|
||||
if p.WelfData.DiamondBank == nil {
|
||||
p.WelfData.DiamondBank = &model.DiamondBankData{}
|
||||
}
|
||||
fGetPropValue := func(propName string) int32 {
|
||||
pool := srvdata.PBDB_Pigbank_PropMgr.Datas.GetArr()
|
||||
for _, PropItem := range pool {
|
||||
if PropItem.PorpName == propName {
|
||||
return PropItem.PropValue
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
if p.WelfData.DiamondBank.DayBuyTimes == fGetPropValue("DayBuyMaxCntDiamond") {
|
||||
return
|
||||
}
|
||||
WinCoinRate := fGetPropValue("WinCoinRateDiamond")
|
||||
LoseCoinRate := fGetPropValue("LoseCoinRateDiamond")
|
||||
addDiamond := float64(0)
|
||||
if isWin {
|
||||
addDiamond = float64(coinNum) * float64(WinCoinRate) / 10000000
|
||||
} else {
|
||||
addDiamond = float64(coinNum) * float64(LoseCoinRate) / 10000000
|
||||
}
|
||||
//保留小数点后4位
|
||||
diamondStr := fmt.Sprintf("%.4f", addDiamond)
|
||||
addDiamond, _ = strconv.ParseFloat(diamondStr, 64)
|
||||
p.WelfData.DiamondBank.BankDiamond += addDiamond
|
||||
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
|
||||
infoData := pool[0]
|
||||
for _, data := range pool {
|
||||
if p.WelfData.DiamondBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.DiamondBank.DayBuyTimes+1 <= data.BuyCountMax {
|
||||
infoData = data
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
BankMaxDiamond := int64(infoData.MaxDiamond)
|
||||
if p.WelfData.DiamondBank.BankDiamond >= float64(BankMaxDiamond) {
|
||||
p.WelfData.DiamondBank.BankDiamond = float64(BankMaxDiamond)
|
||||
}
|
||||
logger.Logger.Tracef("玩家更新钻石存储罐数据 snid = %d,coinNum = %d,isWin = %s,当前钻石存储罐钻石数量:%f,本次增加钻石数量:%f", p.SnId, coinNum, isWin, p.WelfData.DiamondBank.BankDiamond, addDiamond)
|
||||
}
|
||||
func (this *WelfareMgr) Update() {
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
xlsx/DB_VIP.xlsx
BIN
xlsx/DB_VIP.xlsx
Binary file not shown.
Loading…
Reference in New Issue