Anonymous

Module:GolbinRaid: Difference between revisions

From Melvor Idle
Correct various issues
(Update for v1.1)
(Correct various issues)
Line 32: Line 32:
end
end


for i, crateEntry in Shared.spairs(GameData.golbinRaid.crateItems, sortFunc) do
for i, crateEntry in Shared.spairs(GameData.rawData.golbinRaid.crateItems, sortFunc) do
local item = Items.getItemByID(crateEntry.itemID)
local item = Items.getItemByID(crateEntry.itemID)
if item ~= nil then
if item ~= nil then
Line 57: Line 57:
-- If the item has special attacks, use those
-- If the item has special attacks, use those
local spAttText = {}
local spAttText = {}
for j, spAtt in ipairs(item.specialAttacks) do
for j, spAttID in ipairs(item.specialAttacks) do
table.insert(spAttText, '<b>' .. spAtt.name .. ' (' .. Shared.round(spAtt.defaultChance, 2, 0) .. '%)</b> - ' .. spAtt.description)
local spAtt = GameData.getEntityByID('attacks', spAttID)
if spAtt ~= nil then
table.insert(spAttText, '<b>' .. spAtt.name .. ' (' .. Shared.round(spAtt.defaultChance, 2, 0) .. '%)</b> - ' .. spAtt.description)
end
end
end
descText = table.concat(spAttText, '<br/>')
descText = table.concat(spAttText, '<br/>')
Line 81: Line 84:
function p.getRaidModifierList()
function p.getRaidModifierList()
local modList = {}
local modList = {}
for i, modDet in ipairs(GameData.golbinRaid.possibleModifiers) do
for i, modDet in ipairs(GameData.rawData.golbinRaid.possibleModifiers) do
local baseName, modText, modSign, isNeg, isUnsigned = Constants.getModifierDetails(modDet.key)
local baseName, modText, modSign, isNeg, isUnsigned = Constants.getModifierDetails(modDet.key)
local prefix = ''
local prefix = ''