-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:
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.instancemanager;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.idfactory.IdFactory;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
@ -34,7 +33,7 @@ import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket;
|
||||
|
||||
public class BoatManager
|
||||
{
|
||||
private final Map<Integer, L2BoatInstance> _boats = new FastMap<>();
|
||||
private final Map<Integer, L2BoatInstance> _boats = new HashMap<>();
|
||||
private final boolean[] _docksBusy = new boolean[3];
|
||||
|
||||
public static final int TALKING_ISLAND = 1;
|
||||
|
@ -21,11 +21,10 @@ package com.l2jserver.gameserver.instancemanager;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
@ -46,7 +45,7 @@ public final class CHSiegeManager
|
||||
private static final Logger _log = Logger.getLogger(CHSiegeManager.class.getName());
|
||||
private static final String SQL_LOAD_HALLS = "SELECT * FROM siegable_clanhall";
|
||||
|
||||
private final FastMap<Integer, SiegableHall> _siegableHalls = new FastMap<>();
|
||||
private final HashMap<Integer, SiegableHall> _siegableHalls = new HashMap<>();
|
||||
|
||||
protected CHSiegeManager()
|
||||
{
|
||||
@ -87,7 +86,7 @@ public final class CHSiegeManager
|
||||
}
|
||||
}
|
||||
|
||||
public FastMap<Integer, SiegableHall> getConquerableHalls()
|
||||
public HashMap<Integer, SiegableHall> getConquerableHalls()
|
||||
{
|
||||
return _siegableHalls;
|
||||
}
|
||||
|
@ -22,14 +22,13 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
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.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.InstanceListManager;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
@ -181,7 +180,7 @@ public final class CastleManager implements InstanceListManager
|
||||
{
|
||||
if (_castles == null)
|
||||
{
|
||||
_castles = new FastList<>();
|
||||
_castles = new ArrayList<>();
|
||||
}
|
||||
return _castles;
|
||||
}
|
||||
|
@ -21,12 +21,11 @@ package com.l2jserver.gameserver.instancemanager;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
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.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
@ -48,7 +47,7 @@ public final class ClanHallManager
|
||||
private final Map<Integer, AuctionableHall> _clanHall;
|
||||
private final Map<Integer, AuctionableHall> _freeClanHall;
|
||||
private final Map<Integer, AuctionableHall> _allAuctionableClanHalls;
|
||||
private static Map<Integer, ClanHall> _allClanHalls = new FastMap<>();
|
||||
private static Map<Integer, ClanHall> _allClanHalls = new HashMap<>();
|
||||
private boolean _loaded = false;
|
||||
|
||||
public boolean loaded()
|
||||
@ -58,9 +57,9 @@ public final class ClanHallManager
|
||||
|
||||
protected ClanHallManager()
|
||||
{
|
||||
_clanHall = new FastMap<>();
|
||||
_freeClanHall = new FastMap<>();
|
||||
_allAuctionableClanHalls = new FastMap<>();
|
||||
_clanHall = new HashMap<>();
|
||||
_freeClanHall = new HashMap<>();
|
||||
_allAuctionableClanHalls = new HashMap<>();
|
||||
load();
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,10 @@ package com.l2jserver.gameserver.instancemanager;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@ -38,7 +37,7 @@ public final class CoupleManager
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(CoupleManager.class.getName());
|
||||
|
||||
private FastList<Couple> _couples;
|
||||
private ArrayList<Couple> _couples;
|
||||
|
||||
protected CoupleManager()
|
||||
{
|
||||
@ -139,11 +138,11 @@ public final class CoupleManager
|
||||
return -1;
|
||||
}
|
||||
|
||||
public final FastList<Couple> getCouples()
|
||||
public final ArrayList<Couple> getCouples()
|
||||
{
|
||||
if (_couples == null)
|
||||
{
|
||||
_couples = new FastList<>();
|
||||
_couples = new ArrayList<>();
|
||||
}
|
||||
return _couples;
|
||||
}
|
||||
|
@ -19,13 +19,12 @@
|
||||
package com.l2jserver.gameserver.instancemanager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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.GameTimeController;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
@ -54,7 +53,7 @@ public final class DayNightSpawnManager
|
||||
{
|
||||
_dayCreatures = new ArrayList<>();
|
||||
_nightCreatures = new ArrayList<>();
|
||||
_bosses = new FastMap<>();
|
||||
_bosses = new HashMap<>();
|
||||
}
|
||||
|
||||
public void addDayCreature(L2Spawn spawnDat)
|
||||
|
@ -18,10 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.instancemanager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.entity.Duel;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
@ -34,7 +33,7 @@ public final class DuelManager
|
||||
|
||||
protected DuelManager()
|
||||
{
|
||||
_duels = new FastList<>();
|
||||
_duels = new ArrayList<>();
|
||||
}
|
||||
|
||||
private int getNextDuelId()
|
||||
|
@ -21,12 +21,11 @@ package com.l2jserver.gameserver.instancemanager;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
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.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.InstanceListManager;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
@ -159,7 +158,7 @@ public final class FortManager implements InstanceListManager
|
||||
{
|
||||
if (_forts == null)
|
||||
{
|
||||
_forts = new FastList<>();
|
||||
_forts = new ArrayList<>();
|
||||
}
|
||||
return _forts;
|
||||
}
|
||||
|
@ -21,12 +21,11 @@ package com.l2jserver.gameserver.instancemanager;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
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.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
@ -38,7 +37,7 @@ public final class FortSiegeGuardManager
|
||||
private static final Logger _log = Logger.getLogger(FortSiegeGuardManager.class.getName());
|
||||
|
||||
private final Fort _fort;
|
||||
private final FastMap<Integer, FastList<L2Spawn>> _siegeGuards = new FastMap<>();
|
||||
private final HashMap<Integer, ArrayList<L2Spawn>> _siegeGuards = new HashMap<>();
|
||||
|
||||
public FortSiegeGuardManager(Fort fort)
|
||||
{
|
||||
@ -52,7 +51,7 @@ public final class FortSiegeGuardManager
|
||||
{
|
||||
try
|
||||
{
|
||||
final FastList<L2Spawn> monsterList = getSiegeGuardSpawn().get(getFort().getResidenceId());
|
||||
final ArrayList<L2Spawn> monsterList = getSiegeGuardSpawn().get(getFort().getResidenceId());
|
||||
if (monsterList != null)
|
||||
{
|
||||
for (L2Spawn spawnDat : monsterList)
|
||||
@ -82,7 +81,7 @@ public final class FortSiegeGuardManager
|
||||
{
|
||||
try
|
||||
{
|
||||
final FastList<L2Spawn> monsterList = getSiegeGuardSpawn().get(getFort().getResidenceId());
|
||||
final ArrayList<L2Spawn> monsterList = getSiegeGuardSpawn().get(getFort().getResidenceId());
|
||||
|
||||
if (monsterList != null)
|
||||
{
|
||||
@ -115,7 +114,7 @@ public final class FortSiegeGuardManager
|
||||
ps.setInt(1, fortId);
|
||||
try (ResultSet rs = ps.executeQuery())
|
||||
{
|
||||
FastList<L2Spawn> siegeGuardSpawns = new FastList<>();
|
||||
ArrayList<L2Spawn> siegeGuardSpawns = new ArrayList<>();
|
||||
while (rs.next())
|
||||
{
|
||||
L2NpcTemplate template = NpcData.getInstance().getTemplate(rs.getInt("npcId"));
|
||||
@ -151,7 +150,7 @@ public final class FortSiegeGuardManager
|
||||
return _fort;
|
||||
}
|
||||
|
||||
public final FastMap<Integer, FastList<L2Spawn>> getSiegeGuardSpawn()
|
||||
public final HashMap<Integer, ArrayList<L2Spawn>> getSiegeGuardSpawn()
|
||||
{
|
||||
return _siegeGuards;
|
||||
}
|
||||
|
@ -24,15 +24,14 @@ import java.io.InputStream;
|
||||
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.Properties;
|
||||
import java.util.StringTokenizer;
|
||||
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.model.CombatFlag;
|
||||
@ -54,8 +53,8 @@ public final class FortSiegeManager
|
||||
private int _attackerMaxClans = 500; // Max number of clans
|
||||
|
||||
// Fort Siege settings
|
||||
private FastMap<Integer, FastList<FortSiegeSpawn>> _commanderSpawnList;
|
||||
private FastMap<Integer, FastList<CombatFlag>> _flagList;
|
||||
private HashMap<Integer, ArrayList<FortSiegeSpawn>> _commanderSpawnList;
|
||||
private HashMap<Integer, ArrayList<CombatFlag>> _flagList;
|
||||
private boolean _justToTerritory = true; // Changeable in fortsiege.properties
|
||||
private int _flagMaxCount = 1; // Changeable in fortsiege.properties
|
||||
private int _siegeClanMinLevel = 4; // Changeable in fortsiege.properties
|
||||
@ -138,13 +137,13 @@ public final class FortSiegeManager
|
||||
_suspiciousMerchantRespawnDelay = Integer.decode(siegeSettings.getProperty("SuspiciousMerchantRespawnDelay", "180"));
|
||||
|
||||
// Siege spawns settings
|
||||
_commanderSpawnList = new FastMap<>();
|
||||
_flagList = new FastMap<>();
|
||||
_commanderSpawnList = new HashMap<>();
|
||||
_flagList = new HashMap<>();
|
||||
|
||||
for (Fort fort : FortManager.getInstance().getForts())
|
||||
{
|
||||
FastList<FortSiegeSpawn> _commanderSpawns = new FastList<>();
|
||||
FastList<CombatFlag> _flagSpawns = new FastList<>();
|
||||
ArrayList<FortSiegeSpawn> _commanderSpawns = new ArrayList<>();
|
||||
ArrayList<CombatFlag> _flagSpawns = new ArrayList<>();
|
||||
for (int i = 1; i < 5; i++)
|
||||
{
|
||||
final String _spawnParams = siegeSettings.getProperty(fort.getName().replace(" ", "") + "Commander" + i, "");
|
||||
@ -199,7 +198,7 @@ public final class FortSiegeManager
|
||||
}
|
||||
}
|
||||
|
||||
public final FastList<FortSiegeSpawn> getCommanderSpawnList(int _fortId)
|
||||
public final ArrayList<FortSiegeSpawn> getCommanderSpawnList(int _fortId)
|
||||
{
|
||||
if (_commanderSpawnList.containsKey(_fortId))
|
||||
{
|
||||
@ -208,7 +207,7 @@ public final class FortSiegeManager
|
||||
return null;
|
||||
}
|
||||
|
||||
public final FastList<CombatFlag> getFlagList(int _fortId)
|
||||
public final ArrayList<CombatFlag> getFlagList(int _fortId)
|
||||
{
|
||||
if (_flagList.containsKey(_fortId))
|
||||
{
|
||||
@ -273,7 +272,7 @@ public final class FortSiegeManager
|
||||
{
|
||||
if (_sieges == null)
|
||||
{
|
||||
_sieges = new FastList<>();
|
||||
_sieges = new ArrayList<>();
|
||||
}
|
||||
return _sieges;
|
||||
}
|
||||
@ -282,7 +281,7 @@ public final class FortSiegeManager
|
||||
{
|
||||
if (_sieges == null)
|
||||
{
|
||||
_sieges = new FastList<>();
|
||||
_sieges = new ArrayList<>();
|
||||
}
|
||||
_sieges.add(fortSiege);
|
||||
}
|
||||
@ -301,7 +300,7 @@ public final class FortSiegeManager
|
||||
|
||||
final Fort fort = FortManager.getInstance().getFort(player);
|
||||
|
||||
final FastList<CombatFlag> fcf = _flagList.get(fort.getResidenceId());
|
||||
final ArrayList<CombatFlag> fcf = _flagList.get(fort.getResidenceId());
|
||||
for (CombatFlag cf : fcf)
|
||||
{
|
||||
if (cf.getCombatFlagInstance() == item)
|
||||
@ -349,7 +348,7 @@ public final class FortSiegeManager
|
||||
{
|
||||
final Fort fort = FortManager.getInstance().getFortById(fortId);
|
||||
|
||||
final FastList<CombatFlag> fcf = _flagList.get(fort.getResidenceId());
|
||||
final ArrayList<CombatFlag> fcf = _flagList.get(fort.getResidenceId());
|
||||
|
||||
for (CombatFlag cf : fcf)
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ package com.l2jserver.gameserver.instancemanager;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -31,9 +32,6 @@ 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.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
@ -124,9 +122,9 @@ public final class FourSepulchersManager
|
||||
};
|
||||
// @formatter:on
|
||||
|
||||
protected Map<Integer, Boolean> _archonSpawned = new FastMap<>();
|
||||
protected Map<Integer, Boolean> _hallInUse = new FastMap<>();
|
||||
protected Map<Integer, L2PcInstance> _challengers = new FastMap<>();
|
||||
protected Map<Integer, Boolean> _archonSpawned = new HashMap<>();
|
||||
protected Map<Integer, Boolean> _hallInUse = new HashMap<>();
|
||||
protected Map<Integer, L2PcInstance> _challengers = new HashMap<>();
|
||||
protected Map<Integer, int[]> _startHallSpawns = new HashMap<>();
|
||||
protected Map<Integer, Integer> _hallGateKeepers = new HashMap<>();
|
||||
protected Map<Integer, Integer> _keyBoxNpc = new HashMap<>();
|
||||
@ -147,7 +145,7 @@ public final class FourSepulchersManager
|
||||
protected List<L2Spawn> _managers;
|
||||
protected List<L2Spawn> _dukeFinalSpawns;
|
||||
protected List<L2Spawn> _emperorsGraveSpawns;
|
||||
protected List<L2Npc> _allMobs = new FastList<>();
|
||||
protected List<L2Npc> _allMobs = new ArrayList<>();
|
||||
|
||||
private long _attackTimeEnd = 0;
|
||||
private long _coolDownTimeEnd = 0;
|
||||
@ -276,7 +274,7 @@ public final class FourSepulchersManager
|
||||
|
||||
protected void spawnManagers()
|
||||
{
|
||||
_managers = new FastList<>();
|
||||
_managers = new ArrayList<>();
|
||||
|
||||
int i = 31921;
|
||||
for (L2Spawn spawnDat; i <= 31924; i++)
|
||||
@ -518,7 +516,7 @@ public final class FourSepulchersManager
|
||||
ps2.setInt(2, 1);
|
||||
try (ResultSet rs2 = ps2.executeQuery())
|
||||
{
|
||||
_physicalSpawns = new FastList<>();
|
||||
_physicalSpawns = new ArrayList<>();
|
||||
while (rs2.next())
|
||||
{
|
||||
template1 = NpcData.getInstance().getTemplate(rs2.getInt("npc_templateid"));
|
||||
@ -575,7 +573,7 @@ public final class FourSepulchersManager
|
||||
ps2.setInt(2, 2);
|
||||
try (ResultSet rset2 = ps2.executeQuery())
|
||||
{
|
||||
_magicalSpawns = new FastList<>();
|
||||
_magicalSpawns = new ArrayList<>();
|
||||
|
||||
while (rset2.next())
|
||||
{
|
||||
@ -636,7 +634,7 @@ public final class FourSepulchersManager
|
||||
{
|
||||
ps2.clearParameters();
|
||||
|
||||
_dukeFinalSpawns = new FastList<>();
|
||||
_dukeFinalSpawns = new ArrayList<>();
|
||||
|
||||
while (rset2.next())
|
||||
{
|
||||
@ -695,7 +693,7 @@ public final class FourSepulchersManager
|
||||
ps2.setInt(2, 6);
|
||||
try (ResultSet rs2 = ps2.executeQuery())
|
||||
{
|
||||
_emperorsGraveSpawns = new FastList<>();
|
||||
_emperorsGraveSpawns = new ArrayList<>();
|
||||
|
||||
while (rs2.next())
|
||||
{
|
||||
@ -1071,7 +1069,7 @@ public final class FourSepulchersManager
|
||||
|
||||
if (Config.FS_PARTY_MEMBER_COUNT > 1)
|
||||
{
|
||||
List<L2PcInstance> members = new FastList<>();
|
||||
List<L2PcInstance> members = new ArrayList<>();
|
||||
for (L2PcInstance mem : player.getParty().getMembers())
|
||||
{
|
||||
if (!mem.isDead() && Util.checkIfInRange(700, player, mem, true))
|
||||
@ -1105,7 +1103,7 @@ public final class FourSepulchersManager
|
||||
}
|
||||
if ((Config.FS_PARTY_MEMBER_COUNT <= 1) && player.isInParty())
|
||||
{
|
||||
List<L2PcInstance> members = new FastList<>();
|
||||
List<L2PcInstance> members = new ArrayList<>();
|
||||
for (L2PcInstance mem : player.getParty().getMembers())
|
||||
{
|
||||
if (!mem.isDead() && Util.checkIfInRange(700, player, mem, true))
|
||||
@ -1184,7 +1182,7 @@ public final class FourSepulchersManager
|
||||
}
|
||||
|
||||
List<L2Spawn> monsterList;
|
||||
List<L2SepulcherMonsterInstance> mobs = new FastList<>();
|
||||
List<L2SepulcherMonsterInstance> mobs = new ArrayList<>();
|
||||
L2Spawn keyBoxMobSpawn;
|
||||
|
||||
if (Rnd.get(2) == 0)
|
||||
|
@ -32,9 +32,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.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
@ -62,13 +59,13 @@ public final class GrandBossManager implements IStorable
|
||||
|
||||
protected static Logger _log = Logger.getLogger(GrandBossManager.class.getName());
|
||||
|
||||
protected static Map<Integer, L2GrandBossInstance> _bosses = new FastMap<>();
|
||||
protected static Map<Integer, L2GrandBossInstance> _bosses = new HashMap<>();
|
||||
|
||||
protected static Map<Integer, StatsSet> _storedInfo = new HashMap<>();
|
||||
|
||||
private final Map<Integer, Integer> _bossStatus = new HashMap<>();
|
||||
|
||||
private final List<L2BossZone> _zones = new FastList<>();
|
||||
private final List<L2BossZone> _zones = new ArrayList<>();
|
||||
|
||||
protected GrandBossManager()
|
||||
{
|
||||
|
@ -25,8 +25,6 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
@ -42,12 +40,12 @@ import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
|
||||
*/
|
||||
public final class InstanceManager implements IXmlReader
|
||||
{
|
||||
private static final Map<Integer, Instance> _instanceList = new FastMap<>();
|
||||
private final Map<Integer, InstanceWorld> _instanceWorlds = new FastMap<>();
|
||||
private static final Map<Integer, Instance> _instanceList = new HashMap<>();
|
||||
private final Map<Integer, InstanceWorld> _instanceWorlds = new HashMap<>();
|
||||
private int _dynamic = 300000;
|
||||
// InstanceId Names
|
||||
private static final Map<Integer, String> _instanceIdNames = new HashMap<>();
|
||||
private final Map<Integer, Map<Integer, Long>> _playerInstanceTimes = new FastMap<>();
|
||||
private final Map<Integer, Map<Integer, Long>> _playerInstanceTimes = new HashMap<>();
|
||||
// SQL Queries
|
||||
private static final String ADD_INSTANCE_TIME = "INSERT INTO character_instance_time (charId,instanceId,time) values (?,?,?) ON DUPLICATE KEY UPDATE time=?";
|
||||
private static final String RESTORE_INSTANCE_TIMES = "SELECT instanceId,time FROM character_instance_time WHERE charId=?";
|
||||
@ -168,7 +166,7 @@ public final class InstanceManager implements IXmlReader
|
||||
{
|
||||
return; // already restored
|
||||
}
|
||||
_playerInstanceTimes.put(playerObjId, new FastMap<Integer, Long>());
|
||||
_playerInstanceTimes.put(playerObjId, new HashMap<Integer, Long>());
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(RESTORE_INSTANCE_TIMES))
|
||||
{
|
||||
|
@ -24,11 +24,10 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
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.ItemsAutoDestroy;
|
||||
@ -44,7 +43,7 @@ public final class ItemsOnGroundManager implements Runnable
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(ItemsOnGroundManager.class.getName());
|
||||
|
||||
private final List<L2ItemInstance> _items = new FastList<L2ItemInstance>().shared();
|
||||
private final List<L2ItemInstance> _items = new CopyOnWriteArrayList<>();
|
||||
|
||||
protected ItemsOnGroundManager()
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -30,8 +31,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastList;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.idfactory.IdFactory;
|
||||
@ -143,7 +142,7 @@ public final class MailManager
|
||||
|
||||
public final List<Message> getInbox(int objectId)
|
||||
{
|
||||
final List<Message> inbox = new FastList<>();
|
||||
final List<Message> inbox = new ArrayList<>();
|
||||
for (Message msg : getMessages())
|
||||
{
|
||||
if ((msg != null) && (msg.getReceiverId() == objectId) && !msg.isDeletedByReceiver())
|
||||
@ -161,7 +160,7 @@ public final class MailManager
|
||||
|
||||
public final List<Message> getOutbox(int objectId)
|
||||
{
|
||||
final List<Message> outbox = new FastList<>();
|
||||
final List<Message> outbox = new ArrayList<>();
|
||||
for (Message msg : getMessages())
|
||||
{
|
||||
if ((msg != null) && (msg.getSenderId() == objectId) && !msg.isDeletedBySender())
|
||||
|
@ -27,11 +27,10 @@ import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.model.L2Mentee;
|
||||
import com.l2jserver.gameserver.model.L2World;
|
||||
@ -47,8 +46,8 @@ public class MentorManager
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(MentorManager.class.getName());
|
||||
|
||||
private final Map<Integer, Map<Integer, L2Mentee>> _menteeData = new FastMap<Integer, Map<Integer, L2Mentee>>().shared();
|
||||
private final Map<Integer, L2Mentee> _mentors = new FastMap<Integer, L2Mentee>().shared();
|
||||
private final Map<Integer, Map<Integer, L2Mentee>> _menteeData = new ConcurrentHashMap<>();
|
||||
private final Map<Integer, L2Mentee> _mentors = new ConcurrentHashMap<>();
|
||||
|
||||
protected MentorManager()
|
||||
{
|
||||
@ -166,7 +165,7 @@ public class MentorManager
|
||||
*/
|
||||
public void addMentor(int mentorId, int menteeId)
|
||||
{
|
||||
_menteeData.computeIfAbsent(mentorId, map -> new FastMap<Integer, L2Mentee>().shared());
|
||||
_menteeData.computeIfAbsent(mentorId, map -> new ConcurrentHashMap<>());
|
||||
if (_menteeData.get(mentorId).containsKey(menteeId))
|
||||
{
|
||||
_menteeData.get(mentorId).get(menteeId).load(); // Just reloading data if is already there
|
||||
|
@ -23,11 +23,10 @@ import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.util.Iterator;
|
||||
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.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.enums.ItemLocation;
|
||||
@ -50,7 +49,7 @@ public final class MercTicketManager
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(MercTicketManager.class.getName());
|
||||
|
||||
private static final FastList<L2ItemInstance> _droppedTickets = new FastList<>();
|
||||
private static final CopyOnWriteArrayList<L2ItemInstance> _droppedTickets = new CopyOnWriteArrayList<>();
|
||||
|
||||
// TODO: move all these values into siege.properties
|
||||
// max tickets per merc type = 10 + (castleid * 2)?
|
||||
@ -114,7 +113,6 @@ public final class MercTicketManager
|
||||
|
||||
protected MercTicketManager()
|
||||
{
|
||||
_droppedTickets.shared();
|
||||
load();
|
||||
}
|
||||
|
||||
|
@ -25,13 +25,12 @@ import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javolution.util.FastMap;
|
||||
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
@ -43,7 +42,7 @@ public class RaidBossPointsManager
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(RaidBossPointsManager.class.getName());
|
||||
|
||||
private FastMap<Integer, Map<Integer, Integer>> _list;
|
||||
private HashMap<Integer, Map<Integer, Integer>> _list;
|
||||
|
||||
public RaidBossPointsManager()
|
||||
{
|
||||
@ -52,7 +51,7 @@ public class RaidBossPointsManager
|
||||
|
||||
private final void init()
|
||||
{
|
||||
_list = new FastMap<>();
|
||||
_list = new HashMap<>();
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
Statement s = con.createStatement();
|
||||
ResultSet rs = s.executeQuery("SELECT `charId`,`boss_id`,`points` FROM `character_raid_points`"))
|
||||
@ -65,7 +64,7 @@ public class RaidBossPointsManager
|
||||
Map<Integer, Integer> values = _list.get(charId);
|
||||
if (values == null)
|
||||
{
|
||||
values = new FastMap<>();
|
||||
values = new HashMap<>();
|
||||
}
|
||||
values.put(bossId, points);
|
||||
_list.put(charId, values);
|
||||
@ -100,7 +99,7 @@ public class RaidBossPointsManager
|
||||
Map<Integer, Integer> tmpPoint = _list.get(ownerId);
|
||||
if (tmpPoint == null)
|
||||
{
|
||||
tmpPoint = new FastMap<>();
|
||||
tmpPoint = new HashMap<>();
|
||||
tmpPoint.put(bossId, points);
|
||||
updatePointsInDB(player, bossId, points);
|
||||
}
|
||||
@ -163,8 +162,8 @@ public class RaidBossPointsManager
|
||||
|
||||
public Map<Integer, Integer> getRankList()
|
||||
{
|
||||
Map<Integer, Integer> tmpRanking = new FastMap<>();
|
||||
Map<Integer, Integer> tmpPoints = new FastMap<>();
|
||||
Map<Integer, Integer> tmpRanking = new HashMap<>();
|
||||
Map<Integer, Integer> tmpPoints = new HashMap<>();
|
||||
|
||||
for (int ownerId : _list.keySet())
|
||||
{
|
||||
|
@ -23,13 +23,12 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
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;
|
||||
@ -49,10 +48,10 @@ public class RaidBossSpawnManager
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(RaidBossSpawnManager.class.getName());
|
||||
|
||||
protected static final Map<Integer, L2RaidBossInstance> _bosses = new FastMap<>();
|
||||
protected static final Map<Integer, L2Spawn> _spawns = new FastMap<>();
|
||||
protected static final Map<Integer, StatsSet> _storedInfo = new FastMap<>();
|
||||
protected static final Map<Integer, ScheduledFuture<?>> _schedules = new FastMap<>();
|
||||
protected static final Map<Integer, L2RaidBossInstance> _bosses = new HashMap<>();
|
||||
protected static final Map<Integer, L2Spawn> _spawns = new HashMap<>();
|
||||
protected static final Map<Integer, StatsSet> _storedInfo = new HashMap<>();
|
||||
protected static final Map<Integer, ScheduledFuture<?>> _schedules = new HashMap<>();
|
||||
|
||||
public static enum StatusEnum
|
||||
{
|
||||
|
@ -21,12 +21,11 @@ package com.l2jserver.gameserver.instancemanager;
|
||||
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.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jserver.gameserver.model.L2Spawn;
|
||||
@ -39,7 +38,7 @@ public final class SiegeGuardManager
|
||||
private static Logger _log = Logger.getLogger(SiegeGuardManager.class.getName());
|
||||
|
||||
private final Castle _castle;
|
||||
private final List<L2Spawn> _siegeGuardSpawn = new FastList<>();
|
||||
private final List<L2Spawn> _siegeGuardSpawn = new ArrayList<>();
|
||||
|
||||
public SiegeGuardManager(Castle castle)
|
||||
{
|
||||
|
@ -29,8 +29,6 @@ import java.util.StringTokenizer;
|
||||
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.SkillData;
|
||||
@ -270,7 +268,7 @@ public final class SiegeManager
|
||||
|
||||
public final List<Siege> getSieges()
|
||||
{
|
||||
FastList<Siege> sieges = new FastList<>();
|
||||
ArrayList<Siege> sieges = new ArrayList<>();
|
||||
for (Castle castle : CastleManager.getInstance().getCastles())
|
||||
{
|
||||
sieges.add(castle.getSiege());
|
||||
|
Reference in New Issue
Block a user