Anonymous

Module:Skills/Summoning: Difference between revisions

From Melvor Idle
getTabletTable: Apply formatting when familiar has no max hit
(Use printError function)
(getTabletTable: Apply formatting when familiar has no max hit)
Line 55: Line 55:
if item ~= nil then
if item ~= nil then
local maxHit, maxHitText = Items._getItemStat(item, 'summoningMaxhit'), ''
local maxHit, maxHitText = Items._getItemStat(item, 'summoningMaxhit'), ''
if maxHit ~= nil then
if maxHit == nil then
maxHitText = 'class="table-na" data-sort-value="-1"| N/A'
else
maxHit = maxHit * 10
maxHit = maxHit * 10
maxHitText = 'style="text-align:right"; data-sort-value="' .. maxHit .. '"|' .. Shared.formatnum(maxHit)
maxHitText = 'style="text-align:right;" data-sort-value="' .. maxHit .. '"|' .. Shared.formatnum(maxHit)
end
end
local effectDesc = Constants.getModifiersText(item.modifiers, false)
local effectDesc = Constants.getModifiersText(item.modifiers, false)