chapter.go 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. package msg
  2. import "leafstalk/covenant/model"
  3. // EnterChapter 进入章节
  4. type EnterChapter struct {
  5. PlayerId int64 `json:"userId"`
  6. Id int64 `json:"id"` // 关卡id
  7. // chapter
  8. ChapterId int64 `json:"chapterId"`
  9. Players *model.EnterChapterDataItem `json:"players"`
  10. }
  11. type ResponseEnterChapter struct {
  12. ErrCode int `json:"errCode"`
  13. Msg string `json:"msg,omitempty"`
  14. Data EnterChapterData `json:"data"`
  15. }
  16. type EnterChapterData struct {
  17. Seed int64 `json:"seed"`
  18. LevelId int64 `json:"chapterId"`
  19. BattleId int64 `json:"battleId,string"`
  20. Players []*model.EnterChapterDataItem `json:"players"`
  21. }
  22. // type EnterChapterDataItem struct {
  23. // PlayerId int64 `json:"userId"`
  24. // HeadId int64 `json:"headId"`
  25. // FrameId int64 `json:"frameId"`
  26. // Nick string `json:"nick"`
  27. // Heros map[int64]*Hero `json:"heros"`
  28. // Fort *EntryDataFort `json:"fort"`
  29. // Runes map[string]*model.BagRune `json:"runes"`
  30. // Treasures map[int64]*model.GrowableTreasure `json:"treasures"`
  31. // Resonances []*model.GrowableResonance `json:"resonances"`
  32. // Renown int64 `json:"renown"`
  33. // Arenas model.ClientArena `json:"arenas"`
  34. // ArenaSkins map[int64]int64 `json:"arenaSkins"`
  35. // Legend *model.LegendCalc `json:"legend"`
  36. // }
  37. // // 章节结算预览 暂不实现
  38. // type ChapterSettlePreview struct {
  39. // PlayerId int64 `json:"userId"`
  40. // Id int64 `json:"id"` // 关卡id
  41. // Wave int64 `json:"wave"` //通过波数
  42. // Rewards int64 `json:"rewards"` // 多倍奖励原因 0:无多倍奖励;1:广告
  43. // }
  44. // type ResponseChapterSettlePreview struct {
  45. // ErrCode int `json:"errCode"`
  46. // Msg string `json:"msg,omitempty"`
  47. // Data ChapterSettleData `json:"data"`
  48. // }
  49. // 章节结算
  50. type ChapterSettle struct {
  51. PlayerId int64 `json:"userId"`
  52. Id int64 `json:"id"` // 关卡id
  53. Wave int64 `json:"wave"` // 通过波数
  54. Rewards int64 `json:"rewards"` // 多倍奖励原因 0:无多倍奖励;1:广告
  55. BattleId int64 `json:"battleId,string"` // 战斗ID
  56. FriendId int64 `json:"friendId"` // 好友id 以下服务端填充用
  57. Score int64 `json:"score"` // 积分
  58. Players []*model.PersonalItem `json:"players"` // 参战玩家
  59. }
  60. // type PersonalItem struct {
  61. // PlayerID int64 `json:"playerId"`
  62. // HeadId int `json:"headId"` // 头像 -1 代表使用 AvatarURL 微信授权头像
  63. // FrameId int `json:"frameId"` // 头像框
  64. // NickName string `json:"nickName"`
  65. // Level int `json:"level"`
  66. // }
  67. type ResponseChapterSettle struct {
  68. ErrCode int `json:"errCode"`
  69. Msg string `json:"msg,omitempty"`
  70. Data ChapterSettleData `json:"data"`
  71. }
  72. type ChapterSettleData struct {
  73. Bundles *model.DropedBundle `json:"bundles"`
  74. Process *ChapterProcess `json:"process"`
  75. // LevelReward *LevelReward `json:"levelReward"` //升级奖励及等级信息
  76. }
  77. // type LevelReward struct {
  78. // Level int64 `json:"level"`
  79. // Exp int64 `json:"exp"`
  80. // Materials map[int64]int64 `json:"materials"`
  81. // }
  82. // ProgressReward 领取关卡奖励
  83. type ProgressReward struct {
  84. PlayerId int64 `json:"userId"`
  85. Id int64 `json:"id"` // 关卡id
  86. }
  87. type ResponseProgressReward struct {
  88. ErrCode int `json:"errCode"`
  89. Msg string `json:"msg,omitempty"`
  90. Data *ProgressRewardData `json:"data"`
  91. }
  92. type ProgressRewardData struct {
  93. Id int64 `json:"id"` // 关卡id
  94. Geted int64 `json:"geted"`
  95. SubGeted int64 `json:"subGeted"`
  96. Bundles *model.DropedBundle `json:"bundles"`
  97. }
  98. // ChapterSummary 章节详情
  99. type ChapterSummary struct {
  100. PlayerId int64 `json:"userId"`
  101. }
  102. type ResponseChapterSummary struct {
  103. ErrCode int `json:"errCode"`
  104. Msg string `json:"msg,omitempty"`
  105. Data *ChapterProcess `json:"data"`
  106. }
  107. // type ChapterSummaryData struct {
  108. // PlayerId int64 `json:"userId"`
  109. // }
  110. // 激活水晶
  111. type ActiveCrystal struct {
  112. PlayerId int64 `json:"userId"`
  113. Id int64 `json:"id"` // 水晶id
  114. }
  115. type ResponseActiveCrystal struct {
  116. ErrCode int `json:"errCode"`
  117. Msg string `json:"msg,omitempty"`
  118. Data int64 `json:"data"`
  119. }
  120. // 激活水晶奖励
  121. type ActiveCrystalReward struct {
  122. PlayerId int64 `json:"userId"`
  123. Id int64 `json:"id"` // 水晶id
  124. }
  125. type ResponseActiveCrystalReward struct {
  126. ErrCode int `json:"errCode"`
  127. Msg string `json:"msg,omitempty"`
  128. Data *ActiveCrystalRewardData `json:"data"`
  129. }
  130. type ActiveCrystalRewardData struct {
  131. Id int64 `json:"id"` // 水晶id
  132. Materials map[int64]int64 `json:"materials"`
  133. }
  134. // 章节数据同步 暂不实现
  135. type ChapterSync struct {
  136. PlayerId int64 `json:"userId"`
  137. }
  138. type ResponseChapterSync struct {
  139. ErrCode int `json:"errCode"`
  140. Msg string `json:"msg,omitempty"`
  141. Data int `json:"data"`
  142. }
  143. // 邀请联合作战
  144. // C->S
  145. type InviteCoop struct {
  146. PlayerId int64 `json:"userId"`
  147. LevelId int64 `json:"levelId"`
  148. Friends []int64 `json:"friends"`
  149. Code string `json:"code"`
  150. }
  151. type ResponseInviteCoop struct {
  152. ErrCode int `json:"errCode"`
  153. Msg string `json:"msg,omitempty"`
  154. Data []int64 `json:"data"`
  155. }
  156. // 通知被邀请方
  157. // S->C
  158. type InviteCoopNotify struct {
  159. ErrCode int `json:"errCode"`
  160. Msg string `json:"msg,omitempty"`
  161. Data *InviteCoopData `json:"data"`
  162. }
  163. type InviteCoopData struct {
  164. Invitees []int64 `json:"invitees,omitempty"`
  165. Inviter model.PersonalItem `json:"inviter"`
  166. LevelId int64 `json:"levelId"`
  167. Code string `json:"code"`
  168. }
  169. // 修改章节通过数、是否通关
  170. type GmUpdateChapter struct {
  171. MsgId string `json:"msgId"`
  172. PlayerID int64 `json:"userId"`
  173. Chapters []int64 `json:"chapters"`
  174. OperatorId int64 `json:"operatorId"`
  175. }
  176. type ResponseGmUpdateChapter struct {
  177. ErrCode int `json:"errCode"`
  178. MsgId string `json:"msgId"`
  179. }