Removed stream usage from BlockActions effect.

This commit is contained in:
MobiusDevelopment
2023-01-08 11:51:53 +00:00
parent 8226d405fc
commit 003a68a7e1
52 changed files with 572 additions and 234 deletions

View File

@@ -5574,12 +5574,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
return _effectList.hasAbnormalType(abnormalType);
}
public void addBlockActionsAllowedSkill(int skillId)
public void addBlockActionsAllowedSkill(Integer skillId)
{
_blockActionsAllowedSkills.computeIfAbsent(skillId, k -> new AtomicInteger()).incrementAndGet();
}
public void removeBlockActionsAllowedSkill(int skillId)
public void removeBlockActionsAllowedSkill(Integer skillId)
{
_blockActionsAllowedSkills.computeIfPresent(skillId, (k, v) -> v.decrementAndGet() != 0 ? v : null);
}