892
edits
(getAreaMonsterTable: Swap to use functions accepting monster object as a parameter; getMonsterBones: Rename to _getMonsterBones) |
m (getMonsterByID now returns nil instead of erroring) |
||
Line 31: | Line 31: | ||
function p.getMonsterByID(ID) | function p.getMonsterByID(ID) | ||
local result = Shared.clone(MonsterData.Monsters[ID + 1]) | local result = Shared.clone(MonsterData.Monsters[ID + 1]) | ||
result.id = ID | if result ~= nil then | ||
return | result.id = ID | ||
return result | |||
else | |||
return nil | |||
end | |||
end | end | ||
edits