|
@@ -18,23 +18,22 @@
|
|
|
*/
|
|
|
package com.l2jserver.gameserver.instancemanager;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
-
|
|
|
import com.l2jserver.commons.database.ConnectionFactory;
|
|
|
import com.l2jserver.gameserver.InstanceListManager;
|
|
|
import com.l2jserver.gameserver.model.L2Clan;
|
|
|
import com.l2jserver.gameserver.model.L2Object;
|
|
|
import com.l2jserver.gameserver.model.entity.Fort;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.concurrent.CopyOnWriteArrayList;
|
|
|
|
|
|
public final class FortManager implements InstanceListManager {
|
|
|
|
|
|
private static final Logger LOG = LoggerFactory.getLogger(FortManager.class);
|
|
|
|
|
|
- private final List<Fort> _forts = new ArrayList<>();
|
|
|
+ private final List<Fort> _forts = new CopyOnWriteArrayList<>();
|
|
|
|
|
|
public int findNearestFortIndex(L2Object obj) {
|
|
|
return findNearestFortIndex(obj, Long.MAX_VALUE);
|