Fixed Refined Ring of Core usage.
This commit is contained in:
@ -192,7 +192,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
private boolean _isFlying = false;
|
||||
|
||||
private boolean _blockActions = false;
|
||||
private volatile Map<Integer, AtomicInteger> _blockActionsAllowedSkills;
|
||||
private volatile Map<Integer, AtomicInteger> _blockActionsAllowedSkills = new ConcurrentHashMap<>();
|
||||
|
||||
private CharStat _stat;
|
||||
private CharStatus _status;
|
||||
@ -5197,30 +5197,17 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
public void addBlockActionsAllowedSkill(int skillId)
|
||||
{
|
||||
if (_blockActionsAllowedSkills == null)
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (_blockActionsAllowedSkills == null)
|
||||
{
|
||||
_blockActionsAllowedSkills = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
_blockActionsAllowedSkills.computeIfAbsent(skillId, k -> new AtomicInteger()).incrementAndGet();
|
||||
}
|
||||
|
||||
public void removeBlockActionsAllowedSkill(int skillId)
|
||||
{
|
||||
if (_blockActionsAllowedSkills != null)
|
||||
{
|
||||
_blockActionsAllowedSkills.computeIfPresent(skillId, (k, v) -> v.decrementAndGet() != 0 ? v : null);
|
||||
}
|
||||
_blockActionsAllowedSkills.computeIfPresent(skillId, (k, v) -> v.decrementAndGet() != 0 ? v : null);
|
||||
}
|
||||
|
||||
public boolean isBlockedActionsAllowedSkill(Skill skill)
|
||||
{
|
||||
return (_blockActionsAllowedSkills != null) && _blockActionsAllowedSkills.containsKey(skill.getId());
|
||||
return _blockActionsAllowedSkills.containsKey(skill.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +56,8 @@ public enum EffectFlag
|
||||
PROTECT_DEATH_PENALTY,
|
||||
CHAT_BLOCK,
|
||||
FAKE_DEATH,
|
||||
DUELIST_FURY;
|
||||
DUELIST_FURY,
|
||||
FEAR;
|
||||
|
||||
public long getMask()
|
||||
{
|
||||
|
Reference in New Issue
Block a user