Removed Stream usage from Creature.
This commit is contained in:
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2885,7 +2885,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3896,9 +3903,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
@@ -2885,7 +2885,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3896,9 +3903,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2885,7 +2885,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3896,9 +3903,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2899,7 +2899,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3910,9 +3917,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2899,7 +2899,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3910,9 +3917,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2898,7 +2898,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3909,9 +3916,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2886,7 +2886,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3897,9 +3904,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2901,7 +2901,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3919,9 +3926,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
+13
-2
@@ -2908,7 +2908,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
public boolean isCastingNow(Predicate<SkillCaster> filter)
|
||||||
{
|
{
|
||||||
return _skillCasters.values().stream().anyMatch(filter);
|
for (SkillCaster skillCaster : _skillCasters.values())
|
||||||
|
{
|
||||||
|
if (filter.test(skillCaster))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3926,9 +3933,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
private void onAttackFinish(Attack attack)
|
private void onAttackFinish(Attack attack)
|
||||||
{
|
{
|
||||||
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
// Recharge any active auto-soulshot tasks for current creature after the attack has successfully hit.
|
||||||
if (attack.getHits().stream().anyMatch(h -> !h.isMiss()))
|
for (Hit hit : attack.getHits())
|
||||||
|
{
|
||||||
|
if (!hit.isMiss())
|
||||||
{
|
{
|
||||||
rechargeShots(true, false, false);
|
rechargeShots(true, false, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify that this character is ready to act for the next attack
|
// Notify that this character is ready to act for the next attack
|
||||||
|
|||||||
Reference in New Issue
Block a user