add billed code
This commit is contained in:
parent
4ba65f9e87
commit
6e16eb1d52
|
@ -362,6 +362,19 @@ func (this *SceneStateStartFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Play
|
||||||
switch opcode {
|
switch opcode {
|
||||||
case fortunedragon.FortuneDragonPlayerOpStart:
|
case fortunedragon.FortuneDragonPlayerOpStart:
|
||||||
playerEx.Clear()
|
playerEx.Clear()
|
||||||
|
if len(params) < 4 {
|
||||||
|
pack := &protocol.SCFortuneDragonBilled{
|
||||||
|
OpRetCode: proto.Int32(1),
|
||||||
|
}
|
||||||
|
proto.SetDefaults(pack)
|
||||||
|
logger.Logger.Trace("SCFortuneDragonBilled", pack.String())
|
||||||
|
playerEx.SendToClient(int(protocol.FortuneDragonPID_PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONOP), pack)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
playerEx.BetSizeIndex = params[0]
|
||||||
|
playerEx.BetLevelIndex = params[1]
|
||||||
|
playerEx.BetLineIndex = params[2]
|
||||||
|
playerEx.BetMode = params[3]
|
||||||
//get data
|
//get data
|
||||||
Response, err := slots.SlotsMgrSington.Play(playerEx.SlotsSession, &base.SpinReq{
|
Response, err := slots.SlotsMgrSington.Play(playerEx.SlotsSession, &base.SpinReq{
|
||||||
GameId: int64(sceneEx.GameId),
|
GameId: int64(sceneEx.GameId),
|
||||||
|
@ -373,7 +386,7 @@ func (this *SceneStateStartFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Play
|
||||||
})
|
})
|
||||||
var gameEndStr string
|
var gameEndStr string
|
||||||
if err == nil {
|
if err == nil {
|
||||||
data := assemble.DataToCli(Response).(assemble.TableInfo)
|
data := assemble.DataToCli(Response).(assemble.GameEnd)
|
||||||
pi, _ := json.Marshal(data)
|
pi, _ := json.Marshal(data)
|
||||||
gameEndStr = string(pi)
|
gameEndStr = string(pi)
|
||||||
playerEx.Coin = Response.Coin
|
playerEx.Coin = Response.Coin
|
||||||
|
@ -381,6 +394,7 @@ func (this *SceneStateStartFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Play
|
||||||
logger.Logger.Error("slots enter err:", err)
|
logger.Logger.Error("slots enter err:", err)
|
||||||
}
|
}
|
||||||
pack := &protocol.SCFortuneDragonBilled{
|
pack := &protocol.SCFortuneDragonBilled{
|
||||||
|
OpRetCode: proto.Int32(0),
|
||||||
GameEndStr: proto.String(gameEndStr),
|
GameEndStr: proto.String(gameEndStr),
|
||||||
}
|
}
|
||||||
proto.SetDefaults(pack)
|
proto.SetDefaults(pack)
|
||||||
|
|
|
@ -48,7 +48,7 @@ func DataToCli(response any) interface{} {
|
||||||
case *cli.SlotsPlayResponse:
|
case *cli.SlotsPlayResponse:
|
||||||
res := response2NodeTree(Response.NodeTree)
|
res := response2NodeTree(Response.NodeTree)
|
||||||
ress := []*shared.Result{res}
|
ress := []*shared.Result{res}
|
||||||
GameEnd := shared.GameEndDto{
|
gameEnd := shared.GameEndDto{
|
||||||
Results: ress,
|
Results: ress,
|
||||||
RoundReward: Response.NodeTree.Nodes[0].ChildrenTotalWin,
|
RoundReward: Response.NodeTree.Nodes[0].ChildrenTotalWin,
|
||||||
TotalBet: Response.NodeTree.BetCoin.GetCoin(),
|
TotalBet: Response.NodeTree.BetCoin.GetCoin(),
|
||||||
|
@ -60,7 +60,7 @@ func DataToCli(response any) interface{} {
|
||||||
}
|
}
|
||||||
//a, _ := json.Marshal(GameEnd)
|
//a, _ := json.Marshal(GameEnd)
|
||||||
//logx.Error("GameEnd:", string(a))
|
//logx.Error("GameEnd:", string(a))
|
||||||
return GameEnd
|
return SpinRes2Dto(gameEnd)
|
||||||
default:
|
default:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -529,7 +529,8 @@ type SCFortuneDragonBilled struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
GameEndStr string `protobuf:"bytes,1,opt,name=GameEndStr,proto3" json:"GameEndStr,omitempty"`
|
OpRetCode int32 `protobuf:"varint,1,opt,name=OpRetCode,proto3" json:"OpRetCode,omitempty"` //0.spin成功 1.spin失败
|
||||||
|
GameEndStr string `protobuf:"bytes,2,opt,name=GameEndStr,proto3" json:"GameEndStr,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SCFortuneDragonBilled) Reset() {
|
func (x *SCFortuneDragonBilled) Reset() {
|
||||||
|
@ -564,6 +565,13 @@ func (*SCFortuneDragonBilled) Descriptor() ([]byte, []int) {
|
||||||
return file_fortunedragon_proto_rawDescGZIP(), []int{5}
|
return file_fortunedragon_proto_rawDescGZIP(), []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *SCFortuneDragonBilled) GetOpRetCode() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.OpRetCode
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (x *SCFortuneDragonBilled) GetGameEndStr() string {
|
func (x *SCFortuneDragonBilled) GetGameEndStr() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.GameEndStr
|
return x.GameEndStr
|
||||||
|
@ -631,32 +639,34 @@ var file_fortunedragon_proto_rawDesc = []byte{
|
||||||
0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65,
|
0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65,
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05,
|
0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05,
|
||||||
0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x37, 0x0a, 0x15, 0x53, 0x43, 0x46, 0x6f,
|
0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x55, 0x0a, 0x15, 0x53, 0x43, 0x46, 0x6f,
|
||||||
0x72, 0x74, 0x75, 0x6e, 0x65, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x42, 0x69, 0x6c, 0x6c, 0x65,
|
0x72, 0x74, 0x75, 0x6e, 0x65, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x42, 0x69, 0x6c, 0x6c, 0x65,
|
||||||
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x18,
|
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x74,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||||
0x72, 0x2a, 0xa3, 0x02, 0x0a, 0x10, 0x46, 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x65, 0x44, 0x72, 0x61,
|
0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x18, 0x02, 0x20,
|
||||||
0x67, 0x6f, 0x6e, 0x50, 0x49, 0x44, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
0x01, 0x28, 0x09, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x2a,
|
||||||
0x5f, 0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x5a,
|
0xa3, 0x02, 0x0a, 0x10, 0x46, 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x65, 0x44, 0x72, 0x61, 0x67, 0x6f,
|
||||||
0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x31, 0x0a, 0x2c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
0x6e, 0x50, 0x49, 0x44, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x46,
|
||||||
0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x53, 0x43,
|
0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x5a, 0x45, 0x52,
|
||||||
0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x52, 0x4f, 0x4f,
|
0x4f, 0x10, 0x00, 0x12, 0x31, 0x0a, 0x2c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x46, 0x4f,
|
||||||
0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xe0, 0x2b, 0x12, 0x2b, 0x0a, 0x26, 0x50, 0x41, 0x43, 0x4b,
|
0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x46, 0x4f,
|
||||||
0x45, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e,
|
0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x52, 0x4f, 0x4f, 0x4d, 0x49,
|
||||||
0x5f, 0x43, 0x53, 0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e,
|
0x4e, 0x46, 0x4f, 0x10, 0xe0, 0x2b, 0x12, 0x2b, 0x0a, 0x26, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||||
0x4f, 0x50, 0x10, 0xe1, 0x2b, 0x12, 0x2b, 0x0a, 0x26, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
0x5f, 0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x43,
|
||||||
0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x53, 0x43,
|
0x53, 0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x4f, 0x50,
|
||||||
0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x4f, 0x50, 0x10,
|
0x10, 0xe1, 0x2b, 0x12, 0x2b, 0x0a, 0x26, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x46, 0x4f,
|
||||||
0xe2, 0x2b, 0x12, 0x32, 0x0a, 0x2d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x46, 0x4f, 0x52,
|
0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x46, 0x4f,
|
||||||
0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x46, 0x4f, 0x52,
|
0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x4f, 0x50, 0x10, 0xe2, 0x2b,
|
||||||
0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54,
|
0x12, 0x32, 0x0a, 0x2d, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x54, 0x55,
|
||||||
0x41, 0x54, 0x45, 0x10, 0xe3, 0x2b, 0x12, 0x2f, 0x0a, 0x2a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x46, 0x4f, 0x52, 0x54, 0x55,
|
||||||
0x5f, 0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x53,
|
0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54,
|
||||||
0x43, 0x46, 0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x42, 0x49,
|
0x45, 0x10, 0xe3, 0x2b, 0x12, 0x2f, 0x0a, 0x2a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x46,
|
||||||
0x4c, 0x4c, 0x45, 0x44, 0x10, 0xe4, 0x2b, 0x42, 0x2d, 0x5a, 0x2b, 0x6d, 0x6f, 0x6e, 0x67, 0x6f,
|
0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x46,
|
||||||
0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f,
|
0x4f, 0x52, 0x54, 0x55, 0x4e, 0x45, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x42, 0x49, 0x4c, 0x4c,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x66, 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x65,
|
0x45, 0x44, 0x10, 0xe4, 0x2b, 0x42, 0x2d, 0x5a, 0x2b, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67,
|
||||||
0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x66, 0x6f, 0x72, 0x74, 0x75, 0x6e, 0x65, 0x64, 0x72,
|
||||||
|
0x61, 0x67, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -63,5 +63,6 @@ message SCFortuneDragonRoomState {
|
||||||
}
|
}
|
||||||
//PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONBILLED
|
//PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONBILLED
|
||||||
message SCFortuneDragonBilled{
|
message SCFortuneDragonBilled{
|
||||||
string GameEndStr = 1;
|
int32 OpRetCode = 1;//0.spin成功 1.spin失败
|
||||||
|
string GameEndStr = 2;
|
||||||
}
|
}
|
Loading…
Reference in New Issue