gacha.go 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. package msg
  2. import "leafstalk/covenant/model"
  3. // 扭蛋信息
  4. type GachaInfo struct {
  5. PlayerId int64 `json:"userId"`
  6. }
  7. type ResponseGachaInfo struct {
  8. ErrCode int `json:"errCode"`
  9. Msg string `json:"msg,omitempty"`
  10. Data *GachaInfoData `json:"data"`
  11. }
  12. type GachaStatus struct {
  13. FreeRemainTime int64 `json:"freeRemainTime"` // 免费寻宝剩余时间
  14. GachaCount int64 `json:"gachaCount"` // 扭蛋次数
  15. ProcessReward int64 `json:"processReward"` // 已领取的最大进度奖励次数
  16. LuckNum int64 `json:"luckNum"` // 幸运值
  17. }
  18. type GachaInfoData struct {
  19. ActivityUId int64 `json:"activityUId"` // 活动id
  20. RemainTime int64 `json:"remainTime"` // 活动剩余时间
  21. Days int64 `json:"days"` // 活动进行到第几天
  22. Gacha *GachaStatus `json:"gacha"` // 寻宝状态
  23. Supply *model.SupplyPrivilege2 `json:"supply"` // 补给状态
  24. Pray map[int64]int64 `json:"pray"` // 兑换状态
  25. Gift map[int64]int64 `json:"gift"` // 礼包状态
  26. }
  27. // 扭蛋
  28. type Gacha struct {
  29. PlayerId int64 `json:"userId"`
  30. Num int64 `json:"num"`
  31. Free int64 `json:"free"` //1:免费,0:不免费
  32. }
  33. type ResponseGacha struct {
  34. ErrCode int `json:"errCode"`
  35. Msg string `json:"msg,omitempty"`
  36. Data *GachaData `json:"data"`
  37. }
  38. type GachaData struct {
  39. Bundle *model.DropedBundle `json:"bundle"`
  40. Cost map[int64]int64 `json:"cost"`
  41. RewardIds []int64 `json:"rewardIds"`
  42. Gacha *GachaStatus `json:"gacha"`
  43. }
  44. // 扭蛋进度奖励
  45. type GachaProcessReward struct {
  46. PlayerId int64 `json:"userId"`
  47. }
  48. type GachaProcessRewardData struct {
  49. Bundle *model.DropedBundle `json:"bundle"`
  50. Gacha *GachaStatus `json:"gacha"`
  51. }
  52. type ResponseGachaProcessReward struct {
  53. ErrCode int `json:"errCode"`
  54. Msg string `json:"msg,omitempty"`
  55. Data *GachaProcessRewardData `json:"data"`
  56. }
  57. // 扭蛋补给
  58. type GachaSupply struct {
  59. PlayerId int64 `json:"userId"`
  60. }
  61. type GachaSupplyData struct {
  62. Bundle *model.DropedBundle `json:"bundle"`
  63. Supply *model.SupplyPrivilege2 `json:"supply"` // 补给状态
  64. }
  65. type ResponseGachaSupply struct {
  66. ErrCode int `json:"errCode"`
  67. Msg string `json:"msg,omitempty"`
  68. Data *GachaSupplyData `json:"data"`
  69. }
  70. // 扭蛋祈福
  71. type GachaPray struct {
  72. PlayerId int64 `json:"userId"`
  73. }
  74. type GachaPrayData struct {
  75. Bundle *model.DropedBundle `json:"bundle"`
  76. Cost map[int64]int64 `json:"cost"`
  77. DrawUid int64 `json:"drawUid"`
  78. Pray map[int64]int64 `json:"pray"` // 兑换状态
  79. }
  80. type ResponseGachaPray struct {
  81. ErrCode int `json:"errCode"`
  82. Msg string `json:"msg,omitempty"`
  83. Data *GachaPrayData `json:"data"`
  84. }
  85. // 礼包购买
  86. type GachaBuyGift struct {
  87. PlayerId int64 `json:"userId"`
  88. Num int64 `json:"num"`
  89. Uid int64 `json:"uid"` // 客户端不用传
  90. Index int64 `json:"index"` // 客户端不用传
  91. }
  92. type GachaBuyGiftData struct {
  93. Bundle *model.DropedBundle `json:"bundle"`
  94. Cost map[int64]int64 `json:"cost"`
  95. Gift map[int64]int64 `json:"gift"` // 礼包状态
  96. }
  97. type ResponseGachaBuyGift struct {
  98. ErrCode int `json:"errCode"`
  99. Msg string `json:"msg,omitempty"`
  100. Data *GachaBuyGiftData `json:"data"`
  101. }