Removed stream usage from OpTargetWeaponAttackTypeSkillCondition.
This commit is contained in:
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Creature targetCreature = (Creature) target;
|
final Creature targetCreature = (Creature) target;
|
||||||
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
final Weapon weapon = targetCreature.getActiveWeaponItem();
|
||||||
return _weaponTypes.stream().anyMatch(weaponType -> weaponType == weapon.getItemType());
|
if (weapon == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final WeaponType equippedType = weapon.getItemType();
|
||||||
|
for (WeaponType weaponType : _weaponTypes)
|
||||||
|
{
|
||||||
|
if (weaponType == equippedType)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user