-----------------------------------
-- Area: Garlaige Citadel (200)
--   NM: Skewer Sam
-----------------------------------
---@type TMobEntity
local entity = {}

entity.spawnPoints =
{
    { x = -108.000, y = -0.500, z =  177.000 },
    { x = -172.498, y =  0.000, z =  261.626 },
    { x = -180.972, y =  0.000, z =  223.016 },
    { x = -120.080, y =  0.000, z =  261.638 },
    { x = -108.248, y =  0.000, z =  261.342 },
    { x = -142.597, y =  0.000, z =  221.395 },
    { x = -139.322, y =  0.000, z =  252.693 },
    { x = -179.037, y =  0.000, z =  258.070 },
    { x = -109.396, y =  0.000, z =  260.783 },
    { x = -181.705, y =  0.000, z =  222.294 },
    { x = -100.409, y =  0.000, z =  211.322 },
    { x = -100.192, y =  0.000, z =  199.083 },
    { x =  -99.485, y = -0.496, z =  186.128 },
    { x = -138.746, y =  0.000, z =  248.537 },
    { x = -163.311, y =  0.000, z =  259.346 },
    { x = -180.434, y =  0.000, z =  204.863 },
    { x = -100.052, y =  0.000, z =  190.925 },
    { x = -100.267, y =  0.000, z =  237.876 },
    { x = -179.510, y =  0.000, z =  258.896 },
    { x =  -94.201, y =  0.000, z =  217.742 },
    { x = -126.144, y =  0.000, z =  179.746 },
    { x = -126.117, y =  0.000, z =  178.400 },
    { x = -140.418, y =  0.000, z =  166.103 },
    { x =  -99.488, y =  0.000, z =  257.311 },
    { x = -179.133, y =  0.000, z =  241.122 },
    { x = -174.182, y =  0.000, z =  179.269 },
    { x =  -98.831, y =  0.000, z =  203.132 },
    { x = -140.286, y =  0.000, z =  192.882 },
    { x = -114.870, y =  0.000, z =  178.196 },
    { x = -139.391, y =  0.000, z =  192.369 },
    { x = -127.769, y =  0.000, z =  263.463 },
    { x = -156.094, y =  0.000, z =  260.060 },
    { x = -180.426, y =  0.000, z =  195.975 },
    { x = -181.655, y =  0.000, z =  205.768 },
    { x =  -99.110, y =  0.000, z =  249.248 },
    { x = -180.389, y =  0.000, z =  248.235 },
    { x = -109.464, y =  0.000, z =  176.008 },
    { x =  -98.018, y =  0.000, z =  208.463 },
    { x = -140.129, y =  0.000, z =  184.359 },
    { x = -180.672, y =  0.000, z =  229.957 },
    { x =  -98.729, y =  0.000, z =  222.232 },
    { x = -107.555, y =  0.000, z =  177.034 },
    { x = -179.534, y =  0.000, z =  215.395 },
    { x = -139.241, y =  0.000, z =  245.323 },
    { x = -180.534, y =  0.000, z =  192.821 },
    { x =  -99.292, y =  0.000, z =  185.171 },
    { x = -140.154, y =  0.000, z =  240.837 },
    { x = -132.983, y =  0.000, z =  178.993 },
    { x = -140.219, y =  0.000, z =  170.706 },
    { x =  -92.879, y =  0.000, z =  218.895 }
}

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

entity.onMobDeath = function(mob, player, optParams)
    player:addTitle(xi.title.BEAKBENDER)
end

entity.onMobDespawn = function(mob)
    xi.mob.updateNMSpawnPoint(mob)
    mob:setRespawnTime(math.random(75600, 86400)) -- 21 to 24 hours
end

return entity
