Formula

CommonFun.calcRefineRecovery

function CommonFun.calcRefineRecovery(itemid, refinelv, damge, type)
  local refineparam = {
    [1] = 0,
    [2] = 0,
    [3] = 0,
    [4] = 0,
    [5] = 1.2,
    [6] = 1.4,
    [7] = 1.6,
    [8] = 2.2,
    [9] = 3.4,
    [10] = 5,
    [11] = 7.4,
    [12] = 12.4,
    [13] = 19.8,
    [14] = 35.2,
    [15] = 57.4
  }
  local ItemCount = 0
  local CountRatio = 0
  if type == 1 then
    CountRatio = 3
  elseif type == 2 then
    CountRatio = 2
  else
    CountRatio = 2
  end
  if refineparam[refinelv] == nil then
    return 0
  else
    ItemCount = CountRatio * refineparam[refinelv]
    return math.floor(ItemCount)
  end
end