Removed stream usage from OpTargetWeaponAttackTypeSkillCondition.
This commit is contained in:
parent
574f536495
commit
796ca24552
@ -50,8 +50,23 @@ public class OpTargetWeaponAttackTypeSkillCondition implements ISkillCondition
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
|
||||
final Creature targetCreature = (Creature) target;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user