stam.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. type BuyStamina struct {
  18. PlayerID int64 `json:"userId"`
  19. CostType int `json:"type"`
  20. }
  21. type ResponseBuyStamina struct {
  22. ErrCode int `json:"errCode"`
  23. Msg string `json:"msg,omitempty"`
  24. Data *BuyStaminaData `json:"data"`
  25. }
  26. type BuyStaminaData struct {
  27. Stamina int64 `json:"stamina"`
  28. AdCount int `json:"adCount"`
  29. DiamondCount int `json:"diamondCount"`
  30. Cost map[int64]int64 `json:"cost"`
  31. CostType int `json:"costType"`
  32. Materials map[int64]int64 `json:"materials"`
  33. }
  34. type RestoreEnergy struct {
  35. PlayerID int64 `json:"userId"`
  36. }
  37. type ResponseRestoreEnergy struct {
  38. ErrCode int `json:"errCode"`
  39. Msg string `json:"msg,omitempty"`
  40. Data *RestoreEnergyData `json:"data"`
  41. }
  42. type RestoreEnergyData struct {
  43. Energy int64 `json:"energy"`
  44. MaxEnergy int64 `json:"maxEnergy"`
  45. CoolDown int `json:"cd"`
  46. DiamondCount int `json:"diamondCount"`
  47. AdCount int `json:"adCount"`
  48. }
  49. type BuyEnergy struct {
  50. PlayerID int64 `json:"userId"`
  51. CostType int `json:"type"`
  52. }
  53. type ResponseBuyEnergy struct {
  54. ErrCode int `json:"errCode"`
  55. Msg string `json:"msg,omitempty"`
  56. Data *BuyEnergyData `json:"data"`
  57. }
  58. type BuyEnergyData struct {
  59. Energy int64 `json:"energy"`
  60. AdCount int `json:"adCount"`
  61. DiamondCount int `json:"diamondCount"`
  62. Cost map[int64]int64 `json:"cost"`
  63. CostType int `json:"costType"`
  64. Materials map[int64]int64 `json:"materials"`
  65. }