recruit.go 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. package msg
  2. // HeroRecruit 英雄招募
  3. type HeroRecruit struct {
  4. PlayerId int64 `json:"userId"`
  5. Num int64 `json:"num"` // 招募倍数 单次招募和10次招募
  6. IsSkip int64 `json:"isSkip"` // 是否跳过动画 0否 1是
  7. Wave int64 `json:"wave"` // 第几次招募。 第1次招募需要消耗道具,如果第1次成功招募相应数量可免费进行第2次招募,以此类推第3次、4次...
  8. }
  9. type ResponseHeroRecruit struct {
  10. ErrCode int `json:"errCode"`
  11. Msg string `json:"msg,omitempty"`
  12. Data *HeroRecruitData `json:"data"`
  13. }
  14. // type HeroConvertData struct {
  15. // HeroId int64 `json:"heroId"`
  16. // Materials []int64 `json:"materialId"` // 兑换道具id,数量
  17. // Times int64 `json:"times"` // 兑换次数
  18. // }
  19. type HeroRecruitData struct {
  20. Shows []int64 `json:"shows"`
  21. Gets []int64 `json:"gets"`
  22. Costs map[int64]int64 `json:"costs"`
  23. Heros []*HeroItem `json:"heros"`
  24. Treasures []*TreasureItem `json:"treasures"`
  25. Materials map[int64]int64 `json:"materials"`
  26. Converts map[int64]int64 `json:"convert"` //英雄ID:转化数量
  27. // Step1 [14][2]int64 `json:"step1"` // 第一步:随机14个可招募道具结果 [[道具id,道具数量]]
  28. // Step3 []*Step3Item `json:"step3"` // 第三步:随机招募获得道具及数量结果 {Step1.index:[2001,1000]}
  29. // NextFree int64 `json:"nextFree"` // 是否可以免费继续招募 0否 1是
  30. // Step2 int64 `json:"step2"` // 第二步:随机招募道具数量结果
  31. }
  32. type Step3Item struct {
  33. Index int64 `json:"index"` // Step1的下标
  34. ID int64 `json:"id"` // 道具id
  35. Num int64 `json:"num"` // 道具数量
  36. Flag int64 `json:"flag"` // 英雄是否为首次获得 1:获得新英雄 2:获得英雄但进行了转化 0:按Index取结果
  37. }
  38. const (
  39. FlagNewHero = 1 // 1:获得新英雄
  40. FlagTransform = 2 // 2:获得已有英雄全部进行了转化
  41. FlagHeroTransform = 3 // 2:获得新英雄并进行了转化
  42. )
  43. // HeroPointRecruit 积分招募
  44. type HeroPointRecruit struct {
  45. PlayerId int64 `json:"userId"`
  46. }
  47. type ResponseHeroPointRecruit struct {
  48. ErrCode int `json:"errCode"`
  49. Msg string `json:"msg,omitempty"`
  50. Data *HeroPointRecruitData `json:"data"`
  51. }
  52. type HeroPointRecruitData struct {
  53. Costs map[int64]int64 `json:"costs"`
  54. Heros []*HeroItem `json:"heros"`
  55. Materials map[int64]int64 `json:"materials"`
  56. Converts map[int64]int64 `json:"convert"` //英雄ID:转化数量
  57. // ID int64 `json:"id"` // 道具id
  58. // Num int64 `json:"num"` // 道具数量
  59. // Flag int64 `json:"flag"` // 英雄是否为首次获得 1:获得新英雄 2:获得英雄但进行了转化 0:按Index取结果
  60. }
  61. // TreasureRecruit 宝物招募
  62. type TreasureRecruit struct {
  63. PlayerId int64 `json:"userId"`
  64. Num int64 `json:"num"` // 招募次数
  65. }
  66. type ResponseTreasureRecruit struct {
  67. ErrCode int `json:"errCode"`
  68. Msg string `json:"msg,omitempty"`
  69. Data *TreasureRecruitData `json:"data"`
  70. }
  71. type TreasureRecruitData struct {
  72. Materials map[int64]int64 `json:"materials"`
  73. Treausres []*TreasureItem `json:"treausres"`
  74. }
  75. type TreasureItem struct {
  76. Id int64 `json:"id"`
  77. Level int64 `json:"level"` // 等级
  78. Star int64 `json:"star"` // 星级
  79. }
  80. type HeroItem struct {
  81. ID int64 `json:"id"`
  82. Level int64 `json:"level"`
  83. Wear int64 `json:"wear"`
  84. }
  85. // EpigraphRecruit 铭文招募
  86. type EpigraphRecruit struct {
  87. PlayerId int64 `json:"userId"`
  88. Num int64 `json:"num"` // 招募次数
  89. }
  90. type ResponseEpigraphRecruit struct {
  91. ErrCode int `json:"errCode"`
  92. Msg string `json:"msg,omitempty"`
  93. Data [][]int64 `json:"data"`
  94. }