roll.lua 747 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Descripttion:roll房
  3. version:
  4. Author: Neo,Huang
  5. Date: 2023-11-21 23:02:31
  6. LastEditors: Neo,Huang
  7. LastEditTime: 2023-11-21 23:02:43
  8. --]]
  9. local code = require "code"
  10. local util_roll = require("utils.util_roll")
  11. local root = {}
  12. -- 获取房间列表
  13. function root:roll_get_info(role, msg)
  14. local roomInfoList = util_roll:pack_roll_room_info_list()
  15. return code.OK, {roomList = roomInfoList}
  16. end
  17. -- 报名
  18. function root:roll_sign_up(role, msg)
  19. local roomId = msg.roomId
  20. return util_roll:sign_up(role.uid, roomId)
  21. end
  22. -- 我参与的房间
  23. function root:roll_get_self_room_list(role, msg)
  24. local roomInfoList = util_roll:pack_player_roll_room_info_list(role.uid)
  25. return code.OK, {roomList = roomInfoList}
  26. end
  27. return root