	@Override
	public boolean useUserCommand(int id, L2PcInstance activeChar)
	{
		if (id != COMMAND_IDS[0] && id != COMMAND_IDS[1] && id != COMMAND_IDS[2])
			return false;

		L2Clan clan = activeChar.getClan();

		if (clan == null)
		{
			activeChar.sendMessage("You are not in a clan.");
			return false;
		}

		SystemMessage sm;
		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			PreparedStatement statement;

			if (id == 88)
			{
				// Attack List
				activeChar.sendPacket(SystemMessageId.CLANS_YOU_DECLARED_WAR_ON);
				statement = con.prepareStatement("select clan_name,clan_id,ally_id,ally_name from clan_data,clan_wars where clan1=? and clan_id=clan2 and clan2 not in (select clan1 from clan_wars where clan2=?)");
				statement.setInt(1, clan.getClanId());
				statement.setInt(2, clan.getClanId());
			}
			else if (id == 89)
			{
				// Under Attack List
				activeChar.sendPacket(SystemMessageId.CLANS_THAT_HAVE_DECLARED_WAR_ON_YOU);
				statement = con.prepareStatement("select clan_name,clan_id,ally_id,ally_name from clan_data,clan_wars where clan2=? and clan_id=clan1 and clan1 not in (select clan2 from clan_wars where clan1=?)");
				statement.setInt(1, clan.getClanId());
				statement.setInt(2, clan.getClanId());
			}
			else
				// ID = 90
			{
				// War List
				activeChar.sendPacket(SystemMessageId.WAR_LIST);
				statement = con.prepareStatement("select clan_name,clan_id,ally_id,ally_name from clan_data,clan_wars where clan1=? and clan_id=clan2 and clan2 in (select clan1 from clan_wars where clan2=?)");
				statement.setInt(1, clan.getClanId());
				statement.setInt(2, clan.getClanId());
			}

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				String clanName = rset.getString("clan_name");
				int ally_id = rset.getInt("ally_id");

				if (ally_id > 0)
				{
					// Target With Ally
					sm = SystemMessage.getSystemMessage(SystemMessageId.S1_S2_ALLIANCE);
					sm.addString(clanName);
					sm.addString(rset.getString("ally_name"));
				}
				else
				{
					// Target Without Ally
					sm = SystemMessage.getSystemMessage(SystemMessageId.S1_NO_ALLI_EXISTS);
					sm.addString(clanName);
				}

				activeChar.sendPacket(sm);
			}

			activeChar.sendPacket(SystemMessageId.FRIEND_LIST_FOOTER);

			rset.close();
			statement.close();
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "", e);
		}

		return true;
	}

	@Override
	public boolean useUserCommand(int id, L2PcInstance activeChar)
	{
		if (id != COMMAND_IDS[0] && id != COMMAND_IDS[1] && id != COMMAND_IDS[2])
			return false;

		L2Clan clan = activeChar.getClan();

		if (clan == null)
		{
			activeChar.sendMessage("You are not in a clan.");
			return false;
		}

		SystemMessage sm;
		java.sql.Connection con = null;

		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement;

			if (id == 88)
			{
				// Attack List
				activeChar.sendPacket(SystemMessageId.CLANS_YOU_DECLARED_WAR_ON);
				statement = con.prepareStatement("select clan_name,clan_id,ally_id,ally_name from clan_data,clan_wars where clan1=? and clan_id=clan2 and clan2 not in (select clan1 from clan_wars where clan2=?)");
				statement.setInt(1, clan.getClanId());
				statement.setInt(2, clan.getClanId());
			}
			else if (id == 89)
			{
				// Under Attack List
				activeChar.sendPacket(SystemMessageId.CLANS_THAT_HAVE_DECLARED_WAR_ON_YOU);
				statement = con.prepareStatement("select clan_name,clan_id,ally_id,ally_name from clan_data,clan_wars where clan2=? and clan_id=clan1 and clan1 not in (select clan2 from clan_wars where clan1=?)");
				statement.setInt(1, clan.getClanId());
				statement.setInt(2, clan.getClanId());
			}
			else
				// ID = 90
			{
				// War List
				activeChar.sendPacket(SystemMessageId.WAR_LIST);
				statement = con.prepareStatement("select clan_name,clan_id,ally_id,ally_name from clan_data,clan_wars where clan1=? and clan_id=clan2 and clan2 in (select clan1 from clan_wars where clan2=?)");
				statement.setInt(1, clan.getClanId());
				statement.setInt(2, clan.getClanId());
			}

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				String clanName = rset.getString("clan_name");
				int ally_id = rset.getInt("ally_id");

				if (ally_id > 0)
				{
					// Target With Ally
					sm = SystemMessage.getSystemMessage(SystemMessageId.S1_S2_ALLIANCE);
					sm.addString(clanName);
					sm.addString(rset.getString("ally_name"));
				}
				else
				{
					// Target Without Ally
					sm = SystemMessage.getSystemMessage(SystemMessageId.S1_NO_ALLI_EXISTS);
					sm.addString(clanName);
				}

				activeChar.sendPacket(sm);
			}

			activeChar.sendPacket(SystemMessageId.FRIEND_LIST_FOOTER);

			rset.close();
			statement.close();
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "", e);
		}
		finally
		{
			L2DatabaseFactory.close(con);
		}

		return true;
	}

Try With Resources try(Connection con=L2DatabaseFactory.getInstance().getConnection()) in method public useUserCommand(id int, activeChar L2PcInstance) : boolean from class handlers.usercommandhandlers.ClanWarsList


	public boolean engage(L2PcInstance activeChar)
	{
		if (activeChar.getTarget() == null)
		{
			activeChar.sendMessage("You have no one targeted.");
			return false;
		}
		else if (!(activeChar.getTarget() instanceof L2PcInstance))
		{
			activeChar.sendMessage("You can only ask another player to engage you.");
			return false;
		}
		else if (activeChar.getPartnerId() != 0)
		{
			activeChar.sendMessage("You are already engaged.");
			if (Config.L2JMOD_WEDDING_PUNISH_INFIDELITY)
			{
				activeChar.startAbnormalEffect(AbnormalEffect.BIG_HEAD); // give player a Big Head
				// lets recycle the sevensigns debuffs
				int skillId;

				int skillLevel = 1;

				if (activeChar.getLevel() > 40)
				{
					skillLevel = 2;
				}

				if (activeChar.isMageClass())
				{
					skillId = 4362;
				}
				else
				{
					skillId = 4361;
				}

				final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLevel);
				if (activeChar.getFirstEffect(skill) == null)
				{
					skill.getEffects(activeChar, activeChar);
					final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
					sm.addSkillName(skill);
					activeChar.sendPacket(sm);
				}
			}
			return false;
		}
		final L2PcInstance ptarget = (L2PcInstance) activeChar.getTarget();
		// check if player target himself
		if (ptarget.getObjectId() == activeChar.getObjectId())
		{
			activeChar.sendMessage("Is there something wrong with you, are you trying to go out with youself?");
			return false;
		}

		if (ptarget.isMarried())
		{
			activeChar.sendMessage("Player already married.");
			return false;
		}

		if (ptarget.isEngageRequest())
		{
			activeChar.sendMessage("Player already asked by someone else.");
			return false;
		}

		if (ptarget.getPartnerId() != 0)
		{
			activeChar.sendMessage("Player already engaged with someone else.");
			return false;
		}

		if ((ptarget.getAppearance().getSex() == activeChar.getAppearance().getSex()) && !Config.L2JMOD_WEDDING_SAMESEX)
		{
			activeChar.sendMessage("Gay marriage is not allowed on this server!");
			return false;
		}

		// check if target has player on friendlist
		boolean FoundOnFriendList = false;
		int objectId;
		try (Connection con = L2DatabaseFactory.getInstance().getConnection())
		{
			final PreparedStatement statement = con.prepareStatement("SELECT friendId FROM character_friends WHERE charId=?");
			statement.setInt(1, ptarget.getObjectId());
			final ResultSet rset = statement.executeQuery();
			while (rset.next())
			{
				objectId = rset.getInt("friendId");
				if (objectId == activeChar.getObjectId())
				{
					FoundOnFriendList = true;
				}
			}
			statement.close();
		}
		catch (Exception e)
		{
			_log.warning("could not read friend data:" + e);
		}

		if (!FoundOnFriendList)
		{
			activeChar.sendMessage("The player you want to ask is not on your friends list, you must first be on each others friends list before you choose to engage.");
			return false;
		}

		ptarget.setEngageRequest(true, activeChar.getObjectId());
		// $s1
		ConfirmDlg dlg = new ConfirmDlg(SystemMessageId.S1.getId()).addString(activeChar.getName() + " is asking to engage you. Do you want to start a new relationship?");
		ptarget.sendPacket(dlg);
		return true;
	}

	public boolean engage(L2PcInstance activeChar)
	{
		if (activeChar.getTarget() == null)
		{
			activeChar.sendMessage("You have no one targeted.");
			return false;
		}
		else if (!(activeChar.getTarget() instanceof L2PcInstance))
		{
			activeChar.sendMessage("You can only ask another player to engage you.");
			return false;
		}
		else if (activeChar.getPartnerId() != 0)
		{
			activeChar.sendMessage("You are already engaged.");
			if (Config.L2JMOD_WEDDING_PUNISH_INFIDELITY)
			{
				activeChar.startAbnormalEffect(AbnormalEffect.BIG_HEAD); // give player a Big Head
				// lets recycle the sevensigns debuffs
				int skillId;

				int skillLevel = 1;

				if (activeChar.getLevel() > 40)
				{
					skillLevel = 2;
				}

				if (activeChar.isMageClass())
				{
					skillId = 4362;
				}
				else
				{
					skillId = 4361;
				}

				final L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLevel);
				if (activeChar.getFirstEffect(skill) == null)
				{
					skill.getEffects(activeChar, activeChar);
					final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
					sm.addSkillName(skill);
					activeChar.sendPacket(sm);
				}
			}
			return false;
		}
		final L2PcInstance ptarget = (L2PcInstance) activeChar.getTarget();
		// check if player target himself
		if (ptarget.getObjectId() == activeChar.getObjectId())
		{
			activeChar.sendMessage("Is there something wrong with you, are you trying to go out with youself?");
			return false;
		}

		if (ptarget.isMarried())
		{
			activeChar.sendMessage("Player already married.");
			return false;
		}

		if (ptarget.isEngageRequest())
		{
			activeChar.sendMessage("Player already asked by someone else.");
			return false;
		}

		if (ptarget.getPartnerId() != 0)
		{
			activeChar.sendMessage("Player already engaged with someone else.");
			return false;
		}

		if ((ptarget.getAppearance().getSex() == activeChar.getAppearance().getSex()) && !Config.L2JMOD_WEDDING_SAMESEX)
		{
			activeChar.sendMessage("Gay marriage is not allowed on this server!");
			return false;
		}

		// check if target has player on friendlist
		boolean FoundOnFriendList = false;
		int objectId;
		Connection con = null;
		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
			final PreparedStatement statement = con.prepareStatement("SELECT friendId FROM character_friends WHERE charId=?");
			statement.setInt(1, ptarget.getObjectId());
			final ResultSet rset = statement.executeQuery();
			while (rset.next())
			{
				objectId = rset.getInt("friendId");
				if (objectId == activeChar.getObjectId())
				{
					FoundOnFriendList = true;
				}
			}
			statement.close();
		}
		catch (Exception e)
		{
			_log.warning("could not read friend data:" + e);
		}
		finally
		{
			L2DatabaseFactory.close(con);
		}

		if (!FoundOnFriendList)
		{
			activeChar.sendMessage("The player you want to ask is not on your friends list, you must first be on each others friends list before you choose to engage.");
			return false;
		}

		ptarget.setEngageRequest(true, activeChar.getObjectId());
		// $s1
		ConfirmDlg dlg = new ConfirmDlg(SystemMessageId.S1.getId()).addString(activeChar.getName() + " is asking to engage you. Do you want to start a new relationship?");
		ptarget.sendPacket(dlg);
		return true;
	}

Try With Resources try(Connection con=L2DatabaseFactory.getInstance().getConnection()) in method public engage(activeChar L2PcInstance) : boolean from class handlers.voicedcommandhandlers.Wedding


	public Keltas(int id, String name, String descr)
	{
		super(id, name, descr);

		addKillId(KELTAS);
		addSpawnId(KELTAS);

		spawnedMonsters = new FastList<>();
	}

	public Keltas(int id, String name, String descr)
	{
		super(id, name, descr);

		addKillId(KELTAS);
		addSpawnId(KELTAS);

		spawnedMonsters = new FastList<L2Spawn>();
	}

Replace Generic With Diamond FastList<L2Spawn> with FastList<> in method public Keltas(id int, name String, descr String) from class ai.individual.Keltas


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (((target == null || target == activeChar || target.isAlikeDead()) && skill.getCastRange() >= 0) || (!(target instanceof L2Attackable || target instanceof L2Playable)))
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		final L2Character origin;
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final int radius = skill.getSkillRadius();

		if (skill.getCastRange() >= 0)
		{
			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, target, skill, srcInArena))
				return _emptyTargetList;

			if (onlyFirst)
				return new L2Character[] { target };

			origin = target;
			targetList.add(origin); // Add target to target list
		}
		else
			origin = activeChar;

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
		for (L2Character obj : objs)
		{
			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (obj == origin)
				continue;

			if (Util.checkIfInRange(radius, origin, obj, true))
			{
				if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (((target == null || target == activeChar || target.isAlikeDead()) && skill.getCastRange() >= 0) || (!(target instanceof L2Attackable || target instanceof L2Playable)))
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		final L2Character origin;
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final int radius = skill.getSkillRadius();

		if (skill.getCastRange() >= 0)
		{
			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, target, skill, srcInArena))
				return _emptyTargetList;

			if (onlyFirst)
				return new L2Character[] { target };

			origin = target;
			targetList.add(origin); // Add target to target list
		}
		else
			origin = activeChar;

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
		for (L2Character obj : objs)
		{
			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (obj == origin)
				continue;

			if (Util.checkIfInRange(radius, origin, obj, true))
			{
				if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetArea


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if ((!(target instanceof L2Attackable)) || !target.isDead())
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		if (onlyFirst)
			return new L2Character[] { target };

		targetList.add(target);

		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));

		final int radius = skill.getSkillRadius();
		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
		for (L2Character obj : objs)
		{
			if (!(obj instanceof L2Attackable || obj instanceof L2Playable) || !Util.checkIfInRange(radius, target, obj, true))
				continue;

			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
				continue;

			targetList.add(obj);
		}

		if (targetList.isEmpty())
			return _emptyTargetList;
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if ((!(target instanceof L2Attackable)) || !target.isDead())
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		if (onlyFirst)
			return new L2Character[] { target };

		targetList.add(target);

		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));

		final int radius = skill.getSkillRadius();
		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
		for (L2Character obj : objs)
		{
			if (!(obj instanceof L2Attackable || obj instanceof L2Playable) || !Util.checkIfInRange(radius, target, obj, true))
				continue;

			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
				continue;

			targetList.add(obj);
		}

		if (targetList.isEmpty())
			return _emptyTargetList;
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetAreaCorpseMob


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));

		final L2PcInstance sourcePlayer = activeChar.getActingPlayer();

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getSkillRadius());

		if (skill.getSkillType() == L2SkillType.DUMMY)
		{
			if (onlyFirst)
				return new L2Character[] { activeChar };

			targetList.add(activeChar);
			for (L2Character obj : objs)
			{
				if (!(obj == activeChar || obj == sourcePlayer || obj instanceof L2Npc || obj instanceof L2Attackable))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}
		else
		{
			for (L2Character obj : objs)
			{
				if (obj instanceof L2Attackable || obj instanceof L2Playable)
				{
					if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;
					targetList.add(obj);
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));

		final L2PcInstance sourcePlayer = activeChar.getActingPlayer();

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getSkillRadius());

		if (skill.getSkillType() == L2SkillType.DUMMY)
		{
			if (onlyFirst)
				return new L2Character[] { activeChar };

			targetList.add(activeChar);
			for (L2Character obj : objs)
			{
				if (!(obj == activeChar || obj == sourcePlayer || obj instanceof L2Npc || obj instanceof L2Attackable))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}
		else
		{
			for (L2Character obj : objs)
			{
				if (obj instanceof L2Attackable || obj instanceof L2Playable)
				{
					if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;
					targetList.add(obj);
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetAura


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		// Go through the L2Character _knownList
		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getSkillRadius());
		for (L2Character obj : objs)
		{
			if (obj instanceof L2Attackable && obj.isDead())
			{
				if (onlyFirst)
					return new L2Character[] { obj };

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		// Go through the L2Character _knownList
		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getSkillRadius());
		for (L2Character obj : objs)
		{
			if (obj instanceof L2Attackable && obj.isDead())
			{
				if (onlyFirst)
					return new L2Character[] { obj };

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetAuraCorpseMob


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (((target == null || target == activeChar || target.isAlikeDead()) && skill.getCastRange() >= 0) || (!(target instanceof L2Attackable || target instanceof L2Playable)))
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		final L2Character origin;
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final int radius = skill.getSkillRadius();

		if (skill.getCastRange() >= 0)
		{
			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, target, skill, srcInArena))
				return _emptyTargetList;

			if (onlyFirst)
				return new L2Character[] { target };

			origin = target;
			targetList.add(origin); // Add target to target list
		}
		else
			origin = activeChar;

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
		for (L2Character obj : objs)
		{
			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (obj == origin)
				continue;

			if (Util.checkIfInRange(radius, origin, obj, true))
			{
				if (!obj.isBehind(activeChar))
					continue;

				if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (((target == null || target == activeChar || target.isAlikeDead()) && skill.getCastRange() >= 0) || (!(target instanceof L2Attackable || target instanceof L2Playable)))
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		final L2Character origin;
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final int radius = skill.getSkillRadius();

		if (skill.getCastRange() >= 0)
		{
			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, target, skill, srcInArena))
				return _emptyTargetList;

			if (onlyFirst)
				return new L2Character[] { target };

			origin = target;
			targetList.add(origin); // Add target to target list
		}
		else
			origin = activeChar;

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
		for (L2Character obj : objs)
		{
			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (obj == origin)
				continue;

			if (Util.checkIfInRange(radius, origin, obj, true))
			{
				if (!obj.isBehind(activeChar))
					continue;

				if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetBehindArea


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));

		final L2PcInstance sourcePlayer = activeChar.getActingPlayer();

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getSkillRadius());

		if (skill.getSkillType() == L2SkillType.DUMMY)
		{
			if (onlyFirst)
				return new L2Character[] { activeChar };

			targetList.add(activeChar);
			for (L2Character obj : objs)
			{
				if (!(obj == activeChar || obj == sourcePlayer || obj instanceof L2Npc || obj instanceof L2Attackable))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;
				targetList.add(obj);
			}
		}
		else
		{
			for (L2Character obj : objs)
			{
				if (obj instanceof L2Attackable || obj instanceof L2Playable)
				{

					if (!obj.isBehind(activeChar))
						continue;

					if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;
					targetList.add(obj);
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));

		final L2PcInstance sourcePlayer = activeChar.getActingPlayer();

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getSkillRadius());

		if (skill.getSkillType() == L2SkillType.DUMMY)
		{
			if (onlyFirst)
				return new L2Character[] { activeChar };

			targetList.add(activeChar);
			for (L2Character obj : objs)
			{
				if (!(obj == activeChar || obj == sourcePlayer || obj instanceof L2Npc || obj instanceof L2Attackable))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;
				targetList.add(obj);
			}
		}
		else
		{
			for (L2Character obj : objs)
			{
				if (obj instanceof L2Attackable || obj instanceof L2Playable)
				{

					if (!obj.isBehind(activeChar))
						continue;

					if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;
					targetList.add(obj);
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetBehindAura


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (activeChar instanceof L2Npc)
		{
			// for buff purposes, returns friendly mobs nearby and mob itself
			final L2Npc npc = (L2Npc) activeChar;
			if (npc.getFactionId() == null || npc.getFactionId().isEmpty())
			{
				return new L2Character[] { activeChar };
			}
			final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();
			for (L2Object newTarget : objs)
			{
				if (newTarget instanceof L2Npc && npc.getFactionId().equals(((L2Npc) newTarget).getFactionId()))
				{
					if (!Util.checkIfInRange(skill.getCastRange(), activeChar, newTarget, true))
						continue;
					if (((L2Npc) newTarget).getFirstEffect(skill) != null)
						continue;
					targetList.add((L2Npc) newTarget);
					break;
				}
			}
			if (targetList.isEmpty())
				targetList.add(npc);
		}
		else
			return _emptyTargetList;
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (activeChar instanceof L2Npc)
		{
			// for buff purposes, returns friendly mobs nearby and mob itself
			final L2Npc npc = (L2Npc) activeChar;
			if (npc.getFactionId() == null || npc.getFactionId().isEmpty())
			{
				return new L2Character[] { activeChar };
			}
			final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();
			for (L2Object newTarget : objs)
			{
				if (newTarget instanceof L2Npc && npc.getFactionId().equals(((L2Npc) newTarget).getFactionId()))
				{
					if (!Util.checkIfInRange(skill.getCastRange(), activeChar, newTarget, true))
						continue;
					if (((L2Npc) newTarget).getFirstEffect(skill) != null)
						continue;
					targetList.add((L2Npc) newTarget);
					break;
				}
			}
			if (targetList.isEmpty())
				targetList.add(npc);
		}
		else
			return _emptyTargetList;
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetClanMember


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (target != null && target.isDead())
		{
			final L2PcInstance player;
			if (activeChar instanceof L2PcInstance)
				player = (L2PcInstance) activeChar;
			else
				player = null;

			final L2PcInstance targetPlayer;
			if (target instanceof L2PcInstance)
				targetPlayer = (L2PcInstance) target;
			else
				targetPlayer = null;

			final L2PetInstance targetPet;
			if (target instanceof L2PetInstance)
				targetPet = (L2PetInstance) target;
			else
				targetPet = null;

			if (player != null && (targetPlayer != null || targetPet != null))
			{
				boolean condGood = true;

				if (skill.getSkillType() == L2SkillType.RESURRECT)
				{
					if (targetPlayer != null)
					{
						// check target is not in a active siege zone
						if (targetPlayer.isInsideZone(L2Character.ZONE_SIEGE) && !targetPlayer.isInSiege())
						{
							condGood = false;
							activeChar.sendPacket(SystemMessageId.CANNOT_BE_RESURRECTED_DURING_SIEGE);
						}

						if (targetPlayer.isFestivalParticipant()) // Check to see if the current player target is in a festival.
						{
							condGood = false;
							activeChar.sendMessage("You may not resurrect participants in a festival.");
						}
						if (targetPlayer.isReviveRequested())
						{
							if (targetPlayer.isRevivingPet())
								player.sendPacket(SystemMessageId.MASTER_CANNOT_RES); // While a pet is attempting to resurrect, it cannot help in resurrecting its master.
							else
								player.sendPacket(SystemMessageId.RES_HAS_ALREADY_BEEN_PROPOSED); // Resurrection is already been proposed.
							condGood = false;
						}
					}
					else if (targetPet != null)
					{
						if (targetPet.getOwner() != player)
						{
							if (targetPet.getOwner().isReviveRequested())
							{
								if (targetPet.getOwner().isRevivingPet())
									player.sendPacket(SystemMessageId.RES_HAS_ALREADY_BEEN_PROPOSED); // Resurrection is already been proposed.
								else
									player.sendPacket(SystemMessageId.CANNOT_RES_PET2); // A pet cannot be resurrected while it's owner is in the process of resurrecting.
								condGood = false;
							}
						}
					}
				}

				if (condGood)
				{
					if (!onlyFirst)
					{
						targetList.add(target);
						return targetList.toArray(new L2Object[targetList.size()]);
					}
					return new L2Character[] { target };
				}
			}
		}
		activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
		return _emptyTargetList;
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (target != null && target.isDead())
		{
			final L2PcInstance player;
			if (activeChar instanceof L2PcInstance)
				player = (L2PcInstance) activeChar;
			else
				player = null;

			final L2PcInstance targetPlayer;
			if (target instanceof L2PcInstance)
				targetPlayer = (L2PcInstance) target;
			else
				targetPlayer = null;

			final L2PetInstance targetPet;
			if (target instanceof L2PetInstance)
				targetPet = (L2PetInstance) target;
			else
				targetPet = null;

			if (player != null && (targetPlayer != null || targetPet != null))
			{
				boolean condGood = true;

				if (skill.getSkillType() == L2SkillType.RESURRECT)
				{
					if (targetPlayer != null)
					{
						// check target is not in a active siege zone
						if (targetPlayer.isInsideZone(L2Character.ZONE_SIEGE) && !targetPlayer.isInSiege())
						{
							condGood = false;
							activeChar.sendPacket(SystemMessageId.CANNOT_BE_RESURRECTED_DURING_SIEGE);
						}

						if (targetPlayer.isFestivalParticipant()) // Check to see if the current player target is in a festival.
						{
							condGood = false;
							activeChar.sendMessage("You may not resurrect participants in a festival.");
						}
						if (targetPlayer.isReviveRequested())
						{
							if (targetPlayer.isRevivingPet())
								player.sendPacket(SystemMessageId.MASTER_CANNOT_RES); // While a pet is attempting to resurrect, it cannot help in resurrecting its master.
							else
								player.sendPacket(SystemMessageId.RES_HAS_ALREADY_BEEN_PROPOSED); // Resurrection is already been proposed.
							condGood = false;
						}
					}
					else if (targetPet != null)
					{
						if (targetPet.getOwner() != player)
						{
							if (targetPet.getOwner().isReviveRequested())
							{
								if (targetPet.getOwner().isRevivingPet())
									player.sendPacket(SystemMessageId.RES_HAS_ALREADY_BEEN_PROPOSED); // Resurrection is already been proposed.
								else
									player.sendPacket(SystemMessageId.CANNOT_RES_PET2); // A pet cannot be resurrected while it's owner is in the process of resurrecting.
								condGood = false;
							}
						}
					}
				}

				if (condGood)
				{
					if (!onlyFirst)
					{
						targetList.add(target);
						return targetList.toArray(new L2Object[targetList.size()]);
					}
					return new L2Character[] { target };
				}
			}
		}
		activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
		return _emptyTargetList;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetCorpsePlayer


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (((target == null || target == activeChar || target.isAlikeDead()) && skill.getCastRange() >= 0) || (!(target instanceof L2Attackable || target instanceof L2Playable)))
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		final L2Character origin;
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final int radius = skill.getSkillRadius();

		if (skill.getCastRange() >= 0)
		{
			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, target, skill, srcInArena))
				return _emptyTargetList;

			if (onlyFirst)
				return new L2Character[] { target };

			origin = target;
			targetList.add(origin); // Add target to target list
		}
		else
			origin = activeChar;

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
		for (L2Character obj : objs)
		{
			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (obj == origin)
				continue;

			if (Util.checkIfInRange(radius, origin, obj, true))
			{
				if (!obj.isInFrontOf(activeChar))
					continue;

				if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (((target == null || target == activeChar || target.isAlikeDead()) && skill.getCastRange() >= 0) || (!(target instanceof L2Attackable || target instanceof L2Playable)))
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		final L2Character origin;
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final int radius = skill.getSkillRadius();

		if (skill.getCastRange() >= 0)
		{
			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, target, skill, srcInArena))
				return _emptyTargetList;

			if (onlyFirst)
				return new L2Character[] { target };

			origin = target;
			targetList.add(origin); // Add target to target list
		}
		else
			origin = activeChar;

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
		for (L2Character obj : objs)
		{
			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (obj == origin)
				continue;

			if (Util.checkIfInRange(radius, origin, obj, true))
			{
				if (!obj.isInFrontOf(activeChar))
					continue;

				if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				targetList.add(obj);
			}
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetFrontArea


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));

		final L2PcInstance sourcePlayer = activeChar.getActingPlayer();

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getSkillRadius());

		if (skill.getSkillType() == L2SkillType.DUMMY)
		{
			if (onlyFirst)
				return new L2Character[] { activeChar };

			targetList.add(activeChar);
			for (L2Character obj : objs)
			{
				if (!(obj == activeChar || obj == sourcePlayer || obj instanceof L2Npc || obj instanceof L2Attackable))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;
				targetList.add(obj);
			}
		}
		else
		{
			for (L2Character obj : objs)
			{
				if (obj instanceof L2Attackable || obj instanceof L2Playable)
				{

					if (!obj.isInFrontOf(activeChar))
						continue;

					if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;
					targetList.add(obj);
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));

		final L2PcInstance sourcePlayer = activeChar.getActingPlayer();

		final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getSkillRadius());

		if (skill.getSkillType() == L2SkillType.DUMMY)
		{
			if (onlyFirst)
				return new L2Character[] { activeChar };

			targetList.add(activeChar);
			for (L2Character obj : objs)
			{
				if (!(obj == activeChar || obj == sourcePlayer || obj instanceof L2Npc || obj instanceof L2Attackable))
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;
				targetList.add(obj);
			}
		}
		else
		{
			for (L2Character obj : objs)
			{
				if (obj instanceof L2Attackable || obj instanceof L2Playable)
				{

					if (!obj.isInFrontOf(activeChar))
						continue;

					if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;
					targetList.add(obj);
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetFrontAura


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (!(target instanceof L2DoorInstance) && !(target instanceof L2ChestInstance))
		{
			return _emptyTargetList;
		}

		if (!onlyFirst)
		{
			targetList.add(target);
			return targetList.toArray(new L2Object[targetList.size()]);
		}
		return new L2Character[] { target };
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (!(target instanceof L2DoorInstance) && !(target instanceof L2ChestInstance))
		{
			return _emptyTargetList;
		}

		if (!onlyFirst)
		{
			targetList.add(target);
			return targetList.toArray(new L2Object[targetList.size()]);
		}
		return new L2Character[] { target };
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetUnlockable


	private void startRoom(int managerId)
	{
		_activeRooms.put(managerId, true);

		if (DOORS.containsKey(managerId))
		{
			int[] doorList = DOORS.get(managerId);
			DoorTable.getInstance().getDoor(doorList[0]).closeMe();
		}

		if (SPAWNS.containsKey(managerId))
		{
			int[][] spawnList = SPAWNS.get(managerId);
			List<L2Npc> spawned = new FastList<>();
			for (int[] spawn : spawnList)
			{
				L2Npc spawnedNpc = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false);
				spawned.add(spawnedNpc);
			}
			if (!spawned.isEmpty())
			{
				_spawns.put(managerId, spawned);
			}
		}
	}

	private void startRoom(int managerId)
	{
		_activeRooms.put(managerId, true);

		if (DOORS.containsKey(managerId))
		{
			int[] doorList = DOORS.get(managerId);
			DoorTable.getInstance().getDoor(doorList[0]).closeMe();
		}

		if (SPAWNS.containsKey(managerId))
		{
			int[][] spawnList = SPAWNS.get(managerId);
			List<L2Npc> spawned = new FastList<L2Npc>();
			for (int[] spawn : spawnList)
			{
				L2Npc spawnedNpc = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false);
				spawned.add(spawnedNpc);
			}
			if (!spawned.isEmpty())
			{
				_spawns.put(managerId, spawned);
			}
		}
	}

Replace Generic With Diamond FastList<L2Npc> with FastList<> in method private startRoom(managerId int) : void from class hellbound.TowerOfNaia.TowerOfNaia


	protected void runEmeraldSquare(CCWorld world)
	{
		world.status = 3;

		Map<L2Npc, Boolean> spawnList = new FastMap<>();
		for (int[] spawn : EMERALD_SPAWNS)
		{
			L2Npc mob = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false, world.instanceId);
			spawnList.put(mob, false);
		}
		world.npcList2.put(0, spawnList);
	}

	protected void runEmeraldSquare(CCWorld world)
	{
		world.status = 3;

		Map<L2Npc, Boolean> spawnList = new FastMap<L2Npc, Boolean>();
		for (int[] spawn : EMERALD_SPAWNS)
		{
			L2Npc mob = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false, world.instanceId);
			spawnList.put(mob, false);
		}
		world.npcList2.put(0, spawnList);
	}

Replace Generic With Diamond FastMap<L2Npc,Boolean> with FastMap<> in method protected runEmeraldSquare(world CCWorld) : void from class instances.CrystalCaverns.CrystalCaverns


	protected void runEmeraldRooms(CCWorld world, int[][] spawnList, int room)
	{
		Map<L2Npc, Boolean> spawned = new FastMap<>();
		for (int[] spawn : spawnList)
		{
			L2Npc mob = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false, world.instanceId);
			spawned.put(mob, false);
		}
		if (room == 1) // spawn Lahm
			addSpawn(32359, 142110, 139896, -11888, 8033, false, 0, false, world.instanceId);
		world.npcList2.put(room, spawned);
		world.roomsStatus[room - 1] = 1;
	}

	protected void runEmeraldRooms(CCWorld world, int[][] spawnList, int room)
	{
		Map<L2Npc, Boolean> spawned = new FastMap<L2Npc, Boolean>();
		for (int[] spawn : spawnList)
		{
			L2Npc mob = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false, world.instanceId);
			spawned.put(mob, false);
		}
		if (room == 1) // spawn Lahm
			addSpawn(32359, 142110, 139896, -11888, 8033, false, 0, false, world.instanceId);
		world.npcList2.put(room, spawned);
		world.roomsStatus[room - 1] = 1;
	}

Replace Generic With Diamond FastMap<L2Npc,Boolean> with FastMap<> in method protected runEmeraldRooms(world CCWorld, spawnList int[][], room int) : void from class instances.CrystalCaverns.CrystalCaverns


	protected void runSteamRooms(CCWorld world, int[][] spawnList, int status)
	{
		world.status = status;

		Map<L2Npc, Boolean> spawned = new FastMap<>();
		for (int[] spawn : spawnList)
		{
			L2Npc mob = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false, world.instanceId);
			spawned.put(mob, false);
		}
		world.npcList2.put(0, spawned);
	}

	protected void runSteamRooms(CCWorld world, int[][] spawnList, int status)
	{
		world.status = status;

		Map<L2Npc, Boolean> spawned = new FastMap<L2Npc, Boolean>();
		for (int[] spawn : spawnList)
		{
			L2Npc mob = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false, world.instanceId);
			spawned.put(mob, false);
		}
		world.npcList2.put(0, spawned);
	}

Replace Generic With Diamond FastMap<L2Npc,Boolean> with FastMap<> in method protected runSteamRooms(world CCWorld, spawnList int[][], status int) : void from class instances.CrystalCaverns.CrystalCaverns


	@Override
	public String onSpawn(L2Npc npc)
	{
		if (Util.contains(mobs1, npc.getNpcId()))
		{
			FastList<L2Playable> result = new FastList<>();
			Collection<L2Object> objs = npc.getKnownList().getKnownObjects().values();
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2PcInstance) || (obj instanceof L2PetInstance))
				{
					if (Util.checkIfInRange(npc.getAggroRange(), npc, obj, true) && !((L2Character) obj).isDead())
					{
						result.add((L2Playable) obj);
					}
				}
			}
			if (!result.isEmpty() && (result.size() != 0))
			{
				Object[] characters = result.toArray();
				for (Object obj : characters)
				{
					L2Playable target = (L2Playable) (obj instanceof L2PcInstance ? obj : ((L2Summon) obj).getOwner());
					if ((target.getActiveWeaponInstance() != null) && !npc.isInCombat() && (npc.getTarget() == null))
					{
						npc.setTarget(target);
						npc.broadcastPacket(new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), messages[0]));
						switch (npc.getNpcId())
						{
							case 22124:
							case 22126:
							case 22127:
							{
								L2Skill skill = SkillTable.getInstance().getInfo(4589, 8);
								npc.doCast(skill);
								break;
							}
							default:
							{
								npc.setIsRunning(true);
								((L2Attackable) npc).addDamageHate(target, 0, 999);
								npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
								break;
							}
						}
					}
				}
			}
		}
		return super.onSpawn(npc);
	}

	@Override
	public String onSpawn(L2Npc npc)
	{
		if (Util.contains(mobs1, npc.getNpcId()))
		{
			FastList<L2Playable> result = new FastList<L2Playable>();
			Collection<L2Object> objs = npc.getKnownList().getKnownObjects().values();
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2PcInstance) || (obj instanceof L2PetInstance))
				{
					if (Util.checkIfInRange(npc.getAggroRange(), npc, obj, true) && !((L2Character) obj).isDead())
					{
						result.add((L2Playable) obj);
					}
				}
			}
			if (!result.isEmpty() && (result.size() != 0))
			{
				Object[] characters = result.toArray();
				for (Object obj : characters)
				{
					L2Playable target = (L2Playable) (obj instanceof L2PcInstance ? obj : ((L2Summon) obj).getOwner());
					if ((target.getActiveWeaponInstance() != null) && !npc.isInCombat() && (npc.getTarget() == null))
					{
						npc.setTarget(target);
						npc.broadcastPacket(new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), messages[0]));
						switch (npc.getNpcId())
						{
							case 22124:
							case 22126:
							case 22127:
							{
								L2Skill skill = SkillTable.getInstance().getInfo(4589, 8);
								npc.doCast(skill);
								break;
							}
							default:
							{
								npc.setIsRunning(true);
								((L2Attackable) npc).addDamageHate(target, 0, 999);
								npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
								break;
							}
						}
					}
				}
			}
		}
		return super.onSpawn(npc);
	}

Replace Generic With Diamond FastList<L2Playable> with FastList<> in method public onSpawn(npc L2Npc) : String from class ai.group_template.Monastery


	public L2Character getRandomTarget(L2Npc npc)
	{
		FastList<L2Character> result = new FastList<>();
		Collection<L2Character> objs = npc.getKnownList().getKnownCharacters();
		{
			for (L2Character cha : objs)
			{
				if ((cha instanceof L2PcInstance) || (cha instanceof L2Summon) || (cha instanceof L2DecoyInstance))
				{
					if (Util.checkIfInRange(5000, npc, cha, true) && !cha.isDead() && !cha.isGM())
					{
						result.add(cha);
					}
				}
			}
		}
		if (!result.isEmpty() && (result.size() != 0))
		{
			Object[] characters = result.toArray();
			return (L2Character) characters[getRandom(characters.length)];
		}
		return null;
	}

	public L2Character getRandomTarget(L2Npc npc)
	{
		FastList<L2Character> result = new FastList<L2Character>();
		Collection<L2Character> objs = npc.getKnownList().getKnownCharacters();
		{
			for (L2Character cha : objs)
			{
				if ((cha instanceof L2PcInstance) || (cha instanceof L2Summon) || (cha instanceof L2DecoyInstance))
				{
					if (Util.checkIfInRange(5000, npc, cha, true) && !cha.isDead() && !cha.isGM())
					{
						result.add(cha);
					}
				}
			}
		}
		if (!result.isEmpty() && (result.size() != 0))
		{
			Object[] characters = result.toArray();
			return (L2Character) characters[getRandom(characters.length)];
		}
		return null;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getRandomTarget(npc L2Npc) : L2Character from class ai.individual.Valakas


	/**
	 * Fired when a player logs in
	 * @param player
	 */
	@Override
	public void onPlayerLogin(L2PcInstance player)
	{
		_log.log(Level.INFO, "Player " + player.getName() + " just logged in!");
		List<Integer> items = new ArrayList<>();
		for (L2ItemInstance item : player.getInventory().getItems())
		{
			items.add(item.getItemId());
		}
		addItemTracker(items);
		addTransformNotify(player);
		addSkillUseNotify(player, -1);
		addAttackNotify(player);
	}

	/**
	 * Fired when a player logs in
	 * @param player
	 */
	@Override
	public void onPlayerLogin(L2PcInstance player)
	{
		_log.log(Level.INFO, "Player " + player.getName() + " just logged in!");
		List<Integer> items = new FastList<Integer>();
		for (L2ItemInstance item : player.getInventory().getItems())
		{
			items.add(item.getItemId());
		}
		addItemTracker(items);
		addTransformNotify(player);
		addSkillUseNotify(player, -1);
		addAttackNotify(player);
	}

Replace Generic With Diamond FastList<Integer> with ArrayList<> in method public onPlayerLogin(player L2PcInstance) : void from class custom.Listeners.Listeners


	/**
	 * Collect awaiting quests/start points and display a QuestChooseWindow (if several available) or QuestWindow.
	 * @param player the L2PcInstance that talk with the {@code npc}.
	 * @param npc the L2NpcInstance that chats with the {@code player}.
	 */
	public static void showQuestWindow(L2PcInstance player, L2Npc npc)
	{
		// collect awaiting quests and start points
		List<Quest> options = new FastList<>();

		QuestState[] awaits = player.getQuestsForTalk(npc.getTemplate().getNpcId());
		List<Quest> starts = npc.getTemplate().getEventQuests(QuestEventType.QUEST_START);

		// Quests are limited between 1 and 999 because those are the quests that are supported by the client.
		// By limiting them there, we are allowed to create custom quests at higher IDs without interfering
		if (awaits != null)
		{
			for (QuestState x : awaits)
			{
				if (!options.contains(x.getQuest()))
				{
					if ((x.getQuest().getQuestIntId() > 0) && (x.getQuest().getQuestIntId() < 20000))
					{
						options.add(x.getQuest());
					}
				}
			}
		}

		if (starts != null)
		{
			for (Quest x : starts)
			{
				if (!options.contains(x))
				{
					if ((x.getQuestIntId() > 0) && (x.getQuestIntId() < 20000))
					{
						options.add(x);
					}
				}
			}
		}

		// Display a QuestChooseWindow (if several quests are available) or QuestWindow
		if (options.size() > 1)
		{
			showQuestChooseWindow(player, npc, options.toArray(new Quest[options.size()]));
		}
		else if (options.size() == 1)
		{
			showQuestWindow(player, npc, options.get(0).getName());
		}
		else
		{
			showQuestWindow(player, npc, "");
		}
	}

	/**
	 * Collect awaiting quests/start points and display a QuestChooseWindow (if several available) or QuestWindow.
	 * @param player the L2PcInstance that talk with the {@code npc}.
	 * @param npc the L2NpcInstance that chats with the {@code player}.
	 */
	public static void showQuestWindow(L2PcInstance player, L2Npc npc)
	{
		// collect awaiting quests and start points
		List<Quest> options = new FastList<Quest>();

		QuestState[] awaits = player.getQuestsForTalk(npc.getTemplate().getNpcId());
		List<Quest> starts = npc.getTemplate().getEventQuests(QuestEventType.QUEST_START);

		// Quests are limited between 1 and 999 because those are the quests that are supported by the client.
		// By limiting them there, we are allowed to create custom quests at higher IDs without interfering
		if (awaits != null)
		{
			for (QuestState x : awaits)
			{
				if (!options.contains(x.getQuest()))
				{
					if ((x.getQuest().getQuestIntId() > 0) && (x.getQuest().getQuestIntId() < 20000))
					{
						options.add(x.getQuest());
					}
				}
			}
		}

		if (starts != null)
		{
			for (Quest x : starts)
			{
				if (!options.contains(x))
				{
					if ((x.getQuestIntId() > 0) && (x.getQuestIntId() < 20000))
					{
						options.add(x);
					}
				}
			}
		}

		// Display a QuestChooseWindow (if several quests are available) or QuestWindow
		if (options.size() > 1)
		{
			showQuestChooseWindow(player, npc, options.toArray(new Quest[options.size()]));
		}
		else if (options.size() == 1)
		{
			showQuestWindow(player, npc, options.get(0).getName());
		}
		else
		{
			showQuestWindow(player, npc, "");
		}
	}

Replace Generic With Diamond FastList<Quest> with FastList<> in method public showQuestWindow(player L2PcInstance, npc L2Npc) : void from class handlers.bypasshandlers.QuestLink


	@Override
	public boolean onActionTime()
	{
		List<L2Character> targetList = new FastList<>();

		// Getting the possible targets

		Collection<L2Object> objs = getEffected().getKnownList().getKnownObjects().values();
		// synchronized (getEffected().getKnownList().getKnownObjects())
		{
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2Attackable) && (obj != getEffected()))
					targetList.add((L2Character) obj);
			}
		}
		// if there is no target, exit function
		if (targetList.isEmpty())
			return true;

		// Choosing randomly a new target
		int nextTargetIdx = Rnd.nextInt(targetList.size());
		L2Object target = targetList.get(nextTargetIdx);

		// Attacking the target
		getEffected().setTarget(target);
		getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);

		return true;
	}

	@Override
	public boolean onActionTime()
	{
		List<L2Character> targetList = new FastList<L2Character>();

		// Getting the possible targets

		Collection<L2Object> objs = getEffected().getKnownList().getKnownObjects().values();
		// synchronized (getEffected().getKnownList().getKnownObjects())
		{
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2Attackable) && (obj != getEffected()))
					targetList.add((L2Character) obj);
			}
		}
		// if there is no target, exit function
		if (targetList.isEmpty())
			return true;

		// Choosing randomly a new target
		int nextTargetIdx = Rnd.nextInt(targetList.size());
		L2Object target = targetList.get(nextTargetIdx);

		// Attacking the target
		getEffected().setTarget(target);
		getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);

		return true;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public onActionTime() : boolean from class handlers.effecthandlers.ConfuseMob


	@Override
	public boolean onActionTime()
	{
		List<L2Character> targetList = new FastList<>();

		// Getting the possible targets

		Collection<L2Object> objs = getEffected().getKnownList().getKnownObjects().values();
		// synchronized (getEffected().getKnownList().getKnownObjects())
		{
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2Character) && (obj != getEffected()))
					targetList.add((L2Character) obj);
			}
		}
		// if there is no target, exit function
		if (targetList.isEmpty())
			return true;

		// Choosing randomly a new target
		int nextTargetIdx = Rnd.nextInt(targetList.size());
		L2Object target = targetList.get(nextTargetIdx);

		// Attacking the target
		getEffected().setTarget(target);
		getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);

		return true;
	}

	@Override
	public boolean onActionTime()
	{
		List<L2Character> targetList = new FastList<L2Character>();

		// Getting the possible targets

		Collection<L2Object> objs = getEffected().getKnownList().getKnownObjects().values();
		// synchronized (getEffected().getKnownList().getKnownObjects())
		{
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2Character) && (obj != getEffected()))
					targetList.add((L2Character) obj);
			}
		}
		// if there is no target, exit function
		if (targetList.isEmpty())
			return true;

		// Choosing randomly a new target
		int nextTargetIdx = Rnd.nextInt(targetList.size());
		L2Object target = targetList.get(nextTargetIdx);

		// Attacking the target
		getEffected().setTarget(target);
		getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);

		return true;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public onActionTime() : boolean from class handlers.effecthandlers.Confusion


	@Override
	public boolean onActionTime()
	{
		if (getCount() >= getTotalCount() - 2)
			return true; // do nothing first 2 times
		int mpConsume = getSkill().getMpConsume();

		L2PcInstance caster = (L2PcInstance) getEffector();

		boolean ss = false;
		boolean bss = false;

		L2ItemInstance weaponInst = caster.getActiveWeaponInstance();
		if (weaponInst != null)
		{
			switch (weaponInst.getChargedSpiritshot())
			{
				case L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT:
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
					bss = true;
					break;
				case L2ItemInstance.CHARGED_SPIRITSHOT:
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
					ss = true;
					break;
			}
		}

		FastList<L2Character> targets = new FastList<>();

		for (L2Character cha : _actor.getKnownList().getKnownCharactersInRadius(getSkill().getSkillRadius()))
		{
			if (cha == null || cha == caster)
				continue;

			if (cha instanceof L2Attackable || cha instanceof L2Playable)
			{
				if (cha.isAlikeDead())
					continue;

				if (mpConsume > caster.getCurrentMp())
				{
					caster.sendPacket(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP);
					return false;
				}

				caster.reduceCurrentMp(mpConsume);
				if (cha instanceof L2Playable)
				{
					if (caster.canAttackCharacter(cha))
					{
						targets.add(cha);
						caster.updatePvPStatus(cha);
					}
				}
				else
					targets.add(cha);
			}
		}

		if (!targets.isEmpty())
		{
			caster.broadcastPacket(new MagicSkillLaunched(caster, getSkill().getId(), getSkill().getLevel(), targets.toArray(new L2Character[targets.size()])));
			for (L2Character target : targets)
			{
				boolean mcrit = Formulas.calcMCrit(caster.getMCriticalHit(target, getSkill()));
				byte shld = Formulas.calcShldUse(caster, target, getSkill());
				int mdam = (int) Formulas.calcMagicDam(caster, target, getSkill(), shld, ss, bss, mcrit);

				if (target instanceof L2Summon)
					target.broadcastStatusUpdate();

				if (mdam > 0)
				{
					if (!target.isRaid()
							&& Formulas.calcAtkBreak(target, mdam))
					{
						target.breakAttack();
						target.breakCast();
					}
					caster.sendDamageMessage(target, mdam, mcrit, false, false);
					target.reduceCurrentHp(mdam, caster, getSkill());
				}
				target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
			}
		}
		return true;
	}

	@Override
	public boolean onActionTime()
	{
		if (getCount() >= getTotalCount() - 2)
			return true; // do nothing first 2 times
		int mpConsume = getSkill().getMpConsume();

		L2PcInstance caster = (L2PcInstance) getEffector();

		boolean ss = false;
		boolean bss = false;

		L2ItemInstance weaponInst = caster.getActiveWeaponInstance();
		if (weaponInst != null)
		{
			switch (weaponInst.getChargedSpiritshot())
			{
				case L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT:
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
					bss = true;
					break;
				case L2ItemInstance.CHARGED_SPIRITSHOT:
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
					ss = true;
					break;
			}
		}

		FastList<L2Character> targets = new FastList<L2Character>();

		for (L2Character cha : _actor.getKnownList().getKnownCharactersInRadius(getSkill().getSkillRadius()))
		{
			if (cha == null || cha == caster)
				continue;

			if (cha instanceof L2Attackable || cha instanceof L2Playable)
			{
				if (cha.isAlikeDead())
					continue;

				if (mpConsume > caster.getCurrentMp())
				{
					caster.sendPacket(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP);
					return false;
				}

				caster.reduceCurrentMp(mpConsume);
				if (cha instanceof L2Playable)
				{
					if (caster.canAttackCharacter(cha))
					{
						targets.add(cha);
						caster.updatePvPStatus(cha);
					}
				}
				else
					targets.add(cha);
			}
		}

		if (!targets.isEmpty())
		{
			caster.broadcastPacket(new MagicSkillLaunched(caster, getSkill().getId(), getSkill().getLevel(), targets.toArray(new L2Character[targets.size()])));
			for (L2Character target : targets)
			{
				boolean mcrit = Formulas.calcMCrit(caster.getMCriticalHit(target, getSkill()));
				byte shld = Formulas.calcShldUse(caster, target, getSkill());
				int mdam = (int) Formulas.calcMagicDam(caster, target, getSkill(), shld, ss, bss, mcrit);

				if (target instanceof L2Summon)
					target.broadcastStatusUpdate();

				if (mdam > 0)
				{
					if (!target.isRaid()
							&& Formulas.calcAtkBreak(target, mdam))
					{
						target.breakAttack();
						target.breakCast();
					}
					caster.sendDamageMessage(target, mdam, mcrit, false, false);
					target.reduceCurrentHp(mdam, caster, getSkill());
				}
				target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
			}
		}
		return true;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public onActionTime() : boolean from class handlers.effecthandlers.SignetMDam


	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		L2PcInstance player = null;
		if (activeChar instanceof L2PcInstance)
			player = (L2PcInstance) activeChar;

		L2PcInstance targetPlayer;
		List<L2Character> targetToRes = new FastList<>();

		for (L2Character target: (L2Character[]) targets)
		{
			if (target instanceof L2PcInstance)
			{
				targetPlayer = target.getActingPlayer();

				// Check for same party or for same clan, if target is for clan.
				if (skill.getTargetType() == L2TargetType.TARGET_CORPSE_CLAN)
				{
					if ((player != null) && (player.getClanId() != targetPlayer.getClanId()))
					{
						continue;
					}
				}
			}
			if (target.isVisible())
				targetToRes.add(target);
		}

		if (targetToRes.isEmpty())
		{
			activeChar.abortCast();
			return;
		}

		for (L2Character cha : targetToRes)
			if (activeChar instanceof L2PcInstance)
			{
				if (cha instanceof L2PcInstance)
					((L2PcInstance) cha).reviveRequest((L2PcInstance) activeChar, skill, false);
				else if (cha instanceof L2PetInstance)
					((L2PetInstance) cha).getOwner().reviveRequest((L2PcInstance) activeChar, skill, true);
			}
			else
			{
				DecayTaskManager.getInstance().cancelDecayTask(cha);
				cha.doRevive(Formulas.calculateSkillResurrectRestorePercent(skill.getPower(), activeChar));
			}
	}

	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		L2PcInstance player = null;
		if (activeChar instanceof L2PcInstance)
			player = (L2PcInstance) activeChar;

		L2PcInstance targetPlayer;
		List<L2Character> targetToRes = new FastList<L2Character>();

		for (L2Character target: (L2Character[]) targets)
		{
			if (target instanceof L2PcInstance)
			{
				targetPlayer = target.getActingPlayer();

				// Check for same party or for same clan, if target is for clan.
				if (skill.getTargetType() == L2TargetType.TARGET_CORPSE_CLAN)
				{
					if ((player != null) && (player.getClanId() != targetPlayer.getClanId()))
					{
						continue;
					}
				}
			}
			if (target.isVisible())
				targetToRes.add(target);
		}

		if (targetToRes.isEmpty())
		{
			activeChar.abortCast();
			return;
		}

		for (L2Character cha : targetToRes)
			if (activeChar instanceof L2PcInstance)
			{
				if (cha instanceof L2PcInstance)
					((L2PcInstance) cha).reviveRequest((L2PcInstance) activeChar, skill, false);
				else if (cha instanceof L2PetInstance)
					((L2PetInstance) cha).getOwner().reviveRequest((L2PcInstance) activeChar, skill, true);
			}
			else
			{
				DecayTaskManager.getInstance().cancelDecayTask(cha);
				cha.doRevive(Formulas.calculateSkillResurrectRestorePercent(skill.getPower(), activeChar));
			}
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public useSkill(activeChar L2Character, skill L2Skill, targets L2Object[]) : void from class handlers.skillhandlers.Resurrect


	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		// discharge shots
		final L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance();
		if (weaponInst != null)
		{
			if (skill.isMagic())
			{
				if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
				{
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
				}
				else if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT)
				{
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
				}
			}
		}
		else if (activeChar instanceof L2Summon)
		{
			final L2Summon activeSummon = (L2Summon) activeChar;

			if (skill.isMagic())
			{
				if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
				{
					activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE);
				}
				else if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_SPIRITSHOT)
				{
					activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			((L2Npc) activeChar)._spiritshotcharged = false;
		}

		L2Character target;
		L2Effect effect;

		int count = skill.getMaxNegatedEffects();
		for (L2Object obj : targets)
		{
			if (!(obj instanceof L2Character))
			{
				continue;
			}
			target = (L2Character) obj;

			if (target.isDead())
			{
				continue;
			}

			if (!(target instanceof L2PcInstance))
			{
				continue;
			}

			Env env;
			int lastSkillId = 0;
			final L2Effect[] effects = target.getAllEffects();
			final ArrayList<L2Effect> toSteal = new ArrayList<>(count);

			for (int i = effects.length; --i >= 0;) // reverse order
			{
				effect = effects[i];
				if (effect == null)
				{
					continue;
				}

				if (!effect.canBeStolen()) // remove effect if can't be stolen
				{
					effects[i] = null;
					continue;
				}

				// if eff time is smaller than 5 sec, will not be stolen, just to save CPU,
				// avoid synchronization(?) problems and NPEs
				if ((effect.getAbnormalTime() - effect.getTime()) < 5)
				{
					effects[i] = null;
					continue;
				}

				// first pass - only dances/songs
				if (!effect.getSkill().isDance())
				{
					continue;
				}

				if (effect.getSkill().getId() != lastSkillId)
				{
					lastSkillId = effect.getSkill().getId();
					count--;
				}

				toSteal.add(effect);
				if (count == 0)
				{
					break;
				}
			}

			if (count > 0) // second pass
			{
				lastSkillId = 0;
				for (int i = effects.length; --i >= 0;)
				{
					effect = effects[i];
					if (effect == null)
					{
						continue;
					}

					// second pass - all except dances/songs
					if (effect.getSkill().isDance())
					{
						continue;
					}

					if (effect.getSkill().getId() != lastSkillId)
					{
						lastSkillId = effect.getSkill().getId();
						count--;
					}

					toSteal.add(effect);
					if (count == 0)
					{
						break;
					}
				}
			}

			if (toSteal.size() == 0)
			{
				continue;
			}

			// stealing effects
			for (L2Effect eff : toSteal)
			{
				env = new Env();
				env.setCharacter(target);
				env.setTarget(activeChar);
				env.setSkill(eff.getSkill());
				try
				{
					effect = eff.getEffectTemplate().getStolenEffect(env, eff);
					if (effect != null)
					{
						effect.scheduleEffect();
						if (effect.getShowIcon() && (activeChar instanceof L2PcInstance))
						{
							SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
							sm.addSkillName(effect);
							activeChar.sendPacket(sm);
						}
					}
					// Finishing stolen effect
					eff.exit();
				}
				catch (RuntimeException e)
				{
					_log.log(Level.WARNING, "Cannot steal effect: " + eff + " Stealer: " + activeChar + " Stolen: " + target, e);
				}
			}

			// Possibility of a lethal strike
			Formulas.calcLethalHit(activeChar, target, skill);
		}

		if (skill.hasSelfEffects())
		{
			// Applying self-effects
			effect = activeChar.getFirstEffect(skill.getId());
			if ((effect != null) && effect.isSelfEffect())
			{
				// Replace old effect with new one.
				effect.exit();
			}
			skill.getEffectsSelf(activeChar);
		}
	}

	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		// discharge shots
		final L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance();
		if (weaponInst != null)
		{
			if (skill.isMagic())
			{
				if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
				{
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
				}
				else if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT)
				{
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
				}
			}
		}
		else if (activeChar instanceof L2Summon)
		{
			final L2Summon activeSummon = (L2Summon) activeChar;

			if (skill.isMagic())
			{
				if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
				{
					activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE);
				}
				else if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_SPIRITSHOT)
				{
					activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			((L2Npc) activeChar)._spiritshotcharged = false;
		}

		L2Character target;
		L2Effect effect;

		int count = skill.getMaxNegatedEffects();
		for (L2Object obj : targets)
		{
			if (!(obj instanceof L2Character))
			{
				continue;
			}
			target = (L2Character) obj;

			if (target.isDead())
			{
				continue;
			}

			if (!(target instanceof L2PcInstance))
			{
				continue;
			}

			Env env;
			int lastSkillId = 0;
			final L2Effect[] effects = target.getAllEffects();
			final ArrayList<L2Effect> toSteal = new ArrayList<L2Effect>(count);

			for (int i = effects.length; --i >= 0;) // reverse order
			{
				effect = effects[i];
				if (effect == null)
				{
					continue;
				}

				if (!effect.canBeStolen()) // remove effect if can't be stolen
				{
					effects[i] = null;
					continue;
				}

				// if eff time is smaller than 5 sec, will not be stolen, just to save CPU,
				// avoid synchronization(?) problems and NPEs
				if ((effect.getAbnormalTime() - effect.getTime()) < 5)
				{
					effects[i] = null;
					continue;
				}

				// first pass - only dances/songs
				if (!effect.getSkill().isDance())
				{
					continue;
				}

				if (effect.getSkill().getId() != lastSkillId)
				{
					lastSkillId = effect.getSkill().getId();
					count--;
				}

				toSteal.add(effect);
				if (count == 0)
				{
					break;
				}
			}

			if (count > 0) // second pass
			{
				lastSkillId = 0;
				for (int i = effects.length; --i >= 0;)
				{
					effect = effects[i];
					if (effect == null)
					{
						continue;
					}

					// second pass - all except dances/songs
					if (effect.getSkill().isDance())
					{
						continue;
					}

					if (effect.getSkill().getId() != lastSkillId)
					{
						lastSkillId = effect.getSkill().getId();
						count--;
					}

					toSteal.add(effect);
					if (count == 0)
					{
						break;
					}
				}
			}

			if (toSteal.size() == 0)
			{
				continue;
			}

			// stealing effects
			for (L2Effect eff : toSteal)
			{
				env = new Env();
				env.setCharacter(target);
				env.setTarget(activeChar);
				env.setSkill(eff.getSkill());
				try
				{
					effect = eff.getEffectTemplate().getStolenEffect(env, eff);
					if (effect != null)
					{
						effect.scheduleEffect();
						if (effect.getShowIcon() && (activeChar instanceof L2PcInstance))
						{
							SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
							sm.addSkillName(effect);
							activeChar.sendPacket(sm);
						}
					}
					// Finishing stolen effect
					eff.exit();
				}
				catch (RuntimeException e)
				{
					_log.log(Level.WARNING, "Cannot steal effect: " + eff + " Stealer: " + activeChar + " Stolen: " + target, e);
				}
			}

			// Possibility of a lethal strike
			Formulas.calcLethalHit(activeChar, target, skill);
		}

		if (skill.hasSelfEffects())
		{
			// Applying self-effects
			effect = activeChar.getFirstEffect(skill.getId());
			if ((effect != null) && effect.isSelfEffect())
			{
				// Replace old effect with new one.
				effect.exit();
			}
			skill.getEffectsSelf(activeChar);
		}
	}

Replace Generic With Diamond ArrayList<L2Effect> with ArrayList<> in method public useSkill(activeChar L2Character, skill L2Skill, targets L2Object[]) : void from class handlers.skillhandlers.StealBuffs


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			if (onlyFirst)
				return new L2Character[] { player };

			targetList.add(player);

			final int radius = skill.getSkillRadius();

			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());

			if (player.getClan() != null)
			{
				// Get all visible objects in a spherical area near the L2Character
				final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
				for (L2PcInstance obj : objs)
				{
					if (obj == null)
						continue;
					if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId()) && (obj.getClan() == null || obj.getClanId() != player.getClanId()))
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp
					// casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, false))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			if (onlyFirst)
				return new L2Character[] { player };

			targetList.add(player);

			final int radius = skill.getSkillRadius();

			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());

			if (player.getClan() != null)
			{
				// Get all visible objects in a spherical area near the L2Character
				final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
				for (L2PcInstance obj : objs)
				{
					if (obj == null)
						continue;
					if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId()) && (obj.getClan() == null || obj.getClanId() != player.getClanId()))
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp
					// casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, false))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetAlly


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		target = activeChar.getPet();
		if (target == null || !(target instanceof L2ServitorInstance) || target.isDead())
			return _emptyTargetList;

		if (onlyFirst)
			return new L2Character[] { target };

		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final Collection<L2Character> objs = target.getKnownList().getKnownCharacters();
		final int radius = skill.getSkillRadius();

		for (L2Character obj : objs)
		{
			if (obj == null || obj == target || obj == activeChar)
				continue;

			if (!Util.checkIfInRange(radius, target, obj, true))
				continue;

			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
				continue;

			if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
				break;

			targetList.add(obj);
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		target = activeChar.getPet();
		if (target == null || !(target instanceof L2ServitorInstance) || target.isDead())
			return _emptyTargetList;

		if (onlyFirst)
			return new L2Character[] { target };

		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final Collection<L2Character> objs = target.getKnownList().getKnownCharacters();
		final int radius = skill.getSkillRadius();

		for (L2Character obj : objs)
		{
			if (obj == null || obj == target || obj == activeChar)
				continue;

			if (!Util.checkIfInRange(radius, target, obj, true))
				continue;

			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
				continue;

			if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
				break;

			targetList.add(obj);
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetAreaSummon


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			if (onlyFirst)
				return new L2Character[] { player };

			targetList.add(player);

			final int radius = skill.getSkillRadius();
			final L2Clan clan = player.getClan();

			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());

			if (clan != null)
			{
				L2PcInstance obj;
				for (L2ClanMember member : clan.getMembers())
				{
					obj = member.getPlayerInstance();

					if (obj == null || obj == player)
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, false))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			// for buff purposes, returns friendly mobs nearby and mob itself
			final L2Npc npc = (L2Npc) activeChar;
			if (npc.getFactionId() == null || npc.getFactionId().isEmpty())
			{
				return new L2Character[] { activeChar };
			}

			targetList.add(activeChar);

			final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();

			for (L2Object newTarget : objs)
			{
				if (newTarget instanceof L2Npc && npc.getFactionId().equals(((L2Npc) newTarget).getFactionId()))
				{
					if (!Util.checkIfInRange(skill.getCastRange(), activeChar, newTarget, true))
						continue;

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add((L2Npc) newTarget);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			if (onlyFirst)
				return new L2Character[] { player };

			targetList.add(player);

			final int radius = skill.getSkillRadius();
			final L2Clan clan = player.getClan();

			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());

			if (clan != null)
			{
				L2PcInstance obj;
				for (L2ClanMember member : clan.getMembers())
				{
					obj = member.getPlayerInstance();

					if (obj == null || obj == player)
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, false))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			// for buff purposes, returns friendly mobs nearby and mob itself
			final L2Npc npc = (L2Npc) activeChar;
			if (npc.getFactionId() == null || npc.getFactionId().isEmpty())
			{
				return new L2Character[] { activeChar };
			}

			targetList.add(activeChar);

			final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();

			for (L2Object newTarget : objs)
			{
				if (newTarget instanceof L2Npc && npc.getFactionId().equals(((L2Npc) newTarget).getFactionId()))
				{
					if (!Util.checkIfInRange(skill.getCastRange(), activeChar, newTarget, true))
						continue;

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add((L2Npc) newTarget);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetClan


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] {player};

			final int radius = skill.getSkillRadius();

			if (L2Skill.addSummon(activeChar, player, radius, true))
				targetList.add(player.getPet());

			if (player.getClan() != null)
			{
				// Get all visible objects in a spherical area near the L2Character
				final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
				//synchronized (activeChar.getKnownList().getKnownObjects())
				{
					for (L2PcInstance obj : objs)
					{
						if (obj == null)
							continue;
						if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId())
								&& (obj.getClan() == null || obj.getClanId() != player.getClanId()))
							continue;

						if (player.isInDuel())
						{
							if (player.getDuelId() != obj.getDuelId())
								continue;
							if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
								continue;
						}

						// Don't add this target if this is a Pc->Pc pvp
						// casting and pvp condition not met
						if (!player.checkPvpSkill(obj, skill))
							continue;

						if (!TvTEvent.checkForTvTSkill(player, obj, skill))
							continue;

						if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, true))
							targetList.add(obj.getPet());

						if (!L2Skill.addCharacter(activeChar, obj, radius, true))
							continue;

						// Siege battlefield resurrect has been made possible for participants
						if (skill.getSkillType() == L2SkillType.RESURRECT)
						{
							if (obj.isInsideZone(L2Character.ZONE_SIEGE) && !obj.isInSiege())
								continue;
						}

						if (onlyFirst)
							return new L2Character[] { obj };

						if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
							break;

						targetList.add(obj);
					}
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] {player};

			final int radius = skill.getSkillRadius();

			if (L2Skill.addSummon(activeChar, player, radius, true))
				targetList.add(player.getPet());

			if (player.getClan() != null)
			{
				// Get all visible objects in a spherical area near the L2Character
				final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
				//synchronized (activeChar.getKnownList().getKnownObjects())
				{
					for (L2PcInstance obj : objs)
					{
						if (obj == null)
							continue;
						if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId())
								&& (obj.getClan() == null || obj.getClanId() != player.getClanId()))
							continue;

						if (player.isInDuel())
						{
							if (player.getDuelId() != obj.getDuelId())
								continue;
							if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
								continue;
						}

						// Don't add this target if this is a Pc->Pc pvp
						// casting and pvp condition not met
						if (!player.checkPvpSkill(obj, skill))
							continue;

						if (!TvTEvent.checkForTvTSkill(player, obj, skill))
							continue;

						if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, true))
							targetList.add(obj.getPet());

						if (!L2Skill.addCharacter(activeChar, obj, radius, true))
							continue;

						// Siege battlefield resurrect has been made possible for participants
						if (skill.getSkillType() == L2SkillType.RESURRECT)
						{
							if (obj.isInsideZone(L2Character.ZONE_SIEGE) && !obj.isInSiege())
								continue;
						}

						if (onlyFirst)
							return new L2Character[] { obj };

						if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
							break;

						targetList.add(obj);
					}
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetCorpseAlly