player.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. package msg
  2. // 服务端用
  3. type AddBagMaterialIs struct {
  4. RpcRequestMsg
  5. PlayerId int64 `json:"userId"`
  6. Source int `json:"source"` // 类型
  7. Materials map[int64]int64 `json:"materials"` // 奖励
  8. Cost map[int64]int64 `json:"cost"` // 消耗
  9. }
  10. type ResponseAddBagMaterialIs struct {
  11. RpcResponseMsg
  12. }
  13. // HeroLevelUp 升级
  14. type HeroLevelUp struct {
  15. PlayerId int64 `json:"userId"`
  16. HeroId int64 `json:"heroId"`
  17. }
  18. type HeroLevelUpData struct {
  19. Materials map[int64]int64 `json:"materials"`
  20. Hero *Hero `json:"hero"`
  21. }
  22. type ResponseHeroLevelUp struct {
  23. ErrCode int `json:"errCode"`
  24. Msg string `json:"msg,omitempty"`
  25. Data *HeroLevelUpData `json:"data"`
  26. }
  27. // HeroChangeSkin 英雄换皮肤
  28. type HeroChangeSkin struct {
  29. PlayerId int64 `json:"userId"`
  30. HeroId int64 `json:"heroId"`
  31. SkinId int64 `json:"skinId"`
  32. }
  33. type HeroChangeSkinData struct {
  34. Hero *Hero `json:"hero"`
  35. }
  36. type ResponseHeroChangeSkin struct {
  37. ErrCode int `json:"errCode"`
  38. Msg string `json:"msg,omitempty"`
  39. Data *HeroChangeSkinData `json:"data"`
  40. }
  41. // HeroBuy 英雄购买
  42. type HeroBuy struct {
  43. PlayerId int64 `json:"userId"`
  44. HeroId int64 `json:"heroId"`
  45. }
  46. type ResponseHeroBuy struct {
  47. ErrCode int `json:"errCode"`
  48. Msg string `json:"msg,omitempty"`
  49. Data *HeroBuyData `json:"data"`
  50. }
  51. type HeroBuyData struct {
  52. PlayerId int64 `json:"userId"`
  53. Hero *Hero `json:"hero"`
  54. Materials map[int64]int64 `json:"materials"`
  55. }
  56. // HeroSkinActive 英雄皮肤激活
  57. type HeroSkinActive struct {
  58. PlayerId int64 `json:"userId"`
  59. SkinId int64 `json:"skinId"`
  60. }
  61. type ResponseHeroSkinActive struct {
  62. ErrCode int `json:"errCode"`
  63. Msg string `json:"msg,omitempty"`
  64. Data *HeroSkinActiveData `json:"data"`
  65. }
  66. type HeroSkinActiveData struct {
  67. PlayerId int64 `json:"userId"`
  68. Hero *Hero `json:"hero"`
  69. SkinId int64 `json:"skinId"`
  70. Materials map[int64]int64 `json:"materials"`
  71. }
  72. // // HeroActive 激活
  73. // type HeroActive struct {
  74. // PlayerId int64 `json:"userId"`
  75. // HeroId int32 `json:"heroId"`
  76. // Type int32 `json:"type"` // 1 碎片合成 2 钻石购买
  77. // }
  78. // type HeroActiveData struct {
  79. // }
  80. // type ResponseHeroActive struct {
  81. // ErrCode int `json:"errCode"`
  82. // Msg string `json:"msg,omitempty"`
  83. // Data *HeroActiveData `json:"data"`
  84. // }
  85. // TreasuresLevelUp 宝物升级
  86. // type TreasuresLevelUp struct {
  87. // PlayerId int64 `json:"userId"`
  88. // Id int32 `json:"id"`
  89. // }
  90. // type TreasuresLevelUpData struct {
  91. // }
  92. // type ResponseTreasuresLevelUp struct {
  93. // ErrCode int `json:"errCode"`
  94. // Msg string `json:"msg,omitempty"`
  95. // Data *TreasuresLevelUpData `json:"data"`
  96. // }
  97. // // TreasureStarUp 宝物升星
  98. // type TreasuresStarUp struct {
  99. // PlayerId int64 `json:"userId"`
  100. // Id int32 `json:"id"`
  101. // }
  102. // type TreasuresStarUpData struct {
  103. // }
  104. // type ResponseTreasuresStarUp struct {
  105. // ErrCode int `json:"errCode"`
  106. // Msg string `json:"msg,omitempty"`
  107. // Data *TreasuresStarUpData `json:"data"`
  108. // }