模块:ItemInfo:修订间差异

添加956字节 、​ 2024年6月8日 (星期六)
新增物品类别
(修正错误)
(新增物品类别)
第28行: 第28行:
             -- 防具
             -- 防具
             return p.loadItemInfoByIndex(game, '防具', id - 20 + 1)
             return p.loadItemInfoByIndex(game, '防具', id - 20 + 1)
        elseif id >= 49 and id <= 49 + 11 then
            -- 重要
            return p.loadItemInfoByIndex(game, '重要', id - 49 + 1)
        elseif id >= 61 and id <= 61 + 33 then
            -- 材料(采集)
            return p.loadItemInfoByIndex(game, '材料物品', id - 61 + 1)
         elseif id >= 95 and id <= 95 + 23 then
         elseif id >= 95 and id <= 95 + 23 then
             -- 材料(合成)
             -- 材料(合成)
             return p.loadItemInfoByIndex(game, '合成材料', id - 95 + 1)
             return p.loadItemInfoByIndex(game, '合成材料', id - 95 + 1)
        elseif id >= 119 and id <= 119 + 71 then
            -- 使用类物品
            return p.loadItemInfoByIndex(game, '使用', id - 119 + 1)
         elseif id >= 191 and id <= 191 + 34 then
         elseif id >= 191 and id <= 191 + 34 then
             -- 武器
             -- 武器
第77行: 第86行:
end
end


-- 生成材料物品基本信息的方法,使用模板“物品信息”
-- 生成物品基本信息的方法,使用模板“物品信息”
-- type:采集/合成
-- type:采集/合成
function p.at1MaterialItemInfo(type, index)
function p.at1ItemInfo(category, subcategory, index)
     local catName = '材料物品'
     local catName = category
     if type == '合成' then
     if subcategory == '合成' then
         catName = '合成材料'
         catName = '合成材料'
    elseif subcategory == '采集' then
        catName = '材料物品'
     end
     end
     local item = p.loadItemInfoByIndex('AT1', catName, index)
     local item = p.loadItemInfoByIndex('AT1', catName, index)
第92行: 第103行:
         ["图像"] = item.img,
         ["图像"] = item.img,
         ["原文"] = item.ori,
         ["原文"] = item.ori,
         ["类别"] = '材料',
         ["类别"] = category,
         ["子类别"] = type,
         ["子类别"] = subcategory,tegory,
         ["卖价"] = item.base.sell_price,
         ["卖价"] = item.base.sell_price,
         ["游戏"] = 'AT1',
         ["游戏"] = 'AT1',
第131行: 第142行:
         args = arguments
         args = arguments
     }
     }
end
function p.listMaterialsInAt1()
    result = {}
    for i = 1, 34 do
        table.insert(result, p.at1MaterialItemInfo('采集', i))
    end
    return table.concat(result, '\n')
end
function p.listMelcMaterialsInAt1()
    result = {}
    for i = 1, 24 do
        table.insert(result, p.at1MaterialItemInfo('合成', i))
    end
    return table.concat(result, '\n')
end
end


第254行: 第249行:
     }
     }
end
end
-- 列表生成相关函数


function p.listArmorsInAt1()
function p.listArmorsInAt1()
第275行: 第272行:
     for i = 1, 20 do
     for i = 1, 20 do
         table.insert(result, p.at1EquipInfo('饰品', i))
         table.insert(result, p.at1EquipInfo('饰品', i))
    end
    return table.concat(result, '\n')
end
function p.listMaterialsInAt1()
    result = {}
    for i = 1, 34 do
        table.insert(result, p.at1MaterialItemInfo('材料', '采集', i))
    end
    return table.concat(result, '\n')
end
function p.listMelcMaterialsInAt1()
    result = {}
    for i = 1, 24 do
        table.insert(result, p.at1MaterialItemInfo('材料', '合成', i))
    end
    return table.concat(result, '\n')
end
function p.listKeysInAt1()
    result = {}
    for i = 1, 11 do
        table.insert(result, p.at1MaterialItemInfo('重要', nil, i))
    end
    return table.concat(result, '\n')
end
function p.listUseInAt1()
    result = {}
    for i = 1, 71 do
        table.insert(result, p.at1MaterialItemInfo('使用', nil, i))
     end
     end
     return table.concat(result, '\n')
     return table.concat(result, '\n')
1,075

个编辑