Module:Monsters: Difference between revisions

Fixed issues with not showing monster lists properly
(Accounting for Stun Damage Multiplier for spec attacks.)
(Fixed issues with not showing monster lists properly)
Line 29: Line 29:


function p.getMonsterByID(ID)
function p.getMonsterByID(ID)
   return MonsterData.Monsters[ID + 1]
   local result = Shared.clone(MonsterData.Monsters[ID + 1])
  result.id = ID
  return result
end
end


Line 611: Line 613:
   local count = 0
   local count = 0
   for i, monsterID in pairs(area.monsters) do
   for i, monsterID in pairs(area.monsters) do
     local monster = p.getMonsterByID(monsterID)
     if monsterID ~= lastID then
    if monster.id ~= lastID then
      local monster = p.getMonsterByID(monsterID)
       if lastMonster ~= nil then
       if lastMonster ~= nil then
         local name = lastMonster.name
         local name = lastMonster.name