Module:Constants: Difference between revisions

Fixed a bug with getSlayerTierNameByLevel
m (Correct description typos)
(Fixed a bug with getSlayerTierNameByLevel)
Line 400: Line 400:
function p.getSlayerTierNameByLevel(lvl)
function p.getSlayerTierNameByLevel(lvl)
   for i, tier in Shared.skpairs(ConstantData.Slayer.Tiers) do
   for i, tier in Shared.skpairs(ConstantData.Slayer.Tiers) do
     if tier.minLevel <= lvl and (tier.maxLevel >= lvl or tier.maxLevel == -1) then
     if tier.minLevel <= lvl and (tier.maxLevel == nil or tier.maxLevel >= lvl) then
       return tier.display
       return tier.display
     end
     end