4,951
edits
Falterfire (talk | contribs) (have i mentioned i'm super lazy?) |
Falterfire (talk | contribs) (Added slayer area effect to getMonsterAreas to try out) |
||
Line 307: | Line 307: | ||
end | end | ||
function p._getMonsterAreas(monster, excludeDungeons) | function p._getMonsterAreas(monster, excludeDungeons, includeEffects) | ||
if includeEffects == nil then includeEffects = false end | |||
local resultPart = {} | local resultPart = {} | ||
local hideDungeons = excludeDungeons ~= nil and excludeDungeons or false | local hideDungeons = excludeDungeons ~= nil and excludeDungeons or false | ||
Line 315: | Line 316: | ||
local imgType = (area.type == 'slayerArea' and 'combatArea') or area.type | local imgType = (area.type == 'slayerArea' and 'combatArea') or area.type | ||
table.insert(resultPart, Icons.Icon({area.name, type = imgType})) | table.insert(resultPart, Icons.Icon({area.name, type = imgType})) | ||
if area.type == 'slayerArea' then | |||
local areaDescrip = Areas._getAreaStat(area, 'areaEffectDesc') | |||
if areaDescrip ~= 'None' then | |||
table.insert(resultPart, "'''"..areaDescrip.."'''") | |||
end | |||
end | |||
end | end | ||
end | end | ||
Line 323: | Line 330: | ||
local monsterName = frame.args ~= nil and frame.args[1] or frame | local monsterName = frame.args ~= nil and frame.args[1] or frame | ||
local hideDungeons = frame.args ~= nil and frame.args[2] or nil | local hideDungeons = frame.args ~= nil and frame.args[2] or nil | ||
local includeEffects = frame.args ~= nil and frame.args[3] or true | |||
local monster = p.getMonster(monsterName) | local monster = p.getMonster(monsterName) | ||
Line 329: | Line 337: | ||
end | end | ||
return p._getMonsterAreas(monster, hideDungeons) | return p._getMonsterAreas(monster, hideDungeons, includeEffects) | ||
end | end | ||