add 推币机

This commit is contained in:
sk 2025-01-09 15:44:22 +08:00
parent fb56a50a3b
commit 6db4ceec10
16 changed files with 347 additions and 171 deletions

View File

@ -604,7 +604,11 @@ const (
ItemIDRoomCard = 40002 // 房卡
ItemIDLittleGuaranteed = 50014 //小爆竹
ItemIDBigGuaranteed = 50015 //大爆竹
ItemIDPlum = 50016 //梅花(推币机)
ItemIDBigCoin = 50017 //大金币
ItemIDCoin1 = 500018 //金币1
ItemIDCoin2 = 500019 //金币2
ItemIDCoin3 = 500020 //金币3
)
func ToItemId(id int32) int32 {

View File

@ -1,11 +1,11 @@
 ЎЌ ЁГ
иЎЌ
 в† ЁГ
ив†
І
ВЎЌ  Ќ
Вв†  Ќ
Ü ±ê <20>N
î±ê І
ú¢<>  <>
èᆠІ
à† °ê
 dк ЂВЧ/
 d»к ЂВЧ/

View File

@ -4,7 +4,7 @@
"Id": 1,
"Rate": 4000,
"Gain": {
"100001": 5
"50018": 5
},
"Value": 25000
},
@ -12,7 +12,7 @@
"Id": 2,
"Rate": 1000,
"Gain": {
"100001": 10
"50018": 10
},
"Value": 50000
},
@ -20,7 +20,7 @@
"Id": 3,
"Rate": 450,
"Gain": {
"100001": 20
"50018": 20
},
"Value": 100000
},
@ -68,7 +68,7 @@
"Id": 9,
"Rate": 100,
"Gain": {
"30006": 1
"30011": 1
},
"Value": 100000000
}

Binary file not shown.

View File

@ -4574,7 +4574,7 @@
{
"Id": 2110002,
"Name": "十三张四人",
"Title": "小康场",
"Title": "中级场",
"GameId": 211,
"GameRule": 21100,
"GameType": 2,
@ -4628,7 +4628,7 @@
{
"Id": 2110003,
"Name": "十三张四人",
"Title": "土豪场",
"Title": "高级场",
"GameId": 211,
"GameRule": 21100,
"GameType": 2,
@ -4682,7 +4682,7 @@
{
"Id": 2110004,
"Name": "十三张四人",
"Title": "新手场",
"Title": "富豪场",
"GameId": 211,
"GameRule": 21100,
"GameType": 2,
@ -4736,7 +4736,7 @@
{
"Id": 2110005,
"Name": "十三张四人",
"Title": "小康场",
"Title": "至尊场",
"GameId": 211,
"GameRule": 21100,
"GameType": 2,
@ -4790,7 +4790,7 @@
{
"Id": 2110006,
"Name": "十三张四人",
"Title": "土豪场",
"Title": "大神场",
"GameId": 211,
"GameRule": 21100,
"GameType": 2,
@ -4897,7 +4897,7 @@
{
"Id": 2120002,
"Name": "十三张八人",
"Title": "小康场",
"Title": "中级场",
"GameId": 212,
"GameRule": 21200,
"GameType": 2,
@ -4951,7 +4951,7 @@
{
"Id": 2120003,
"Name": "十三张八人",
"Title": "土豪场",
"Title": "高级场",
"GameId": 212,
"GameRule": 21200,
"GameType": 2,
@ -5005,7 +5005,7 @@
{
"Id": 2120004,
"Name": "十三张八人",
"Title": "新手场",
"Title": "富豪场",
"GameId": 212,
"GameRule": 21200,
"GameType": 2,
@ -5059,7 +5059,7 @@
{
"Id": 2120005,
"Name": "十三张八人",
"Title": "小康场",
"Title": "至尊场",
"GameId": 212,
"GameRule": 21200,
"GameType": 2,
@ -5113,7 +5113,7 @@
{
"Id": 2120006,
"Name": "十三张八人",
"Title": "土豪场",
"Title": "大神场",
"GameId": 212,
"GameRule": 21200,
"GameType": 2,
@ -7023,22 +7023,36 @@
{
"Id": 6090001,
"Name": "推币机",
"Title": "推币机",
"GameId": 609,
"GameRule": 60900,
"GameType": 5,
"SceneType": 1,
"Desc": "0",
"ShowType": 3,
"ShowId": 60900,
"Turn": 60900,
"BetDec": "0",
"Ai": [
0
],
"OtherIntParams": [
5000,
10000,
15000
],
"RobotNumRng": [
0
],
"SameIpLimit": 1,
"GameDif": "609",
"GameClass": 2,
"PlatformName": "越南棋牌",
"MaxBetCoin": [
0
],
"PlayerWaterRate": 100,
"BetWaterRate": 100,
"GameName": "推币机"
}
]

Binary file not shown.

View File

@ -7373,8 +7373,122 @@
"Composition": 1,
"CompositionMax": 9999,
"Location": "0",
"Describe": "可在推币机活动兑换道具",
"Num": 10
"Describe": "推币机活动中掉落的3D道具",
"Num": 50000
},
{
"Id": 50018,
"Name": "3D金币5K",
"ShowLocation": [
0,
0,
0
],
"Classify": [
0,
0,
0
],
"Type": 29,
"Effect0": [
0,
0,
0,
0,
0,
0
],
"Effect": [
0,
0,
0,
0,
0,
0
],
"SaleType": 1,
"SaleGold": 5000,
"Composition": 1,
"CompositionMax": 9999,
"Location": "0",
"Describe": "推币机活动中掉落的3D道具",
"Num": 5000
},
{
"Id": 50019,
"Name": "3D金币10K",
"ShowLocation": [
0,
0,
0
],
"Classify": [
0,
0,
0
],
"Type": 29,
"Effect0": [
0,
0,
0,
0,
0,
0
],
"Effect": [
0,
0,
0,
0,
0,
0
],
"SaleType": 1,
"SaleGold": 5000,
"Composition": 1,
"CompositionMax": 9999,
"Location": "0",
"Describe": "推币机活动中掉落的3D道具",
"Num": 10000
},
{
"Id": 50020,
"Name": "3D金币15K",
"ShowLocation": [
0,
0,
0
],
"Classify": [
0,
0,
0
],
"Type": 29,
"Effect0": [
0,
0,
0,
0,
0,
0
],
"Effect": [
0,
0,
0,
0,
0,
0
],
"SaleType": 1,
"SaleGold": 5000,
"Composition": 1,
"CompositionMax": 9999,
"Location": "0",
"Describe": "推币机活动中掉落的3D道具",
"Num": 15000
}
]
}

View File

@ -1,8 +1,8 @@
6в├с├т├у├ж├"║█ю└=
.ь├ы├зш"║█ю└=
Wу├ж├ы├з├т├в├ь├ш├с" ║█─╜Б
]ь├з├ш├э├с├у├ж├т├в├ы"╒█Т
6с├т├у├жв"║█ю└=
.ш├ь├ы├з├"║█ю└=
Wж├ь├с├т├ы├з├ш├у├в" ║█─╜Б
]в├ы├ш├с├у├ь├з├э├т├ж"╒█Т
à†"¸0
à†
"¢<>0

Binary file not shown.

View File

@ -561,10 +561,9 @@ type PushCoinData struct {
Shake int32 // 震动次数
Refresh int64 // 刷新次数
Power int64 // 能量值
Base int64 // 底注
Value int64 // 价值
Exchange map[int32]int32 // 兑换次数 兑换id:兑换次数
Dram int // 抽奖次数
Items map[int32]int64 // 道具
}
type WelfareData struct {

View File

@ -85,8 +85,8 @@ type OpCodes int32
const (
OpCodes_OP_Zero OpCodes = 0
OpCodes_OP_Bet OpCodes = 1 // 下注 OpParam 下注金额
OpCodes_OP_Gain OpCodes = 2 // 得分 OpItem 获得道具
OpCodes_OP_Bet OpCodes = 1 // 下注 OpParam 道具id
OpCodes_OP_Gain OpCodes = 2 // 得分 OpParam 1有效区 2无效区 OpItem 获得道具
OpCodes_OP_Shake OpCodes = 3 // 震动 OpParam 消耗次数
OpCodes_OP_Refresh OpCodes = 4 // 刷新 OpParam 桌面金额
OpCodes_OP_Exchange OpCodes = 5 // 兑换 OpParam 兑换id
@ -233,12 +233,10 @@ type SCPushCoinInfo struct {
ExchangeList []*ExchangeInfo `protobuf:"bytes,1,rep,name=ExchangeList,proto3" json:"ExchangeList,omitempty"` //兑换信息
DrawList []*DrawInfo `protobuf:"bytes,2,rep,name=DrawList,proto3" json:"DrawList,omitempty"` //抽奖信息
BetList []int64 `protobuf:"varint,3,rep,packed,name=BetList,proto3" json:"BetList,omitempty"` //下注金额列表
ShakeTimes int32 `protobuf:"varint,4,opt,name=ShakeTimes,proto3" json:"ShakeTimes,omitempty"` //可震动次数
BaseCoin int64 `protobuf:"varint,5,opt,name=BaseCoin,proto3" json:"BaseCoin,omitempty"` //当前底分(单次投币金额)
PowerLine int64 `protobuf:"varint,6,opt,name=PowerLine,proto3" json:"PowerLine,omitempty"` // 当前能量值
PowerLineMax int64 `protobuf:"varint,7,opt,name=PowerLineMax,proto3" json:"PowerLineMax,omitempty"` // 能量值上限
RefreshTimes int64 `protobuf:"varint,8,opt,name=RefreshTimes,proto3" json:"RefreshTimes,omitempty"` // 刷新次数
ShakeTimes int32 `protobuf:"varint,3,opt,name=ShakeTimes,proto3" json:"ShakeTimes,omitempty"` //可震动次数
PowerLine int64 `protobuf:"varint,4,opt,name=PowerLine,proto3" json:"PowerLine,omitempty"` // 当前能量值
PowerLineMax int64 `protobuf:"varint,5,opt,name=PowerLineMax,proto3" json:"PowerLineMax,omitempty"` // 能量值上限
RefreshTimes int64 `protobuf:"varint,6,opt,name=RefreshTimes,proto3" json:"RefreshTimes,omitempty"` // 刷新次数
}
func (x *SCPushCoinInfo) Reset() {
@ -287,13 +285,6 @@ func (x *SCPushCoinInfo) GetDrawList() []*DrawInfo {
return nil
}
func (x *SCPushCoinInfo) GetBetList() []int64 {
if x != nil {
return x.BetList
}
return nil
}
func (x *SCPushCoinInfo) GetShakeTimes() int32 {
if x != nil {
return x.ShakeTimes
@ -301,13 +292,6 @@ func (x *SCPushCoinInfo) GetShakeTimes() int32 {
return 0
}
func (x *SCPushCoinInfo) GetBaseCoin() int64 {
if x != nil {
return x.BaseCoin
}
return 0
}
func (x *SCPushCoinInfo) GetPowerLine() int64 {
if x != nil {
return x.PowerLine
@ -736,7 +720,7 @@ var file_protocol_activity_pushcoin_proto_rawDesc = []byte{
0x0a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76,
0x69, 0x74, 0x79, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x10, 0x0a, 0x0e,
0x43, 0x53, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xb8,
0x43, 0x53, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x82,
0x02, 0x0a, 0x0e, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x66,
0x6f, 0x12, 0x3a, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73,
0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
@ -744,94 +728,91 @@ var file_protocol_activity_pushcoin_proto_rawDesc = []byte{
0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x0a,
0x08, 0x44, 0x72, 0x61, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x08, 0x44, 0x72, 0x61, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a,
0x07, 0x42, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07,
0x42, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x6b, 0x65,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x68, 0x61,
0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x61, 0x73, 0x65, 0x43,
0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x42, 0x61, 0x73, 0x65, 0x43,
0x6f, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e,
0x65, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x61,
0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69,
0x6e, 0x65, 0x4d, 0x61, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x52, 0x65, 0x66,
0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x08, 0x49, 0x74, 0x65,
0x6d, 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, 0x05, 0x52, 0x07,
0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x22, 0xc4, 0x01, 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, 0x26, 0x0a, 0x04, 0x43, 0x6f, 0x73, 0x74,
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
0x79, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x43, 0x6f, 0x73, 0x74,
0x12, 0x26, 0x0a, 0x04, 0x47, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12,
0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x04, 0x47, 0x61, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x6b,
0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x68,
0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1e,
0x0a, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x60,
0x0a, 0x08, 0x44, 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74,
0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d,
0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 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,
0x22, 0x85, 0x01, 0x0a, 0x12, 0x43, 0x53, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50,
0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x12, 0x29, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
0x6e, 0x66, 0x6f, 0x52, 0x08, 0x44, 0x72, 0x61, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a,
0x0a, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0a, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x0a,
0x09, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
0x52, 0x09, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x50,
0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x78, 0x12,
0x22, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18,
0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 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, 0x05, 0x52, 0x07, 0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75,
0x6d, 0x22, 0xc4, 0x01, 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, 0x26, 0x0a, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x49, 0x74, 0x65, 0x6d,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x47, 0x61,
0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76,
0x69, 0x74, 0x79, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x47, 0x61,
0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
0x03, 0x52, 0x05, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x54, 0x6f, 0x74, 0x61,
0x6c, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x54, 0x6f,
0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x08, 0x44, 0x72, 0x61, 0x77,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 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, 0x22, 0x85, 0x01, 0x0a, 0x12, 0x43,
0x53, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f,
0x70, 0x12, 0x29, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x11, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4f, 0x70, 0x43,
0x6f, 0x64, 0x65, 0x73, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07,
0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x4f,
0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x2a, 0x0a, 0x06, 0x4f, 0x70, 0x49, 0x74, 0x65, 0x6d,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
0x79, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x4f, 0x70, 0x49, 0x74,
0x65, 0x6d, 0x22, 0xb1, 0x01, 0x0a, 0x12, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69,
0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x12, 0x3c, 0x0a, 0x09, 0x4f, 0x70, 0x52,
0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61,
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70,
0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
0x74, 0x79, 0x2e, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f,
0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20,
0x01, 0x28, 0x03, 0x52, 0x07, 0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x2a, 0x0a, 0x06,
0x4f, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61,
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x06, 0x4f, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x22, 0xb1, 0x01, 0x0a, 0x12, 0x53, 0x43, 0x50,
0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x12,
0x3c, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4f, 0x70,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x6f,
0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a,
0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e,
0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x73,
0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x68,
0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x74,
0x69, 0x76, 0x69, 0x74, 0x79, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x08, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x53, 0x0a, 0x0f,
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12,
0x1c, 0x0a, 0x09, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x09, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x22, 0x0a,
0x0c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x78, 0x18, 0x02, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x61,
0x78, 0x2a, 0xdd, 0x01, 0x0a, 0x10, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x61,
0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00,
0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x75, 0x73,
0x68, 0x43, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xf8, 0x14, 0x12, 0x1a, 0x0a, 0x15,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69,
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xf9, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61,
0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xfa, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61,
0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xfb, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69,
0x6e, 0x65, 0x10, 0xfc, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x44, 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xfd,
0x14, 0x2a, 0x5e, 0x0a, 0x07, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07,
0x4f, 0x50, 0x5f, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x50, 0x5f,
0x42, 0x65, 0x74, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x5f, 0x47, 0x61, 0x69, 0x6e,
0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x5f, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x10, 0x03,
0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x5f, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x10, 0x04,
0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x5f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10,
0x05, 0x2a, 0x4a, 0x0a, 0x14, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x50, 0x75, 0x73,
0x68, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x52,
0x43, 0x5f, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x75, 0x73,
0x68, 0x43, 0x6f, 0x69, 0x6e, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x42, 0x28, 0x5a,
0x26, 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, 0x61,
0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x64, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x2e,
0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x45, 0x78,
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x53, 0x0a, 0x0f, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79,
0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x6f, 0x77,
0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x50, 0x6f,
0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x50, 0x6f, 0x77, 0x65, 0x72,
0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x50,
0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x78, 0x2a, 0xdd, 0x01, 0x0a, 0x10,
0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44,
0x12, 0x18, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x50, 0x75, 0x73, 0x68, 0x43,
0x6f, 0x69, 0x6e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x49,
0x6e, 0x66, 0x6f, 0x10, 0xf8, 0x14, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x53, 0x43, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10,
0xf9, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x50,
0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10,
0xfa, 0x14, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x50,
0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10,
0xfb, 0x14, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4e, 0x6f, 0x74,
0x69, 0x66, 0x79, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x10, 0xfc, 0x14, 0x12,
0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79,
0x44, 0x72, 0x61, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xfd, 0x14, 0x2a, 0x5e, 0x0a, 0x07, 0x4f,
0x70, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x5f, 0x5a, 0x65, 0x72,
0x6f, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x50, 0x5f, 0x42, 0x65, 0x74, 0x10, 0x01, 0x12,
0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x5f, 0x47, 0x61, 0x69, 0x6e, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08,
0x4f, 0x50, 0x5f, 0x53, 0x68, 0x61, 0x6b, 0x65, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50,
0x5f, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50,
0x5f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x10, 0x05, 0x2a, 0x4a, 0x0a, 0x14, 0x4f,
0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x43,
0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x75, 0x73, 0x68,
0x43, 0x6f, 0x69, 0x6e, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x17,
0x0a, 0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x69, 0x6e, 0x5f,
0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x42, 0x28, 0x5a, 0x26, 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, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -20,12 +20,10 @@ message CSPushCoinInfo {
message SCPushCoinInfo {
repeated ExchangeInfo ExchangeList = 1; //
repeated DrawInfo DrawList = 2; //
repeated int64 BetList = 3; //
int32 ShakeTimes = 4; //
int64 BaseCoin = 5; //()
int64 PowerLine = 6; //
int64 PowerLineMax = 7; //
int64 RefreshTimes = 8; //
int32 ShakeTimes = 3; //
int64 PowerLine = 4; //
int64 PowerLineMax = 5; //
int64 RefreshTimes = 6; //
}
message ItemInfo{
@ -61,8 +59,8 @@ message CSPushCoinPlayerOp {
enum OpCodes {
OP_Zero = 0;
OP_Bet = 1; // OpParam
OP_Gain = 2; // OpItem
OP_Bet = 1; // OpParam id
OP_Gain = 2; // OpParam 1 2 OpItem
OP_Shake = 3; // OpParam
OP_Refresh = 4; // OpParam
OP_Exchange = 5; // OpParam id

View File

@ -1,24 +1,32 @@
package main
import (
"sort"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib"
"mongo.games.com/game/common"
"mongo.games.com/game/gamesrv/base"
"mongo.games.com/game/model"
"mongo.games.com/game/protocol/activity"
"mongo.games.com/game/protocol/pushcoin"
"mongo.games.com/game/srvdata"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib"
"sort"
)
const (
PowerMax = 700000
PowerInit = 400000
ValueInit = 50 * 5000
)
var BaseCoins = []int64{5000, 10000, 15000}
var PushCoinItemValue = map[int32]int64{
common.ItemIDBigCoin: 50000,
common.ItemIDVCard: 10000,
common.ItemIDPlum: 30000,
30011: 100000000, // 话费卡
common.ItemIDCoin1: 5000,
common.ItemIDCoin2: 10000,
common.ItemIDCoin3: 15000,
}
func init() {
// 推币机活动信息
@ -47,19 +55,16 @@ func CSPushCoinInfo(s *netlib.Session, packetid int, data interface{}, sid int64
if p.WelfData.PushCoin == nil {
p.WelfData.PushCoin = &model.PushCoinData{
Power: PowerInit,
Base: BaseCoins[0],
Value: ValueInit,
Exchange: make(map[int32]int32),
Items: make(map[int32]int64),
}
}
pack := &activity.SCPushCoinInfo{
ShakeTimes: p.WelfData.PushCoin.Shake,
BaseCoin: p.WelfData.PushCoin.Base,
PowerLine: p.WelfData.PushCoin.Power,
PowerLineMax: PowerMax,
RefreshTimes: p.WelfData.PushCoin.Refresh,
BetList: BaseCoins,
}
for _, v := range srvdata.PBDB_PropExchangeMgr.Datas.Arr {
@ -149,25 +154,59 @@ func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid i
switch msg.GetOpCode() {
case activity.OpCodes_OP_Bet:
if p.GetCoin() < msg.GetOpParam() {
if msg.GetOpParam() != common.ItemIDCoin1 && msg.GetOpParam() != common.ItemIDCoin2 && msg.GetOpParam() != common.ItemIDCoin3 {
goto here
}
p.AddCoin(-msg.GetOpParam(), common.GainWayPushCoinCost, base.SyncFlag_ToClient, "system", "推币机下注")
// 增加能量条
AddPower(p, msg.GetOpParam())
item := srvdata.GameItemMgr.Get(p.Platform, int32(msg.GetOpParam()))
if item == nil {
goto here
}
if p.GetCoin() < item.GetNum() {
goto here
}
p.AddCoin(-item.GetNum(), common.GainWayPushCoinCost, base.SyncFlag_ToClient, "system", "推币机下注")
// 增加桌面道具
AddValue(p, map[int32]int64{common.ItemIDCoin: item.GetNum()})
case activity.OpCodes_OP_Gain:
// todo校验
if msg.GetOpParam() == 1 {
// 有效区
for _, v := range msg.GetOpItem() {
id := v.GetItemId()
val := int64(v.GetItemNum())
switch v.GetItemId() {
case common.ItemIDBigCoin, common.ItemIDCoin1, common.ItemIDCoin2, common.ItemIDCoin3:
val *= srvdata.GameItemMgr.Get(p.Platform, id).GetNum()
id = common.ItemIDCoin
}
if p.WelfData.PushCoin.Items[id] < val {
logger.Logger.Errorf("获得道具太多: %d, %d", p.WelfData.PushCoin.Items[id], val)
goto here
}
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{{ItemId: id, ItemNum: val}},
GainWay: common.GainWayPushCoinGain,
Operator: "system",
Remark: "推币机掉落获得",
})
}
} else {
// 无效区
}
for _, v := range msg.GetOpItem() {
BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform,
SnId: p.SnId,
Change: []*model.Item{{ItemId: v.GetItemId(), ItemNum: int64(v.GetItemNum())}},
GainWay: common.GainWayPushCoinGain,
Operator: "system",
Remark: "推币机掉落获得",
})
// 增加能量条
AddPower(p, PushCoinItemValue[v.GetItemId()]*int64(v.GetItemNum()))
// 减少桌面道具
AddValue(p, map[int32]int64{v.GetItemId(): -int64(v.GetItemNum())})
}
case activity.OpCodes_OP_Shake:
@ -178,7 +217,12 @@ func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid i
case activity.OpCodes_OP_Refresh:
p.WelfData.PushCoin.Refresh++
p.WelfData.PushCoin.Value = ValueInit
// 1个v卡50个金币大梅花1个
p.WelfData.PushCoin.Items = map[int32]int64{
common.ItemIDVCard: 1,
common.ItemIDCoin: 50 * 5000,
common.ItemIDPlum: 1,
}
case activity.OpCodes_OP_Exchange:
d := srvdata.PBDB_PropExchangeMgr.GetData(int32(msg.GetOpParam()))
@ -199,7 +243,7 @@ func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid i
ItemId: int32(k),
ItemNum: int32(v),
})
if k == 10001 && p.GetCoin() < v {
if k == common.ItemIDCoin && p.GetCoin() < v {
goto here
}
cost = append(cost, &model.Item{
@ -244,6 +288,7 @@ func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid i
for k, v := range d.GetCustom() {
if k == 1 {
pack.Exchange.ShakeTimes = int32(v)
p.WelfData.PushCoin.Shake += int32(v)
}
}
@ -259,7 +304,7 @@ func CSPushCoinPlayerOp(s *netlib.Session, packetid int, data interface{}, sid i
pack.OpRetCode = activity.OpResultPushCoinCode_OPRC_PushCoin_Success
here:
p.SendToClient(int(pushcoin.PushCoinPacketID_PACKET_SCPushCoinPlayerOp), pack)
p.SendToClient(int(activity.PushCoinPacketID_PACKET_SCPushCoinPlayerOp), pack)
logger.Logger.Trace("SCPushCoinPlayerOp: ", pack)
return nil
@ -340,7 +385,28 @@ func Draw(p *Player) {
if pack.Coin > 0 || pack.ItemId > 0 {
p.SendToClient(int(activity.PushCoinPacketID_PACKET_NotifyDrawInfo), pack)
// 增加能量条
AddPower(p, d.GetValue())
AddPower(p, 0)
}
}
}
}
func AddValue(p *Player, item map[int32]int64) {
if item == nil {
return
}
if p.WelfData != nil && p.WelfData.PushCoin != nil {
if p.WelfData.PushCoin.Items == nil {
p.WelfData.PushCoin.Items = make(map[int32]int64)
}
for k, v := range item {
if v > 0 {
switch k {
case common.ItemIDCoin1, common.ItemIDCoin2, common.ItemIDCoin3, common.ItemIDBigCoin:
p.WelfData.PushCoin.Items[common.ItemIDCoin] += v * srvdata.GameItemMgr.Get(p.Platform, k).GetNum()
default:
p.WelfData.PushCoin.Items[k] += v
}
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.