|
@@ -38,7 +38,6 @@ import com.l2jserver.Config;
|
|
import com.l2jserver.L2DatabaseFactory;
|
|
import com.l2jserver.L2DatabaseFactory;
|
|
import com.l2jserver.gameserver.ThreadPoolManager;
|
|
import com.l2jserver.gameserver.ThreadPoolManager;
|
|
import com.l2jserver.gameserver.data.xml.impl.DoorData;
|
|
import com.l2jserver.gameserver.data.xml.impl.DoorData;
|
|
-import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
|
|
|
import com.l2jserver.gameserver.datatables.SpawnTable;
|
|
import com.l2jserver.gameserver.datatables.SpawnTable;
|
|
import com.l2jserver.gameserver.instancemanager.tasks.FourSepulchersChangeAttackTimeTask;
|
|
import com.l2jserver.gameserver.instancemanager.tasks.FourSepulchersChangeAttackTimeTask;
|
|
import com.l2jserver.gameserver.instancemanager.tasks.FourSepulchersChangeCoolDownTimeTask;
|
|
import com.l2jserver.gameserver.instancemanager.tasks.FourSepulchersChangeCoolDownTimeTask;
|
|
@@ -50,7 +49,6 @@ import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
|
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
|
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
|
import com.l2jserver.gameserver.model.actor.instance.L2SepulcherMonsterInstance;
|
|
import com.l2jserver.gameserver.model.actor.instance.L2SepulcherMonsterInstance;
|
|
import com.l2jserver.gameserver.model.actor.instance.L2SepulcherNpcInstance;
|
|
import com.l2jserver.gameserver.model.actor.instance.L2SepulcherNpcInstance;
|
|
-import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
|
|
|
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
|
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
|
import com.l2jserver.gameserver.model.quest.Quest;
|
|
import com.l2jserver.gameserver.model.quest.Quest;
|
|
import com.l2jserver.gameserver.model.quest.QuestState;
|
|
import com.l2jserver.gameserver.model.quest.QuestState;
|
|
@@ -278,25 +276,14 @@ public final class FourSepulchersManager
|
|
{
|
|
{
|
|
_managers = new FastList<>();
|
|
_managers = new FastList<>();
|
|
|
|
|
|
- int i = 31921;
|
|
|
|
- for (L2Spawn spawnDat; i <= 31924; i++)
|
|
|
|
|
|
+ for (int npcId = 31921; npcId <= 31924; npcId++)
|
|
{
|
|
{
|
|
- if ((i < 31921) || (i > 31924))
|
|
|
|
- {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- L2NpcTemplate template1 = NpcData.getInstance().getTemplate(i);
|
|
|
|
- if (template1 == null)
|
|
|
|
- {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- spawnDat = new L2Spawn(template1);
|
|
|
|
-
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(npcId);
|
|
spawnDat.setAmount(1);
|
|
spawnDat.setAmount(1);
|
|
spawnDat.setRespawnDelay(60);
|
|
spawnDat.setRespawnDelay(60);
|
|
- switch (i)
|
|
|
|
|
|
+ switch (npcId)
|
|
{
|
|
{
|
|
case 31921: // conquerors
|
|
case 31921: // conquerors
|
|
spawnDat.setX(181061);
|
|
spawnDat.setX(181061);
|
|
@@ -429,29 +416,18 @@ public final class FourSepulchersManager
|
|
ps.setInt(1, 0);
|
|
ps.setInt(1, 0);
|
|
try (ResultSet rs = ps.executeQuery())
|
|
try (ResultSet rs = ps.executeQuery())
|
|
{
|
|
{
|
|
-
|
|
|
|
- L2Spawn spawnDat;
|
|
|
|
- L2NpcTemplate template1;
|
|
|
|
while (rs.next())
|
|
while (rs.next())
|
|
{
|
|
{
|
|
- template1 = NpcData.getInstance().getTemplate(rs.getInt("npc_templateid"));
|
|
|
|
- if (template1 != null)
|
|
|
|
- {
|
|
|
|
- spawnDat = new L2Spawn(template1);
|
|
|
|
- spawnDat.setAmount(rs.getInt("count"));
|
|
|
|
- spawnDat.setX(rs.getInt("locx"));
|
|
|
|
- spawnDat.setY(rs.getInt("locy"));
|
|
|
|
- spawnDat.setZ(rs.getInt("locz"));
|
|
|
|
- spawnDat.setHeading(rs.getInt("heading"));
|
|
|
|
- spawnDat.setRespawnDelay(rs.getInt("respawn_delay"));
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
- int keyNpcId = rs.getInt("key_npc_id");
|
|
|
|
- _mysteriousBoxSpawns.put(keyNpcId, spawnDat);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("FourSepulchersManager.LoadMysteriousBox: Data missing in NPC table for ID: " + rs.getInt("npc_templateid") + ".");
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(rs.getInt("npc_templateid"));
|
|
|
|
+ spawnDat.setAmount(rs.getInt("count"));
|
|
|
|
+ spawnDat.setX(rs.getInt("locx"));
|
|
|
|
+ spawnDat.setY(rs.getInt("locy"));
|
|
|
|
+ spawnDat.setZ(rs.getInt("locz"));
|
|
|
|
+ spawnDat.setHeading(rs.getInt("heading"));
|
|
|
|
+ spawnDat.setRespawnDelay(rs.getInt("respawn_delay"));
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
+ int keyNpcId = rs.getInt("key_npc_id");
|
|
|
|
+ _mysteriousBoxSpawns.put(keyNpcId, spawnDat);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
_log.info(getClass().getSimpleName() + ": loaded " + _mysteriousBoxSpawns.size() + " Mysterious-Box spawns.");
|
|
_log.info(getClass().getSimpleName() + ": loaded " + _mysteriousBoxSpawns.size() + " Mysterious-Box spawns.");
|
|
@@ -465,29 +441,19 @@ public final class FourSepulchersManager
|
|
|
|
|
|
private void initKeyBoxSpawns()
|
|
private void initKeyBoxSpawns()
|
|
{
|
|
{
|
|
- L2Spawn spawnDat;
|
|
|
|
- L2NpcTemplate template;
|
|
|
|
for (Entry<Integer, Integer> keyNpc : _keyBoxNpc.entrySet())
|
|
for (Entry<Integer, Integer> keyNpc : _keyBoxNpc.entrySet())
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- template = NpcData.getInstance().getTemplate(keyNpc.getValue());
|
|
|
|
- if (template != null)
|
|
|
|
- {
|
|
|
|
- spawnDat = new L2Spawn(template);
|
|
|
|
- spawnDat.setAmount(1);
|
|
|
|
- spawnDat.setX(0);
|
|
|
|
- spawnDat.setY(0);
|
|
|
|
- spawnDat.setZ(0);
|
|
|
|
- spawnDat.setHeading(0);
|
|
|
|
- spawnDat.setRespawnDelay(3600);
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
- _keyBoxSpawns.put(keyNpc.getKey(), spawnDat);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("FourSepulchersManager.InitKeyBoxSpawns: Data missing in NPC table for ID: " + keyNpc.getValue() + ".");
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(keyNpc.getValue());
|
|
|
|
+ spawnDat.setAmount(1);
|
|
|
|
+ spawnDat.setX(0);
|
|
|
|
+ spawnDat.setY(0);
|
|
|
|
+ spawnDat.setZ(0);
|
|
|
|
+ spawnDat.setHeading(0);
|
|
|
|
+ spawnDat.setRespawnDelay(3600);
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
+ _keyBoxSpawns.put(keyNpc.getKey(), spawnDat);
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
catch (Exception e)
|
|
{
|
|
{
|
|
@@ -508,8 +474,6 @@ public final class FourSepulchersManager
|
|
try (ResultSet rs1 = ps1.executeQuery();
|
|
try (ResultSet rs1 = ps1.executeQuery();
|
|
PreparedStatement ps2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist Where key_npc_id = ? and spawntype = ? ORDER BY id"))
|
|
PreparedStatement ps2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist Where key_npc_id = ? and spawntype = ? ORDER BY id"))
|
|
{
|
|
{
|
|
- L2Spawn spawnDat;
|
|
|
|
- L2NpcTemplate template1;
|
|
|
|
while (rs1.next())
|
|
while (rs1.next())
|
|
{
|
|
{
|
|
int keyNpcId = rs1.getInt("key_npc_id");
|
|
int keyNpcId = rs1.getInt("key_npc_id");
|
|
@@ -521,24 +485,16 @@ public final class FourSepulchersManager
|
|
_physicalSpawns = new FastList<>();
|
|
_physicalSpawns = new FastList<>();
|
|
while (rs2.next())
|
|
while (rs2.next())
|
|
{
|
|
{
|
|
- template1 = NpcData.getInstance().getTemplate(rs2.getInt("npc_templateid"));
|
|
|
|
- if (template1 != null)
|
|
|
|
- {
|
|
|
|
- spawnDat = new L2Spawn(template1);
|
|
|
|
- spawnDat.setAmount(rs2.getInt("count"));
|
|
|
|
- spawnDat.setX(rs2.getInt("locx"));
|
|
|
|
- spawnDat.setY(rs2.getInt("locy"));
|
|
|
|
- spawnDat.setZ(rs2.getInt("locz"));
|
|
|
|
- spawnDat.setHeading(rs2.getInt("heading"));
|
|
|
|
- spawnDat.setRespawnDelay(rs2.getInt("respawn_delay"));
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
- _physicalSpawns.add(spawnDat);
|
|
|
|
- loaded++;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("FourSepulchersManager.LoadPhysicalMonsters: Data missing in NPC table for ID: " + rs2.getInt("npc_templateid") + ".");
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(rs2.getInt("npc_templateid"));
|
|
|
|
+ spawnDat.setAmount(rs2.getInt("count"));
|
|
|
|
+ spawnDat.setX(rs2.getInt("locx"));
|
|
|
|
+ spawnDat.setY(rs2.getInt("locy"));
|
|
|
|
+ spawnDat.setZ(rs2.getInt("locz"));
|
|
|
|
+ spawnDat.setHeading(rs2.getInt("heading"));
|
|
|
|
+ spawnDat.setRespawnDelay(rs2.getInt("respawn_delay"));
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
+ _physicalSpawns.add(spawnDat);
|
|
|
|
+ loaded++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ps2.clearParameters();
|
|
ps2.clearParameters();
|
|
@@ -565,8 +521,6 @@ public final class FourSepulchersManager
|
|
try (ResultSet rs1 = ps1.executeQuery();
|
|
try (ResultSet rs1 = ps1.executeQuery();
|
|
PreparedStatement ps2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? AND spawntype = ? ORDER BY id"))
|
|
PreparedStatement ps2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? AND spawntype = ? ORDER BY id"))
|
|
{
|
|
{
|
|
- L2Spawn spawnDat;
|
|
|
|
- L2NpcTemplate template1;
|
|
|
|
while (rs1.next())
|
|
while (rs1.next())
|
|
{
|
|
{
|
|
int keyNpcId = rs1.getInt("key_npc_id");
|
|
int keyNpcId = rs1.getInt("key_npc_id");
|
|
@@ -579,24 +533,16 @@ public final class FourSepulchersManager
|
|
|
|
|
|
while (rset2.next())
|
|
while (rset2.next())
|
|
{
|
|
{
|
|
- template1 = NpcData.getInstance().getTemplate(rset2.getInt("npc_templateid"));
|
|
|
|
- if (template1 != null)
|
|
|
|
- {
|
|
|
|
- spawnDat = new L2Spawn(template1);
|
|
|
|
- spawnDat.setAmount(rset2.getInt("count"));
|
|
|
|
- spawnDat.setX(rset2.getInt("locx"));
|
|
|
|
- spawnDat.setY(rset2.getInt("locy"));
|
|
|
|
- spawnDat.setZ(rset2.getInt("locz"));
|
|
|
|
- spawnDat.setHeading(rset2.getInt("heading"));
|
|
|
|
- spawnDat.setRespawnDelay(rset2.getInt("respawn_delay"));
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
- _magicalSpawns.add(spawnDat);
|
|
|
|
- loaded++;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("FourSepulchersManager.LoadMagicalMonsters: Data missing in NPC table for ID: " + rset2.getInt("npc_templateid") + ".");
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(rset2.getInt("npc_templateid"));
|
|
|
|
+ spawnDat.setAmount(rset2.getInt("count"));
|
|
|
|
+ spawnDat.setX(rset2.getInt("locx"));
|
|
|
|
+ spawnDat.setY(rset2.getInt("locy"));
|
|
|
|
+ spawnDat.setZ(rset2.getInt("locz"));
|
|
|
|
+ spawnDat.setHeading(rset2.getInt("heading"));
|
|
|
|
+ spawnDat.setRespawnDelay(rset2.getInt("respawn_delay"));
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
+ _magicalSpawns.add(spawnDat);
|
|
|
|
+ loaded++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ps2.clearParameters();
|
|
ps2.clearParameters();
|
|
@@ -624,8 +570,6 @@ public final class FourSepulchersManager
|
|
try (ResultSet rs1 = ps1.executeQuery();
|
|
try (ResultSet rs1 = ps1.executeQuery();
|
|
PreparedStatement ps2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? AND spawntype = ? ORDER BY id"))
|
|
PreparedStatement ps2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? AND spawntype = ? ORDER BY id"))
|
|
{
|
|
{
|
|
- L2Spawn spawnDat;
|
|
|
|
- L2NpcTemplate template1;
|
|
|
|
while (rs1.next())
|
|
while (rs1.next())
|
|
{
|
|
{
|
|
int keyNpcId = rs1.getInt("key_npc_id");
|
|
int keyNpcId = rs1.getInt("key_npc_id");
|
|
@@ -640,24 +584,16 @@ public final class FourSepulchersManager
|
|
|
|
|
|
while (rset2.next())
|
|
while (rset2.next())
|
|
{
|
|
{
|
|
- template1 = NpcData.getInstance().getTemplate(rset2.getInt("npc_templateid"));
|
|
|
|
- if (template1 != null)
|
|
|
|
- {
|
|
|
|
- spawnDat = new L2Spawn(template1);
|
|
|
|
- spawnDat.setAmount(rset2.getInt("count"));
|
|
|
|
- spawnDat.setX(rset2.getInt("locx"));
|
|
|
|
- spawnDat.setY(rset2.getInt("locy"));
|
|
|
|
- spawnDat.setZ(rset2.getInt("locz"));
|
|
|
|
- spawnDat.setHeading(rset2.getInt("heading"));
|
|
|
|
- spawnDat.setRespawnDelay(rset2.getInt("respawn_delay"));
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
- _dukeFinalSpawns.add(spawnDat);
|
|
|
|
- loaded++;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("FourSepulchersManager.LoadDukeMonsters: Data missing in NPC table for ID: " + rset2.getInt("npc_templateid") + ".");
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(rset2.getInt("npc_templateid"));
|
|
|
|
+ spawnDat.setAmount(rset2.getInt("count"));
|
|
|
|
+ spawnDat.setX(rset2.getInt("locx"));
|
|
|
|
+ spawnDat.setY(rset2.getInt("locy"));
|
|
|
|
+ spawnDat.setZ(rset2.getInt("locz"));
|
|
|
|
+ spawnDat.setHeading(rset2.getInt("heading"));
|
|
|
|
+ spawnDat.setRespawnDelay(rset2.getInt("respawn_delay"));
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
+ _dukeFinalSpawns.add(spawnDat);
|
|
|
|
+ loaded++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ps2.clearParameters();
|
|
ps2.clearParameters();
|
|
@@ -685,8 +621,6 @@ public final class FourSepulchersManager
|
|
try (ResultSet rs1 = ps1.executeQuery();
|
|
try (ResultSet rs1 = ps1.executeQuery();
|
|
PreparedStatement ps2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? and spawntype = ? ORDER BY id"))
|
|
PreparedStatement ps2 = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, key_npc_id FROM four_sepulchers_spawnlist WHERE key_npc_id = ? and spawntype = ? ORDER BY id"))
|
|
{
|
|
{
|
|
- L2Spawn spawnDat;
|
|
|
|
- L2NpcTemplate template1;
|
|
|
|
while (rs1.next())
|
|
while (rs1.next())
|
|
{
|
|
{
|
|
int keyNpcId = rs1.getInt("key_npc_id");
|
|
int keyNpcId = rs1.getInt("key_npc_id");
|
|
@@ -699,24 +633,16 @@ public final class FourSepulchersManager
|
|
|
|
|
|
while (rs2.next())
|
|
while (rs2.next())
|
|
{
|
|
{
|
|
- template1 = NpcData.getInstance().getTemplate(rs2.getInt("npc_templateid"));
|
|
|
|
- if (template1 != null)
|
|
|
|
- {
|
|
|
|
- spawnDat = new L2Spawn(template1);
|
|
|
|
- spawnDat.setAmount(rs2.getInt("count"));
|
|
|
|
- spawnDat.setX(rs2.getInt("locx"));
|
|
|
|
- spawnDat.setY(rs2.getInt("locy"));
|
|
|
|
- spawnDat.setZ(rs2.getInt("locz"));
|
|
|
|
- spawnDat.setHeading(rs2.getInt("heading"));
|
|
|
|
- spawnDat.setRespawnDelay(rs2.getInt("respawn_delay"));
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
- _emperorsGraveSpawns.add(spawnDat);
|
|
|
|
- loaded++;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("FourSepulchersManager.LoadEmperorsGraveMonsters: Data missing in NPC table for ID: " + rs2.getInt("npc_templateid") + ".");
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(rs2.getInt("npc_templateid"));
|
|
|
|
+ spawnDat.setAmount(rs2.getInt("count"));
|
|
|
|
+ spawnDat.setX(rs2.getInt("locx"));
|
|
|
|
+ spawnDat.setY(rs2.getInt("locy"));
|
|
|
|
+ spawnDat.setZ(rs2.getInt("locz"));
|
|
|
|
+ spawnDat.setHeading(rs2.getInt("heading"));
|
|
|
|
+ spawnDat.setRespawnDelay(rs2.getInt("respawn_delay"));
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
+ _emperorsGraveSpawns.add(spawnDat);
|
|
|
|
+ loaded++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ps2.clearParameters();
|
|
ps2.clearParameters();
|
|
@@ -742,66 +668,43 @@ public final class FourSepulchersManager
|
|
31944
|
|
31944
|
|
};
|
|
};
|
|
|
|
|
|
- L2Spawn spawnDat;
|
|
|
|
- L2NpcTemplate template;
|
|
|
|
-
|
|
|
|
_shadowSpawns.clear();
|
|
_shadowSpawns.clear();
|
|
|
|
|
|
for (int i = 0; i <= 3; i++)
|
|
for (int i = 0; i <= 3; i++)
|
|
{
|
|
{
|
|
- template = NpcData.getInstance().getTemplate(_shadowSpawnLoc[locNo][i][0]);
|
|
|
|
- if (template != null)
|
|
|
|
|
|
+ try
|
|
{
|
|
{
|
|
- try
|
|
|
|
- {
|
|
|
|
- spawnDat = new L2Spawn(template);
|
|
|
|
- spawnDat.setAmount(1);
|
|
|
|
- spawnDat.setX(_shadowSpawnLoc[locNo][i][1]);
|
|
|
|
- spawnDat.setY(_shadowSpawnLoc[locNo][i][2]);
|
|
|
|
- spawnDat.setZ(_shadowSpawnLoc[locNo][i][3]);
|
|
|
|
- spawnDat.setHeading(_shadowSpawnLoc[locNo][i][4]);
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
- int keyNpcId = gateKeeper[i];
|
|
|
|
- _shadowSpawns.put(keyNpcId, spawnDat);
|
|
|
|
- }
|
|
|
|
- catch (Exception e)
|
|
|
|
- {
|
|
|
|
- _log.log(Level.SEVERE, "Error on InitLocationShadowSpawns", e);
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(_shadowSpawnLoc[locNo][i][0]);
|
|
|
|
+ spawnDat.setAmount(1);
|
|
|
|
+ spawnDat.setX(_shadowSpawnLoc[locNo][i][1]);
|
|
|
|
+ spawnDat.setY(_shadowSpawnLoc[locNo][i][2]);
|
|
|
|
+ spawnDat.setZ(_shadowSpawnLoc[locNo][i][3]);
|
|
|
|
+ spawnDat.setHeading(_shadowSpawnLoc[locNo][i][4]);
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
+ _shadowSpawns.put(gateKeeper[i], spawnDat);
|
|
}
|
|
}
|
|
- else
|
|
|
|
|
|
+ catch (Exception e)
|
|
{
|
|
{
|
|
- _log.warning("FourSepulchersManager.InitLocationShadowSpawns: Data missing in NPC table for ID: " + _shadowSpawnLoc[locNo][i][0] + ".");
|
|
|
|
|
|
+ _log.log(Level.SEVERE, "Error on InitLocationShadowSpawns", e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
protected void initExecutionerSpawns()
|
|
protected void initExecutionerSpawns()
|
|
{
|
|
{
|
|
- L2Spawn spawnDat;
|
|
|
|
- L2NpcTemplate template;
|
|
|
|
-
|
|
|
|
for (int keyNpcId : _victim.keySet())
|
|
for (int keyNpcId : _victim.keySet())
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- template = NpcData.getInstance().getTemplate(_victim.get(keyNpcId));
|
|
|
|
- if (template != null)
|
|
|
|
- {
|
|
|
|
- spawnDat = new L2Spawn(template);
|
|
|
|
- spawnDat.setAmount(1);
|
|
|
|
- spawnDat.setX(0);
|
|
|
|
- spawnDat.setY(0);
|
|
|
|
- spawnDat.setZ(0);
|
|
|
|
- spawnDat.setHeading(0);
|
|
|
|
- spawnDat.setRespawnDelay(3600);
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
- _executionerSpawns.put(keyNpcId, spawnDat);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("FourSepulchersManager.InitExecutionerSpawns: Data missing in NPC table for ID: " + _victim.get(keyNpcId) + ".");
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn spawnDat = new L2Spawn(_victim.get(keyNpcId));
|
|
|
|
+ spawnDat.setAmount(1);
|
|
|
|
+ spawnDat.setX(0);
|
|
|
|
+ spawnDat.setY(0);
|
|
|
|
+ spawnDat.setZ(0);
|
|
|
|
+ spawnDat.setHeading(0);
|
|
|
|
+ spawnDat.setRespawnDelay(3600);
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
|
|
|
+ _executionerSpawns.put(keyNpcId, spawnDat);
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
catch (Exception e)
|
|
{
|
|
{
|
|
@@ -1185,7 +1088,6 @@ public final class FourSepulchersManager
|
|
|
|
|
|
List<L2Spawn> monsterList;
|
|
List<L2Spawn> monsterList;
|
|
List<L2SepulcherMonsterInstance> mobs = new FastList<>();
|
|
List<L2SepulcherMonsterInstance> mobs = new FastList<>();
|
|
- L2Spawn keyBoxMobSpawn;
|
|
|
|
|
|
|
|
if (Rnd.get(2) == 0)
|
|
if (Rnd.get(2) == 0)
|
|
{
|
|
{
|
|
@@ -1231,21 +1133,13 @@ public final class FourSepulchersManager
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- L2NpcTemplate template = NpcData.getInstance().getTemplate(18149);
|
|
|
|
- if (template != null)
|
|
|
|
- {
|
|
|
|
- keyBoxMobSpawn = new L2Spawn(template);
|
|
|
|
- keyBoxMobSpawn.setAmount(1);
|
|
|
|
- keyBoxMobSpawn.setLocation(spawnDat.getLocation());
|
|
|
|
- keyBoxMobSpawn.setRespawnDelay(3600);
|
|
|
|
- SpawnTable.getInstance().addNewSpawn(keyBoxMobSpawn, false);
|
|
|
|
- mob = (L2SepulcherMonsterInstance) keyBoxMobSpawn.doSpawn();
|
|
|
|
- keyBoxMobSpawn.stopRespawn();
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("FourSepulchersManager.SpawnMonster: Data missing in NPC table for ID: 18149");
|
|
|
|
- }
|
|
|
|
|
|
+ final L2Spawn keyBoxMobSpawn = new L2Spawn(18149);
|
|
|
|
+ keyBoxMobSpawn.setAmount(1);
|
|
|
|
+ keyBoxMobSpawn.setLocation(spawnDat.getLocation());
|
|
|
|
+ keyBoxMobSpawn.setRespawnDelay(3600);
|
|
|
|
+ SpawnTable.getInstance().addNewSpawn(keyBoxMobSpawn, false);
|
|
|
|
+ mob = (L2SepulcherMonsterInstance) keyBoxMobSpawn.doSpawn();
|
|
|
|
+ keyBoxMobSpawn.stopRespawn();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
catch (Exception e)
|
|
{
|
|
{
|