-More changes related to Javolution drop.
-Disabled html LazyCache by default.
This commit is contained in:
2
trunk/dist/game/config/General.properties
vendored
2
trunk/dist/game/config/General.properties
vendored
@@ -352,7 +352,7 @@ ForceInventoryUpdate = False
|
|||||||
# True = Load html's into cache only on first time html is requested.
|
# True = Load html's into cache only on first time html is requested.
|
||||||
# False = Load all html's into cache on server startup.
|
# False = Load all html's into cache on server startup.
|
||||||
# Default: True
|
# Default: True
|
||||||
LazyCache = True
|
LazyCache = False
|
||||||
|
|
||||||
# Cache all character names in to memory on server startup
|
# Cache all character names in to memory on server startup
|
||||||
# False - names are loaded from Db when they are requested
|
# False - names are loaded from Db when they are requested
|
||||||
|
@@ -37,6 +37,7 @@ import java.sql.ResultSet;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.LogRecord;
|
import java.util.logging.LogRecord;
|
||||||
@@ -104,7 +105,7 @@ public class LoginServerThread extends Thread
|
|||||||
private final boolean _reserveHost;
|
private final boolean _reserveHost;
|
||||||
private int _maxPlayer;
|
private int _maxPlayer;
|
||||||
private final List<WaitingClient> _waitingClients;
|
private final List<WaitingClient> _waitingClients;
|
||||||
private final ConcurrentHashMap<String, L2GameClient> _accountsInGameServer = new ConcurrentHashMap<>();
|
private final Map<String, L2GameClient> _accountsInGameServer = new ConcurrentHashMap<>();
|
||||||
private int _status;
|
private int _status;
|
||||||
private String _serverName;
|
private String _serverName;
|
||||||
private final List<String> _subnets;
|
private final List<String> _subnets;
|
||||||
|
@@ -21,6 +21,7 @@ package com.l2jserver.gameserver;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ import com.l2jserver.util.Rnd;
|
|||||||
|
|
||||||
public class RecipeController
|
public class RecipeController
|
||||||
{
|
{
|
||||||
protected static final ConcurrentHashMap<Integer, RecipeItemMaker> _activeMakers = new ConcurrentHashMap<>();
|
protected static final Map<Integer, RecipeItemMaker> _activeMakers = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
protected RecipeController()
|
protected RecipeController()
|
||||||
{
|
{
|
||||||
|
@@ -49,7 +49,7 @@ public final class MercTicketManager
|
|||||||
{
|
{
|
||||||
private static final Logger _log = Logger.getLogger(MercTicketManager.class.getName());
|
private static final Logger _log = Logger.getLogger(MercTicketManager.class.getName());
|
||||||
|
|
||||||
private static final CopyOnWriteArrayList<L2ItemInstance> _droppedTickets = new CopyOnWriteArrayList<>();
|
private static final List<L2ItemInstance> _droppedTickets = new CopyOnWriteArrayList<>();
|
||||||
|
|
||||||
// TODO: move all these values into siege.properties
|
// TODO: move all these values into siege.properties
|
||||||
// max tickets per merc type = 10 + (castleid * 2)?
|
// max tickets per merc type = 10 + (castleid * 2)?
|
||||||
|
@@ -3002,8 +3002,7 @@ public class L2Clan implements IIdentifiable, INamable
|
|||||||
list.add(new SubPledgeSkill(subunit.getId(), skill.getId(), skill.getLevel()));
|
list.add(new SubPledgeSkill(subunit.getId(), skill.getId(), skill.getLevel()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SubPledgeSkill[] result = list.toArray(new SubPledgeSkill[list.size()]);
|
return list.toArray(new SubPledgeSkill[list.size()]);
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNewLeaderId(int objectId, boolean storeInDb)
|
public void setNewLeaderId(int objectId, boolean storeInDb)
|
||||||
|
@@ -83,7 +83,7 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
private static final Duration PARTY_POSITION_BROADCAST_INTERVAL = Duration.ofSeconds(12);
|
private static final Duration PARTY_POSITION_BROADCAST_INTERVAL = Duration.ofSeconds(12);
|
||||||
private static final Duration PARTY_DISTRIBUTION_TYPE_REQUEST_TIMEOUT = Duration.ofSeconds(15);
|
private static final Duration PARTY_DISTRIBUTION_TYPE_REQUEST_TIMEOUT = Duration.ofSeconds(15);
|
||||||
|
|
||||||
private final CopyOnWriteArrayList<L2PcInstance> _members;
|
private final List<L2PcInstance> _members;
|
||||||
private boolean _pendingInvitation = false;
|
private boolean _pendingInvitation = false;
|
||||||
private long _pendingInviteTimeout;
|
private long _pendingInviteTimeout;
|
||||||
private int _partyLvl = 0;
|
private int _partyLvl = 0;
|
||||||
@@ -769,11 +769,11 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
public void distributeAdena(L2PcInstance player, long adena, L2Character target)
|
public void distributeAdena(L2PcInstance player, long adena, L2Character target)
|
||||||
{
|
{
|
||||||
// Get all the party members
|
// Get all the party members
|
||||||
List<L2PcInstance> membersList = getMembers();
|
final List<L2PcInstance> membersList = getMembers();
|
||||||
|
|
||||||
// Check the number of party members that must be rewarded
|
// Check the number of party members that must be rewarded
|
||||||
// (The party member must be in range to receive its reward)
|
// (The party member must be in range to receive its reward)
|
||||||
List<L2PcInstance> ToReward = new ArrayList<>();
|
final List<L2PcInstance> ToReward = new ArrayList<>();
|
||||||
for (L2PcInstance member : membersList)
|
for (L2PcInstance member : membersList)
|
||||||
{
|
{
|
||||||
if (!Util.checkIfInRange(Config.ALT_PARTY_RANGE2, target, member, true))
|
if (!Util.checkIfInRange(Config.ALT_PARTY_RANGE2, target, member, true))
|
||||||
@@ -791,7 +791,7 @@ public class L2Party extends AbstractPlayerGroup
|
|||||||
|
|
||||||
// Now we can actually distribute the adena reward
|
// Now we can actually distribute the adena reward
|
||||||
// (Total adena splitted by the number of party members that are in range and must be rewarded)
|
// (Total adena splitted by the number of party members that are in range and must be rewarded)
|
||||||
long count = adena / ToReward.size();
|
final long count = adena / ToReward.size();
|
||||||
for (L2PcInstance member : ToReward)
|
for (L2PcInstance member : ToReward)
|
||||||
{
|
{
|
||||||
member.addAdena("Party", count, player, true);
|
member.addAdena("Party", count, player, true);
|
||||||
|
@@ -134,8 +134,7 @@ public class TradeList
|
|||||||
inventory.adjustAvailableItem(item);
|
inventory.adjustAvailableItem(item);
|
||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
final TradeItem[] result = list.toArray(new TradeItem[list.size()]);
|
return list.toArray(new TradeItem[list.size()]);
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -777,7 +777,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
/** Player's cubics. */
|
/** Player's cubics. */
|
||||||
private final Map<Integer, L2CubicInstance> _cubics = new ConcurrentSkipListMap<>();
|
private final Map<Integer, L2CubicInstance> _cubics = new ConcurrentSkipListMap<>();
|
||||||
/** Active shots. */
|
/** Active shots. */
|
||||||
protected CopyOnWriteArraySet<Integer> _activeSoulShots = new CopyOnWriteArraySet<>();
|
protected Set<Integer> _activeSoulShots = new CopyOnWriteArraySet<>();
|
||||||
|
|
||||||
public final ReentrantLock soulShotLock = new ReentrantLock();
|
public final ReentrantLock soulShotLock = new ReentrantLock();
|
||||||
|
|
||||||
|
@@ -169,10 +169,7 @@ public class PcInventory extends Inventory
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list.toArray(new L2ItemInstance[list.size()]);
|
||||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -219,10 +216,7 @@ public class PcInventory extends Inventory
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list.toArray(new L2ItemInstance[list.size()]);
|
||||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -255,10 +249,7 @@ public class PcInventory extends Inventory
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list.toArray(new L2ItemInstance[list.size()]);
|
||||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -293,10 +284,7 @@ public class PcInventory extends Inventory
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list.toArray(new L2ItemInstance[list.size()]);
|
||||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -326,10 +314,7 @@ public class PcInventory extends Inventory
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list.toArray(new L2ItemInstance[list.size()]);
|
||||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -346,10 +331,7 @@ public class PcInventory extends Inventory
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list.toArray(new L2ItemInstance[list.size()]);
|
||||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -366,10 +348,7 @@ public class PcInventory extends Inventory
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list.toArray(new L2ItemInstance[list.size()]);
|
||||||
L2ItemInstance[] result = list.toArray(new L2ItemInstance[list.size()]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -391,10 +370,7 @@ public class PcInventory extends Inventory
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list.toArray(new TradeItem[list.size()]);
|
||||||
TradeItem[] result = list.toArray(new TradeItem[list.size()]);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -453,7 +453,7 @@ public class MultiSellChoose extends L2GameClientPacket
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
augmentation.clear(); // ?
|
augmentation.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// finally, give the tax to the castle...
|
// finally, give the tax to the castle...
|
||||||
|
@@ -35,14 +35,12 @@ public class ScriptPackage
|
|||||||
{
|
{
|
||||||
private static final Logger _log = Logger.getLogger(ScriptPackage.class.getName());
|
private static final Logger _log = Logger.getLogger(ScriptPackage.class.getName());
|
||||||
|
|
||||||
private final List<ScriptDocument> _scriptFiles;
|
private final List<ScriptDocument> _scriptFiles = new ArrayList<>();
|
||||||
private final List<String> _otherFiles;
|
private final List<String> _otherFiles = new ArrayList<>();
|
||||||
private final String _name;
|
private final String _name;
|
||||||
|
|
||||||
public ScriptPackage(ZipFile pack)
|
public ScriptPackage(ZipFile pack)
|
||||||
{
|
{
|
||||||
_scriptFiles = new ArrayList<>();
|
|
||||||
_otherFiles = new ArrayList<>();
|
|
||||||
_name = pack.getName();
|
_name = pack.getName();
|
||||||
addFiles(pack);
|
addFiles(pack);
|
||||||
}
|
}
|
||||||
@@ -75,8 +73,7 @@ public class ScriptPackage
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ScriptDocument newScript = new ScriptDocument(entry.getName(), pack.getInputStream(entry));
|
_scriptFiles.add(new ScriptDocument(entry.getName(), pack.getInputStream(entry)));
|
||||||
_scriptFiles.add(newScript);
|
|
||||||
}
|
}
|
||||||
catch (IOException io)
|
catch (IOException io)
|
||||||
{
|
{
|
||||||
|
@@ -27,12 +27,12 @@ import java.sql.PreparedStatement;
|
|||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -60,8 +60,8 @@ public final class TaskManager
|
|||||||
{
|
{
|
||||||
protected static final Logger _log = Logger.getLogger(TaskManager.class.getName());
|
protected static final Logger _log = Logger.getLogger(TaskManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Task> _tasks = new ConcurrentHashMap<>();
|
private final Map<Integer, Task> _tasks = new HashMap<>();
|
||||||
protected final List<ExecutedTask> _currentTasks = new CopyOnWriteArrayList<>();
|
protected final List<ExecutedTask> _currentTasks = new ArrayList<>();
|
||||||
|
|
||||||
protected static final String[] SQL_STATEMENTS =
|
protected static final String[] SQL_STATEMENTS =
|
||||||
{
|
{
|
||||||
|
@@ -45,7 +45,7 @@ public class MinionList
|
|||||||
|
|
||||||
protected final L2MonsterInstance _master;
|
protected final L2MonsterInstance _master;
|
||||||
/** List containing the current spawned minions */
|
/** List containing the current spawned minions */
|
||||||
private final List<L2MonsterInstance> _minionReferences;
|
private final List<L2MonsterInstance> _minionReferences = new CopyOnWriteArrayList<>();
|
||||||
/** List containing the cached deleted minions for reuse */
|
/** List containing the cached deleted minions for reuse */
|
||||||
protected List<L2MonsterInstance> _reusedMinionReferences = null;
|
protected List<L2MonsterInstance> _reusedMinionReferences = null;
|
||||||
|
|
||||||
@@ -57,7 +57,6 @@ public class MinionList
|
|||||||
}
|
}
|
||||||
|
|
||||||
_master = pMaster;
|
_master = pMaster;
|
||||||
_minionReferences = new CopyOnWriteArrayList<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -29,6 +29,7 @@ import java.util.Collection;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.StringJoiner;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -307,16 +308,13 @@ public final class Util
|
|||||||
*/
|
*/
|
||||||
public static String implodeString(Iterable<String> strArray, String strDelim)
|
public static String implodeString(Iterable<String> strArray, String strDelim)
|
||||||
{
|
{
|
||||||
final StringBuilder sbString = new StringBuilder();
|
final StringJoiner sj = new StringJoiner(strDelim);
|
||||||
|
|
||||||
for (String strValue : strArray)
|
for (String strValue : strArray)
|
||||||
{
|
{
|
||||||
sbString.append(strValue);
|
sj.add(strValue);
|
||||||
sbString.append(strDelim);
|
|
||||||
}
|
}
|
||||||
|
return sj.toString();
|
||||||
String result = sbString.toString();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -61,7 +61,7 @@ public class LoginController
|
|||||||
public static final int LOGIN_TIMEOUT = 60 * 1000;
|
public static final int LOGIN_TIMEOUT = 60 * 1000;
|
||||||
|
|
||||||
/** Authed Clients on LoginServer */
|
/** Authed Clients on LoginServer */
|
||||||
protected ConcurrentHashMap<String, L2LoginClient> _loginServerClients = new ConcurrentHashMap<>();
|
protected Map<String, L2LoginClient> _loginServerClients = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final Map<InetAddress, Integer> _failedLoginAttemps = new HashMap<>();
|
private final Map<InetAddress, Integer> _failedLoginAttemps = new HashMap<>();
|
||||||
private final Map<InetAddress, Long> _bannedIps = new ConcurrentHashMap<>();
|
private final Map<InetAddress, Long> _bannedIps = new ConcurrentHashMap<>();
|
||||||
|
Reference in New Issue
Block a user