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

entity.spawnPoints =
{
    { x = -93.769,  y = -4.499, z = 34.776 },
    { x = -84.932,  y = -4.000, z = 38.000 },
    { x = -96.179,  y = -4.000, z = 48.946 },
    { x = -98.741,  y = -4.000, z = 47.952 },
    { x = -78.002,  y = -4.000, z = 40.362 },
    { x = -86.154,  y = -4.000, z = 46.506 },
    { x = -76.079,  y = -4.000, z = 39.661 },
    { x = -97.475,  y = -4.000, z = 54.316 },
    { x = -89.632,  y = -4.000, z = 36.528 },
    { x = -95.447,  y = -4.000, z = 47.594 },
    { x = -93.236,  y = -4.000, z = 47.716 },
    { x = -80.050,  y = -4.000, z = 35.323 },
    { x = -85.429,  y = -4.000, z = 55.021 },
    { x = -89.883,  y = -4.000, z = 42.737 },
    { x = -100.166, y = -4.000, z = 38.231 },
    { x = -90.196,  y = -4.000, z = 57.541 },
    { x = -77.605,  y = -4.000, z = 54.588 },
    { x = -84.243,  y = -4.000, z = 34.578 },
    { x = -82.795,  y = -4.000, z = 37.228 },
    { x = -79.153,  y = -4.000, z = 47.920 },
    { x = -89.630,  y = -4.000, z = 53.270 },
    { x = -76.847,  y = -4.000, z = 41.022 },
    { x = -84.422,  y = -4.000, z = 50.222 },
    { x = -76.259,  y = -4.000, z = 58.982 },
    { x = -91.231,  y = -4.000, z = 54.904 },
    { x = -98.063,  y = -4.000, z = 48.223 },
    { x = -88.618,  y = -4.000, z = 52.425 },
    { x = -90.120,  y = -4.000, z = 38.297 },
    { x = -80.276,  y = -4.000, z = 48.213 },
    { x = -90.232,  y = -4.000, z = 59.110 },
    { x = -86.178,  y = -4.000, z = 60.332 },
    { x = -75.336,  y = -4.000, z = 45.551 },
    { x = -94.653,  y = -4.000, z = 46.078 },
    { x = -76.062,  y = -4.000, z = 48.924 },
    { x = -78.779,  y = -4.000, z = 47.111 },
    { x = -89.020,  y = -4.000, z = 50.009 },
    { x = -97.799,  y = -4.000, z = 55.399 },
    { x = -79.884,  y = -4.000, z = 48.083 },
    { x = -84.411,  y = -4.000, z = 61.898 },
    { x = -97.740,  y = -4.000, z = 47.258 },
    { x = -80.467,  y = -4.000, z = 41.014 },
    { x = -85.431,  y = -4.000, z = 40.200 },
    { x = -80.630,  y = -4.000, z = 41.076 },
    { x = -74.228,  y = -4.000, z = 51.451 },
    { x = -79.111,  y = -4.000, z = 43.844 },
    { x = -99.137,  y = -4.000, z = 48.229 },
    { x = -84.165,  y = -4.000, z = 58.622 },
    { x = -74.743,  y = -4.000, z = 43.741 },
    { x = -83.653,  y = -4.000, z = 48.851 },
    { x = -82.792,  y = -4.000, z = 37.386 },
}

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

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

return entity
