item.proto 846 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // message结构的属性名请使用 驼峰小写字母开始
  2. syntax = "proto3";
  3. option go_package = "/pb";
  4. package pb;
  5. import "base_type.proto";
  6. // 道具列表
  7. message ItemList {
  8. // 货币列表
  9. map<int32, Currency> currencies = 1;
  10. // 道具列表
  11. map<int32, Asset> items = 2;
  12. // 药品使用次数 key 药品ID D-道具-药品表药品ID value 当前使用次数
  13. map<int32, int32> medicineUses = 3;
  14. }
  15. // 货币
  16. message Currency {
  17. // 货币id
  18. int32 id = 1;
  19. // 当前数量
  20. int64 num = 2;
  21. // 最大数量(0表示没有最大值)
  22. int64 maxNum = 3;
  23. // 最后一次更新时间(毫秒)
  24. int64 updateTime = 4;
  25. }
  26. // [请求]道具使用
  27. message ItemUseRequest {
  28. // 宝箱道具ID
  29. int32 itemID = 1;
  30. // 开启数量
  31. int64 useNum = 2;
  32. // (选择道具ID) 仅自选类型宝箱使用
  33. int32 selectItemID = 3;
  34. }