chapter.go 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. package msg
  2. // EnterChapter 进入章节
  3. type EnterChapter struct {
  4. PlayerId int64 `json:"userId"`
  5. Id int64 `json:"id"` // 关卡id
  6. }
  7. type ResponseEnterChapter struct {
  8. ErrCode int `json:"errCode"`
  9. Msg string `json:"msg,omitempty"`
  10. Data *EnterChapterData `json:"data"`
  11. }
  12. type EnterChapterData struct{}
  13. // 章节结算预览 暂不实现
  14. type ChapterSettlePreview struct {
  15. PlayerId int64 `json:"userId"`
  16. Id int64 `json:"id"` // 关卡id
  17. Wave int64 `json:"wave"` //通过波数
  18. Rewards int64 `json:"rewards"` // 多倍奖励原因 0:无多倍奖励;1:广告
  19. }
  20. type ResponseChapterSettlePreview struct {
  21. ErrCode int `json:"errCode"`
  22. Msg string `json:"msg,omitempty"`
  23. Data *ChapterSettleData `json:"data"`
  24. }
  25. type ChapterSettleData struct {
  26. Materials map[int64]int64 `json:"materials"`
  27. }
  28. // 章节结算
  29. type ChapterSettle struct {
  30. PlayerId int64 `json:"userId"`
  31. Id int64 `json:"id"` // 关卡id
  32. Wave int64 `json:"wave"` //通过波数
  33. Rewards int64 `json:"rewards"` // 多倍奖励原因 0:无多倍奖励;1:广告
  34. }
  35. type ResponseChapterSettle struct {
  36. ErrCode int `json:"errCode"`
  37. Msg string `json:"msg,omitempty"`
  38. Data *ChapterSettleData `json:"data"`
  39. }
  40. // ProgressReward 领取关卡奖励
  41. type ProgressReward struct {
  42. PlayerId int64 `json:"userId"`
  43. Id int64 `json:"id"` // 关卡id
  44. }
  45. type ResponseProgressReward struct {
  46. ErrCode int `json:"errCode"`
  47. Msg string `json:"msg,omitempty"`
  48. Data *ProgressRewardData `json:"data"`
  49. }
  50. type ProgressRewardData struct {
  51. Id int64 `json:"id"` // 关卡id
  52. Geted int64 `json:"geted"`
  53. SubGeted int64 `json:"subGeted"`
  54. Materials map[int64]int64 `json:"materials"`
  55. }
  56. // ChapterSummary 章节详情
  57. type ChapterSummary struct {
  58. PlayerId int64 `json:"userId"`
  59. }
  60. type ResponseChapterSummary struct {
  61. ErrCode int `json:"errCode"`
  62. Msg string `json:"msg,omitempty"`
  63. Data *ChapterProcess `json:"data"`
  64. }
  65. // type ChapterSummaryData struct {
  66. // PlayerId int64 `json:"userId"`
  67. // }
  68. // 激活水晶
  69. type ActiveCrystal struct {
  70. PlayerId int64 `json:"userId"`
  71. Id int64 `json:"id"` // 水晶id
  72. }
  73. type ResponseActiveCrystal struct {
  74. ErrCode int `json:"errCode"`
  75. Msg string `json:"msg,omitempty"`
  76. Data int64 `json:"data"`
  77. }
  78. // 激活水晶奖励
  79. type ActiveCrystalReward struct {
  80. PlayerId int64 `json:"userId"`
  81. Id int64 `json:"id"` // 水晶id
  82. }
  83. type ResponseActiveCrystalReward struct {
  84. ErrCode int `json:"errCode"`
  85. Msg string `json:"msg,omitempty"`
  86. Data *ActiveCrystalRewardData `json:"data"`
  87. }
  88. type ActiveCrystalRewardData struct {
  89. Id int64 `json:"id"` // 水晶id
  90. Materials map[int64]int64 `json:"materials"`
  91. }
  92. // 章节数据同步 暂不实现
  93. type ChapterSync struct {
  94. PlayerId int64 `json:"userId"`
  95. }
  96. type ResponseChapterSync struct {
  97. ErrCode int `json:"errCode"`
  98. Msg string `json:"msg,omitempty"`
  99. Data int `json:"data"`
  100. }