Removed another duplicate contains method.
This commit is contained in:
@@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.holders.DropHolder;
|
|||||||
import com.l2jmobius.gameserver.model.holders.MinionHolder;
|
import com.l2jmobius.gameserver.model.holders.MinionHolder;
|
||||||
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
import com.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||||
import com.l2jmobius.gameserver.util.Util;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NPC data parser.
|
* NPC data parser.
|
||||||
@@ -771,7 +770,7 @@ public class NpcData implements IGameXmlReader
|
|||||||
*/
|
*/
|
||||||
public List<L2NpcTemplate> getAllNpcOfClassType(String... classTypes)
|
public List<L2NpcTemplate> getAllNpcOfClassType(String... classTypes)
|
||||||
{
|
{
|
||||||
return getTemplates(template -> Util.contains(classTypes, template.getType(), true));
|
return getTemplates(template -> CommonUtil.contains(classTypes, template.getType(), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadNpcsSkillLearn()
|
public void loadNpcsSkillLearn()
|
||||||
|
@@ -991,24 +991,6 @@ public final class Util
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array - the array to look into
|
|
||||||
* @param obj - the object to search for
|
|
||||||
* @param ignoreCase
|
|
||||||
* @return {@code true} if the {@code array} contains the {@code obj}, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public static boolean contains(String[] array, String obj, boolean ignoreCase)
|
|
||||||
{
|
|
||||||
for (String element : array)
|
|
||||||
{
|
|
||||||
if (element.equals(obj) || (ignoreCase && element.equalsIgnoreCase(obj)))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int parseNextInt(StringTokenizer st, int defaultVal)
|
public static int parseNextInt(StringTokenizer st, int defaultVal)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
Reference in New Issue
Block a user