fort.go 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. package msg
  2. import (
  3. "leafstalk/covenant/model"
  4. )
  5. // FortLevelUp 要塞升级
  6. type FortLevelUp struct {
  7. PlayerId int64 `json:"userId"`
  8. }
  9. type ResponseFortLevelUp struct {
  10. ErrCode int `json:"errCode"`
  11. Msg string `json:"msg,omitempty"`
  12. Data *FortLevelUpData `json:"data"`
  13. }
  14. type FortLevelUpData struct {
  15. Level int64 `json:"level"` //等级
  16. Cost map[int64]int64 `json:"cost"` // 消耗
  17. }
  18. // FortTalentUp 天赋升级
  19. type FortTalentUp struct {
  20. PlayerId int64 `json:"userId"`
  21. Type int64 `json:"type"`
  22. }
  23. type ResponseFortTalentUp struct {
  24. ErrCode int `json:"errCode"`
  25. Msg string `json:"msg,omitempty"`
  26. Data *FortTalentUpData `json:"data"`
  27. }
  28. type FortTalentUpData struct {
  29. Type int64 `json:"type"`
  30. Level int64 `json:"level"` //新天赋等级
  31. Cost map[int64]int64 `json:"cost"` // 消耗
  32. }
  33. // ChangeFortSkin 更换时装
  34. type ChangeFortSkin struct {
  35. PlayerId int64 `json:"userId"`
  36. SkinId int64 `json:"skinId"` //皮肤ID
  37. }
  38. type ResponseChangeFortSkin struct {
  39. ErrCode int `json:"errCode"`
  40. Msg string `json:"msg,omitempty"`
  41. Data int64 `json:"data"` //皮肤ID
  42. }
  43. // type ChangeFortSkinData struct {
  44. // Level int64 `json:"level"` //等级
  45. // Skin *FortSkin `json:"skin"` //皮肤
  46. // }
  47. // StarFortSkin 升星时装
  48. type FortSkinStarUp struct {
  49. PlayerId int64 `json:"userId"`
  50. SkinId int64 `json:"skinId"`
  51. }
  52. type ResponseFortSkinStarUp struct {
  53. ErrCode int `json:"errCode"`
  54. Msg string `json:"msg,omitempty"`
  55. Data *FortSkinStarUpData `json:"data"`
  56. }
  57. type FortSkinStarUpData struct {
  58. SkinId int64 `json:"skinId"`
  59. Star int64 `json:"star"`
  60. Cost map[int64]int64 `json:"cost"`
  61. }
  62. // FortSkinActive
  63. type FortSkinActive struct {
  64. PlayerId int64 `json:"userId"`
  65. SkinId int64 `json:"skinId"` //皮肤模型ID
  66. }
  67. type ResponseFortSkinActive struct {
  68. ErrCode int `json:"errCode"`
  69. Msg string `json:"msg,omitempty"`
  70. Data *FortSkinActiveData `json:"data"`
  71. }
  72. type FortSkinActiveData struct {
  73. SkinId int64 `json:"skinId"` //皮肤ID
  74. Level int64 `json:"level"`
  75. Cost map[int64]int64 `json:"cost"`
  76. }
  77. // 要塞技能选配
  78. type FortSkillSelect struct {
  79. PlayerId int64 `json:"userId"`
  80. SkinId int64 `json:"skillId"` //皮肤ID
  81. Pos int64 `json:"pos"` //技能位置 0,1,2
  82. }
  83. type ResponseFortSkillSelect struct {
  84. ErrCode int `json:"errCode"`
  85. Msg string `json:"msg,omitempty"`
  86. Data [3]int64 `json:"data"`
  87. }
  88. const (
  89. WearRune = 1
  90. TakeOffRune = 2
  91. )
  92. // RuneWear 穿卸符文
  93. // 镶嵌 卸下 替换: 1,2,3
  94. type RuneWear struct {
  95. PlayerId int64 `json:"userId"`
  96. RuneGId int64 `json:"runeGId,string"`
  97. Type int64 `json:"type"`
  98. }
  99. type ResponseRuneWear struct {
  100. ErrCode int `json:"errCode"`
  101. Msg string `json:"msg,omitempty"`
  102. Data *RuneWearData `json:"data"`
  103. }
  104. type RuneWearData struct {
  105. Pos int64 `json:"pos"`
  106. Part *model.FortPart `json:"part"`
  107. }
  108. // RuneLevelUp 符文部位升级
  109. type RuneLevelUp struct {
  110. PlayerId int64 `json:"userId"`
  111. OptType int64 `json:"optType"` // 0:指定部位升一级 1:一键升级,所有部位升到尽量最高
  112. RuneType int `json:"runeType,omitempty"` // 符文类型 1-6
  113. }
  114. type ResponseRuneLevelUp struct {
  115. ErrCode int `json:"errCode"`
  116. Msg string `json:"msg,omitempty"`
  117. Data *RuneLevelUpData `json:"data"`
  118. }
  119. type RuneLevelUpData struct {
  120. Cost map[int64]int64 `json:"cost"`
  121. PartLevel map[int]int64 `json:"partLevel"`
  122. }
  123. // RuneRecast 符文重铸属性
  124. type RuneRecast struct {
  125. PlayerId int64 `json:"userId"`
  126. RuneGId int64 `json:"runeGId,string"`
  127. LockPos []int `json:"lockPos"` // 需要锁定的位置 0,1,2
  128. }
  129. // 给客户端的参考
  130. // type RuneAffix struct {
  131. // Type int64 `json:"typ"`
  132. // Value float64 `json:"val"`
  133. // }
  134. // type RuneAffixAndPos struct {
  135. // *RuneAffix
  136. // Pos int
  137. // }
  138. type ResponseRuneRecast struct {
  139. ErrCode int `json:"errCode"`
  140. Msg string `json:"msg,omitempty"`
  141. Data *RuneRecastData `json:"data"`
  142. }
  143. type RuneRecastData struct {
  144. RuneAffix []*model.RuneAffixAndPos `json:"affix"`
  145. Cost map[int64]int64 `json:"cost"`
  146. }
  147. // SaveRuneRecastAttrs 保存符文重铸属性
  148. type SaveRuneRecastAttrs struct {
  149. PlayerId int64 `json:"userId"`
  150. RuneGId int64 `json:"runeGId,string"`
  151. }
  152. type ResponseSaveRuneRecastAttrs struct {
  153. ErrCode int `json:"errCode"`
  154. Msg string `json:"msg,omitempty"`
  155. Data map[string]*model.BagRune `json:"data"`
  156. }
  157. // RuneDisintegration 符文分解
  158. type RuneDisintegration struct {
  159. PlayerId int64 `json:"userId"`
  160. Quality int64 `json:"quality"`
  161. }
  162. type ResponseRuneDisintegration struct {
  163. ErrCode int `json:"errCode"`
  164. Msg string `json:"msg,omitempty"`
  165. Data *RuneDisintegrationData `json:"data"`
  166. }
  167. type RuneDisintegrationData struct {
  168. Dels []int64 `json:"dels"`
  169. Adds map[int64]int64 `json:"adds"`
  170. }
  171. // // 英雄换皮肤
  172. // type HeroChangeSkin struct {
  173. // PlayerId int64 `json:"userId"`
  174. // HeroId int64 `json:"heroId"`
  175. // SkinId int64 `json:"skinId"`
  176. // }
  177. // type HeroChangeSkinData struct {
  178. // }
  179. // type ResponseHeroChangeSkin struct {
  180. // ErrCode int `json:"errCode"`
  181. // Msg string `json:"msg,omitempty"`
  182. // Data *HeroChangeSkinData `json:"data"`
  183. // }
  184. // // HeroActive 激活
  185. // type HeroActive struct {
  186. // PlayerId int64 `json:"userId"`
  187. // HeroId int32 `json:"heroId"`
  188. // Type int32 `json:"type"` // 1 碎片合成 2 钻石购买
  189. // }
  190. // type HeroActiveData struct {
  191. // }
  192. // type ResponseHeroActive struct {
  193. // ErrCode int `json:"errCode"`
  194. // Msg string `json:"msg,omitempty"`
  195. // Data *HeroActiveData `json:"data"`
  196. // }
  197. // TreasuresLevelUp 宝物升级
  198. // type TreasuresLevelUp struct {
  199. // PlayerId int64 `json:"userId"`
  200. // Id int32 `json:"id"`
  201. // }
  202. // type TreasuresLevelUpData struct {
  203. // }
  204. // type ResponseTreasuresLevelUp struct {
  205. // ErrCode int `json:"errCode"`
  206. // Msg string `json:"msg,omitempty"`
  207. // Data *TreasuresLevelUpData `json:"data"`
  208. // }
  209. // // TreasureStarUp 宝物升星
  210. // type TreasuresStarUp struct {
  211. // PlayerId int64 `json:"userId"`
  212. // Id int32 `json:"id"`
  213. // }
  214. // type TreasuresStarUpData struct {
  215. // }
  216. // type ResponseTreasuresStarUp struct {
  217. // ErrCode int `json:"errCode"`
  218. // Msg string `json:"msg,omitempty"`
  219. // Data *TreasuresStarUpData `json:"data"`
  220. // }