-- 装备图鉴 local Msg = require("core.Msg") local EquipExcel = require("excel.equip") local ItemDefine = require("bag.ItemDefine") local Grid = require("bag.Grid") -- 查询装备图鉴 全部信息 function queryEquipBook(human, rare) local EquipBookConfig = EquipExcel.tujian if not EquipBookConfig then return end local msgRet = Msg.gc.GC_EQUIP_BOOK_QUERY msgRet.rare = rare local cnt = 0 for equipID, equipData in pairs(EquipBookConfig)do local find = false if rare >= 6 and equipData.rare >= 6 then find = true end if rare == equipData.rare or find then local equipConfig = EquipExcel.equip[equipID] if not equipConfig then assert() end cnt = cnt + 1 Grid.makeItem(msgRet.list[cnt],equipID,1) msgRet.list[cnt].equip[1].level = equipConfig.maxLevel or 0 if cnt >= ItemDefine.PAGE_LIST_COUNT then msgRet.list[0] = cnt cnt = 0 Msg.send(msgRet, human.fd) end end end if cnt > 0 then msgRet.list[0] = cnt Msg.send(msgRet, human.fd) end end