forage.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. package msg
  2. import (
  3. "leafstalk/covenant/model"
  4. )
  5. // Patrol 巡逻数据
  6. type Patrol struct {
  7. PlayerId int64 `json:"userId"`
  8. }
  9. type PointsSettingData struct {
  10. model.ForagePointsSetting
  11. BaseValues map[int64]float64 `json:"baseValues"` // 基础值
  12. AddValues map[int64]int64 `json:"addValues"` // 加成值
  13. }
  14. type PatrolData struct {
  15. PointsSetting *PointsSettingData `json:"pointsSetting"`
  16. TimeLen int64 `json:"timeLen"` //巡逻时长
  17. MaxTimeLen int64 `json:"maxTimeLen"`
  18. RewardData map[int64]*model.DropedItem `json:"rewardData"` // 产出奖励
  19. AdNum int64 `json:"adNum"`
  20. FastNum int64 `json:"fastNum"`
  21. }
  22. type ResponsePatrol struct {
  23. ErrCode int `json:"errCode"`
  24. Msg string `json:"msg,omitempty"`
  25. Data *PatrolData `json:"data"`
  26. }
  27. // 巡逻时长
  28. type PatrolTimeLen struct {
  29. PlayerId int64 `json:"userId"`
  30. }
  31. type ResponsePatrolTimeLen struct {
  32. ErrCode int `json:"errCode"`
  33. Msg string `json:"msg,omitempty"`
  34. Data *PatrolTimeLenData `json:"data"`
  35. }
  36. type PatrolTimeLenData struct {
  37. TimeLen int64 `json:"timeLen"` //巡逻时长
  38. MaxTimeLen int64 `json:"maxTimeLen"`
  39. }
  40. // ReceiveReward 领取巡逻奖励
  41. type ReceiveReward struct {
  42. PlayerId int64 `json:"userId"`
  43. }
  44. type ReceiveRewardData struct {
  45. TimeLen int64 `json:"timeLen"` //巡逻时长
  46. Bundles *model.DropedBundle `json:"bundles"`
  47. }
  48. type ResponseReceiveReward struct {
  49. ErrCode int `json:"errCode"`
  50. Msg string `json:"msg,omitempty"`
  51. Data *ReceiveRewardData `json:"data"`
  52. }
  53. // PointsSetting 加成点数分配
  54. type PointsSetting struct {
  55. PlayerId int64 `json:"userId"`
  56. PointsSetting map[int64]int64 `json:"pointsSetting"`
  57. }
  58. type ResponsePointsSetting struct {
  59. ErrCode int `json:"errCode"`
  60. Msg string `json:"msg,omitempty"`
  61. Data *PointsSettingData `json:"data"`
  62. }
  63. // FastPatrol 快速巡逻
  64. type FastPatrol struct {
  65. PlayerId int64 `json:"userId"`
  66. Type int64 `json:"type"` // 1:ad 2:fast
  67. }
  68. type FastPatrolData struct {
  69. AdNum int64 `json:"adNum"`
  70. FastNum int64 `json:"fastNum"`
  71. TimeLen int64 `json:"timeLen"` //巡逻时长
  72. Bundles *model.DropedBundle `json:"bundles"`
  73. Cost map[int64]int64 `json:"cost"` // 消耗
  74. }
  75. type ResponseFastPatrol struct {
  76. ErrCode int `json:"errCode"`
  77. Msg string `json:"msg,omitempty"`
  78. Data *FastPatrolData `json:"data"`
  79. }
  80. /* rpc调用参数 */
  81. type PatrolReceiveReward struct {
  82. PlayerId int64 `json:"userId"`
  83. Reward map[int64]*model.DropedItem `json:"reward"`
  84. Cost map[int64]int64 `json:"cost"`
  85. }
  86. type InitPatrol struct {
  87. PlayerId int64 `json:"userId"`
  88. Level int64 `json:"level"`
  89. Point int64 `json:"point"`
  90. }
  91. // 购买特权卡后续处理
  92. type BuyPrivilegeCardToPatrol struct {
  93. PlayerId int64 `json:"userId"`
  94. Cards map[int64]int64 `json:"cards"`
  95. }
  96. type BuyMonthCardToPatrol struct {
  97. PlayerId int64 `json:"userId"`
  98. Cards map[int64]*model.MonthCardItem `json:"cards"`
  99. }