hero.go 3.4 KB

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