17,101
edits
Falterfire (talk | contribs) (Fixed decimal issue with monster drops) |
(_isDungeonOnlyMonster: Optimise) |
||
Line 294: | Line 294: | ||
function p._isDungeonOnlyMonster(monster) | function p._isDungeonOnlyMonster(monster) | ||
local areaList = Areas.getMonsterAreas(monster.id) | local areaList = Areas.getMonsterAreas(monster.id) | ||
local | local inDungeon = false | ||
for i, area in | for i, area in ipairs(areaList) do | ||
if area.type == 'dungeon' then | |||
inDungeon = true | |||
else | |||
return false | |||
end | |||
end | end | ||
return | return inDungeon | ||
end | end | ||