Removed stream usage from OpTargetArmorTypeSkillCondition.
This commit is contained in:
parent
18ff6082be
commit
53ce9b5233
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.skillconditionhandlers;
|
package handlers.skillconditionhandlers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.StatSet;
|
import org.l2jmobius.gameserver.model.StatSet;
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
import org.l2jmobius.gameserver.model.WorldObject;
|
||||||
@ -35,14 +36,17 @@ import org.l2jmobius.gameserver.model.skill.Skill;
|
|||||||
*/
|
*/
|
||||||
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
public class OpTargetArmorTypeSkillCondition implements ISkillCondition
|
||||||
{
|
{
|
||||||
private final List<ArmorType> _armorTypes = new ArrayList<>();
|
private final Set<ArmorType> _armorTypes = EnumSet.noneOf(ArmorType.class);
|
||||||
|
|
||||||
public OpTargetArmorTypeSkillCondition(StatSet params)
|
public OpTargetArmorTypeSkillCondition(StatSet params)
|
||||||
{
|
{
|
||||||
final List<String> armorTypes = params.getList("armorType", String.class);
|
final List<String> armorTypes = params.getList("armorType", String.class);
|
||||||
if (armorTypes != null)
|
if (armorTypes != null)
|
||||||
{
|
{
|
||||||
armorTypes.stream().map(ArmorType::valueOf).forEach(_armorTypes::add);
|
for (String type : armorTypes)
|
||||||
|
{
|
||||||
|
_armorTypes.add(ArmorType.valueOf(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user