4,951
edits
(getModifierText: Adjust display of various time based modifier values) |
Falterfire (talk | contribs) (Tweaked how bonuses for multiple rows simultaneously are handled) |
||
Line 43: | Line 43: | ||
["increasedFoodHealingValue"] = { text = "+{V}% Food Healing Value", }, | ["increasedFoodHealingValue"] = { text = "+{V}% Food Healing Value", }, | ||
["increasedChanceToPreservePrayerPoints"] = { text = "+{V}% Chance To Preserve Prayer Points", }, | ["increasedChanceToPreservePrayerPoints"] = { text = "+{V}% Chance To Preserve Prayer Points", }, | ||
["increasedMinAirSpellDmg"] = { text = "+{V} Min Air Spell Dmg", }, | ["increasedMinAirSpellDmg"] = { text = "+{V} Min Air Spell Dmg", }, | ||
["increasedMinWaterSpellDmg"] = { text = "+{V} Min Water Spell Dmg", }, | ["increasedMinWaterSpellDmg"] = { text = "+{V} Min Water Spell Dmg", }, | ||
Line 86: | Line 85: | ||
["decreasedFoodHealingValue"] = { text = "-{V}% Food Healing Value", isNegative = true }, | ["decreasedFoodHealingValue"] = { text = "-{V}% Food Healing Value", isNegative = true }, | ||
["decreasedChanceToPreservePrayerPoints"] = { text = "-{V}% Chance To Preserve Prayer Points", isNegative = true }, | ["decreasedChanceToPreservePrayerPoints"] = { text = "-{V}% Chance To Preserve Prayer Points", isNegative = true }, | ||
["decreasedMinAirSpellDmg"] = { text = "-{V} Min Air Spell Dmg", isNegative = true }, | ["decreasedMinAirSpellDmg"] = { text = "-{V} Min Air Spell Dmg", isNegative = true }, | ||
["decreasedMinWaterSpellDmg"] = { text = "-{V} Min Water Spell Dmg", isNegative = true }, | ["decreasedMinWaterSpellDmg"] = { text = "-{V} Min Water Spell Dmg", isNegative = true }, | ||
Line 193: | Line 191: | ||
if type(value) == 'table' then | if type(value) == 'table' then | ||
if Shared.tableCount(value) | if Shared.tableCount(value) > 0 and type(value[1]) == 'table' then | ||
--Potentially return multiple rows if necessay | |||
local resultArray = {} | |||
if value[1] ~= nil then | for i, subVal in Shared.skpairs(value) do | ||
table.insert(resultArray, p.getModifierText, modifier, subVal, doColor) | |||
end | |||
return table.concat(resultArray, '<br/>') | |||
else | |||
if value[1] ~= nil then | |||
local skillName = p.getSkillName(value[1]) | |||
if skillName ~= nil then | |||
result = string.gsub(result, '{SV0}', p.getSkillName(value[1])) | |||
end | |||
end | |||
if value[2] ~= nil then | |||
result = string.gsub(result, '{V1}', value[2]) | |||
result = string.gsub(result, '{VMS1}', value[2] / 1000) | |||
end | end | ||
end | end | ||
else | else |