-- Decompiled using luadec 2.2 GBK r120 from http://luadec.googlecode.com
-- Command line: iteminfo.lub 

add_url = function()
return M
end

add_item_link = function(v)
return M
end

-- ====================================================
-- 自定義設定區：伺服器名稱與物品編號顯示
-- ====================================================
serverName = "    ^0000ff海棠仙境^000000"  -- 請把這裡改成你的伺服器名稱
cont_cor = "^008000"
bg_c = "^000000"
serName = "^00bfff"..serverName.."^000000"..cont_cor

title_add = 1  -- 是否顯示伺服器名稱 (1=開啟, 0=關閉)
title_id = 1   -- 是否顯示物品 ID 編號 (1=開啟, 0=關閉)
-- ====================================================

main = function()
IInfo = {"System.updata_iteminfo", "System.tw_iteminfo", "System.kro_iteminfo"}
ItemList = {}

for key,ItemInfo in pairs(IInfo) do
  require(ItemInfo)
  for ItemID,DESCS in pairs(tbl) do
    if not ItemList[ItemID] then
      ItemList[ItemID] = true
      result = AddItem(ItemID, DESCS.identifiedDisplayName .. "(未鑑定)", DESCS.identifiedResourceName, DESCS.identifiedDisplayName, DESCS.identifiedResourceName, DESCS.slotCount, DESCS.ClassNum)
      if not result == true then
        return false, msg
      end
      
      -- ==========================================
      -- [未鑑定] 插入伺服器名稱與物品編號
      -- ==========================================
      if title_add == 1 then 
        AddItemUnidentifiedDesc(ItemID, serName) 
      end
      if title_id == 1 then 
        AddItemUnidentifiedDesc(ItemID, "道具編號:[^FF0000"..ItemID..cont_cor.."]"..bg_c) 
      end
      
      AddItemUnidentifiedDesc(ItemID, add_url())
      for k,v in pairs(DESCS.identifiedDescriptionName) do
        result = AddItemUnidentifiedDesc(ItemID, v)
        if not result == true then
          return false, msg
        end
      end
      AddItemUnidentifiedDesc(ItemID, add_item_link(ItemID))
      
      -- ==========================================
      -- [已鑑定] 插入伺服器名稱與物品編號
      -- ==========================================
      if title_add == 1 then 
        AddItemIdentifiedDesc(ItemID, serName) 
      end
      if title_id == 1 then 
        AddItemIdentifiedDesc(ItemID, "道具編號:[^FF0000"..ItemID..cont_cor.."]"..bg_c) 
      end

      AddItemIdentifiedDesc(ItemID, add_url())
      for k,v in pairs(DESCS.identifiedDescriptionName) do
        result = AddItemIdentifiedDesc(ItemID, v)
        if not result == true then
          return false, msg
        end
      end
      AddItemIdentifiedDesc(ItemID, add_item_link(ItemID))
      
      -- 已修正反編譯器的 == nil 錯誤為 ~= nil，避免特效與服飾失效
      if DESCS.EffectID ~= nil then
        result = AddItemEffectInfo(ItemID, DESCS.EffectID)
      end
      if not result == true then
        return false, msg
      end
      if DESCS.costume ~= nil then
        result = AddItemIsCostume(ItemID, DESCS.costume)
      end
    end
    
    if not result == true then
      return false, msg
    end
  end
end
return true, "good"
end