Proto.lua 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --圣者遗物
  2. local ItemData = require("bag.Proto").ItemData
  3. local Attr = require("role.Proto").Attr
  4. -- 遗物网络传输结构
  5. SacredRelicNet = {
  6. {"id", 1, "int"}, -- 遗物ID
  7. {"name", 1, "string"}, -- 遗物名称
  8. {"activateItem", 1, "int"}, -- 激活所需道具ID
  9. {"attr", 4, Attr}, -- 基础属性 生命/攻击/防御/速度
  10. {"nextattr", 4, Attr},
  11. {"effectDesc", 1, "string"}, -- 效果描述
  12. {"effectData", 4, "double"}, --当前加成数据
  13. {"effectNextData",4, "double"}, --下一级加成
  14. {"effectMaxData", 4, "double"}, --最大等级加成
  15. {"type", 1, "int"}, -- 遗物类型 (1:攻击型,2:防御型,3:辅助型)
  16. {"upGradeCost", 1, ItemData}, -- 激活/升级消耗道具信息
  17. {"starLevel", 1, "int"}, -- 星级
  18. {"equipLimit", 1, "int"}, -- 可装备英雄数量
  19. {"heroIdx" , 5, "int"}, -- 背包index
  20. }
  21. -- 客户端请求遗物列表
  22. CG_SACRED_RELIC_QUERY = {
  23. }
  24. -- 服务端返回遗物列表
  25. GC_SACRED_RELIC_QUERY = {
  26. {"nAllStar", 1, "int"}, -- 总星数
  27. {"SacredRelicConfigs", 30, SacredRelicNet},-- 星级配置
  28. }
  29. -- 客户端请求激活/升星遗物
  30. CG_SACRED_RELIC_UPGRADE = {
  31. {"relicId", 1, "int"}, -- 遗物ID
  32. }
  33. -- 服务端返回升级结果
  34. GC_SACRED_RELIC_UPGRADE = {
  35. {"data", 1, SacredRelicNet}, -- 遗物ID
  36. }
  37. -- 客户端请求装备/卸下遗物
  38. CG_SACRED_RELIC_EQUIP = {
  39. {"heroID", 1, "int"},
  40. {"heroIdx", 1, "int"}, -- heroBag = {[0] = HeroDefine.HERO_BAG_CNT},-- 英雄背包[index] ={id,lv等级,quality品阶}
  41. {"relicId", 1, "int"}, -- 遗物ID
  42. {"operate", 1, "int"}, -- 操作(0表示卸下,1表示装备)
  43. }
  44. -- 服务端返回装备/卸下结果
  45. GC_SACRED_RELIC_EQUIP = {
  46. {"heroIdx", 1, "int"}, -- heroBag = {[0] = HeroDefine.HERO_BAG_CNT},-- 英雄背包[index] ={id,lv等级,quality品阶}
  47. {"olddata", 1, SacredRelicNet}, -- 遗物
  48. {"newdata", 1, SacredRelicNet}, -- 遗物
  49. }