recruit.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. Score int64 `json:"score"` //积分
  28. Wave int64 `json:"wave"` //完成几次招募
  29. CountNum int64 `json:"countNum"` //共招募几个道具
  30. // Step1 [14][2]int64 `json:"step1"` // 第一步:随机14个可招募道具结果 [[道具id,道具数量]]
  31. // Step3 []*Step3Item `json:"step3"` // 第三步:随机招募获得道具及数量结果 {Step1.index:[2001,1000]}
  32. // NextFree int64 `json:"nextFree"` // 是否可以免费继续招募 0否 1是
  33. // Step2 int64 `json:"step2"` // 第二步:随机招募道具数量结果
  34. }
  35. type Step3Item struct {
  36. Index int64 `json:"index"` // Step1的下标
  37. ID int64 `json:"id"` // 道具id
  38. Num int64 `json:"num"` // 道具数量
  39. Flag int64 `json:"flag"` // 英雄是否为首次获得 1:获得新英雄 2:获得英雄但进行了转化 0:按Index取结果
  40. }
  41. const (
  42. FlagNewHero = 1 // 1:获得新英雄
  43. FlagTransform = 2 // 2:获得已有英雄全部进行了转化
  44. FlagHeroTransform = 3 // 2:获得新英雄并进行了转化
  45. )
  46. // HeroPointRecruit 积分招募
  47. type HeroPointRecruit struct {
  48. PlayerId int64 `json:"userId"`
  49. }
  50. type ResponseHeroPointRecruit struct {
  51. ErrCode int `json:"errCode"`
  52. Msg string `json:"msg,omitempty"`
  53. Data *HeroPointRecruitData `json:"data"`
  54. }
  55. type HeroPointRecruitData struct {
  56. Costs map[int64]int64 `json:"costs"`
  57. Heros []*HeroItem `json:"heros"`
  58. Materials map[int64]int64 `json:"materials"`
  59. Converts map[int64]int64 `json:"convert"` //英雄ID:转化数量
  60. // ID int64 `json:"id"` // 道具id
  61. // Num int64 `json:"num"` // 道具数量
  62. // Flag int64 `json:"flag"` // 英雄是否为首次获得 1:获得新英雄 2:获得英雄但进行了转化 0:按Index取结果
  63. }
  64. // TreasureRecruit 宝物招募
  65. type TreasureRecruit struct {
  66. PlayerId int64 `json:"userId"`
  67. Num int64 `json:"num"` // 招募次数
  68. }
  69. type ResponseTreasureRecruit struct {
  70. ErrCode int `json:"errCode"`
  71. Msg string `json:"msg,omitempty"`
  72. Data *TreasureRecruitData `json:"data"`
  73. }
  74. type TreasureRecruitData struct {
  75. Materials map[int64]int64 `json:"materials"`
  76. Treausres []*TreasureItem `json:"treausres"`
  77. Cost map[int64]int64 `json:"cost"`
  78. }
  79. type TreasureItem struct {
  80. Id int64 `json:"id"`
  81. Level int64 `json:"level"` // 等级
  82. Star int64 `json:"star"` // 星级
  83. }
  84. type HeroItem struct {
  85. ID int64 `json:"id"`
  86. Level int64 `json:"level"`
  87. Wear int64 `json:"wear"`
  88. }
  89. // EpigraphRecruit 铭文招募
  90. type EpigraphRecruit struct {
  91. PlayerId int64 `json:"userId"`
  92. Num int64 `json:"num"` // 招募次数
  93. }
  94. type ResponseEpigraphRecruit struct {
  95. ErrCode int `json:"errCode"`
  96. Msg string `json:"msg,omitempty"`
  97. Data [][]int64 `json:"data"`
  98. }