模块:ItemInfo:修订间差异

跳转到导航 跳转到搜索
删除110字节 、​ 2024年6月8日 (星期六)
修正错误
(添加调试信息)
(修正错误)
第17行: 第17行:


-- 根据物品Id获取物品信息
-- 根据物品Id获取物品信息
function p.loadItemById(game, p_id)
function p.loadItemById(game, id)
     if p_id == nil then return nil, '参数为 nil' end
     id = tonumber(id)
    local id = tonumber(p_id)
    if id == nil then return nil, '不正确的ID:' .. p_id end


     if game == 'AT1' then
     if game == 'AT1' then
第56行: 第54行:
end
end


local function queryCategoryById(game, p_id)
local function queryCategoryById(game, id)
     local id = tonumber(p_id)
     id = tonumber(id)
     if game == 'AT1' then
     if game == 'AT1' then
         -- id 区间检查
         -- id 区间检查
第256行: 第254行:


-- AT1 物品信息卡(按ID)
-- AT1 物品信息卡(按ID)
function p.makeAt1ItemInfo(id)
function p.makeAt1ItemInfo(frame)
    local id = frame.args[1]
     local item, err = p.loadItemById('AT1', id)
     local item, err = p.loadItemById('AT1', id)
     if not err then return '获取物品数据出错:' .. err end
     if not err then return '获取物品数据出错:' .. err end
1,075

个编辑

导航菜单