Explorar el Código

FastList #3 - split concurrent modifications with shared() - atomic insert/remove, safe slower iteration. shared() will not make it 100% safe..
For now used in CharEffectList only.

JIV hace 15 años
padre
commit
af4b9c7a41

+ 2 - 2
L2_GameServer/java/com/l2jserver/gameserver/model/CharEffectList.java

@@ -724,7 +724,7 @@ public class CharEffectList
 
 		if (newSkill.isDebuff())
 		{
-			if (_debuffs == null) _debuffs = new FastList<L2Effect>();
+			if (_debuffs == null) _debuffs = new FastList<L2Effect>().shared();
 			for (L2Effect e : _debuffs)
 			{
 				if (e != null
@@ -742,7 +742,7 @@ public class CharEffectList
 		}
 		else
 		{
-			if (_buffs == null) _buffs = new FastList<L2Effect>();
+			if (_buffs == null) _buffs = new FastList<L2Effect>().shared();
 
 			for (L2Effect e : _buffs)
 			{

BIN
L2_GameServer/lib/javolution-5.5.1.jar