-----------------------------------
-- Area: Castle Zvahl Keep (162)
--  Mob: Demon Warlock
-- Note: PH for Viscount Morax
-----------------------------------
local ID = zones[xi.zone.CASTLE_ZVAHL_KEEP]
-----------------------------------
---@type TMobEntity
local entity = {}
local viscountSpawnPoints =
{
    { x = -365.684, y = -52.125, z = -136.540 },
    { x = -361.908, y = -52.000, z = -103.112 },
    { x = -342.755, y = -52.000, z = -138.533 },
    { x = -366.100, y = -52.000, z = -119.985 },
    { x = -351.634, y = -52.000, z = -119.717 },
    { x = -372.264, y = -52.000, z = -103.135 },
    { x = -373.457, y = -52.000, z = -104.019 },
    { x = -346.898, y = -52.000, z = -140.409 },
    { x = -361.224, y = -52.000, z = -120.390 },
    { x = -381.589, y = -52.000, z = -135.523 },
    { x = -345.669, y = -52.000, z = -116.024 },
    { x = -359.514, y = -52.000, z = -108.685 },
    { x = -359.757, y = -52.000, z = -108.120 },
    { x = -360.882, y = -52.000, z = -119.316 },
    { x = -357.869, y = -52.000, z = -122.612 },
    { x = -360.598, y = -52.000, z = -117.969 },
    { x = -370.603, y = -52.000, z = -119.821 },
    { x = -376.319, y = -52.000, z = -109.355 },
    { x = -373.309, y = -52.000, z = -138.565 },
    { x = -364.625, y = -52.000, z = -121.474 },
    { x = -377.467, y = -52.000, z = -133.275 },
    { x = -378.931, y = -52.000, z = -115.090 },
    { x = -361.630, y = -52.000, z = -123.932 },
    { x = -338.308, y = -52.000, z = -109.546 },
    { x = -367.809, y = -52.000, z = -138.299 },
    { x = -345.482, y = -52.000, z = -141.617 },
    { x = -340.663, y = -52.000, z = -102.188 },
    { x = -351.259, y = -52.000, z = -139.539 },
    { x = -344.934, y = -52.000, z = -130.432 },
    { x = -375.883, y = -52.000, z = -127.970 },
    { x = -339.615, y = -52.000, z = -107.815 },
    { x = -375.580, y = -52.000, z = -119.607 },
    { x = -371.411, y = -52.000, z = -139.012 },
    { x = -359.973, y = -52.000, z = -122.907 },
    { x = -377.728, y = -52.000, z = -137.659 },
    { x = -363.203, y = -52.000, z = -133.782 },
    { x = -344.082, y = -52.000, z = -109.798 },
    { x = -378.402, y = -52.000, z = -133.893 },
    { x = -356.732, y = -52.000, z = -102.710 },
    { x = -345.879, y = -52.000, z = -128.379 },
    { x = -341.604, y = -52.000, z = -137.919 },
    { x = -375.639, y = -52.000, z = -116.255 },
    { x = -356.046, y = -52.000, z = -121.091 },
    { x = -353.791, y = -52.000, z = -121.281 },
    { x = -362.554, y = -52.000, z = -113.409 },
    { x = -361.766, y = -52.000, z = -134.713 },
    { x = -343.402, y = -52.000, z = -116.448 },
    { x = -375.652, y = -52.000, z = -104.427 },
    { x = -338.817, y = -52.000, z = -115.323 },
    { x = -359.439, y = -52.000, z = -129.000 },
}

entity.onMobInitialize = function(mob)
    xi.pet.setMobPet(mob, 1, 'Demons_Elemental')
end

entity.onMobDespawn = function(mob)
    xi.mob.phOnDespawn(mob, ID.mob.VISCOUNT_MORAX, 10, 1, { spawnPoints = viscountSpawnPoints }) -- No respawn
end

return entity
