123456789101112131415161718192021222324252627282930313233343536 |
- -- 箱子配置
- local baseAdapt = require "base.baseAdapt"
- local root = {}
- ----------------------------------------
- -- 盲盒
- ----------------------------------------
- -- 箱子物品列表
- function root:blind_get_box_item_list(boxId)
- local confList = {}
- local conf = baseAdapt:getConfig("BlindBoxAwardConfig")
- for _, v in ipairs(conf) do
- if v.boxId == boxId then
- table.insert(confList, table.copy(v))
- end
- end
- return confList
- end
- -- 获取箱子信息
- function root:blind_get_box_key_info(boxId, key)
- local conf = baseAdapt:getConfig("BlindBoxConfig")
- for _, v in ipairs(conf) do
- if v.boxId == boxId then
- if is_empty(key) then
- return v
- else
- return v[key]
- end
- end
- end
- end
- return root
|