Formula

CommonFun.calcBuff_4040

function CommonFun.calcBuff_4040(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Num = srcUser:GetRunePoint(c)
  local RefineLv = srcUser:GetEquipedRefineLv(7_WEAPON)
  local JS = 0
  if 15 <= RefineLv and srcUser:HasBuffID(90002133_SPIRITUAL_ROD_R4_:MAX_STACK_0) then
    JS = 5
  end
  if srcUser:HasBuffID(42710_STARFORGED_MAGIC_WAND_:MAX_STACK_0) then
    JS = JS + 4
  end
  if 15 <= RefineLv and srcUser:HasBuffID(42710_STARFORGED_MAGIC_WAND_:MAX_STACK_0) then
    JS = JS + 5
  end
  if srcUser:HasBuffID(90004574_STARFORGED_MAGIC_WAND_1_T5_:MAX_STACK_0) then
    JS = JS + 5
  end
  local A = lv * a + b + Num * d + JS
  return A
end