--[[ Descripttion:战斗 version: Author: Neo,Huang Date: 2021-09-15 19:47:54 LastEditors: Neo,Huang LastEditTime: 2021-09-15 19:47:55 --]] local moduleData = require("data.module") local MODULE_NAME = "battle" local root = {} -- 房间 - 更新 function root:band_room(uid, roomId, costItems) if is_empty(uid) then return false end moduleData:hset(uid, MODULE_NAME, "roomId", roomId) moduleData:hset(uid, MODULE_NAME, "costItems", costItems) return true end -- 房间 - 获取 function root:get_room_id(uid) if is_empty(uid) then return end return moduleData:hget_int(uid, MODULE_NAME, "roomId") end -- 获取进入房间消耗 function root:get_room_cost_items(uid) if is_empty(uid) then return end return moduleData:hget_json(uid, MODULE_NAME, "costItems") end return root