if(spawnTimer != null)
{
spawnTimer.cancel();
spawnTimer = null;
}
final DimensionalRiftRoom riftRoom = DimensionalRiftManager.getInstance().getRoom(_roomType, room);
spawnTimer = new Timer();
spawnTimerTask = new TimerTask()
{
@Override
public void run()
{
for(L2Spawn s : riftRoom.getSpawns())
{
L2Spawn sp = s.clone();
sp.setReflection(_id);
addSpawn(sp);
if(!isBossRoom)
{
sp.startRespawn();
}
for(int i = 0; i < sp.getAmount(); i++)
{
sp.doSpawn(true);
}
}
Quest.addSpawnToInstance(getManagerId(), riftRoom.getTeleportCoords(), 0, _id);
}
};
spawnTimer.schedule(spawnTimerTask, Config.RIFT_SPAWN_DELAY);
}