-Dropped Javolution.
-Removal of Q00344_1000YearsTheEndOfLamentation. -Fixed starting conditions for Q00144_PailakaInjuredDragon. -Fixed starting conditions for last Seven Sign quests. -Added missing MonasteryOfSilence.xml instance spawns and doors. -Removed many catacomb spawns.
This commit is contained in:
@ -22,6 +22,8 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
@ -29,9 +31,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
@ -75,8 +74,8 @@ public class AutoSpawnHandler
|
||||
|
||||
protected AutoSpawnHandler()
|
||||
{
|
||||
_registeredSpawns = new FastMap<>();
|
||||
_runningSpawns = new FastMap<>();
|
||||
_registeredSpawns = new HashMap<>();
|
||||
_runningSpawns = new HashMap<>();
|
||||
|
||||
restoreSpawnData();
|
||||
}
|
||||
@ -111,8 +110,8 @@ public class AutoSpawnHandler
|
||||
}
|
||||
|
||||
// create clean list
|
||||
_registeredSpawns = new FastMap<>();
|
||||
_runningSpawns = new FastMap<>();
|
||||
_registeredSpawns = new HashMap<>();
|
||||
_runningSpawns = new HashMap<>();
|
||||
|
||||
// load
|
||||
restoreSpawnData();
|
||||
@ -372,7 +371,7 @@ public class AutoSpawnHandler
|
||||
|
||||
public Map<Integer, AutoSpawnInstance> getAutoSpawnInstances(int npcId)
|
||||
{
|
||||
Map<Integer, AutoSpawnInstance> spawnInstList = new FastMap<>();
|
||||
Map<Integer, AutoSpawnInstance> spawnInstList = new HashMap<>();
|
||||
|
||||
for (AutoSpawnInstance spawnInst : _registeredSpawns.values())
|
||||
{
|
||||
@ -606,9 +605,9 @@ public class AutoSpawnHandler
|
||||
|
||||
protected int _lastLocIndex = -1;
|
||||
|
||||
private final List<L2Npc> _npcList = new FastList<>();
|
||||
private final List<L2Npc> _npcList = new ArrayList<>();
|
||||
|
||||
private final List<Location> _locList = new FastList<>();
|
||||
private final List<Location> _locList = new ArrayList<>();
|
||||
|
||||
private boolean _spawnActive;
|
||||
|
||||
@ -693,7 +692,7 @@ public class AutoSpawnHandler
|
||||
|
||||
public L2Spawn[] getSpawns()
|
||||
{
|
||||
List<L2Spawn> npcSpawns = new FastList<>();
|
||||
List<L2Spawn> npcSpawns = new ArrayList<>();
|
||||
|
||||
for (L2Npc npcInst : _npcList)
|
||||
{
|
||||
|
@ -31,8 +31,6 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
@ -65,17 +63,17 @@ public final class CharEffectList
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(CharEffectList.class.getName());
|
||||
/** Map containing all effects from buffs for this effect list. */
|
||||
private volatile FastMap<Integer, BuffInfo> _buffs;
|
||||
private volatile ConcurrentHashMap<Integer, BuffInfo> _buffs;
|
||||
/** Map containing all triggered skills for this effect list. */
|
||||
private volatile FastMap<Integer, BuffInfo> _triggered;
|
||||
private volatile ConcurrentHashMap<Integer, BuffInfo> _triggered;
|
||||
/** Map containing all dances/songs for this effect list. */
|
||||
private volatile FastMap<Integer, BuffInfo> _dances;
|
||||
private volatile ConcurrentHashMap<Integer, BuffInfo> _dances;
|
||||
/** Map containing all toggle for this effect list. */
|
||||
private volatile FastMap<Integer, BuffInfo> _toggles;
|
||||
private volatile ConcurrentHashMap<Integer, BuffInfo> _toggles;
|
||||
/** Map containing all debuffs for this effect list. */
|
||||
private volatile FastMap<Integer, BuffInfo> _debuffs;
|
||||
private volatile ConcurrentHashMap<Integer, BuffInfo> _debuffs;
|
||||
/** They bypass most of the actions, they are not included in most operations. */
|
||||
private volatile FastMap<Integer, BuffInfo> _passives;
|
||||
private volatile ConcurrentHashMap<Integer, BuffInfo> _passives;
|
||||
/** Map containing the all stacked effect in progress for each abnormal type. */
|
||||
private volatile Map<AbnormalType, BuffInfo> _stackedEffects;
|
||||
/** Set containing all abnormal types that shouldn't be added to this creature effect list. */
|
||||
@ -118,8 +116,7 @@ public final class CharEffectList
|
||||
{
|
||||
if (_buffs == null)
|
||||
{
|
||||
_buffs = new FastMap<>();
|
||||
_buffs.shared();
|
||||
_buffs = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -138,8 +135,7 @@ public final class CharEffectList
|
||||
{
|
||||
if (_triggered == null)
|
||||
{
|
||||
_triggered = new FastMap<>();
|
||||
_triggered.shared();
|
||||
_triggered = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -158,8 +154,7 @@ public final class CharEffectList
|
||||
{
|
||||
if (_dances == null)
|
||||
{
|
||||
_dances = new FastMap<>();
|
||||
_dances.shared();
|
||||
_dances = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -178,8 +173,7 @@ public final class CharEffectList
|
||||
{
|
||||
if (_toggles == null)
|
||||
{
|
||||
_toggles = new FastMap<>();
|
||||
_toggles.shared();
|
||||
_toggles = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -198,8 +192,7 @@ public final class CharEffectList
|
||||
{
|
||||
if (_debuffs == null)
|
||||
{
|
||||
_debuffs = new FastMap<>();
|
||||
_debuffs.shared();
|
||||
_debuffs = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -218,8 +211,7 @@ public final class CharEffectList
|
||||
{
|
||||
if (_passives == null)
|
||||
{
|
||||
_passives = new FastMap<>();
|
||||
_passives.shared();
|
||||
_passives = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,16 +22,15 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.communitybbs.BB.Forum;
|
||||
@ -110,7 +109,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
private String _name;
|
||||
private int _clanId;
|
||||
private L2ClanMember _leader;
|
||||
private final Map<Integer, L2ClanMember> _members = new FastMap<>();
|
||||
private final Map<Integer, L2ClanMember> _members = new HashMap<>();
|
||||
|
||||
private String _allyName;
|
||||
private int _allyId;
|
||||
@ -131,16 +130,16 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
private int _bloodOathCount;
|
||||
|
||||
private final ItemContainer _warehouse = new ClanWarehouse(this);
|
||||
private final List<Integer> _atWarWith = new FastList<>();
|
||||
private final List<Integer> _atWarAttackers = new FastList<>();
|
||||
private final List<Integer> _atWarWith = new ArrayList<>();
|
||||
private final List<Integer> _atWarAttackers = new ArrayList<>();
|
||||
|
||||
private Forum _forum;
|
||||
|
||||
/** FastMap(Integer, L2Skill) containing all skills of the L2Clan */
|
||||
private final Map<Integer, Skill> _skills = new FastMap<>();
|
||||
private final Map<Integer, RankPrivs> _privs = new FastMap<>();
|
||||
private final Map<Integer, SubPledge> _subPledges = new FastMap<>();
|
||||
private final Map<Integer, Skill> _subPledgeSkills = new FastMap<>();
|
||||
/** HashMap(Integer, L2Skill) containing all skills of the L2Clan */
|
||||
private final Map<Integer, Skill> _skills = new HashMap<>();
|
||||
private final Map<Integer, RankPrivs> _privs = new HashMap<>();
|
||||
private final Map<Integer, SubPledge> _subPledges = new HashMap<>();
|
||||
private final Map<Integer, Skill> _subPledgeSkills = new HashMap<>();
|
||||
|
||||
private int _reputationScore = 0;
|
||||
private int _rank = 0;
|
||||
@ -610,9 +609,9 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
* @param exclude the object Id to exclude from list.
|
||||
* @return all online members excluding the one with object id {code exclude}.
|
||||
*/
|
||||
public FastList<L2PcInstance> getOnlineMembers(int exclude)
|
||||
public ArrayList<L2PcInstance> getOnlineMembers(int exclude)
|
||||
{
|
||||
final FastList<L2PcInstance> onlineMembers = new FastList<>();
|
||||
final ArrayList<L2PcInstance> onlineMembers = new ArrayList<>();
|
||||
for (L2ClanMember temp : _members.values())
|
||||
{
|
||||
if ((temp != null) && temp.isOnline() && (temp.getObjectId() != exclude))
|
||||
@ -1712,7 +1711,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
private final int _id;
|
||||
private String _subPledgeName;
|
||||
private int _leaderId;
|
||||
private final Map<Integer, Skill> _subPledgeSkills = new FastMap<>();
|
||||
private final Map<Integer, Skill> _subPledgeSkills = new HashMap<>();
|
||||
|
||||
public SubPledge(int id, String name, int leaderId)
|
||||
{
|
||||
@ -2991,7 +2990,7 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
|
||||
public SubPledgeSkill[] getAllSubSkills()
|
||||
{
|
||||
FastList<SubPledgeSkill> list = FastList.newInstance();
|
||||
final ArrayList<SubPledgeSkill> list = new ArrayList<>();
|
||||
for (Skill skill : _subPledgeSkills.values())
|
||||
{
|
||||
list.add(new SubPledgeSkill(0, skill.getId(), skill.getLevel()));
|
||||
@ -3004,7 +3003,6 @@ public class L2Clan implements IIdentifiable, INamable
|
||||
}
|
||||
}
|
||||
SubPledgeSkill[] result = list.toArray(new SubPledgeSkill[list.size()]);
|
||||
FastList.recycle(list);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,9 @@
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.function.Function;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@ -50,7 +49,7 @@ public class L2CommandChannel extends AbstractPlayerGroup
|
||||
{
|
||||
_commandLeader = leader;
|
||||
L2Party party = leader.getParty();
|
||||
_parties = new FastList<L2Party>().shared();
|
||||
_parties = new CopyOnWriteArrayList<>();
|
||||
_parties.add(party);
|
||||
_channelLvl = party.getLevel();
|
||||
party.setCommandChannel(this);
|
||||
@ -164,7 +163,7 @@ public class L2CommandChannel extends AbstractPlayerGroup
|
||||
@Override
|
||||
public List<L2PcInstance> getMembers()
|
||||
{
|
||||
List<L2PcInstance> members = new FastList<L2PcInstance>().shared();
|
||||
List<L2PcInstance> members = new CopyOnWriteArrayList<>();
|
||||
for (L2Party party : getPartys())
|
||||
{
|
||||
members.addAll(party.getMembers());
|
||||
|
@ -22,11 +22,10 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@ -53,7 +52,7 @@ public class L2ContactList
|
||||
public L2ContactList(L2PcInstance player)
|
||||
{
|
||||
activeChar = player;
|
||||
_contacts = new FastList<String>().shared();
|
||||
_contacts = new CopyOnWriteArrayList<>();
|
||||
restore();
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,9 @@
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
import com.l2jserver.gameserver.enums.ShotType;
|
||||
import com.l2jserver.gameserver.handler.ActionHandler;
|
||||
@ -531,7 +530,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
||||
{
|
||||
if (_scripts == null)
|
||||
{
|
||||
_scripts = new FastMap<String, Object>().shared();
|
||||
_scripts = new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,12 +26,11 @@ import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -84,7 +83,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
private static final Duration PARTY_POSITION_BROADCAST_INTERVAL = Duration.ofSeconds(12);
|
||||
private static final Duration PARTY_DISTRIBUTION_TYPE_REQUEST_TIMEOUT = Duration.ofSeconds(15);
|
||||
|
||||
private final FastList<L2PcInstance> _members;
|
||||
private final CopyOnWriteArrayList<L2PcInstance> _members;
|
||||
private boolean _pendingInvitation = false;
|
||||
private long _pendingInviteTimeout;
|
||||
private int _partyLvl = 0;
|
||||
@ -117,7 +116,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
*/
|
||||
public L2Party(L2PcInstance leader, PartyDistributionType partyDistributionType)
|
||||
{
|
||||
_members = new FastList<L2PcInstance>().shared();
|
||||
_members = new CopyOnWriteArrayList<>();
|
||||
_members.add(leader);
|
||||
_partyLvl = leader.getLevel();
|
||||
_distributionType = partyDistributionType;
|
||||
@ -161,7 +160,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
*/
|
||||
private L2PcInstance getCheckedRandomMember(int itemId, L2Character target)
|
||||
{
|
||||
List<L2PcInstance> availableMembers = new FastList<>();
|
||||
List<L2PcInstance> availableMembers = new ArrayList<>();
|
||||
for (L2PcInstance member : getMembers())
|
||||
{
|
||||
if (member.getInventory().validateCapacityByItemId(itemId) && Util.checkIfInRange(Config.ALT_PARTY_RANGE2, target, member, true))
|
||||
@ -365,8 +364,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
|
||||
if (_positionBroadcastTask == null)
|
||||
{
|
||||
_positionBroadcastTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(() ->
|
||||
{
|
||||
_positionBroadcastTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(() -> {
|
||||
if (_positionPacket == null)
|
||||
{
|
||||
_positionPacket = new PartyMemberPosition(this);
|
||||
@ -432,8 +430,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
{
|
||||
// Otherwise, delete the old sign, and apply it to the new target
|
||||
_tacticalSigns.replace(tacticalSignId, target);
|
||||
getMembers().forEach(m ->
|
||||
{
|
||||
getMembers().forEach(m -> {
|
||||
m.sendPacket(new ExTacticalSign(tacticalTarget, 0));
|
||||
m.sendPacket(new ExTacticalSign(target, tacticalSignId));
|
||||
});
|
||||
@ -774,7 +771,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
|
||||
// Check the number of party members that must be rewarded
|
||||
// (The party member must be in range to receive its reward)
|
||||
List<L2PcInstance> ToReward = FastList.newInstance();
|
||||
List<L2PcInstance> ToReward = new ArrayList<>();
|
||||
for (L2PcInstance member : membersList)
|
||||
{
|
||||
if (!Util.checkIfInRange(Config.ALT_PARTY_RANGE2, target, member, true))
|
||||
@ -797,8 +794,6 @@ public class L2Party extends AbstractPlayerGroup
|
||||
{
|
||||
member.addAdena("Party", count, player, true);
|
||||
}
|
||||
|
||||
FastList.recycle((FastList<?>) ToReward);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1049,7 +1044,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
{
|
||||
try
|
||||
{
|
||||
return _members.getFirst();
|
||||
return _members.get(0);
|
||||
}
|
||||
catch (NoSuchElementException e)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.RadarControl;
|
||||
@ -29,12 +29,12 @@ import com.l2jserver.gameserver.network.serverpackets.RadarControl;
|
||||
public final class L2Radar
|
||||
{
|
||||
private final L2PcInstance _player;
|
||||
private final FastList<RadarMarker> _markers;
|
||||
private final ArrayList<RadarMarker> _markers;
|
||||
|
||||
public L2Radar(L2PcInstance player)
|
||||
{
|
||||
_player = player;
|
||||
_markers = new FastList<>();
|
||||
_markers = new ArrayList<>();
|
||||
}
|
||||
|
||||
// Add a marker to player's radar
|
||||
|
@ -18,17 +18,16 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.enums.SiegeClanType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
|
||||
public class L2SiegeClan
|
||||
{
|
||||
private int _clanId = 0;
|
||||
private List<L2Npc> _flag = new FastList<>();
|
||||
private List<L2Npc> _flag = new ArrayList<>();
|
||||
private int _numFlagsAdded = 0;
|
||||
private SiegeClanType _type;
|
||||
|
||||
@ -88,7 +87,7 @@ public class L2SiegeClan
|
||||
{
|
||||
if (_flag == null)
|
||||
{
|
||||
_flag = new FastList<>();
|
||||
_flag = new ArrayList<>();
|
||||
}
|
||||
return _flag;
|
||||
}
|
||||
|
@ -19,14 +19,13 @@
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -80,8 +79,9 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
private boolean _doRespawn;
|
||||
/** If true then spawn is custom */
|
||||
private boolean _customSpawn;
|
||||
private static List<SpawnListener> _spawnListeners = new FastList<>();
|
||||
private final FastList<L2Npc> _spawnedNpcs = new FastList<>();
|
||||
private static List<SpawnListener> _spawnListeners = new ArrayList<>();
|
||||
private final ArrayList<L2Npc> _spawnedNpcs = new ArrayList<>();
|
||||
private L2Npc _lastSpawn;
|
||||
private Map<Integer, Location> _lastSpawnPoints;
|
||||
private boolean _isNoRndWalk = false; // Is no random walk
|
||||
|
||||
@ -675,6 +675,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
notifyNpcSpawned(mob);
|
||||
|
||||
_spawnedNpcs.add(mob);
|
||||
_lastSpawn = mob;
|
||||
if (_lastSpawnPoints != null)
|
||||
{
|
||||
_lastSpawnPoints.put(mob.getObjectId(), new Location(newlocx, newlocy, newlocz));
|
||||
@ -777,15 +778,10 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
|
||||
public L2Npc getLastSpawn()
|
||||
{
|
||||
if (!_spawnedNpcs.isEmpty())
|
||||
{
|
||||
return _spawnedNpcs.getLast();
|
||||
}
|
||||
|
||||
return null;
|
||||
return _lastSpawn;
|
||||
}
|
||||
|
||||
public final FastList<L2Npc> getSpawnedNpcs()
|
||||
public final ArrayList<L2Npc> getSpawnedNpcs()
|
||||
{
|
||||
return _spawnedNpcs;
|
||||
}
|
||||
|
@ -18,11 +18,10 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.util.Rnd;
|
||||
|
||||
/**
|
||||
@ -59,7 +58,7 @@ public class L2Territory
|
||||
|
||||
public L2Territory(int terr)
|
||||
{
|
||||
_points = new FastList<>();
|
||||
_points = new ArrayList<>();
|
||||
_terr = terr;
|
||||
_xMin = 999999;
|
||||
_xMax = -999999;
|
||||
|
@ -446,10 +446,10 @@ public final class L2World
|
||||
return null;
|
||||
}
|
||||
|
||||
// Create an FastList in order to contain all visible L2Object
|
||||
// Create an ArrayList in order to contain all visible L2Object
|
||||
List<L2Object> result = new ArrayList<>();
|
||||
|
||||
// Go through the FastList of region
|
||||
// Go through the ArrayList of region
|
||||
for (L2WorldRegion regi : reg.getSurroundingRegions())
|
||||
{
|
||||
// Go through visible objects of the selected region
|
||||
@ -488,10 +488,10 @@ public final class L2World
|
||||
|
||||
final int sqRadius = radius * radius;
|
||||
|
||||
// Create an FastList in order to contain all visible L2Object
|
||||
// Create an ArrayList in order to contain all visible L2Object
|
||||
List<L2Object> result = new ArrayList<>();
|
||||
|
||||
// Go through the FastList of region
|
||||
// Go through the ArrayList of region
|
||||
for (L2WorldRegion regi : object.getWorldRegion().getSurroundingRegions())
|
||||
{
|
||||
// Go through visible objects of the selected region
|
||||
@ -529,7 +529,7 @@ public final class L2World
|
||||
|
||||
final int sqRadius = radius * radius;
|
||||
|
||||
// Create an FastList in order to contain all visible L2Object
|
||||
// Create an ArrayList in order to contain all visible L2Object
|
||||
List<L2Object> result = new ArrayList<>();
|
||||
|
||||
// Go through visible object of the selected region
|
||||
@ -567,10 +567,10 @@ public final class L2World
|
||||
return null;
|
||||
}
|
||||
|
||||
// Create an FastList in order to contain all visible L2Object
|
||||
// Create an ArrayList in order to contain all visible L2Object
|
||||
List<L2Playable> result = new ArrayList<>();
|
||||
|
||||
// Go through the FastList of region
|
||||
// Go through the ArrayList of region
|
||||
for (L2WorldRegion regi : reg.getSurroundingRegions())
|
||||
{
|
||||
// Create an Iterator to go through the visible L2Object of the L2WorldRegion
|
||||
|
@ -22,12 +22,10 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.datatables.SpawnTable;
|
||||
@ -58,8 +56,8 @@ public final class L2WorldRegion
|
||||
|
||||
public L2WorldRegion(int pTileX, int pTileY)
|
||||
{
|
||||
_allPlayable = new FastMap<Integer, L2Playable>().shared();
|
||||
_visibleObjects = new FastMap<Integer, L2Object>().shared();
|
||||
_allPlayable = new ConcurrentHashMap<>();
|
||||
_visibleObjects = new ConcurrentHashMap<>();
|
||||
_surroundingRegions = new ArrayList<>();
|
||||
|
||||
_tileX = pTileX;
|
||||
@ -67,7 +65,7 @@ public final class L2WorldRegion
|
||||
|
||||
// default a newly initialized region to inactive, unless always on is specified
|
||||
_active = Config.GRIDS_ALWAYS_ON;
|
||||
_zones = new FastList<>();
|
||||
_zones = new ArrayList<>();
|
||||
}
|
||||
|
||||
public List<L2ZoneType> getZones()
|
||||
@ -456,7 +454,7 @@ public final class L2WorldRegion
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the FastList _surroundingRegions containing all L2WorldRegion around the current L2WorldRegion
|
||||
* @return the ArrayList _surroundingRegions containing all L2WorldRegion around the current L2WorldRegion
|
||||
*/
|
||||
public List<L2WorldRegion> getSurroundingRegions()
|
||||
{
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.ai.L2ControllableMobAI;
|
||||
import com.l2jserver.gameserver.datatables.SpawnTable;
|
||||
@ -68,7 +67,7 @@ public final class MobGroup
|
||||
{
|
||||
if (_mobs == null)
|
||||
{
|
||||
_mobs = new FastList<>();
|
||||
_mobs = new ArrayList<>();
|
||||
}
|
||||
|
||||
return _mobs;
|
||||
@ -370,7 +369,7 @@ public final class MobGroup
|
||||
|
||||
protected void removeDead()
|
||||
{
|
||||
List<L2ControllableMobInstance> deadMobs = new FastList<>();
|
||||
List<L2ControllableMobInstance> deadMobs = new ArrayList<>();
|
||||
|
||||
for (L2ControllableMobInstance mobInst : getMobs())
|
||||
{
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2ControllableMobInstance;
|
||||
|
||||
/**
|
||||
@ -36,7 +35,7 @@ public class MobGroupTable
|
||||
|
||||
protected MobGroupTable()
|
||||
{
|
||||
_groupMap = new FastMap<>();
|
||||
_groupMap = new HashMap<>();
|
||||
}
|
||||
|
||||
public static MobGroupTable getInstance()
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExClosePartyRoom;
|
||||
@ -36,7 +35,7 @@ public class PartyMatchRoomList
|
||||
|
||||
protected PartyMatchRoomList()
|
||||
{
|
||||
_rooms = new FastMap<>();
|
||||
_rooms = new HashMap<>();
|
||||
}
|
||||
|
||||
public synchronized void addPartyMatchRoom(int id, PartyMatchRoom room)
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
@ -33,7 +32,7 @@ public class PartyMatchWaitingList
|
||||
|
||||
protected PartyMatchWaitingList()
|
||||
{
|
||||
_members = new FastList<>();
|
||||
_members = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void addPlayer(L2PcInstance player)
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.enums.PetitionState;
|
||||
import com.l2jserver.gameserver.enums.PetitionType;
|
||||
import com.l2jserver.gameserver.idfactory.IdFactory;
|
||||
@ -44,7 +43,7 @@ public final class Petition
|
||||
private final PetitionType _type;
|
||||
private PetitionState _state = PetitionState.PENDING;
|
||||
private final String _content;
|
||||
private final List<CreatureSay> _messageLog = new FastList<>();
|
||||
private final List<CreatureSay> _messageLog = new ArrayList<>();
|
||||
private final L2PcInstance _petitioner;
|
||||
private L2PcInstance _responder;
|
||||
|
||||
|
@ -21,13 +21,12 @@ package com.l2jserver.gameserver.model;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.gameserver.model.holders.MinionHolder;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.model.interfaces.IParserAdvUtils;
|
||||
@ -48,7 +47,7 @@ public class StatsSet implements IParserAdvUtils
|
||||
|
||||
public StatsSet()
|
||||
{
|
||||
this(new FastMap<String, Object>());
|
||||
this(new HashMap<String, Object>());
|
||||
}
|
||||
|
||||
public StatsSet(Map<String, Object> map)
|
||||
|
@ -20,12 +20,11 @@ package com.l2jserver.gameserver.model;
|
||||
|
||||
import static com.l2jserver.gameserver.model.itemcontainer.Inventory.MAX_ADENA;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastSet;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@ -59,7 +58,7 @@ public class TradeList
|
||||
|
||||
public TradeList(L2PcInstance owner)
|
||||
{
|
||||
_items = new FastList<>();
|
||||
_items = new ArrayList<>();
|
||||
_owner = owner;
|
||||
}
|
||||
|
||||
@ -123,7 +122,7 @@ public class TradeList
|
||||
*/
|
||||
public TradeItem[] getAvailableItems(PcInventory inventory)
|
||||
{
|
||||
FastList<TradeItem> list = FastList.newInstance();
|
||||
final ArrayList<TradeItem> list = new ArrayList<>();
|
||||
for (TradeItem item : _items)
|
||||
{
|
||||
int el[] = new int[6];
|
||||
@ -135,8 +134,7 @@ public class TradeList
|
||||
inventory.adjustAvailableItem(item);
|
||||
list.add(item);
|
||||
}
|
||||
TradeItem[] result = list.toArray(new TradeItem[list.size()]);
|
||||
FastList.recycle(list);
|
||||
final TradeItem[] result = list.toArray(new TradeItem[list.size()]);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -685,7 +683,7 @@ public class TradeList
|
||||
* @param items
|
||||
* @return int: result of trading. 0 - ok, 1 - canceled (no adena), 2 - failed (item error)
|
||||
*/
|
||||
public synchronized int privateStoreBuy(L2PcInstance player, FastSet<ItemRequest> items)
|
||||
public synchronized int privateStoreBuy(L2PcInstance player, HashSet<ItemRequest> items)
|
||||
{
|
||||
if (_locked)
|
||||
{
|
||||
|
@ -40,10 +40,6 @@ import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
import javolution.util.WeakFastSet;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.GeoData;
|
||||
@ -220,7 +216,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
/** Table of Calculators containing all used calculator */
|
||||
private Calculator[] _calculators;
|
||||
/** Map containing all skills of this character. */
|
||||
private final Map<Integer, Skill> _skills = new FastMap<Integer, Skill>().shared();
|
||||
private final Map<Integer, Skill> _skills = new ConcurrentHashMap<>();
|
||||
/** Map containing the skill reuse time stamps. */
|
||||
private volatile Map<Integer, TimeStamp> _reuseTimeStampsSkills = null;
|
||||
/** Map containing the item reuse time stamps. */
|
||||
@ -2699,7 +2695,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
if (_attackByList == null)
|
||||
{
|
||||
_attackByList = new WeakFastSet<>(true);
|
||||
_attackByList = new HashSet<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4315,8 +4311,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
if (distFraction > 1)
|
||||
{
|
||||
ThreadPoolManager.getInstance().executeAi(() ->
|
||||
{
|
||||
ThreadPoolManager.getInstance().executeAi(() -> {
|
||||
try
|
||||
{
|
||||
if (Config.MOVE_BASED_KNOWNLIST)
|
||||
@ -5605,7 +5600,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
int _skiprange = 0;
|
||||
int _skipgeo = 0;
|
||||
int _skippeace = 0;
|
||||
List<L2Character> targetList = new FastList<>(targets.length);
|
||||
List<L2Character> targetList = new ArrayList<>(targets.length);
|
||||
for (L2Object target : targets)
|
||||
{
|
||||
if (target instanceof L2Character)
|
||||
|
@ -18,13 +18,12 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.actor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -54,7 +53,7 @@ import com.l2jserver.gameserver.util.Util;
|
||||
public abstract class L2Vehicle extends L2Character
|
||||
{
|
||||
protected int _dockId = 0;
|
||||
protected final FastList<L2PcInstance> _passengers = new FastList<>();
|
||||
protected final ArrayList<L2PcInstance> _passengers = new ArrayList<>();
|
||||
protected Location _oustLoc = null;
|
||||
private Runnable _engine = null;
|
||||
|
||||
|
@ -22,12 +22,11 @@ import static com.l2jserver.gameserver.model.itemcontainer.Inventory.MAX_ADENA;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
import com.l2jserver.gameserver.instancemanager.ClanHallAuctionManager;
|
||||
@ -47,7 +46,7 @@ public final class L2AuctioneerInstance extends L2Npc
|
||||
private static final int COND_BUSY_BECAUSE_OF_SIEGE = 1;
|
||||
private static final int COND_REGULAR = 3;
|
||||
|
||||
private final Map<Integer, Auction> _pendingAuctions = new FastMap<>();
|
||||
private final Map<Integer, Auction> _pendingAuctions = new HashMap<>();
|
||||
|
||||
public L2AuctioneerInstance(int objectId, L2NpcTemplate template)
|
||||
{
|
||||
|
@ -18,11 +18,10 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
@ -86,7 +85,7 @@ public class L2ControlTowerInstance extends L2Tower
|
||||
{
|
||||
if (_guards == null)
|
||||
{
|
||||
_guards = new FastList<>();
|
||||
_guards = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,13 +18,12 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.ai.L2CharacterAI;
|
||||
import com.l2jserver.gameserver.ai.L2DoorAI;
|
||||
@ -612,7 +611,7 @@ public class L2DoorInstance extends L2Character
|
||||
|
||||
public Collection<L2DefenderInstance> getKnownDefenders()
|
||||
{
|
||||
FastList<L2DefenderInstance> result = new FastList<>();
|
||||
ArrayList<L2DefenderInstance> result = new ArrayList<>();
|
||||
|
||||
Collection<L2Object> objs = getKnownList().getKnownObjects().values();
|
||||
for (L2Object obj : objs)
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.actor.instance;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -124,7 +124,7 @@ public class L2FortCommanderInstance extends L2DefenderInstance
|
||||
L2Spawn spawn = getSpawn();
|
||||
if ((spawn != null) && canTalk())
|
||||
{
|
||||
FastList<FortSiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(getFort().getResidenceId());
|
||||
ArrayList<FortSiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(getFort().getResidenceId());
|
||||
for (FortSiegeSpawn spawn2 : commanders)
|
||||
{
|
||||
if (spawn2.getId() == spawn.getId())
|
||||
|
@ -39,6 +39,8 @@ import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentSkipListMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -46,10 +48,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
import javolution.util.FastSet;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
@ -410,7 +408,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_POINTS";
|
||||
|
||||
private final List<IEventListener> _eventListeners = new FastList<IEventListener>().shared();
|
||||
private final List<IEventListener> _eventListeners = new CopyOnWriteArrayList<>();
|
||||
|
||||
public class AIAccessor extends L2Character.AIAccessor
|
||||
{
|
||||
@ -522,7 +520,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
private int _bookmarkslot = 0; // The Teleport Bookmark Slot
|
||||
|
||||
private final Map<Integer, TeleportBookmark> _tpbookmarks = new FastMap<>();
|
||||
private final Map<Integer, TeleportBookmark> _tpbookmarks = new HashMap<>();
|
||||
|
||||
private boolean _canFeed;
|
||||
private boolean _isInSiege;
|
||||
@ -563,11 +561,11 @@ public final class L2PcInstance extends L2Playable
|
||||
private Transform _transformation;
|
||||
|
||||
/** The table containing all L2RecipeList of the L2PcInstance */
|
||||
private final Map<Integer, L2RecipeList> _dwarvenRecipeBook = new FastMap<>();
|
||||
private final Map<Integer, L2RecipeList> _commonRecipeBook = new FastMap<>();
|
||||
private final Map<Integer, L2RecipeList> _dwarvenRecipeBook = new HashMap<>();
|
||||
private final Map<Integer, L2RecipeList> _commonRecipeBook = new HashMap<>();
|
||||
|
||||
/** Premium Items */
|
||||
private final Map<Integer, L2PremiumItem> _premiumItems = new FastMap<>();
|
||||
private final Map<Integer, L2PremiumItem> _premiumItems = new HashMap<>();
|
||||
|
||||
/** True if the L2PcInstance is sitting */
|
||||
private boolean _waitTypeSitting;
|
||||
@ -625,7 +623,7 @@ public final class L2PcInstance extends L2Playable
|
||||
private int _questNpcObject = 0;
|
||||
|
||||
/** The table containing all Quests began by the L2PcInstance */
|
||||
private final Map<String, QuestState> _quests = new FastMap<>();
|
||||
private final Map<String, QuestState> _quests = new HashMap<>();
|
||||
|
||||
/** The list containing all shortCuts of this player. */
|
||||
private final ShortCuts _shortCuts = new ShortCuts(this);
|
||||
@ -633,8 +631,8 @@ public final class L2PcInstance extends L2Playable
|
||||
/** The list containing all macros of this player. */
|
||||
private final MacroList _macros = new MacroList(this);
|
||||
|
||||
private final List<L2PcInstance> _snoopListener = new FastList<>();
|
||||
private final List<L2PcInstance> _snoopedPlayer = new FastList<>();
|
||||
private final List<L2PcInstance> _snoopListener = new ArrayList<>();
|
||||
private final List<L2PcInstance> _snoopedPlayer = new ArrayList<>();
|
||||
|
||||
// hennas
|
||||
private final L2Henna[] _henna = new L2Henna[3];
|
||||
@ -753,7 +751,7 @@ public final class L2PcInstance extends L2Playable
|
||||
/** The fists L2Weapon of the L2PcInstance (used when no weapon is equipped) */
|
||||
private L2Weapon _fistsWeaponItem;
|
||||
|
||||
private final Map<Integer, String> _chars = new FastMap<>();
|
||||
private final Map<Integer, String> _chars = new HashMap<>();
|
||||
|
||||
// private byte _updateKnownCounter = 0;
|
||||
|
||||
@ -779,7 +777,7 @@ public final class L2PcInstance extends L2Playable
|
||||
/** Player's cubics. */
|
||||
private final Map<Integer, L2CubicInstance> _cubics = new ConcurrentSkipListMap<>();
|
||||
/** Active shots. */
|
||||
protected FastSet<Integer> _activeSoulShots = new FastSet<Integer>().shared();
|
||||
protected CopyOnWriteArraySet<Integer> _activeSoulShots = new CopyOnWriteArraySet<>();
|
||||
|
||||
public final ReentrantLock soulShotLock = new ReentrantLock();
|
||||
|
||||
@ -1574,7 +1572,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_notifyQuestOfDeathList == null)
|
||||
{
|
||||
_notifyQuestOfDeathList = new FastList<>();
|
||||
_notifyQuestOfDeathList = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5958,7 +5956,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_tamedBeast == null)
|
||||
{
|
||||
_tamedBeast = new FastList<>();
|
||||
_tamedBeast = new ArrayList<>();
|
||||
}
|
||||
_tamedBeast.add(tamedBeast);
|
||||
}
|
||||
@ -10539,7 +10537,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_subClasses == null)
|
||||
{
|
||||
_subClasses = new FastMap<>();
|
||||
_subClasses = new HashMap<>();
|
||||
}
|
||||
|
||||
return _subClasses;
|
||||
@ -14601,7 +14599,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_customSkills == null)
|
||||
{
|
||||
_customSkills = new FastMap<Integer, Skill>().shared();
|
||||
_customSkills = new ConcurrentHashMap<>();
|
||||
}
|
||||
_customSkills.put(skill.getDisplayId(), skill);
|
||||
}
|
||||
|
@ -21,13 +21,12 @@ package com.l2jserver.gameserver.model.actor.instance;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -1031,7 +1030,7 @@ public class L2PetInstance extends L2Summon
|
||||
|
||||
int buff_index = 0;
|
||||
|
||||
final List<Integer> storedSkills = new FastList<>();
|
||||
final List<Integer> storedSkills = new ArrayList<>();
|
||||
|
||||
// Store all effect data along with calculated remaining
|
||||
if (storeEffects)
|
||||
@ -1077,7 +1076,7 @@ public class L2PetInstance extends L2Summon
|
||||
|
||||
if (!SummonEffectsTable.getInstance().getPetEffects().containsKey(getControlObjectId()))
|
||||
{
|
||||
SummonEffectsTable.getInstance().getPetEffects().put(getControlObjectId(), new FastList<SummonEffect>());
|
||||
SummonEffectsTable.getInstance().getPetEffects().put(getControlObjectId(), new ArrayList<SummonEffect>());
|
||||
}
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().get(getControlObjectId()).add(SummonEffectsTable.getInstance().new SummonEffect(skill, info.getTime()));
|
||||
@ -1116,7 +1115,7 @@ public class L2PetInstance extends L2Summon
|
||||
{
|
||||
if (!SummonEffectsTable.getInstance().getPetEffects().containsKey(getControlObjectId()))
|
||||
{
|
||||
SummonEffectsTable.getInstance().getPetEffects().put(getControlObjectId(), new FastList<SummonEffect>());
|
||||
SummonEffectsTable.getInstance().getPetEffects().put(getControlObjectId(), new ArrayList<SummonEffect>());
|
||||
}
|
||||
|
||||
SummonEffectsTable.getInstance().getPetEffects().get(getControlObjectId()).add(SummonEffectsTable.getInstance().new SummonEffect(skill, effectCurTime));
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.MonsterRace;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
@ -101,8 +100,8 @@ public class L2RaceManagerInstance extends L2Npc
|
||||
{
|
||||
_notInitialized = false;
|
||||
|
||||
// _history = new FastList<>();
|
||||
_managers = new FastList<>();
|
||||
// _history = new ArrayList<>();
|
||||
_managers = new ArrayList<>();
|
||||
|
||||
ThreadPoolManager s = ThreadPoolManager.getInstance();
|
||||
s.scheduleGeneralAtFixedRate(new Announcement(SystemMessageId.TICKETS_ARE_NOW_AVAILABLE_FOR_MONSTER_RACE_S1), 0, 10 * MINUTE);
|
||||
|
@ -21,6 +21,7 @@ package com.l2jserver.gameserver.model.actor.instance;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -28,8 +29,6 @@ import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -299,7 +298,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
|
||||
int buff_index = 0;
|
||||
|
||||
final List<Integer> storedSkills = new FastList<>();
|
||||
final List<Integer> storedSkills = new ArrayList<>();
|
||||
|
||||
// Store all effect data along with calculated remaining
|
||||
if (storeEffects)
|
||||
@ -358,7 +357,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
}
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffects(getOwner()).containsKey(getReferenceSkill()))
|
||||
{
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).put(getReferenceSkill(), new FastList<SummonEffect>());
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).put(getReferenceSkill(), new ArrayList<SummonEffect>());
|
||||
}
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(SummonEffectsTable.getInstance().new SummonEffect(skill, info.getTime()));
|
||||
@ -414,7 +413,7 @@ public class L2ServitorInstance extends L2Summon implements Runnable
|
||||
}
|
||||
if (!SummonEffectsTable.getInstance().getServitorEffects(getOwner()).containsKey(getReferenceSkill()))
|
||||
{
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).put(getReferenceSkill(), new FastList<SummonEffect>());
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).put(getReferenceSkill(), new ArrayList<SummonEffect>());
|
||||
}
|
||||
|
||||
SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(SummonEffectsTable.getInstance().new SummonEffect(skill, effectCurTime));
|
||||
|
@ -20,11 +20,10 @@ package com.l2jserver.gameserver.model.actor.instance;
|
||||
|
||||
import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
@ -206,7 +205,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance
|
||||
{
|
||||
if (_beastSkills == null)
|
||||
{
|
||||
_beastSkills = new FastList<>();
|
||||
_beastSkills = new ArrayList<>();
|
||||
}
|
||||
_beastSkills.add(skill);
|
||||
}
|
||||
|
@ -25,8 +25,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
@ -208,7 +206,7 @@ public class CharKnownList extends ObjectKnownList
|
||||
|
||||
public Collection<L2Character> getKnownCharacters()
|
||||
{
|
||||
FastList<L2Character> result = new FastList<>();
|
||||
ArrayList<L2Character> result = new ArrayList<>();
|
||||
|
||||
final Collection<L2Object> objs = getKnownObjects().values();
|
||||
for (L2Object obj : objs)
|
||||
|
@ -19,12 +19,11 @@
|
||||
package com.l2jserver.gameserver.model.actor.status;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastSet;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
@ -109,7 +108,7 @@ public class CharStatus
|
||||
{
|
||||
if (_StatusListener == null)
|
||||
{
|
||||
_StatusListener = new FastSet<L2Character>().shared();
|
||||
_StatusListener = new CopyOnWriteArraySet<>();
|
||||
}
|
||||
return _StatusListener;
|
||||
}
|
||||
|
@ -25,12 +25,11 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
@ -62,7 +61,7 @@ public class Auction
|
||||
private long _currentBid = 0;
|
||||
private long _startingBid = 0;
|
||||
|
||||
private final Map<Integer, Bidder> _bidders = new FastMap<>();
|
||||
private final Map<Integer, Bidder> _bidders = new HashMap<>();
|
||||
|
||||
private static final String[] ItemTypeName =
|
||||
{
|
||||
|
@ -18,14 +18,13 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
@ -64,15 +63,15 @@ public final class BlockCheckerEngine
|
||||
// The object which holds all basic members info
|
||||
protected ArenaParticipantsHolder _holder;
|
||||
// Maps to hold player of each team and his points
|
||||
protected FastMap<L2PcInstance, Integer> _redTeamPoints = new FastMap<>();
|
||||
protected FastMap<L2PcInstance, Integer> _blueTeamPoints = new FastMap<>();
|
||||
protected HashMap<L2PcInstance, Integer> _redTeamPoints = new HashMap<>();
|
||||
protected HashMap<L2PcInstance, Integer> _blueTeamPoints = new HashMap<>();
|
||||
// The initial points of the event
|
||||
protected int _redPoints = 15;
|
||||
protected int _bluePoints = 15;
|
||||
// Current used arena
|
||||
protected int _arena = -1;
|
||||
// All blocks
|
||||
protected FastList<L2Spawn> _spawns = new FastList<>();
|
||||
protected ArrayList<L2Spawn> _spawns = new ArrayList<>();
|
||||
// Sets if the red team won the event at the end of this (used for packets)
|
||||
protected boolean _isRedWinner;
|
||||
// Time when the event starts. Used on packet sending
|
||||
@ -121,7 +120,7 @@ public final class BlockCheckerEngine
|
||||
// Common z coordinate
|
||||
private static final int _zCoord = -2405;
|
||||
// List of dropped items in event (for later deletion)
|
||||
protected FastList<L2ItemInstance> _drops = new FastList<>();
|
||||
protected ArrayList<L2ItemInstance> _drops = new ArrayList<>();
|
||||
// Default arena
|
||||
private static final byte DEFAULT_ARENA = -1;
|
||||
// Event is started
|
||||
@ -662,7 +661,7 @@ public final class BlockCheckerEngine
|
||||
*/
|
||||
private void rewardAsWinner(boolean isRed)
|
||||
{
|
||||
FastMap<L2PcInstance, Integer> tempPoints = isRed ? _redTeamPoints : _blueTeamPoints;
|
||||
HashMap<L2PcInstance, Integer> tempPoints = isRed ? _redTeamPoints : _blueTeamPoints;
|
||||
|
||||
// Main give
|
||||
for (Entry<L2PcInstance, Integer> points : tempPoints.entrySet())
|
||||
@ -719,7 +718,7 @@ public final class BlockCheckerEngine
|
||||
*/
|
||||
private void rewardAsLooser(boolean isRed)
|
||||
{
|
||||
FastMap<L2PcInstance, Integer> tempPoints = isRed ? _redTeamPoints : _blueTeamPoints;
|
||||
HashMap<L2PcInstance, Integer> tempPoints = isRed ? _redTeamPoints : _blueTeamPoints;
|
||||
|
||||
for (Entry<L2PcInstance, Integer> entry : tempPoints.entrySet())
|
||||
{
|
||||
|
@ -23,14 +23,13 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -244,7 +243,7 @@ public final class Castle extends AbstractResidence
|
||||
{
|
||||
super(castleId);
|
||||
load();
|
||||
_function = new FastMap<>();
|
||||
_function = new HashMap<>();
|
||||
initResidenceZone();
|
||||
spawnSideNpcs();
|
||||
if (getOwnerId() != 0)
|
||||
|
@ -22,12 +22,11 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
@ -213,7 +212,7 @@ public abstract class ClanHall
|
||||
_ownerId = set.getInt("ownerId");
|
||||
_desc = set.getString("desc");
|
||||
_location = set.getString("location");
|
||||
_functions = new FastMap<>();
|
||||
_functions = new HashMap<>();
|
||||
|
||||
if (_ownerId > 0)
|
||||
{
|
||||
|
@ -18,13 +18,12 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.enums.DuelResult;
|
||||
@ -83,7 +82,7 @@ public class Duel
|
||||
_duelEndTime.add(Calendar.SECOND, 120);
|
||||
}
|
||||
|
||||
_playerConditions = new FastList<>();
|
||||
_playerConditions = new ArrayList<>();
|
||||
|
||||
setFinished(false);
|
||||
|
||||
@ -108,7 +107,7 @@ public class Duel
|
||||
private double _cp;
|
||||
private boolean _paDuel;
|
||||
private int _x, _y, _z;
|
||||
private FastList<Skill> _debuffs;
|
||||
private ArrayList<Skill> _debuffs;
|
||||
|
||||
public PlayerCondition(L2PcInstance player, boolean partyDuel)
|
||||
{
|
||||
@ -160,7 +159,7 @@ public class Duel
|
||||
{
|
||||
if (_debuffs == null)
|
||||
{
|
||||
_debuffs = new FastList<>();
|
||||
_debuffs = new ArrayList<>();
|
||||
}
|
||||
|
||||
_debuffs.add(debuff);
|
||||
|
@ -33,9 +33,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.FortUpdater;
|
||||
@ -81,14 +78,14 @@ public final class Fort extends AbstractResidence
|
||||
private int _state = 0;
|
||||
private int _castleId = 0;
|
||||
private int _supplyLvL = 0;
|
||||
private final FastMap<Integer, FortFunction> _function;
|
||||
private final HashMap<Integer, FortFunction> _function;
|
||||
private final ScheduledFuture<?>[] _FortUpdater = new ScheduledFuture<?>[2];
|
||||
|
||||
// Spawn Data
|
||||
private boolean _isSuspiciousMerchantSpawned = false;
|
||||
private final FastList<L2Spawn> _siegeNpcs = new FastList<>();
|
||||
private final FastList<L2Spawn> _npcCommanders = new FastList<>();
|
||||
private final FastList<L2Spawn> _specialEnvoys = new FastList<>();
|
||||
private final ArrayList<L2Spawn> _siegeNpcs = new ArrayList<>();
|
||||
private final ArrayList<L2Spawn> _npcCommanders = new ArrayList<>();
|
||||
private final ArrayList<L2Spawn> _specialEnvoys = new ArrayList<>();
|
||||
|
||||
private final Map<Integer, Integer> _envoyCastles = new HashMap<>(2);
|
||||
private final Set<Integer> _availableCastles = new HashSet<>(1);
|
||||
@ -247,7 +244,7 @@ public final class Fort extends AbstractResidence
|
||||
super(fortId);
|
||||
load();
|
||||
loadFlagPoles();
|
||||
_function = new FastMap<>();
|
||||
_function = new HashMap<>();
|
||||
if (getOwnerClan() != null)
|
||||
{
|
||||
setVisibleFlag(true);
|
||||
|
@ -21,14 +21,13 @@ package com.l2jserver.gameserver.model.entity;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -227,10 +226,10 @@ public class FortSiege implements Siegable
|
||||
}
|
||||
}
|
||||
|
||||
private final List<L2SiegeClan> _attackerClans = new FastList<>();
|
||||
private final List<L2SiegeClan> _attackerClans = new ArrayList<>();
|
||||
|
||||
// Fort setting
|
||||
protected FastList<L2Spawn> _commanders = new FastList<>();
|
||||
protected ArrayList<L2Spawn> _commanders = new ArrayList<>();
|
||||
protected final Fort _fort;
|
||||
private boolean _isInProgress = false;
|
||||
private FortSiegeGuardManager _siegeGuardManager;
|
||||
@ -553,7 +552,7 @@ public class FortSiege implements Siegable
|
||||
@Override
|
||||
public List<L2PcInstance> getAttackersInZone()
|
||||
{
|
||||
List<L2PcInstance> players = new FastList<>();
|
||||
List<L2PcInstance> players = new ArrayList<>();
|
||||
L2Clan clan;
|
||||
for (L2SiegeClan siegeclan : getAttackerClans())
|
||||
{
|
||||
@ -587,7 +586,7 @@ public class FortSiege implements Siegable
|
||||
*/
|
||||
public List<L2PcInstance> getOwnersInZone()
|
||||
{
|
||||
List<L2PcInstance> players = new FastList<>();
|
||||
List<L2PcInstance> players = new ArrayList<>();
|
||||
L2Clan clan;
|
||||
if (getFort().getOwnerClan() != null)
|
||||
{
|
||||
@ -625,7 +624,7 @@ public class FortSiege implements Siegable
|
||||
L2Spawn spawn = instance.getSpawn();
|
||||
if (spawn != null)
|
||||
{
|
||||
FastList<FortSiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(getFort().getResidenceId());
|
||||
ArrayList<FortSiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(getFort().getResidenceId());
|
||||
for (FortSiegeSpawn spawn2 : commanders)
|
||||
{
|
||||
if (spawn2.getId() == spawn.getId())
|
||||
|
@ -24,18 +24,17 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.cache.HtmCache;
|
||||
@ -77,14 +76,14 @@ public class Hero
|
||||
// delete hero items
|
||||
private static final String DELETE_ITEMS = "DELETE FROM items WHERE item_id IN (6842, 6611, 6612, 6613, 6614, 6615, 6616, 6617, 6618, 6619, 6620, 6621, 9388, 9389, 9390) AND owner_id NOT IN (SELECT charId FROM characters WHERE accesslevel > 0)";
|
||||
|
||||
private static final Map<Integer, StatsSet> _heroes = new FastMap<>();
|
||||
private static final Map<Integer, StatsSet> _completeHeroes = new FastMap<>();
|
||||
private static final Map<Integer, StatsSet> _heroes = new HashMap<>();
|
||||
private static final Map<Integer, StatsSet> _completeHeroes = new HashMap<>();
|
||||
|
||||
private static final Map<Integer, StatsSet> _herocounts = new FastMap<>();
|
||||
private static final Map<Integer, List<StatsSet>> _herofights = new FastMap<>();
|
||||
private static final Map<Integer, StatsSet> _herocounts = new HashMap<>();
|
||||
private static final Map<Integer, List<StatsSet>> _herofights = new HashMap<>();
|
||||
|
||||
private static final Map<Integer, List<StatsSet>> _herodiary = new FastMap<>();
|
||||
private static final Map<Integer, String> _heroMessage = new FastMap<>();
|
||||
private static final Map<Integer, List<StatsSet>> _herodiary = new HashMap<>();
|
||||
private static final Map<Integer, String> _heroMessage = new HashMap<>();
|
||||
|
||||
public static final String COUNT = "count";
|
||||
public static final String PLAYED = "played";
|
||||
@ -235,7 +234,7 @@ public class Hero
|
||||
|
||||
public void loadDiary(int charId)
|
||||
{
|
||||
final List<StatsSet> _diary = new FastList<>();
|
||||
final List<StatsSet> _diary = new ArrayList<>();
|
||||
int diaryentries = 0;
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT * FROM heroes_diary WHERE charId=? ORDER BY time ASC"))
|
||||
@ -290,7 +289,7 @@ public class Hero
|
||||
|
||||
public void loadFights(int charId)
|
||||
{
|
||||
final List<StatsSet> _fights = new FastList<>();
|
||||
final List<StatsSet> _fights = new ArrayList<>();
|
||||
StatsSet _herocountdata = new StatsSet();
|
||||
Calendar _data = Calendar.getInstance();
|
||||
_data.set(Calendar.DAY_OF_MONTH, 1);
|
||||
@ -464,7 +463,7 @@ public class Hero
|
||||
|
||||
if (!_mainlist.isEmpty())
|
||||
{
|
||||
FastList<StatsSet> _list = FastList.newInstance();
|
||||
final ArrayList<StatsSet> _list = new ArrayList<>();
|
||||
_list.addAll(_mainlist);
|
||||
Collections.reverse(_list);
|
||||
|
||||
@ -516,8 +515,6 @@ public class Hero
|
||||
}
|
||||
|
||||
DiaryReply.replace("%list%", fList.toString());
|
||||
|
||||
FastList.recycle(_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -671,7 +668,7 @@ public class Hero
|
||||
return;
|
||||
}
|
||||
|
||||
Map<Integer, StatsSet> heroes = new FastMap<>();
|
||||
Map<Integer, StatsSet> heroes = new HashMap<>();
|
||||
|
||||
for (StatsSet hero : newHeroes)
|
||||
{
|
||||
|
@ -28,15 +28,13 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
@ -82,8 +80,8 @@ public final class Instance
|
||||
private int _ejectTime = Config.EJECT_DEAD_PLAYER_TIME;
|
||||
/** Allow random walk for NPCs, global parameter. */
|
||||
private boolean _allowRandomWalk = true;
|
||||
private final List<Integer> _players = new FastList<Integer>().shared();
|
||||
private final List<L2Npc> _npcs = new FastList<L2Npc>().shared();
|
||||
private final List<Integer> _players = new CopyOnWriteArrayList<>();
|
||||
private final List<L2Npc> _npcs = new CopyOnWriteArrayList<>();
|
||||
private final Map<Integer, L2DoorInstance> _doors = new ConcurrentHashMap<>();
|
||||
private final Map<String, List<L2Spawn>> _manualSpawn = new HashMap<>();
|
||||
private Location _spawnLoc = null;
|
||||
@ -104,7 +102,7 @@ public final class Instance
|
||||
private final List<Integer> _exceptionList = new ArrayList<>();
|
||||
|
||||
protected ScheduledFuture<?> _checkTimeUpTask = null;
|
||||
protected final Map<Integer, ScheduledFuture<?>> _ejectDeadTasks = new FastMap<>();
|
||||
protected final Map<Integer, ScheduledFuture<?>> _ejectDeadTasks = new HashMap<>();
|
||||
|
||||
public Instance(int id)
|
||||
{
|
||||
|
@ -31,9 +31,6 @@ import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.cache.HtmCache;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
@ -61,12 +58,12 @@ public class L2Event
|
||||
public static String _eventCreator = "";
|
||||
public static String _eventInfo = "";
|
||||
public static int _teamsNumber = 0;
|
||||
public static final Map<Integer, String> _teamNames = new FastMap<>();
|
||||
public static final List<L2PcInstance> _registeredPlayers = new FastList<>();
|
||||
public static final Map<Integer, List<L2PcInstance>> _teams = new FastMap<>();
|
||||
public static final Map<Integer, String> _teamNames = new HashMap<>();
|
||||
public static final List<L2PcInstance> _registeredPlayers = new ArrayList<>();
|
||||
public static final Map<Integer, List<L2PcInstance>> _teams = new HashMap<>();
|
||||
public static int _npcId = 0;
|
||||
// public static final List<L2Npc> _npcs = new FastList<L2Npc>();
|
||||
private static final Map<L2PcInstance, PlayerEventHolder> _connectionLossData = new FastMap<>();
|
||||
// public static final List<L2Npc> _npcs = new ArrayList<L2Npc>();
|
||||
private static final Map<L2PcInstance, PlayerEventHolder> _connectionLossData = new HashMap<>();
|
||||
|
||||
public enum EventState
|
||||
{
|
||||
@ -385,7 +382,7 @@ public class L2Event
|
||||
_eventInfo = br.readLine();
|
||||
}
|
||||
|
||||
List<L2PcInstance> temp = new FastList<>();
|
||||
List<L2PcInstance> temp = new ArrayList<>();
|
||||
for (L2PcInstance player : L2World.getInstance().getPlayers())
|
||||
{
|
||||
if (!player.isOnline())
|
||||
@ -443,7 +440,7 @@ public class L2Event
|
||||
// Insert empty lists at _teams.
|
||||
for (int i = 0; i < _teamsNumber; i++)
|
||||
{
|
||||
_teams.put(i + 1, new FastList<L2PcInstance>());
|
||||
_teams.put(i + 1, new ArrayList<L2PcInstance>());
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
|
@ -31,8 +31,6 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -223,9 +221,9 @@ public class Siege implements Siegable
|
||||
}
|
||||
|
||||
// must support Concurrent Modifications
|
||||
private final List<L2SiegeClan> _attackerClans = new FastList<>();
|
||||
private final List<L2SiegeClan> _defenderClans = new FastList<>();
|
||||
private final List<L2SiegeClan> _defenderWaitingClans = new FastList<>();
|
||||
private final List<L2SiegeClan> _attackerClans = new ArrayList<>();
|
||||
private final List<L2SiegeClan> _defenderClans = new ArrayList<>();
|
||||
private final List<L2SiegeClan> _defenderWaitingClans = new ArrayList<>();
|
||||
|
||||
// Castle setting
|
||||
private final List<L2ControlTowerInstance> _controlTowers = new ArrayList<>();
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.entity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -25,8 +26,6 @@ import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.cache.HtmCache;
|
||||
import com.l2jserver.gameserver.data.xml.impl.DoorData;
|
||||
@ -188,7 +187,7 @@ public class TvTEvent
|
||||
setState(EventState.STARTING);
|
||||
|
||||
// Randomize and balance team distribution
|
||||
Map<Integer, L2PcInstance> allParticipants = new FastMap<>();
|
||||
Map<Integer, L2PcInstance> allParticipants = new HashMap<>();
|
||||
allParticipants.putAll(_teams[0].getParticipatedPlayers());
|
||||
allParticipants.putAll(_teams[1].getParticipatedPlayers());
|
||||
_teams[0].cleanMe();
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.entity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
@ -35,8 +34,8 @@ public class TvTEventTeam
|
||||
private int[] _coordinates = new int[3];
|
||||
/** The points of the team<br> */
|
||||
private short _points;
|
||||
/** Name and instance of all participated players in FastMap<br> */
|
||||
private Map<Integer, L2PcInstance> _participatedPlayers = new FastMap<>();
|
||||
/** Name and instance of all participated players in HashMap<br> */
|
||||
private Map<Integer, L2PcInstance> _participatedPlayers = new HashMap<>();
|
||||
|
||||
/**
|
||||
* C'tor initialize the team<br>
|
||||
@ -98,7 +97,7 @@ public class TvTEventTeam
|
||||
public void cleanMe()
|
||||
{
|
||||
_participatedPlayers.clear();
|
||||
_participatedPlayers = new FastMap<>();
|
||||
_participatedPlayers = new HashMap<>();
|
||||
_points = 0;
|
||||
}
|
||||
|
||||
@ -150,7 +149,7 @@ public class TvTEventTeam
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns name and instance of all participated players in FastMap<br>
|
||||
* Returns name and instance of all participated players in HashMap<br>
|
||||
* <br>
|
||||
* @return Map<String, L2PcInstance>: map of players in this team<br>
|
||||
*/
|
||||
|
@ -21,15 +21,14 @@ package com.l2jserver.gameserver.model.entity.clanhall;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -74,8 +73,8 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
|
||||
protected final Logger _log;
|
||||
|
||||
private final FastMap<Integer, L2SiegeClan> _attackers = new FastMap<>();
|
||||
private FastList<L2Spawn> _guards;
|
||||
private final HashMap<Integer, L2SiegeClan> _attackers = new HashMap<>();
|
||||
private ArrayList<L2Spawn> _guards;
|
||||
|
||||
public SiegableHall _hall;
|
||||
public ScheduledFuture<?> _siegeTask;
|
||||
@ -151,7 +150,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
{
|
||||
if (_guards == null)
|
||||
{
|
||||
_guards = new FastList<>();
|
||||
_guards = new ArrayList<>();
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(SQL_LOAD_GUARDS))
|
||||
{
|
||||
@ -225,7 +224,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
|
||||
// XXX Attacker clans management -----------------------------
|
||||
|
||||
public final FastMap<Integer, L2SiegeClan> getAttackers()
|
||||
public final HashMap<Integer, L2SiegeClan> getAttackers()
|
||||
{
|
||||
return _attackers;
|
||||
}
|
||||
@ -262,7 +261,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
@Override
|
||||
public List<L2SiegeClan> getAttackerClans()
|
||||
{
|
||||
FastList<L2SiegeClan> result = new FastList<>();
|
||||
ArrayList<L2SiegeClan> result = new ArrayList<>();
|
||||
result.addAll(_attackers.values());
|
||||
return result;
|
||||
}
|
||||
@ -271,7 +270,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
public List<L2PcInstance> getAttackersInZone()
|
||||
{
|
||||
final Collection<L2PcInstance> list = _hall.getSiegeZone().getPlayersInside();
|
||||
List<L2PcInstance> attackers = new FastList<>();
|
||||
List<L2PcInstance> attackers = new ArrayList<>();
|
||||
|
||||
for (L2PcInstance pc : list)
|
||||
{
|
||||
|
@ -24,18 +24,18 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastSet;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
@ -143,7 +143,7 @@ public abstract class AbstractScript extends ManagedScript
|
||||
{
|
||||
protected static final Logger _log = Logger.getLogger(AbstractScript.class.getName());
|
||||
private final Map<ListenerRegisterType, Set<Integer>> _registeredIds = new ConcurrentHashMap<>();
|
||||
private final List<AbstractEventListener> _listeners = new FastList<AbstractEventListener>().shared();
|
||||
private final List<AbstractEventListener> _listeners = new CopyOnWriteArrayList<>();
|
||||
|
||||
public AbstractScript()
|
||||
{
|
||||
@ -291,7 +291,7 @@ public abstract class AbstractScript extends ManagedScript
|
||||
{
|
||||
if (!_registeredIds.containsKey(type))
|
||||
{
|
||||
_registeredIds.put(type, new FastSet<Integer>().shared());
|
||||
_registeredIds.put(type, new CopyOnWriteArraySet<Integer>());
|
||||
}
|
||||
_registeredIds.get(type).addAll(ids);
|
||||
}
|
||||
@ -1338,7 +1338,7 @@ public abstract class AbstractScript extends ManagedScript
|
||||
|
||||
if (!_registeredIds.containsKey(registerType))
|
||||
{
|
||||
_registeredIds.put(registerType, new FastSet<Integer>().shared());
|
||||
_registeredIds.put(registerType, new HashSet<Integer>());
|
||||
}
|
||||
_registeredIds.get(registerType).add(id);
|
||||
}
|
||||
@ -1453,7 +1453,7 @@ public abstract class AbstractScript extends ManagedScript
|
||||
}
|
||||
if (!_registeredIds.containsKey(registerType))
|
||||
{
|
||||
_registeredIds.put(registerType, new FastSet<Integer>().shared());
|
||||
_registeredIds.put(registerType, new HashSet<Integer>());
|
||||
}
|
||||
_registeredIds.get(registerType).addAll(ids);
|
||||
}
|
||||
@ -2508,16 +2508,14 @@ public abstract class AbstractScript extends ManagedScript
|
||||
{
|
||||
if (includeCommandChannel && player.getParty().isInCommandChannel())
|
||||
{
|
||||
player.getParty().getCommandChannel().forEachMember(member ->
|
||||
{
|
||||
player.getParty().getCommandChannel().forEachMember(member -> {
|
||||
actionForEachPlayer(member, npc, isSummon);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
else if (includeParty)
|
||||
{
|
||||
player.getParty().forEachMember(member ->
|
||||
{
|
||||
player.getParty().forEachMember(member -> {
|
||||
actionForEachPlayer(member, npc, isSummon);
|
||||
return true;
|
||||
});
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.holders;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@ -69,7 +68,7 @@ public final class PlayerEventHolder
|
||||
_pvpKills = player.getPvpKills();
|
||||
_pkKills = player.getPkKills();
|
||||
_karma = player.getKarma();
|
||||
_kills = new FastList<>();
|
||||
_kills = new ArrayList<>();
|
||||
_sitForced = sitForced;
|
||||
}
|
||||
|
||||
|
@ -18,11 +18,10 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.instancezone;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.entity.Instance;
|
||||
@ -37,7 +36,7 @@ public class InstanceWorld
|
||||
{
|
||||
private int _instanceId;
|
||||
private int _templateId = -1;
|
||||
private final List<Integer> _allowed = new FastList<>();
|
||||
private final List<Integer> _allowed = new ArrayList<>();
|
||||
private final AtomicInteger _status = new AtomicInteger();
|
||||
|
||||
public List<Integer> getAllowed()
|
||||
|
@ -26,8 +26,6 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.data.xml.impl.ArmorSetsData;
|
||||
@ -130,7 +128,7 @@ public abstract class Inventory extends ItemContainer
|
||||
ChangeRecorder(Inventory inventory)
|
||||
{
|
||||
_inventory = inventory;
|
||||
_changed = new FastList<>();
|
||||
_changed = new ArrayList<>();
|
||||
_inventory.addPaperdollListener(this);
|
||||
}
|
||||
|
||||
|
@ -23,11 +23,10 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.GameTimeController;
|
||||
@ -46,7 +45,7 @@ public abstract class ItemContainer
|
||||
{
|
||||
protected static final Logger _log = Logger.getLogger(ItemContainer.class.getName());
|
||||
|
||||
protected final List<L2ItemInstance> _items = new FastList<L2ItemInstance>().shared();
|
||||
protected final List<L2ItemInstance> _items = new CopyOnWriteArrayList<>();
|
||||
|
||||
protected ItemContainer()
|
||||
{
|
||||
|
@ -21,12 +21,11 @@ package com.l2jserver.gameserver.model.itemcontainer;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
@ -141,7 +140,7 @@ public class PcInventory extends Inventory
|
||||
|
||||
public L2ItemInstance[] getUniqueItems(boolean allowAdena, boolean allowAncientAdena, boolean onlyAvailable)
|
||||
{
|
||||
FastList<L2ItemInstance> list = FastList.newInstance();
|
||||
final ArrayList<L2ItemInstance> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if (item == null)
|
||||
@ -172,7 +171,6 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
|
||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
||||
FastList.recycle(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -190,7 +188,7 @@ public class PcInventory extends Inventory
|
||||
|
||||
public L2ItemInstance[] getUniqueItemsByEnchantLevel(boolean allowAdena, boolean allowAncientAdena, boolean onlyAvailable)
|
||||
{
|
||||
FastList<L2ItemInstance> list = FastList.newInstance();
|
||||
final ArrayList<L2ItemInstance> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if (item == null)
|
||||
@ -223,7 +221,6 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
|
||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
||||
FastList.recycle(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -245,7 +242,7 @@ public class PcInventory extends Inventory
|
||||
*/
|
||||
public L2ItemInstance[] getAllItemsByItemId(int itemId, boolean includeEquipped)
|
||||
{
|
||||
FastList<L2ItemInstance> list = FastList.newInstance();
|
||||
final ArrayList<L2ItemInstance> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if (item == null)
|
||||
@ -260,7 +257,6 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
|
||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
||||
FastList.recycle(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -284,7 +280,7 @@ public class PcInventory extends Inventory
|
||||
*/
|
||||
public L2ItemInstance[] getAllItemsByItemId(int itemId, int enchantment, boolean includeEquipped)
|
||||
{
|
||||
FastList<L2ItemInstance> list = FastList.newInstance();
|
||||
final ArrayList<L2ItemInstance> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if (item == null)
|
||||
@ -299,7 +295,6 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
|
||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
||||
FastList.recycle(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -312,7 +307,7 @@ public class PcInventory extends Inventory
|
||||
*/
|
||||
public L2ItemInstance[] getAvailableItems(boolean allowAdena, boolean allowNonTradeable, boolean feightable)
|
||||
{
|
||||
FastList<L2ItemInstance> list = FastList.newInstance();
|
||||
final ArrayList<L2ItemInstance> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if ((item == null) || !item.isAvailable(getOwner(), allowAdena, allowNonTradeable) || !canManipulateWithItemId(item.getId()))
|
||||
@ -333,7 +328,6 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
|
||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
||||
FastList.recycle(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -344,7 +338,7 @@ public class PcInventory extends Inventory
|
||||
*/
|
||||
public L2ItemInstance[] getAugmentedItems()
|
||||
{
|
||||
FastList<L2ItemInstance> list = FastList.newInstance();
|
||||
final ArrayList<L2ItemInstance> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if ((item != null) && item.isAugmented())
|
||||
@ -354,7 +348,6 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
|
||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
||||
FastList.recycle(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -365,7 +358,7 @@ public class PcInventory extends Inventory
|
||||
*/
|
||||
public L2ItemInstance[] getElementItems()
|
||||
{
|
||||
FastList<L2ItemInstance> list = FastList.newInstance();
|
||||
final ArrayList<L2ItemInstance> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if ((item != null) && (item.getElementals() != null))
|
||||
@ -375,7 +368,6 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
|
||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
||||
FastList.recycle(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -387,7 +379,7 @@ public class PcInventory extends Inventory
|
||||
*/
|
||||
public TradeItem[] getAvailableItems(TradeList tradeList)
|
||||
{
|
||||
FastList<TradeItem> list = FastList.newInstance();
|
||||
final ArrayList<TradeItem> list = new ArrayList<>();
|
||||
for (L2ItemInstance item : _items)
|
||||
{
|
||||
if ((item != null) && item.isAvailable(getOwner(), false, false))
|
||||
@ -401,7 +393,6 @@ public class PcInventory extends Inventory
|
||||
}
|
||||
|
||||
TradeItem[] result = list.toArray(new TradeItem[list.size()]);
|
||||
FastList.recycle(list);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -20,8 +20,6 @@ package com.l2jserver.gameserver.model.multisell;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.L2Armor;
|
||||
@ -66,8 +64,8 @@ public class PreparedListContainer extends ListContainer
|
||||
items = player.getInventory().getUniqueItems(false, false, false);
|
||||
}
|
||||
|
||||
// size is not known - using FastList
|
||||
_entries = new FastList<>();
|
||||
// size is not known - using ArrayList
|
||||
_entries = new ArrayList<>();
|
||||
for (L2ItemInstance item : items)
|
||||
{
|
||||
// only do the match up on equippable items that are not currently equipped
|
||||
|
@ -36,9 +36,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -60,7 +57,7 @@ public class Olympiad extends ListenersContainer
|
||||
protected static final Logger _log = Logger.getLogger(Olympiad.class.getName());
|
||||
protected static final Logger _logResults = Logger.getLogger("olympiad");
|
||||
|
||||
private static final Map<Integer, StatsSet> _nobles = new FastMap<>();
|
||||
private static final Map<Integer, StatsSet> _nobles = new HashMap<>();
|
||||
protected static List<StatsSet> _heroesToBe;
|
||||
private static final Map<Integer, Integer> _noblesRank = new HashMap<>();
|
||||
|
||||
@ -877,7 +874,7 @@ public class Olympiad extends ListenersContainer
|
||||
}
|
||||
}
|
||||
|
||||
_heroesToBe = new FastList<>();
|
||||
_heroesToBe = new ArrayList<>();
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement(OLYMPIAD_GET_HEROS))
|
||||
|
@ -21,9 +21,8 @@ package com.l2jserver.gameserver.model.olympiad;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -47,9 +46,9 @@ public class OlympiadManager
|
||||
|
||||
protected OlympiadManager()
|
||||
{
|
||||
_nonClassBasedRegisters = new FastList<Integer>().shared();
|
||||
_classBasedRegisters = new FastMap<Integer, List<Integer>>().shared();
|
||||
_teamsBasedRegisters = new FastList<List<Integer>>().shared();
|
||||
_nonClassBasedRegisters = new CopyOnWriteArrayList<>();
|
||||
_classBasedRegisters = new ConcurrentHashMap<>();
|
||||
_teamsBasedRegisters = new CopyOnWriteArrayList<>();
|
||||
}
|
||||
|
||||
public static final OlympiadManager getInstance()
|
||||
@ -81,7 +80,7 @@ public class OlympiadManager
|
||||
{
|
||||
if (result == null)
|
||||
{
|
||||
result = new FastList<>();
|
||||
result = new ArrayList<>();
|
||||
}
|
||||
|
||||
result.add(classList.getValue());
|
||||
@ -258,7 +257,7 @@ public class OlympiadManager
|
||||
}
|
||||
else
|
||||
{
|
||||
classed = new FastList<Integer>().shared();
|
||||
classed = new CopyOnWriteArrayList<>();
|
||||
classed.add(charId);
|
||||
_classBasedRegisters.put(player.getBaseClass(), classed);
|
||||
}
|
||||
|
@ -221,8 +221,8 @@ public final class QuestState
|
||||
* <ul>
|
||||
* <li>Initialize class variable "vars" if is null.</li>
|
||||
* <li>Initialize parameter "val" if is null</li>
|
||||
* <li>Add/Update couple (var,val) in class variable FastMap "vars"</li>
|
||||
* <li>If the key represented by "var" exists in FastMap "vars", the couple (var,val) is updated in the database.<br>
|
||||
* <li>Add/Update couple (var,val) in class variable HashMap "vars"</li>
|
||||
* <li>If the key represented by "var" exists in HashMap "vars", the couple (var,val) is updated in the database.<br>
|
||||
* The key is known as existing if the preceding value of the key (given as result of function put()) is not null.<br>
|
||||
* If the key doesn't exist, the couple is added/created in the database</li>
|
||||
* <ul>
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.variables;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.interfaces.IDeletable;
|
||||
import com.l2jserver.gameserver.model.interfaces.IRestorable;
|
||||
@ -36,7 +35,7 @@ public abstract class AbstractVariables extends StatsSet implements IRestorable,
|
||||
|
||||
public AbstractVariables()
|
||||
{
|
||||
super(new FastMap<String, Object>().shared());
|
||||
super(new ConcurrentHashMap<String, Object>());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,10 +22,9 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
import com.l2jserver.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jserver.gameserver.model.L2Object;
|
||||
@ -48,7 +47,7 @@ public abstract class L2ZoneType extends ListenersContainer
|
||||
|
||||
private final int _id;
|
||||
protected L2ZoneForm _zone;
|
||||
protected FastMap<Integer, L2Character> _characterList;
|
||||
protected ConcurrentHashMap<Integer, L2Character> _characterList;
|
||||
|
||||
/** Parameters to affect specific characters */
|
||||
private boolean _checkAffected = false;
|
||||
@ -68,8 +67,7 @@ public abstract class L2ZoneType extends ListenersContainer
|
||||
protected L2ZoneType(int id)
|
||||
{
|
||||
_id = id;
|
||||
_characterList = new FastMap<>();
|
||||
_characterList.shared();
|
||||
_characterList = new ConcurrentHashMap<>();
|
||||
|
||||
_minLvl = 0;
|
||||
_maxLvl = 0xFF;
|
||||
|
@ -18,12 +18,11 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.zone.type;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javolution.util.FastList;
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.gameserver.GameServer;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.instancemanager.ZoneManager;
|
||||
@ -57,13 +56,13 @@ public class L2BossZone extends L2ZoneType
|
||||
// track the times that players got disconnected. Players are allowed
|
||||
// to log back into the zone as long as their log-out was within _timeInvade time...
|
||||
// <player objectId, expiration time in milliseconds>
|
||||
private final Map<Integer, Long> _playerAllowedReEntryTimes = new FastMap<>();
|
||||
private final Map<Integer, Long> _playerAllowedReEntryTimes = new HashMap<>();
|
||||
|
||||
// track the players admitted to the zone who should be allowed back in
|
||||
// after reboot/server downtime (outside of their control), within 30 of server restart
|
||||
private final List<Integer> _playersAllowed = new FastList<>();
|
||||
private final List<Integer> _playersAllowed = new ArrayList<>();
|
||||
|
||||
private final List<L2Character> _raidList = new FastList<>();
|
||||
private final List<L2Character> _raidList = new ArrayList<>();
|
||||
|
||||
protected Settings()
|
||||
{
|
||||
|
@ -19,8 +19,7 @@
|
||||
package com.l2jserver.gameserver.model.zone.type;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
@ -47,7 +46,7 @@ public class L2EffectZone extends L2ZoneType
|
||||
private int _reuse;
|
||||
protected boolean _bypassConditions;
|
||||
private boolean _isShowDangerIcon;
|
||||
protected volatile FastMap<Integer, Integer> _skills;
|
||||
protected volatile ConcurrentHashMap<Integer, Integer> _skills;
|
||||
|
||||
public L2EffectZone(int id)
|
||||
{
|
||||
@ -93,12 +92,12 @@ public class L2EffectZone extends L2ZoneType
|
||||
}
|
||||
else if (name.equals("maxDynamicSkillCount"))
|
||||
{
|
||||
_skills = new FastMap<Integer, Integer>(Integer.parseInt(value)).shared();
|
||||
_skills = new ConcurrentHashMap<>(Integer.parseInt(value));
|
||||
}
|
||||
else if (name.equals("skillIdLvl"))
|
||||
{
|
||||
String[] propertySplit = value.split(";");
|
||||
_skills = new FastMap<>(propertySplit.length);
|
||||
_skills = new ConcurrentHashMap<>(propertySplit.length);
|
||||
for (String skill : propertySplit)
|
||||
{
|
||||
String[] skillSplit = skill.split("-");
|
||||
@ -204,7 +203,7 @@ public class L2EffectZone extends L2ZoneType
|
||||
{
|
||||
if (_skills == null)
|
||||
{
|
||||
_skills = new FastMap<Integer, Integer>(3).shared();
|
||||
_skills = new ConcurrentHashMap<>(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user