From c0e91ed2caaeb91b4164df955f51a5433034dc39 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sun, 20 Mar 2016 02:06:43 +0100 Subject: [PATCH] small fix --- disenchant.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disenchant.lua b/disenchant.lua index 97e7893..91ebf36 100644 --- a/disenchant.lua +++ b/disenchant.lua @@ -80,11 +80,11 @@ function public.value(slot, quality, level) end function public.distribution(slot, quality, level) - if not (armor[slot] or weapon[slot]) then + if not (armor[slot] or weapon[slot]) or level == 0 then return {} end - local function p(probability_weapon, probability_armor) + local function p(probability_armor, probability_weapon) if armor[slot] then return probability_armor elseif weapon[slot] then