GameDefs.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package slotpanda
  2. const (
  3. COLUMN_COUNT = 5
  4. ROW_COUNT = 3
  5. RESULT_COUNT = 15
  6. GAMEID = 55
  7. GAME_NAME = "bambooslot"
  8. GAME_MESSAGE = "pandaslot"
  9. )
  10. type SlotCount struct {
  11. SlotID int
  12. Count int
  13. }
  14. // 中奖连线信息
  15. type Result struct {
  16. SlotID int // 格子ID
  17. SlotCount int // 数量
  18. WinShapeID int // 连线ID
  19. WinRate int // 赢的倍数
  20. }
  21. // 消息定义
  22. const (
  23. Msg_Bet = 1 // 下注
  24. Msg_Result = 2 // 发送结果
  25. Msg_FreeResult = 20 // 发送FreeSpin结果
  26. Msg_Jackpot = 3 // 获取彩池额度
  27. Msg_Slots = 4 // 获取目前使用的Slot类型
  28. Msg_WinShapes = 5
  29. Msg_GetConfig = 6 // 获取配置信息
  30. Msg_Broadcast = 7 // 奖池广播
  31. Msg_Enter = 8 // 进入游戏
  32. Msg_Exit = 9 // 离开游戏
  33. Msg_FreeAdConfig = 10 // 广告配置及自己的剩余
  34. Msg_UseAd = 11 // 看广告后请求免费次数
  35. )
  36. // 错误码
  37. const (
  38. ErrCode_InvalidBet = 1 // 玩家投注不合理
  39. ErrCode_NotEnoughMoney = 2 // 玩家金币不足
  40. ErrCode_NotExist = 3 // 玩家已退出不存在
  41. )
  42. type Slot_Message struct {
  43. MsgID int
  44. Data string
  45. }
  46. type SlotPanda_Bet struct {
  47. Amount int
  48. ErrorMsg string
  49. ErrCode int
  50. }
  51. type SlotPanda_Result struct {
  52. BetAmount int // 下注金额
  53. WinAmount int // 共赢金额
  54. Slots []int // 15个格子ID
  55. Lines []Result // 中奖连线
  56. FreeSpinInner int // 如果产生freespin,内圈倍数
  57. FreeSpinOuter int // 如果产生freespin,外圈倍数 不产生为0
  58. Bonus *Bonus
  59. }
  60. type TestSlots struct {
  61. Slots []int
  62. }
  63. type SlotPanda_FreeAdBet struct {
  64. AdCount int
  65. BetAmount int
  66. }
  67. type SlotPanda_FreeAdConfig struct {
  68. TotalAdCount int // 每日免费次数
  69. AdCount int // 剩余次数
  70. FreeSpinCount int // 看广告后获取的免费次数
  71. Bet int // 本次看视频获得的底注
  72. AdBets []SlotPanda_FreeAdBet
  73. }
  74. // 下行数据,上行无数据
  75. type SlotPanda_UsedAd struct {
  76. FreeSpinCount int // 获取免费次数,如果为0 表示没有免费
  77. Bet int // 免费次数的底注
  78. AdCount int // 剩余次数
  79. NextAdBetAmount int // 下次广告的底注
  80. }
  81. type SlotPanda_Jackpot struct {
  82. Amount int
  83. }