}
}
}
player.getInventory().destroyItemByItemId(CONTAMINATED_CRYSTAL, 1, true);
player.sendPacket(SystemMessage.removeItems(CONTAMINATED_CRYSTAL, 1));
Reflection r = new Reflection(name);
r.setInstancedZoneId(instancedZoneId);
for(InstancedZone i : ils.values())
{
if(r.getReturnLoc() == null)
{
r.setReturnLoc(i.getReturnCoords());
}
if(r.getTeleportLoc() == null)
{
r.setTeleportLoc(i.getTeleportCoords());
}
if(i.getDoors() != null)
{
for(L2DoorInstance d : i.getDoors())
{
L2DoorInstance door = d.clone();
r.addDoor(door);
door.setReflection(r);
door.spawnMe();
if(d.isOpen())
{
door.openMe();
}
}
}
}
World world = new World();
world.rewarded = new GArray<Integer>();
world.instanceId = r.getId();
world.bosses = 5;
worlds.put(r.getId(), world);
if(type == 1)
{
runEmeraldAndSteamFirstRoom(world);
r.openDoor(DOOR1);
r.openDoor(DOOR2);
}
else if(type == 2)
{
runCoralGardenHall(world);
r.openDoor(CORAL_GARDEN_GATEWAY);
}
for(L2Player member : player.getParty().getPartyMembers())
{
if(member != player)
{
newQuestState(member, STARTED);
}
member.setReflection(r);
member.teleToLocation(il.getTeleportCoords());
member.setVar("backCoords", r.getReturnLoc().toXYZString());
member.setVar(name, String.valueOf(System.currentTimeMillis()));
}
player.getParty().setReflection(r);
r.setParty(player.getParty());
r.startCollapseTimer(timelimit * 60 * 1000L);
player.getParty().broadcastToPartyMembers(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(timelimit));
}