simple.go 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package msg
  2. import (
  3. "leafstalk/covenant/model"
  4. )
  5. // 查询首通记录
  6. type QueryFirstPassHistory struct {
  7. PlayerId int64 `json:"userId"`
  8. Type int64 `json:"type"` // 1:主线 2:合作 3:主线+合作
  9. LastReward map[int64]int64 `json:"achieve"` //服务端用
  10. }
  11. type ResponseQueryFirstPassHistory struct {
  12. ErrCode int `json:"errCode"`
  13. Msg string `json:"msg,omitempty"`
  14. Data map[int]*QueryFirstPassHistoryData `json:"data"`
  15. }
  16. type QueryFirstPassHistoryData struct {
  17. History []*model.FirstPassChapter `json:"history"`
  18. LastReward int64 `json:"achieve"`
  19. }
  20. // 领取首通奖励
  21. type ClaimFirstPassReward struct {
  22. PlayerId int64 `json:"userId"`
  23. Type int64 `json:"type"` // 1:主线 2:合作
  24. }
  25. type ResponseClaimFirstPassReward struct {
  26. ErrCode int `json:"errCode"`
  27. Msg string `json:"msg,omitempty"`
  28. Data *ClaimFirstPassRewardData `json:"data"`
  29. }
  30. type ClaimFirstPassRewardData struct {
  31. Type int64 `json:"type"`
  32. Achieve int64 `json:"achieve"` // 成就ID
  33. Materials map[int64]int64 `json:"materials"`
  34. }
  35. // 查询战斗
  36. type QueryBattleRecord struct {
  37. PlayerId int64 `json:"userId"`
  38. BattleId int64 `json:"battleId"` //对战记录ID
  39. }
  40. type ResponseQueryBattleRecord struct {
  41. ErrCode int `json:"errCode"`
  42. Msg string `json:"msg,omitempty"`
  43. Data *model.BattleRecord `json:"data"`
  44. }
  45. // 查看玩家信息
  46. type ViewPlayer struct {
  47. PlayerId int64 `json:"userId"`
  48. OtherId int64 `json:"otherId,string"`
  49. }
  50. type ResponseViewPlayer struct {
  51. ErrCode int `json:"errCode"`
  52. Msg string `json:"msg,omitempty"`
  53. Data *model.PlayerProfile `json:"data"`
  54. }