fort.go 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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. GIds []string `json:"GIds"`
  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 []string `json:"dels"`
  169. Adds map[int64]int64 `json:"adds"`
  170. }
  171. // 共鸣
  172. // ResonanceSystem 共命新系统
  173. type ResonanceSystem struct {
  174. PlayerId int64 `json:"userId"`
  175. }
  176. type ResponseResonanceSystem struct {
  177. ErrCode int `json:"errCode"`
  178. Msg string `json:"msg,omitempty"`
  179. Data ResonanceFactionDatas `json:"data"`
  180. }
  181. type ResonanceFactionDatas struct {
  182. ServerTs int64 `json:"serverTs"`
  183. Resonance []*model.GrowableResonance `json:"resonance"`
  184. }
  185. type ResonanceFactionData struct {
  186. ServerTs int64 `json:"serverTs"`
  187. Resonance *model.GrowableResonance `json:"resonance"`
  188. Cost map[int64]int64 `json:"cost,omitempty"`
  189. }
  190. // 共鸣体升级
  191. type ResonanceLevelUp struct {
  192. PlayerId int64 `json:"userId"`
  193. Faction int64 `json:"faction"` //阵营
  194. }
  195. type ResponseResonanceLevelUp struct {
  196. ErrCode int `json:"errCode"`
  197. Msg string `json:"msg,omitempty"`
  198. Data ResonanceFactionData `json:"data"`
  199. }
  200. // 共鸣体上下阵英雄
  201. type ResonanceChangeHero struct {
  202. PlayerId int64 `json:"userId"`
  203. Faction int64 `json:"faction"` //阵营
  204. Pos int64 `json:"pos"` //位置 0-3
  205. HeroId int64 `json:"heroId"` //英雄id
  206. OptType int64 `json:"optType"` // 1:上阵 2:下阵
  207. }
  208. type ResponseResonanceChangeHero struct {
  209. ErrCode int `json:"errCode"`
  210. Msg string `json:"msg,omitempty"`
  211. Data ResonanceFactionData `json:"data"`
  212. }
  213. // 共鸣体清理CD
  214. type ResonanceResetCD struct {
  215. PlayerId int64 `json:"userId"`
  216. Faction int64 `json:"faction"` //阵营
  217. Pos int64 `json:"pos"` //位置 0-3
  218. }
  219. type ResponseResonanceResetCD struct {
  220. ErrCode int `json:"errCode"`
  221. Msg string `json:"msg,omitempty"`
  222. Data ResonanceFactionData `json:"data"`
  223. }
  224. // 军衔晋升
  225. type RenownLevelUp struct {
  226. PlayerId int64 `json:"userId"`
  227. }
  228. type ResponseRenownLevelUp struct {
  229. ErrCode int `json:"errCode"`
  230. Msg string `json:"msg,omitempty"`
  231. Data *RenownLevelUpData `json:"data"`
  232. }
  233. type RenownLevelUpData struct {
  234. Materials map[int64]int64 `json:"materials"`
  235. Renown int64 `json:"renown"`
  236. }
  237. type QueryLoginDaysIs struct {
  238. RpcRequestMsg
  239. PlayerID int64 `json:"userId"`
  240. }
  241. type ResponseQueryLoginDaysIs struct {
  242. RpcResponseMsg
  243. PlayerID int64 `json:"userId"`
  244. Data int64 `json:"data"`
  245. }
  246. // // 英雄换皮肤
  247. // type HeroChangeSkin struct {
  248. // PlayerId int64 `json:"userId"`
  249. // HeroId int64 `json:"heroId"`
  250. // SkinId int64 `json:"skinId"`
  251. // }
  252. // type HeroChangeSkinData struct {
  253. // }
  254. // type ResponseHeroChangeSkin struct {
  255. // ErrCode int `json:"errCode"`
  256. // Msg string `json:"msg,omitempty"`
  257. // Data *HeroChangeSkinData `json:"data"`
  258. // }
  259. // // HeroActive 激活
  260. // type HeroActive struct {
  261. // PlayerId int64 `json:"userId"`
  262. // HeroId int32 `json:"heroId"`
  263. // Type int32 `json:"type"` // 1 碎片合成 2 钻石购买
  264. // }
  265. // type HeroActiveData struct {
  266. // }
  267. // type ResponseHeroActive struct {
  268. // ErrCode int `json:"errCode"`
  269. // Msg string `json:"msg,omitempty"`
  270. // Data *HeroActiveData `json:"data"`
  271. // }
  272. // TreasuresLevelUp 宝物升级
  273. // type TreasuresLevelUp struct {
  274. // PlayerId int64 `json:"userId"`
  275. // Id int32 `json:"id"`
  276. // }
  277. // type TreasuresLevelUpData struct {
  278. // }
  279. // type ResponseTreasuresLevelUp struct {
  280. // ErrCode int `json:"errCode"`
  281. // Msg string `json:"msg,omitempty"`
  282. // Data *TreasuresLevelUpData `json:"data"`
  283. // }
  284. // // TreasureStarUp 宝物升星
  285. // type TreasuresStarUp struct {
  286. // PlayerId int64 `json:"userId"`
  287. // Id int32 `json:"id"`
  288. // }
  289. // type TreasuresStarUpData struct {
  290. // }
  291. // type ResponseTreasuresStarUp struct {
  292. // ErrCode int `json:"errCode"`
  293. // Msg string `json:"msg,omitempty"`
  294. // Data *TreasuresStarUpData `json:"data"`
  295. // }