-----------------------------------
-- Area: Castle Zvahl Baileys (161)
--   NM: Marquis Amon
-----------------------------------
mixins = { require('scripts/mixins/job_special') }
-----------------------------------
---@type TMobEntity
local entity = {}

entity.spawnPoints =
{
    { x = -30.715, y = -4.500, z = -20.455 },
    { x = -40.749, y = -4.000, z = -11.079 },
    { x = -28.560, y = -4.000, z =   3.923 },
    { x = -37.871, y = -4.000, z = -12.995 },
    { x = -28.994, y = -4.000, z =  -2.958 },
    { x = -38.143, y = -4.000, z = -12.759 },
    { x = -34.191, y = -4.000, z =  -4.037 },
    { x = -22.554, y = -4.000, z =  -2.814 },
    { x = -36.064, y = -4.000, z = -17.204 },
    { x = -44.664, y = -4.000, z =   0.671 },
    { x = -33.959, y = -4.000, z = -16.539 },
    { x = -34.922, y = -4.000, z =  -5.554 },
    { x = -31.919, y = -4.000, z =   6.051 },
    { x = -41.793, y = -4.000, z =   5.527 },
    { x = -34.147, y = -4.000, z = -17.818 },
    { x = -41.741, y = -4.000, z =  -1.070 },
    { x = -41.575, y = -4.000, z = -15.190 },
    { x = -37.941, y = -4.000, z =   1.472 },
    { x = -37.208, y = -4.000, z =   7.541 },
    { x = -28.253, y = -4.000, z = -13.785 },
    { x = -21.092, y = -4.000, z =  -6.196 },
    { x = -43.040, y = -4.000, z =  -7.677 },
    { x = -44.337, y = -4.000, z = -18.642 },
    { x = -22.415, y = -4.000, z = -10.492 },
    { x = -25.805, y = -4.000, z =  -1.420 },
    { x = -42.501, y = -4.000, z =  -1.566 },
    { x = -27.260, y = -4.000, z = -13.595 },
    { x = -24.693, y = -4.000, z =   3.786 },
    { x = -30.845, y = -4.000, z =  -3.526 },
    { x = -19.697, y = -4.000, z =  -5.593 },
    { x = -39.398, y = -4.000, z = -18.995 },
    { x = -44.096, y = -4.000, z =  -1.129 },
    { x = -35.742, y = -4.000, z = -18.005 },
    { x = -25.566, y = -4.000, z = -18.922 },
    { x = -29.845, y = -4.000, z =   4.826 },
    { x = -30.757, y = -4.000, z = -12.312 },
    { x = -21.648, y = -4.000, z =  -5.490 },
    { x = -40.119, y = -4.000, z =   2.191 },
    { x = -39.063, y = -4.000, z = -15.999 },
    { x = -43.779, y = -4.000, z =  -3.345 },
    { x = -45.451, y = -4.000, z =   2.691 },
    { x = -26.348, y = -4.000, z =  -8.100 },
    { x = -33.601, y = -4.000, z =   3.087 },
    { x = -31.659, y = -4.000, z = -11.285 },
    { x = -34.150, y = -4.000, z =   1.973 },
    { x = -42.356, y = -4.000, z = -12.358 },
    { x = -34.245, y = -4.000, z =  -0.117 },
    { x = -27.089, y = -4.000, z =  -8.732 },
    { x = -40.770, y = -4.000, z = -16.928 },
    { x = -35.299, y = -4.000, z =  -7.573 },
}

entity.onMobInitialize = function(mob)
    xi.mob.updateNMSpawnPoint(mob)
    mob:setRespawnTime(math.random(900, 10800))
end

entity.onMobDespawn = function(mob)
    -- Set Marquis_Amon's spawnpoint and respawn time (21-24 hours)
    xi.mob.updateNMSpawnPoint(mob)
    mob:setRespawnTime(math.random(75600, 86400))
end

return entity
