4,685
edits
(Updated getRaidModifierList to remove Sign and Redesigned) |
(Updated getRaidModifierList) |
||
Line 86: | Line 86: | ||
for i, modDet in ipairs(GameData.rawData.golbinRaid.possibleModifiers) do | for i, modDet in ipairs(GameData.rawData.golbinRaid.possibleModifiers) do | ||
local baseName, modText, isNeg, modifyValue = Constants.getModifierDetails(modDet.key) | local baseName, modText, isNeg, modifyValue = Constants.getModifierDetails(modDet.key) | ||
--TODO: Is this necessary? getModifierDetails has the same code and this function doesn't have params | |||
local prefix = '' | local prefix = '' | ||
if Shared.startsWith(baseName, 'increased') or Shared.startsWith(baseName, 'decreased') then | if Shared.startsWith(baseName, 'increased') or Shared.startsWith(baseName, 'decreased') then | ||
Line 97: | Line 98: | ||
if modList[baseName] == nil then | if modList[baseName] == nil then | ||
modText = Constants._getModifierText(modDet.key, modVal, false) | modText = Constants._getModifierText(modDet.key, modVal, false) | ||
modList[baseName] = {[" | modList[baseName] = {modText, ["ord"] = i, ["mods"] = 1} | ||
else | else | ||
modList[baseName]["mods"] = modList[baseName]["mods"] + 1 | |||
end | end | ||
end | end | ||
Line 112: | Line 113: | ||
local sortFunc = function(t, a, b) return t[a].ord < t[b].ord end | local sortFunc = function(t, a, b) return t[a].ord < t[b].ord end | ||
for baseName, modDet in Shared.spairs(modList, sortFunc) do | for baseName, modDet in Shared.spairs(modList, sortFunc) do | ||
local modText = modDet | local modText = modDet[1] | ||
if modDet['mods'] > 1 then | |||
local replPat = '[+-]' | |||
if modDet[' | modText = string.gsub(modDet[1], replPat, '+/-', 2) | ||
end | end | ||
resultTable:tag('tr') | resultTable:tag('tr') |