con = L2DatabaseFactory.getInstance().getConnection();
statement = con.prepareStatement("SELECT * FROM spawnlist ORDER by npc_templateid");
//TODO возможно в будущем понадобится условие: WHERE npc_templateid NOT IN (SELECT bossId FROM epic_boss_spawn)
rset = statement.executeQuery();
L2Spawn spawnDat;
L2NpcTemplate template1;
while(rset.next())
{
template1 = NpcTable.getTemplate(rset.getInt("npc_templateid"));
if(template1 != null)
{
if(template1.isInstanceOf(L2SiegeGuardInstance.class))
{
// Don't spawn Siege Guard
}
else if(Config.ALLOW_CLASS_MASTERS_LIST.isEmpty() && template1.name.equalsIgnoreCase("L2ClassMaster"))
{
// Dont' spawn class masters
}
else
{
spawnDat = new L2Spawn(template1);
spawnDat.setAmount(rset.getInt("count") * (Config.ALT_DOUBLE_SPAWN && !template1.isRaid ? 2 : 1));
spawnDat.setLocx(rset.getInt("locx"));
spawnDat.setLocy(rset.getInt("locy"));
spawnDat.setLocz(rset.getInt("locz"));
spawnDat.setHeading(rset.getInt("heading"));
spawnDat.setRespawnDelay(rset.getInt("respawn_delay"), rset.getInt("respawn_delay_rnd"));
spawnDat.setLocation(rset.getInt("loc_id"));
spawnDat.setReflection(rset.getLong("reflection"));
spawnDat.setRespawnTime(0);
if(template1.isInstanceOf(L2MonsterInstance.class))
{
if(template1.name.contains("Lilim") || template1.name.contains("Lith"))
{
CatacombSpawnManager.getInstance().addDawnMob(spawnDat);
}
else if(template1.name.contains("Nephilim") || template1.name.contains("Gigant"))
{
CatacombSpawnManager.getInstance().addDuskMob(spawnDat);
}
if(CatacombSpawnManager._monsters.contains(template1.getNpcId()))
{
spawnDat.setRespawnDelay(Math.round(rset.getInt("respawn_delay") * Config.ALT_CATACOMB_RESPAWN), Math.round(rset.getInt("respawn_delay_rnd") * Config.ALT_CATACOMB_RESPAWN));
}
}
if(template1.isRaid)