-----------------------------------------------------------
-- 兵书
-----------------------------------------------------------

local FuwenExcel = require("excel.fuwen")
local Util = require("common.Util")
local Grid = require("bag.Grid")

function create(skillID)
	local grid = {}
	grid.skillID = skillID 	-- 技能
	return grid
end

function makeBingshuNet(net, grid, index)
	net.index = index or 0
	Grid.makeFuwenSkill(net.skill, grid.skillID)
end

function makeBingshuLearnNet(net, skillID)
	local config = FuwenExcel.skill[skillID]
	Grid.makeFuwenSkill(net.skill, skillID)
	net.items[0] = #config.bingshuUpNeed
	for i = 1, net.items[0] do
		local itemID = config.bingshuUpNeed[i][1]
		local itemCnt = config.bingshuUpNeed[i][2]
		Grid.makeItem(net.items[i], itemID, itemCnt)
	end
end