-----------------------------------
-- Area: Temple of Uggalepih
--   NM: Manipulator
-- Note: Paths around the 2 staircases
-----------------------------------
---@type TMobEntity
local entity = {}

local pathNodes =
{
    { x = -17.930, y = -8.500, z = -93.215 },
    { x = -18.553, y = -7.713, z = -91.224 },
    { x = -20.226, y = -6.250, z = -89.091 },
    { x = -21.651, y = -5.005, z = -87.401 },
    { x = -23.137, y = -3.917, z = -85.818 },
    { x = -24.750, y = -2.650, z = -84.440 },
    { x = -26.487, y = -1.300, z = -83.362 },
    { x = -28.366, y = -0.068, z = -82.488 },
    { x = -30.361, y = 0.500, z = -81.880 },
    { x = -32.450, y = 0.500, z = -81.498 },
    { x = -34.553, y = 0.500, z = -81.367 },
    { x = -36.575, y = 0.500, z = -81.401 },
    { x = -38.601, y = 0.500, z = -81.632 },
    { x = -40.699, y = 0.500, z = -82.133 },
    { x = -43.542, y = -1.300, z = -83.312 },
    { x = -45.403, y = -2.650, z = -84.455 },
    { x = -47.108, y = -3.804, z = -85.804 },
    { x = -48.567, y = -4.900, z = -87.243 },
    { x = -49.894, y = -6.250, z = -88.891 },
    { x = -50.957, y = -7.518, z = -90.686 },
    { x = -51.714, y = -8.500, z = -92.696 },
    { x = -52.136, y = -8.500, z = -94.655 },
    { x = -52.358, y = -8.500, z = -96.757 },
    { x = -52.482, y = -8.500, z = -99.253 },
    { x = -52.530, y = -8.500, z = -102.142 },
    { x = -52.409, y = -8.500, z = -104.364 },
    { x = -51.995, y = -8.500, z = -106.498 },
    { x = -51.329, y = -7.998, z = -108.403 },
    { x = -50.419, y = -6.700, z = -110.216 },
    { x = -49.221, y = -5.514, z = -111.939 },
    { x = -47.741, y = -4.367, z = -113.588 },
    { x = -46.122, y = -3.100, z = -115.009 },
    { x = -44.418, y = -1.750, z = -116.181 },
    { x = -42.611, y = -0.797, z = -117.185 },
    { x = -40.653, y = 0.500, z = -117.857 },
    { x = -38.622, y = 0.500, z = -118.275 },
    { x = -36.614, y = 0.500, z = -118.518 },
    { x = -34.459, y = 0.500, z = -118.650 },
    { x = -32.303, y = 0.500, z = -118.591 },
    { x = -30.276, y = 0.500, z = -118.249 },
    { x = -28.199, y = -0.318, z = -117.605 },
    { x = -26.325, y = -1.300, z = -116.748 },
    { x = -24.522, y = -2.650, z = -115.637 },
    { x = -22.911, y = -3.550, z = -114.378 },
    { x = -21.430, y = -4.900, z = -112.942 },
    { x = -20.121, y = -6.250, z = -111.382 },
    { x = -18.967, y = -7.150, z = -109.509 },
    { x = -18.191, y = -8.500, z = -107.518 },
    { x = -17.743, y = -8.500, z = -105.495 },
    { x = -17.541, y = -8.500, z = -103.466 },
    { x = -17.497, y = -8.500, z = -101.427 },
    { x = -17.408, y = -8.500, z = -97.263 },
    { x = -17.573, y = -8.500, z = -95.179 },
}

entity.onMobSpawn = function(mob)
    mob:pathThrough(pathNodes, xi.path.flag.PATROL)
end

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

entity.onMobDespawn = function(mob)
    mob:setRespawnTime(900) -- 15 minutes
end

return entity
