stam.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package msg
  2. type RestoreStamina struct {
  3. PlayerID int64 `json:"userId"`
  4. }
  5. type ResponseRestoreStamina struct {
  6. ErrCode int `json:"errCode"`
  7. Msg string `json:"msg,omitempty"`
  8. Data *RestoreStaminaData `json:"data"`
  9. }
  10. type RestoreStaminaData struct {
  11. Stamina int64 `json:"stamina"`
  12. MaxStama int64 `json:"maxStama"`
  13. CoolDown int `json:"cd"`
  14. DiamondCount int `json:"diamondCount"`
  15. AdCount int `json:"adCount"`
  16. }
  17. const (
  18. BuyStaminaCostTypeAd = 1 // 广告获得体力
  19. BuyStaminaCostTypeDiamond = 2 // 钻石获得体力
  20. )
  21. type BuyStamina struct {
  22. PlayerID int64 `json:"userId"`
  23. CostType int `json:"type"`
  24. ClientPlat string `json:"clientPlat"`
  25. }
  26. type ResponseBuyStamina struct {
  27. ErrCode int `json:"errCode"`
  28. Msg string `json:"msg,omitempty"`
  29. Data *BuyStaminaData `json:"data"`
  30. }
  31. type BuyStaminaData struct {
  32. Stamina int64 `json:"stamina"`
  33. AdCount int `json:"adCount"`
  34. DiamondCount int `json:"diamondCount"`
  35. Cost map[int64]int64 `json:"cost"`
  36. CostType int `json:"costType"`
  37. Materials map[int64]int64 `json:"materials"`
  38. }
  39. type RestoreEnergy struct {
  40. PlayerID int64 `json:"userId"`
  41. }
  42. type ResponseRestoreEnergy struct {
  43. ErrCode int `json:"errCode"`
  44. Msg string `json:"msg,omitempty"`
  45. Data *RestoreEnergyData `json:"data"`
  46. }
  47. type RestoreEnergyData struct {
  48. Energy int64 `json:"energy"`
  49. MaxEnergy int64 `json:"maxEnergy"`
  50. CoolDown int `json:"cd"`
  51. DiamondCount int `json:"diamondCount"`
  52. AdCount int `json:"adCount"`
  53. }
  54. type BuyEnergy struct {
  55. PlayerID int64 `json:"userId"`
  56. CostType int `json:"type"`
  57. }
  58. type ResponseBuyEnergy struct {
  59. ErrCode int `json:"errCode"`
  60. Msg string `json:"msg,omitempty"`
  61. Data *BuyEnergyData `json:"data"`
  62. }
  63. type BuyEnergyData struct {
  64. Energy int64 `json:"energy"`
  65. AdCount int `json:"adCount"`
  66. DiamondCount int `json:"diamondCount"`
  67. Cost map[int64]int64 `json:"cost"`
  68. CostType int `json:"costType"`
  69. Materials map[int64]int64 `json:"materials"`
  70. }
  71. // 领取联合作战卷轴
  72. type ClaimCoopTicket struct {
  73. PlayerID int64 `json:"userId"`
  74. TicketId int64 `json:"ticketId"`
  75. }
  76. type ResponseClaimCoopTicket struct {
  77. ErrCode int `json:"errCode"`
  78. Msg string `json:"msg,omitempty"`
  79. Data *ClaimCoopTicketData `json:"data"`
  80. }
  81. type ClaimCoopTicketData struct {
  82. TicketId int64 `json:"ticketId"` // 卷轴id
  83. Num int64 `json:"num"` // 卷轴数量
  84. CD int64 `json:"cd"` //cd 秒
  85. }
  86. // 查看卷轴
  87. type ViewCoopTicket struct {
  88. PlayerID int64 `json:"userId"`
  89. TicketId int64 `json:"ticketId"`
  90. }
  91. type ResponseViewCoopTicket struct {
  92. ErrCode int `json:"errCode"`
  93. Msg string `json:"msg,omitempty"`
  94. Data *ClaimCoopTicketData `json:"data"`
  95. }