239
edits
(getAreaPassives is working) |
(getAreaPassives now works for dungeons and strongholds) |
||
Line 185: | Line 185: | ||
end | end | ||
-- nonBossPassives | local bossPassives = nil | ||
local nonBossPassives = nil | |||
if area.eventID ~= nil and area.eventID ~= '' then -- currently just Impending Darkness Event | |||
local event = GameData.getEntityByID('combatEvents', area.eventID) | |||
bossPassives = event.bossPassives | |||
-- nonBossPassives = event.enemyPassives -- melvorF:ControlledAffliction is missing from GameData | |||
else | |||
bossPassives = area.bossOnlyPassives -- Strongholds only | |||
nonBossPassives = area.nonBossPassives -- Dungeons only | |||
end | |||
local result = '' | local result = '' | ||
if type( | |||
for i, passiveID in ipairs( | if type(nonBossPassives) == 'table' and not Shared.tableIsEmpty(nonBossPassives) then | ||
result = result .. '\r\n===Non-Boss Monster Passives===' | |||
for i, passiveID in ipairs(nonBossPassives) do | |||
local passive = p.getPassiveByID(passiveID) | local passive = p.getPassiveByID(passiveID) | ||
result = result .. '\r\n* ' .. passive.name .. '\r\n** ' .. Constants.getDescription(passive.customDescription, passive.modifiers) | result = result .. '\r\n* ' .. passive.name .. '\r\n** ' .. Constants.getDescription(passive.customDescription, passive.modifiers) | ||
Line 194: | Line 206: | ||
end | end | ||
if type(bossPassives) == 'table' and not Shared.tableIsEmpty(bossPassives) then | |||
result = result .. '\r\n===Boss Monster Passives===' | |||
for i, passiveID in ipairs(bossPassives) do | |||
local passive = p.getPassiveByID(passiveID) | |||
result = result .. '\r\n* ' .. passive.name .. '\r\n** ' .. Constants.getDescription(passive.customDescription, passive.modifiers) | |||
end | |||
end | |||
if | if type(area.tiers) == 'table' and not Shared.tableIsEmpty(area.tiers) then | ||
result = '===Passives===' .. result | result = result .. '\r\n===Stronghold Tier Passives===' | ||
for tierName, tierData in pairs(area.tiers) do | |||
result = result .. '\r\n* ' .. tierName .. ' Tier' | |||
for i, passiveID in ipairs(tierData.passives) do | |||
local passive = p.getPassiveByID(passiveID) | |||
result = result .. '\r\n** ' .. passive.name .. '\r\n*** ' .. Constants.getDescription(passive.customDescription, passive.modifiers) | |||
end | |||
end | |||
end | end | ||
return result | return result | ||
end | end |
edits