proto_test.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. -- 测试工具相关协议 2200~2299
  2. local proto_struct = [[
  3. ]]
  4. local proto_c2s =
  5. [[
  6. # 玩家修改个人系统时间GM
  7. test_debug_system_time 2200 {
  8. request {
  9. uid 0: integer
  10. time 1: integer # 玩家修改的时间戳
  11. reset 2: integer # 是否重置,0(空):重置,1:系统时间,2:设置注册时间,3:退出标准时间
  12. }
  13. response {
  14. code 0: integer # 返回码
  15. sysTime 1: integer # 服务器时间
  16. debugTime 2: integer # 调试时间(固定)
  17. }
  18. }
  19. #请求给玩家增减物品GM
  20. test_add_items 2201 {
  21. request {
  22. uid 0: integer
  23. items 1: *DataItem # 物品列表
  24. }
  25. response {
  26. code 0: integer
  27. }
  28. }
  29. # 测试支付接口
  30. test_pay_goods 2202 {
  31. request {
  32. orderId 0: string # 订单号 时间戳_渠道_玩家ID_商品ID
  33. payName 1: string # 支付名称wxpay cmpay...
  34. status 2: boolean # 订单成功 true, 失败 false
  35. resMsg 3: string # 订单状态解释
  36. amount 4: integer # 实际订单金额,单位分
  37. }
  38. response {
  39. code 0: integer #
  40. }
  41. }
  42. ]]
  43. local proto_s2c = [[
  44. ]]
  45. local proto = {
  46. c2s = proto_struct .. proto_c2s,
  47. s2c = proto_struct .. proto_s2c
  48. }
  49. return proto