diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/CharEffectList.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/CharEffectList.java index 67d786e931..de027352eb 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/CharEffectList.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/CharEffectList.java @@ -666,7 +666,7 @@ public final class CharEffectList * @param info * @param removed */ - private void removeActive(BuffInfo info, boolean removed) + private synchronized void removeActive(BuffInfo info, boolean removed) { if (_actives != null) { @@ -741,7 +741,7 @@ public final class CharEffectList updateEffectList(true); } - private void addActive(BuffInfo info) + private synchronized void addActive(BuffInfo info) { final Skill skill = info.getSkill(); @@ -796,13 +796,7 @@ public final class CharEffectList // Initialize if (_actives == null) { - synchronized (this) - { - if (_actives == null) - { - _actives = new ConcurrentLinkedQueue<>(); - } - } + _actives = new ConcurrentLinkedQueue<>(); } // Manage effect stacking. diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/CharEffectList.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/CharEffectList.java index 67d786e931..de027352eb 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/CharEffectList.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/CharEffectList.java @@ -666,7 +666,7 @@ public final class CharEffectList * @param info * @param removed */ - private void removeActive(BuffInfo info, boolean removed) + private synchronized void removeActive(BuffInfo info, boolean removed) { if (_actives != null) { @@ -741,7 +741,7 @@ public final class CharEffectList updateEffectList(true); } - private void addActive(BuffInfo info) + private synchronized void addActive(BuffInfo info) { final Skill skill = info.getSkill(); @@ -796,13 +796,7 @@ public final class CharEffectList // Initialize if (_actives == null) { - synchronized (this) - { - if (_actives == null) - { - _actives = new ConcurrentLinkedQueue<>(); - } - } + _actives = new ConcurrentLinkedQueue<>(); } // Manage effect stacking. diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/CharEffectList.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/CharEffectList.java index 67d786e931..de027352eb 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/CharEffectList.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/CharEffectList.java @@ -666,7 +666,7 @@ public final class CharEffectList * @param info * @param removed */ - private void removeActive(BuffInfo info, boolean removed) + private synchronized void removeActive(BuffInfo info, boolean removed) { if (_actives != null) { @@ -741,7 +741,7 @@ public final class CharEffectList updateEffectList(true); } - private void addActive(BuffInfo info) + private synchronized void addActive(BuffInfo info) { final Skill skill = info.getSkill(); @@ -796,13 +796,7 @@ public final class CharEffectList // Initialize if (_actives == null) { - synchronized (this) - { - if (_actives == null) - { - _actives = new ConcurrentLinkedQueue<>(); - } - } + _actives = new ConcurrentLinkedQueue<>(); } // Manage effect stacking. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/CharEffectList.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/CharEffectList.java index 67d786e931..de027352eb 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/CharEffectList.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/CharEffectList.java @@ -666,7 +666,7 @@ public final class CharEffectList * @param info * @param removed */ - private void removeActive(BuffInfo info, boolean removed) + private synchronized void removeActive(BuffInfo info, boolean removed) { if (_actives != null) { @@ -741,7 +741,7 @@ public final class CharEffectList updateEffectList(true); } - private void addActive(BuffInfo info) + private synchronized void addActive(BuffInfo info) { final Skill skill = info.getSkill(); @@ -796,13 +796,7 @@ public final class CharEffectList // Initialize if (_actives == null) { - synchronized (this) - { - if (_actives == null) - { - _actives = new ConcurrentLinkedQueue<>(); - } - } + _actives = new ConcurrentLinkedQueue<>(); } // Manage effect stacking.