-----------------------------------
-- Area: Caedarva Mire
--   NM: Aynu-kaysey
-----------------------------------
mixins = { require('scripts/mixins/families/qutrub') }
-----------------------------------
---@type TMobEntity
local entity = {}

entity.spawnPoints =
{
    { x = -538.583, y = -7.218, z = 46.353 },
    { x = -534.618, y = -7.928, z = 46.110 },
    { x = -534.518, y = -6.746, z = 51.792 },
    { x = -536.379, y = -5.666, z = 54.635 },
    { x = -540.569, y = -4.242, z = 55.373 },
    { x = -545.419, y = -4.321, z = 54.366 },
    { x = -547.942, y = -4.513, z = 55.903 },
    { x = -549.695, y = -4.551, z = 60.388 },
    { x = -551.838, y = -5.241, z = 59.897 },
    { x = -554.375, y = -5.400, z = 57.406 },
    { x = -557.228, y = -6.000, z = 54.256 },
    { x = -560.040, y = -7.146, z = 58.897 },
    { x = -565.162, y = -6.940, z = 58.342 },
    { x = -566.648, y = -6.000, z = 54.309 },
    { x = -567.318, y = -5.544, z = 50.588 },
    { x = -565.609, y = -4.555, z = 47.226 },
    { x = -564.912, y = -4.120, z = 43.842 },
    { x = -564.867, y = -4.115, z = 40.408 },
    { x = -563.163, y = -4.000, z = 36.976 },
    { x = -560.409, y = -4.000, z = 36.531 },
    { x = -557.170, y = -4.004, z = 36.040 },
    { x = -554.502, y = -4.202, z = 34.629 },
    { x = -551.657, y = -4.674, z = 34.013 },
    { x = -549.438, y = -5.519, z = 34.609 },
    { x = -547.096, y = -6.000, z = 35.024 },
    { x = -545.113, y = -6.000, z = 34.082 },
    { x = -542.736, y = -6.435, z = 33.606 },
    { x = -539.636, y = -7.429, z = 33.511 },
    { x = -537.521, y = -7.885, z = 34.476 },
    { x = -535.147, y = -8.214, z = 35.663 },
    { x = -533.115, y = -8.250, z = 36.587 },
    { x = -532.262, y = -8.250, z = 38.567 },
    { x = -532.192, y = -8.250, z = 40.793 },
    { x = -534.383, y = -8.250, z = 41.666 },
    { x = -536.543, y = -8.163, z = 42.577 },
    { x = -538.885, y = -7.724, z = 43.718 },
    { x = -541.609, y = -6.825, z = 44.649 },
    { x = -544.215, y = -5.878, z = 44.727 },
    { x = -547.018, y = -5.693, z = 45.713 },
    { x = -549.190, y = -5.250, z = 47.350 },
    { x = -551.480, y = -5.250, z = 48.397 },
    { x = -552.972, y = -5.250, z = 50.819 },
    { x = -552.939, y = -5.310, z = 52.927 },
    { x = -552.158, y = -5.276, z = 54.783 },
    { x = -552.144, y = -5.291, z = 57.165 },
    { x = -551.793, y = -5.238, z = 59.134 },
    { x = -546.507, y = -4.139, z = 56.823 },
    { x = -543.752, y = -3.952, z = 56.330 },
    { x = -542.274, y = -3.654, z = 57.490 },
    { x = -541.146, y = -2.807, z = 61.593 },
}

entity.onMobInitialize = function(mob)
    xi.mob.updateNMSpawnPoint(mob)
    mob:setRespawnTime(math.random(7200, 14400)) -- 2 to 4 hours
end

entity.onMobDeath = function(mob, player, optParams)
    xi.hunts.checkHunt(mob, player, 470)
end

entity.onMobDespawn = function(mob)
    xi.mob.updateNMSpawnPoint(mob)
    mob:setRespawnTime(math.random(7200, 14400)) -- 2 to 4 hours
end

return entity
