Backward compatibility changes for Java 8.
This commit is contained in:
parent
a54e1fbcf8
commit
6083099412
@ -170,6 +170,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Start implements Runnable
|
||||
{
|
||||
public Start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -182,6 +186,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Spawn implements Runnable
|
||||
{
|
||||
public Spawn()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -212,6 +220,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Delete implements Runnable
|
||||
{
|
||||
public Delete()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -243,6 +255,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Clean implements Runnable
|
||||
{
|
||||
public Clean()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -79,6 +79,10 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
private int currentMonitorizedDamage = 0;
|
||||
private int zoneStage = 0;
|
||||
|
||||
public zoneInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void setZoneStage(int a)
|
||||
{
|
||||
zoneStage = a;
|
||||
|
@ -71,6 +71,10 @@ public class Stage1 extends AbstractInstance implements IXmlReader
|
||||
|
||||
private static class SODSpawn
|
||||
{
|
||||
public SODSpawn()
|
||||
{
|
||||
}
|
||||
|
||||
boolean isZone = false;
|
||||
boolean isNeededNextFlag = false;
|
||||
int npcId;
|
||||
|
@ -90,8 +90,8 @@ public class SiegeGuards extends AbstractNpcAI
|
||||
};
|
||||
//@formatter:on
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
private static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
protected static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
protected static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
|
||||
public SiegeGuards()
|
||||
{
|
||||
|
@ -47,6 +47,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DecayTask implements Runnable
|
||||
{
|
||||
public DecayTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -59,6 +63,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DepartTask implements Runnable
|
||||
{
|
||||
public DepartTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -27,6 +27,9 @@ public class Rnd
|
||||
* Thread-specific random number generator.<br>
|
||||
* Each is seeded with the thread ID, so the sequence of random numbers are unique between threads.
|
||||
*/
|
||||
// Java 1.8
|
||||
// private static ThreadLocal<Random> RANDOM = new ThreadLocal<Random>()
|
||||
// Java 10
|
||||
private static ThreadLocal<Random> RANDOM = new ThreadLocal<>()
|
||||
{
|
||||
@Override
|
||||
|
@ -29,8 +29,8 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
*/
|
||||
public class WarehouseCacheManager
|
||||
{
|
||||
private static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
private static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
protected static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
protected static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
@ -49,6 +49,10 @@ public class WarehouseCacheManager
|
||||
|
||||
private class CacheScheduler implements Runnable
|
||||
{
|
||||
public CacheScheduler()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
public class BotReportTable
|
||||
{
|
||||
// Zoey76: TODO: Split XML parsing from SQL operations, use IGameXmlReader instead of SAXParser.
|
||||
private static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
|
||||
private static final int COLUMN_BOT_ID = 1;
|
||||
private static final int COLUMN_REPORTER_ID = 2;
|
||||
@ -609,6 +609,10 @@ public class BotReportTable
|
||||
|
||||
private class ResetPointTask implements Runnable
|
||||
{
|
||||
public ResetPointTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -155,6 +155,10 @@ public class FortCommanderInstance extends DefenderInstance
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -74,6 +74,9 @@ public class EventMethodNotification
|
||||
|
||||
private void invoke(Object instance) throws Exception
|
||||
{
|
||||
// Java 1.8
|
||||
// final boolean wasAccessible = _method.isAccessible();
|
||||
// Java 10
|
||||
final boolean wasAccessible = _method.canAccess(instance);
|
||||
if (!wasAccessible)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ public class LongTimeEvent extends Quest
|
||||
// Messages
|
||||
protected String _onEnterMsg = "";
|
||||
protected String _endMsg = "";
|
||||
private int _enterAnnounceId = -1;
|
||||
protected int _enterAnnounceId = -1;
|
||||
|
||||
protected DateRange _eventPeriod = null;
|
||||
protected DateRange _dropPeriod;
|
||||
|
@ -24,12 +24,12 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
public class QuestTimer
|
||||
{
|
||||
private final String _name;
|
||||
private final Quest _quest;
|
||||
private final Npc _npc;
|
||||
private final PlayerInstance _player;
|
||||
private final boolean _isRepeating;
|
||||
private ScheduledFuture<?> _scheduler;
|
||||
protected final String _name;
|
||||
protected final Quest _quest;
|
||||
protected final Npc _npc;
|
||||
protected final PlayerInstance _player;
|
||||
protected final boolean _isRepeating;
|
||||
protected ScheduledFuture<?> _scheduler;
|
||||
|
||||
public QuestTimer(Quest quest, String name, long time, Npc npc, PlayerInstance player, boolean repeating)
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ import org.l2jmobius.gameserver.util.Locator;
|
||||
*/
|
||||
public class SystemPanel extends JPanel
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
|
||||
private static final long START_TIME = System.currentTimeMillis();
|
||||
protected static final long START_TIME = System.currentTimeMillis();
|
||||
|
||||
public SystemPanel()
|
||||
{
|
||||
|
@ -49,6 +49,10 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
|
||||
private class DocumentItemDataHolder
|
||||
{
|
||||
public DocumentItemDataHolder()
|
||||
{
|
||||
}
|
||||
|
||||
int id;
|
||||
String type;
|
||||
StatSet set;
|
||||
|
@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.holders.MinionHolder;
|
||||
*/
|
||||
public class MinionList
|
||||
{
|
||||
private final MonsterInstance _master;
|
||||
protected final MonsterInstance _master;
|
||||
private final List<MonsterInstance> _spawnedMinions = new CopyOnWriteArrayList<>();
|
||||
private final List<ScheduledFuture<?>> _respawnTasks = new CopyOnWriteArrayList<>();
|
||||
|
||||
|
@ -170,6 +170,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Start implements Runnable
|
||||
{
|
||||
public Start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -182,6 +186,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Spawn implements Runnable
|
||||
{
|
||||
public Spawn()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -212,6 +220,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Delete implements Runnable
|
||||
{
|
||||
public Delete()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -243,6 +255,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Clean implements Runnable
|
||||
{
|
||||
public Clean()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -79,6 +79,10 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
private int currentMonitorizedDamage = 0;
|
||||
private int zoneStage = 0;
|
||||
|
||||
public zoneInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void setZoneStage(int a)
|
||||
{
|
||||
zoneStage = a;
|
||||
|
@ -71,6 +71,10 @@ public class Stage1 extends AbstractInstance implements IXmlReader
|
||||
|
||||
private static class SODSpawn
|
||||
{
|
||||
public SODSpawn()
|
||||
{
|
||||
}
|
||||
|
||||
boolean isZone = false;
|
||||
boolean isNeededNextFlag = false;
|
||||
int npcId;
|
||||
|
@ -90,8 +90,8 @@ public class SiegeGuards extends AbstractNpcAI
|
||||
};
|
||||
//@formatter:on
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
private static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
protected static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
protected static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
|
||||
public SiegeGuards()
|
||||
{
|
||||
|
@ -47,6 +47,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DecayTask implements Runnable
|
||||
{
|
||||
public DecayTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -59,6 +63,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DepartTask implements Runnable
|
||||
{
|
||||
public DepartTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -27,6 +27,9 @@ public class Rnd
|
||||
* Thread-specific random number generator.<br>
|
||||
* Each is seeded with the thread ID, so the sequence of random numbers are unique between threads.
|
||||
*/
|
||||
// Java 1.8
|
||||
// private static ThreadLocal<Random> RANDOM = new ThreadLocal<Random>()
|
||||
// Java 10
|
||||
private static ThreadLocal<Random> RANDOM = new ThreadLocal<>()
|
||||
{
|
||||
@Override
|
||||
|
@ -29,8 +29,8 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
*/
|
||||
public class WarehouseCacheManager
|
||||
{
|
||||
private static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
private static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
protected static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
protected static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
@ -49,6 +49,10 @@ public class WarehouseCacheManager
|
||||
|
||||
private class CacheScheduler implements Runnable
|
||||
{
|
||||
public CacheScheduler()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
public class BotReportTable
|
||||
{
|
||||
// Zoey76: TODO: Split XML parsing from SQL operations, use IGameXmlReader instead of SAXParser.
|
||||
private static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
|
||||
private static final int COLUMN_BOT_ID = 1;
|
||||
private static final int COLUMN_REPORTER_ID = 2;
|
||||
@ -609,6 +609,10 @@ public class BotReportTable
|
||||
|
||||
private class ResetPointTask implements Runnable
|
||||
{
|
||||
public ResetPointTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -155,6 +155,10 @@ public class FortCommanderInstance extends DefenderInstance
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -74,6 +74,9 @@ public class EventMethodNotification
|
||||
|
||||
private void invoke(Object instance) throws Exception
|
||||
{
|
||||
// Java 1.8
|
||||
// final boolean wasAccessible = _method.isAccessible();
|
||||
// Java 10
|
||||
final boolean wasAccessible = _method.canAccess(instance);
|
||||
if (!wasAccessible)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ public class LongTimeEvent extends Quest
|
||||
// Messages
|
||||
protected String _onEnterMsg = "";
|
||||
protected String _endMsg = "";
|
||||
private int _enterAnnounceId = -1;
|
||||
protected int _enterAnnounceId = -1;
|
||||
|
||||
protected DateRange _eventPeriod = null;
|
||||
protected DateRange _dropPeriod;
|
||||
|
@ -24,12 +24,12 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
public class QuestTimer
|
||||
{
|
||||
private final String _name;
|
||||
private final Quest _quest;
|
||||
private final Npc _npc;
|
||||
private final PlayerInstance _player;
|
||||
private final boolean _isRepeating;
|
||||
private ScheduledFuture<?> _scheduler;
|
||||
protected final String _name;
|
||||
protected final Quest _quest;
|
||||
protected final Npc _npc;
|
||||
protected final PlayerInstance _player;
|
||||
protected final boolean _isRepeating;
|
||||
protected ScheduledFuture<?> _scheduler;
|
||||
|
||||
public QuestTimer(Quest quest, String name, long time, Npc npc, PlayerInstance player, boolean repeating)
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ import org.l2jmobius.gameserver.util.Locator;
|
||||
*/
|
||||
public class SystemPanel extends JPanel
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
|
||||
private static final long START_TIME = System.currentTimeMillis();
|
||||
protected static final long START_TIME = System.currentTimeMillis();
|
||||
|
||||
public SystemPanel()
|
||||
{
|
||||
|
@ -49,6 +49,10 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
|
||||
private class DocumentItemDataHolder
|
||||
{
|
||||
public DocumentItemDataHolder()
|
||||
{
|
||||
}
|
||||
|
||||
int id;
|
||||
String type;
|
||||
StatSet set;
|
||||
|
@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.holders.MinionHolder;
|
||||
*/
|
||||
public class MinionList
|
||||
{
|
||||
private final MonsterInstance _master;
|
||||
protected final MonsterInstance _master;
|
||||
private final List<MonsterInstance> _spawnedMinions = new CopyOnWriteArrayList<>();
|
||||
private final List<ScheduledFuture<?>> _respawnTasks = new CopyOnWriteArrayList<>();
|
||||
|
||||
|
@ -170,6 +170,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Start implements Runnable
|
||||
{
|
||||
public Start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -182,6 +186,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Spawn implements Runnable
|
||||
{
|
||||
public Spawn()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -212,6 +220,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Delete implements Runnable
|
||||
{
|
||||
public Delete()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -243,6 +255,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Clean implements Runnable
|
||||
{
|
||||
public Clean()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -79,6 +79,10 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
private int currentMonitorizedDamage = 0;
|
||||
private int zoneStage = 0;
|
||||
|
||||
public zoneInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void setZoneStage(int a)
|
||||
{
|
||||
zoneStage = a;
|
||||
|
@ -71,6 +71,10 @@ public class Stage1 extends AbstractInstance implements IXmlReader
|
||||
|
||||
private static class SODSpawn
|
||||
{
|
||||
public SODSpawn()
|
||||
{
|
||||
}
|
||||
|
||||
boolean isZone = false;
|
||||
boolean isNeededNextFlag = false;
|
||||
int npcId;
|
||||
|
@ -90,8 +90,8 @@ public class SiegeGuards extends AbstractNpcAI
|
||||
};
|
||||
//@formatter:on
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
private static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
protected static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
protected static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
|
||||
public SiegeGuards()
|
||||
{
|
||||
|
@ -47,6 +47,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DecayTask implements Runnable
|
||||
{
|
||||
public DecayTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -59,6 +63,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DepartTask implements Runnable
|
||||
{
|
||||
public DepartTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -27,6 +27,9 @@ public class Rnd
|
||||
* Thread-specific random number generator.<br>
|
||||
* Each is seeded with the thread ID, so the sequence of random numbers are unique between threads.
|
||||
*/
|
||||
// Java 1.8
|
||||
// private static ThreadLocal<Random> RANDOM = new ThreadLocal<Random>()
|
||||
// Java 10
|
||||
private static ThreadLocal<Random> RANDOM = new ThreadLocal<>()
|
||||
{
|
||||
@Override
|
||||
|
@ -29,8 +29,8 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
*/
|
||||
public class WarehouseCacheManager
|
||||
{
|
||||
private static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
private static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
protected static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
protected static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
@ -49,6 +49,10 @@ public class WarehouseCacheManager
|
||||
|
||||
private class CacheScheduler implements Runnable
|
||||
{
|
||||
public CacheScheduler()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
public class BotReportTable
|
||||
{
|
||||
// Zoey76: TODO: Split XML parsing from SQL operations, use IGameXmlReader instead of SAXParser.
|
||||
private static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
|
||||
private static final int COLUMN_BOT_ID = 1;
|
||||
private static final int COLUMN_REPORTER_ID = 2;
|
||||
@ -609,6 +609,10 @@ public class BotReportTable
|
||||
|
||||
private class ResetPointTask implements Runnable
|
||||
{
|
||||
public ResetPointTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -155,6 +155,10 @@ public class FortCommanderInstance extends DefenderInstance
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -74,6 +74,9 @@ public class EventMethodNotification
|
||||
|
||||
private void invoke(Object instance) throws Exception
|
||||
{
|
||||
// Java 1.8
|
||||
// final boolean wasAccessible = _method.isAccessible();
|
||||
// Java 10
|
||||
final boolean wasAccessible = _method.canAccess(instance);
|
||||
if (!wasAccessible)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ public class LongTimeEvent extends Quest
|
||||
// Messages
|
||||
protected String _onEnterMsg = "";
|
||||
protected String _endMsg = "";
|
||||
private int _enterAnnounceId = -1;
|
||||
protected int _enterAnnounceId = -1;
|
||||
|
||||
protected DateRange _eventPeriod = null;
|
||||
protected DateRange _dropPeriod;
|
||||
|
@ -24,12 +24,12 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
public class QuestTimer
|
||||
{
|
||||
private final String _name;
|
||||
private final Quest _quest;
|
||||
private final Npc _npc;
|
||||
private final PlayerInstance _player;
|
||||
private final boolean _isRepeating;
|
||||
private ScheduledFuture<?> _scheduler;
|
||||
protected final String _name;
|
||||
protected final Quest _quest;
|
||||
protected final Npc _npc;
|
||||
protected final PlayerInstance _player;
|
||||
protected final boolean _isRepeating;
|
||||
protected ScheduledFuture<?> _scheduler;
|
||||
|
||||
public QuestTimer(Quest quest, String name, long time, Npc npc, PlayerInstance player, boolean repeating)
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ import org.l2jmobius.gameserver.util.Locator;
|
||||
*/
|
||||
public class SystemPanel extends JPanel
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
|
||||
private static final long START_TIME = System.currentTimeMillis();
|
||||
protected static final long START_TIME = System.currentTimeMillis();
|
||||
|
||||
public SystemPanel()
|
||||
{
|
||||
|
@ -49,6 +49,10 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
|
||||
private class DocumentItemDataHolder
|
||||
{
|
||||
public DocumentItemDataHolder()
|
||||
{
|
||||
}
|
||||
|
||||
int id;
|
||||
String type;
|
||||
StatSet set;
|
||||
|
@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.holders.MinionHolder;
|
||||
*/
|
||||
public class MinionList
|
||||
{
|
||||
private final MonsterInstance _master;
|
||||
protected final MonsterInstance _master;
|
||||
private final List<MonsterInstance> _spawnedMinions = new CopyOnWriteArrayList<>();
|
||||
private final List<ScheduledFuture<?>> _respawnTasks = new CopyOnWriteArrayList<>();
|
||||
|
||||
|
@ -170,6 +170,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Start implements Runnable
|
||||
{
|
||||
public Start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -182,6 +186,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Spawn implements Runnable
|
||||
{
|
||||
public Spawn()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -212,6 +220,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Delete implements Runnable
|
||||
{
|
||||
public Delete()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -243,6 +255,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Clean implements Runnable
|
||||
{
|
||||
public Clean()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -79,6 +79,10 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
private int currentMonitorizedDamage = 0;
|
||||
private int zoneStage = 0;
|
||||
|
||||
public zoneInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void setZoneStage(int a)
|
||||
{
|
||||
zoneStage = a;
|
||||
|
@ -71,6 +71,10 @@ public class Stage1 extends AbstractInstance implements IXmlReader
|
||||
|
||||
private static class SODSpawn
|
||||
{
|
||||
public SODSpawn()
|
||||
{
|
||||
}
|
||||
|
||||
boolean isZone = false;
|
||||
boolean isNeededNextFlag = false;
|
||||
int npcId;
|
||||
|
@ -90,8 +90,8 @@ public class SiegeGuards extends AbstractNpcAI
|
||||
};
|
||||
//@formatter:on
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
private static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
protected static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
protected static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
|
||||
public SiegeGuards()
|
||||
{
|
||||
|
@ -47,6 +47,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DecayTask implements Runnable
|
||||
{
|
||||
public DecayTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -59,6 +63,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DepartTask implements Runnable
|
||||
{
|
||||
public DepartTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -27,6 +27,9 @@ public class Rnd
|
||||
* Thread-specific random number generator.<br>
|
||||
* Each is seeded with the thread ID, so the sequence of random numbers are unique between threads.
|
||||
*/
|
||||
// Java 1.8
|
||||
// private static ThreadLocal<Random> RANDOM = new ThreadLocal<Random>()
|
||||
// Java 10
|
||||
private static ThreadLocal<Random> RANDOM = new ThreadLocal<>()
|
||||
{
|
||||
@Override
|
||||
|
@ -29,8 +29,8 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
*/
|
||||
public class WarehouseCacheManager
|
||||
{
|
||||
private static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
private static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
protected static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
protected static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
@ -49,6 +49,10 @@ public class WarehouseCacheManager
|
||||
|
||||
private class CacheScheduler implements Runnable
|
||||
{
|
||||
public CacheScheduler()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
public class BotReportTable
|
||||
{
|
||||
// Zoey76: TODO: Split XML parsing from SQL operations, use IGameXmlReader instead of SAXParser.
|
||||
private static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
|
||||
private static final int COLUMN_BOT_ID = 1;
|
||||
private static final int COLUMN_REPORTER_ID = 2;
|
||||
@ -609,6 +609,10 @@ public class BotReportTable
|
||||
|
||||
private class ResetPointTask implements Runnable
|
||||
{
|
||||
public ResetPointTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -155,6 +155,10 @@ public class FortCommanderInstance extends DefenderInstance
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -74,6 +74,9 @@ public class EventMethodNotification
|
||||
|
||||
private void invoke(Object instance) throws Exception
|
||||
{
|
||||
// Java 1.8
|
||||
// final boolean wasAccessible = _method.isAccessible();
|
||||
// Java 10
|
||||
final boolean wasAccessible = _method.canAccess(instance);
|
||||
if (!wasAccessible)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ public class LongTimeEvent extends Quest
|
||||
// Messages
|
||||
protected String _onEnterMsg = "";
|
||||
protected String _endMsg = "";
|
||||
private int _enterAnnounceId = -1;
|
||||
protected int _enterAnnounceId = -1;
|
||||
|
||||
protected DateRange _eventPeriod = null;
|
||||
protected DateRange _dropPeriod;
|
||||
|
@ -24,12 +24,12 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
public class QuestTimer
|
||||
{
|
||||
private final String _name;
|
||||
private final Quest _quest;
|
||||
private final Npc _npc;
|
||||
private final PlayerInstance _player;
|
||||
private final boolean _isRepeating;
|
||||
private ScheduledFuture<?> _scheduler;
|
||||
protected final String _name;
|
||||
protected final Quest _quest;
|
||||
protected final Npc _npc;
|
||||
protected final PlayerInstance _player;
|
||||
protected final boolean _isRepeating;
|
||||
protected ScheduledFuture<?> _scheduler;
|
||||
|
||||
public QuestTimer(Quest quest, String name, long time, Npc npc, PlayerInstance player, boolean repeating)
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ import org.l2jmobius.gameserver.util.Locator;
|
||||
*/
|
||||
public class SystemPanel extends JPanel
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
|
||||
private static final long START_TIME = System.currentTimeMillis();
|
||||
protected static final long START_TIME = System.currentTimeMillis();
|
||||
|
||||
public SystemPanel()
|
||||
{
|
||||
|
@ -49,6 +49,10 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
|
||||
private class DocumentItemDataHolder
|
||||
{
|
||||
public DocumentItemDataHolder()
|
||||
{
|
||||
}
|
||||
|
||||
int id;
|
||||
String type;
|
||||
StatSet set;
|
||||
|
@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.holders.MinionHolder;
|
||||
*/
|
||||
public class MinionList
|
||||
{
|
||||
private final MonsterInstance _master;
|
||||
protected final MonsterInstance _master;
|
||||
private final List<MonsterInstance> _spawnedMinions = new CopyOnWriteArrayList<>();
|
||||
private final List<ScheduledFuture<?>> _respawnTasks = new CopyOnWriteArrayList<>();
|
||||
|
||||
|
@ -170,6 +170,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Start implements Runnable
|
||||
{
|
||||
public Start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -182,6 +186,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Spawn implements Runnable
|
||||
{
|
||||
public Spawn()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -212,6 +220,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Delete implements Runnable
|
||||
{
|
||||
public Delete()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -243,6 +255,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Clean implements Runnable
|
||||
{
|
||||
public Clean()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -79,6 +79,10 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
private int currentMonitorizedDamage = 0;
|
||||
private int zoneStage = 0;
|
||||
|
||||
public zoneInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void setZoneStage(int a)
|
||||
{
|
||||
zoneStage = a;
|
||||
|
@ -71,6 +71,10 @@ public class Stage1 extends AbstractInstance implements IXmlReader
|
||||
|
||||
private static class SODSpawn
|
||||
{
|
||||
public SODSpawn()
|
||||
{
|
||||
}
|
||||
|
||||
boolean isZone = false;
|
||||
boolean isNeededNextFlag = false;
|
||||
int npcId;
|
||||
|
@ -90,8 +90,8 @@ public class SiegeGuards extends AbstractNpcAI
|
||||
};
|
||||
//@formatter:on
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
private static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
protected static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
protected static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
|
||||
public SiegeGuards()
|
||||
{
|
||||
|
@ -47,6 +47,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DecayTask implements Runnable
|
||||
{
|
||||
public DecayTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -59,6 +63,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DepartTask implements Runnable
|
||||
{
|
||||
public DepartTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -27,6 +27,9 @@ public class Rnd
|
||||
* Thread-specific random number generator.<br>
|
||||
* Each is seeded with the thread ID, so the sequence of random numbers are unique between threads.
|
||||
*/
|
||||
// Java 1.8
|
||||
// private static ThreadLocal<Random> RANDOM = new ThreadLocal<Random>()
|
||||
// Java 10
|
||||
private static ThreadLocal<Random> RANDOM = new ThreadLocal<>()
|
||||
{
|
||||
@Override
|
||||
|
@ -29,8 +29,8 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
*/
|
||||
public class WarehouseCacheManager
|
||||
{
|
||||
private static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
private static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
protected static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
protected static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
@ -49,6 +49,10 @@ public class WarehouseCacheManager
|
||||
|
||||
private class CacheScheduler implements Runnable
|
||||
{
|
||||
public CacheScheduler()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
public class BotReportTable
|
||||
{
|
||||
// Zoey76: TODO: Split XML parsing from SQL operations, use IGameXmlReader instead of SAXParser.
|
||||
private static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
|
||||
private static final int COLUMN_BOT_ID = 1;
|
||||
private static final int COLUMN_REPORTER_ID = 2;
|
||||
@ -609,6 +609,10 @@ public class BotReportTable
|
||||
|
||||
private class ResetPointTask implements Runnable
|
||||
{
|
||||
public ResetPointTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -155,6 +155,10 @@ public class FortCommanderInstance extends DefenderInstance
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -74,6 +74,9 @@ public class EventMethodNotification
|
||||
|
||||
private void invoke(Object instance) throws Exception
|
||||
{
|
||||
// Java 1.8
|
||||
// final boolean wasAccessible = _method.isAccessible();
|
||||
// Java 10
|
||||
final boolean wasAccessible = _method.canAccess(instance);
|
||||
if (!wasAccessible)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ public class LongTimeEvent extends Quest
|
||||
// Messages
|
||||
protected String _onEnterMsg = "";
|
||||
protected String _endMsg = "";
|
||||
private int _enterAnnounceId = -1;
|
||||
protected int _enterAnnounceId = -1;
|
||||
|
||||
protected DateRange _eventPeriod = null;
|
||||
protected DateRange _dropPeriod;
|
||||
|
@ -24,12 +24,12 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
public class QuestTimer
|
||||
{
|
||||
private final String _name;
|
||||
private final Quest _quest;
|
||||
private final Npc _npc;
|
||||
private final PlayerInstance _player;
|
||||
private final boolean _isRepeating;
|
||||
private ScheduledFuture<?> _scheduler;
|
||||
protected final String _name;
|
||||
protected final Quest _quest;
|
||||
protected final Npc _npc;
|
||||
protected final PlayerInstance _player;
|
||||
protected final boolean _isRepeating;
|
||||
protected ScheduledFuture<?> _scheduler;
|
||||
|
||||
public QuestTimer(Quest quest, String name, long time, Npc npc, PlayerInstance player, boolean repeating)
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ import org.l2jmobius.gameserver.util.Locator;
|
||||
*/
|
||||
public class SystemPanel extends JPanel
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
|
||||
private static final long START_TIME = System.currentTimeMillis();
|
||||
protected static final long START_TIME = System.currentTimeMillis();
|
||||
|
||||
public SystemPanel()
|
||||
{
|
||||
|
@ -49,6 +49,10 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
|
||||
private class DocumentItemDataHolder
|
||||
{
|
||||
public DocumentItemDataHolder()
|
||||
{
|
||||
}
|
||||
|
||||
int id;
|
||||
String type;
|
||||
StatSet set;
|
||||
|
@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.holders.MinionHolder;
|
||||
*/
|
||||
public class MinionList
|
||||
{
|
||||
private final MonsterInstance _master;
|
||||
protected final MonsterInstance _master;
|
||||
private final List<MonsterInstance> _spawnedMinions = new CopyOnWriteArrayList<>();
|
||||
private final List<ScheduledFuture<?>> _respawnTasks = new CopyOnWriteArrayList<>();
|
||||
|
||||
|
@ -170,6 +170,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Start implements Runnable
|
||||
{
|
||||
public Start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -182,6 +186,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Spawn implements Runnable
|
||||
{
|
||||
public Spawn()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -212,6 +220,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Delete implements Runnable
|
||||
{
|
||||
public Delete()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -243,6 +255,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Clean implements Runnable
|
||||
{
|
||||
public Clean()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -79,6 +79,10 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
private int currentMonitorizedDamage = 0;
|
||||
private int zoneStage = 0;
|
||||
|
||||
public zoneInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void setZoneStage(int a)
|
||||
{
|
||||
zoneStage = a;
|
||||
|
@ -71,6 +71,10 @@ public class Stage1 extends AbstractInstance implements IXmlReader
|
||||
|
||||
private static class SODSpawn
|
||||
{
|
||||
public SODSpawn()
|
||||
{
|
||||
}
|
||||
|
||||
boolean isZone = false;
|
||||
boolean isNeededNextFlag = false;
|
||||
int npcId;
|
||||
|
@ -90,8 +90,8 @@ public class SiegeGuards extends AbstractNpcAI
|
||||
};
|
||||
//@formatter:on
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
private static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
protected static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
protected static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
|
||||
public SiegeGuards()
|
||||
{
|
||||
|
@ -47,6 +47,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DecayTask implements Runnable
|
||||
{
|
||||
public DecayTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -59,6 +63,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DepartTask implements Runnable
|
||||
{
|
||||
public DepartTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -27,6 +27,9 @@ public class Rnd
|
||||
* Thread-specific random number generator.<br>
|
||||
* Each is seeded with the thread ID, so the sequence of random numbers are unique between threads.
|
||||
*/
|
||||
// Java 1.8
|
||||
// private static ThreadLocal<Random> RANDOM = new ThreadLocal<Random>()
|
||||
// Java 10
|
||||
private static ThreadLocal<Random> RANDOM = new ThreadLocal<>()
|
||||
{
|
||||
@Override
|
||||
|
@ -29,8 +29,8 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
*/
|
||||
public class WarehouseCacheManager
|
||||
{
|
||||
private static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
private static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
protected static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
protected static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
@ -49,6 +49,10 @@ public class WarehouseCacheManager
|
||||
|
||||
private class CacheScheduler implements Runnable
|
||||
{
|
||||
public CacheScheduler()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
public class BotReportTable
|
||||
{
|
||||
// Zoey76: TODO: Split XML parsing from SQL operations, use IGameXmlReader instead of SAXParser.
|
||||
private static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
|
||||
private static final int COLUMN_BOT_ID = 1;
|
||||
private static final int COLUMN_REPORTER_ID = 2;
|
||||
@ -609,6 +609,10 @@ public class BotReportTable
|
||||
|
||||
private class ResetPointTask implements Runnable
|
||||
{
|
||||
public ResetPointTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -155,6 +155,10 @@ public class FortCommanderInstance extends DefenderInstance
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -74,6 +74,9 @@ public class EventMethodNotification
|
||||
|
||||
private void invoke(Object instance) throws Exception
|
||||
{
|
||||
// Java 1.8
|
||||
// final boolean wasAccessible = _method.isAccessible();
|
||||
// Java 10
|
||||
final boolean wasAccessible = _method.canAccess(instance);
|
||||
if (!wasAccessible)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ public class LongTimeEvent extends Quest
|
||||
// Messages
|
||||
protected String _onEnterMsg = "";
|
||||
protected String _endMsg = "";
|
||||
private int _enterAnnounceId = -1;
|
||||
protected int _enterAnnounceId = -1;
|
||||
|
||||
protected DateRange _eventPeriod = null;
|
||||
protected DateRange _dropPeriod;
|
||||
|
@ -24,12 +24,12 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
public class QuestTimer
|
||||
{
|
||||
private final String _name;
|
||||
private final Quest _quest;
|
||||
private final Npc _npc;
|
||||
private final PlayerInstance _player;
|
||||
private final boolean _isRepeating;
|
||||
private ScheduledFuture<?> _scheduler;
|
||||
protected final String _name;
|
||||
protected final Quest _quest;
|
||||
protected final Npc _npc;
|
||||
protected final PlayerInstance _player;
|
||||
protected final boolean _isRepeating;
|
||||
protected ScheduledFuture<?> _scheduler;
|
||||
|
||||
public QuestTimer(Quest quest, String name, long time, Npc npc, PlayerInstance player, boolean repeating)
|
||||
{
|
||||
|
@ -40,9 +40,9 @@ import org.l2jmobius.gameserver.util.Locator;
|
||||
*/
|
||||
public class SystemPanel extends JPanel
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
|
||||
private static final long START_TIME = System.currentTimeMillis();
|
||||
protected static final long START_TIME = System.currentTimeMillis();
|
||||
|
||||
public SystemPanel()
|
||||
{
|
||||
|
@ -49,6 +49,10 @@ public class DocumentItem extends DocumentBase implements IXmlReader
|
||||
|
||||
private class DocumentItemDataHolder
|
||||
{
|
||||
public DocumentItemDataHolder()
|
||||
{
|
||||
}
|
||||
|
||||
int id;
|
||||
String type;
|
||||
StatSet set;
|
||||
|
@ -36,7 +36,7 @@ import org.l2jmobius.gameserver.model.holders.MinionHolder;
|
||||
*/
|
||||
public class MinionList
|
||||
{
|
||||
private final MonsterInstance _master;
|
||||
protected final MonsterInstance _master;
|
||||
private final List<MonsterInstance> _spawnedMinions = new CopyOnWriteArrayList<>();
|
||||
private final List<ScheduledFuture<?>> _respawnTasks = new CopyOnWriteArrayList<>();
|
||||
|
||||
|
@ -170,6 +170,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Start implements Runnable
|
||||
{
|
||||
public Start()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -182,6 +186,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Spawn implements Runnable
|
||||
{
|
||||
public Spawn()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -212,6 +220,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Delete implements Runnable
|
||||
{
|
||||
public Delete()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -243,6 +255,10 @@ public class Parade extends AbstractNpcAI
|
||||
|
||||
private class Clean implements Runnable
|
||||
{
|
||||
public Clean()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -79,6 +79,10 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
private int currentMonitorizedDamage = 0;
|
||||
private int zoneStage = 0;
|
||||
|
||||
public zoneInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void setZoneStage(int a)
|
||||
{
|
||||
zoneStage = a;
|
||||
|
@ -71,6 +71,10 @@ public class Stage1 extends AbstractInstance implements IXmlReader
|
||||
|
||||
private static class SODSpawn
|
||||
{
|
||||
public SODSpawn()
|
||||
{
|
||||
}
|
||||
|
||||
boolean isZone = false;
|
||||
boolean isNeededNextFlag = false;
|
||||
int npcId;
|
||||
|
@ -90,8 +90,8 @@ public class SiegeGuards extends AbstractNpcAI
|
||||
};
|
||||
//@formatter:on
|
||||
@SuppressWarnings("unchecked")
|
||||
private static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
private static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
protected static final List<Npc>[] RESIDENCE_GUARD_MAP = new CopyOnWriteArrayList[122];
|
||||
protected static final boolean[] RESIDENCE_WORKING = new boolean[122];
|
||||
|
||||
public SiegeGuards()
|
||||
{
|
||||
|
@ -47,6 +47,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DecayTask implements Runnable
|
||||
{
|
||||
public DecayTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@ -59,6 +63,10 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
|
||||
private final class DepartTask implements Runnable
|
||||
{
|
||||
public DepartTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -27,6 +27,9 @@ public class Rnd
|
||||
* Thread-specific random number generator.<br>
|
||||
* Each is seeded with the thread ID, so the sequence of random numbers are unique between threads.
|
||||
*/
|
||||
// Java 1.8
|
||||
// private static ThreadLocal<Random> RANDOM = new ThreadLocal<Random>()
|
||||
// Java 10
|
||||
private static ThreadLocal<Random> RANDOM = new ThreadLocal<>()
|
||||
{
|
||||
@Override
|
||||
|
@ -29,8 +29,8 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
*/
|
||||
public class WarehouseCacheManager
|
||||
{
|
||||
private static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
private static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
protected static final Map<PlayerInstance, Long> CACHED_WH = new ConcurrentHashMap<>();
|
||||
protected static final long CACHE_TIME = Config.WAREHOUSE_CACHE_TIME * 60000;
|
||||
|
||||
protected WarehouseCacheManager()
|
||||
{
|
||||
@ -49,6 +49,10 @@ public class WarehouseCacheManager
|
||||
|
||||
private class CacheScheduler implements Runnable
|
||||
{
|
||||
public CacheScheduler()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
public class BotReportTable
|
||||
{
|
||||
// Zoey76: TODO: Split XML parsing from SQL operations, use IGameXmlReader instead of SAXParser.
|
||||
private static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(BotReportTable.class.getName());
|
||||
|
||||
private static final int COLUMN_BOT_ID = 1;
|
||||
private static final int COLUMN_REPORTER_ID = 2;
|
||||
@ -609,6 +609,10 @@ public class BotReportTable
|
||||
|
||||
private class ResetPointTask implements Runnable
|
||||
{
|
||||
public ResetPointTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -155,6 +155,10 @@ public class FortCommanderInstance extends DefenderInstance
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
@ -74,6 +74,9 @@ public class EventMethodNotification
|
||||
|
||||
private void invoke(Object instance) throws Exception
|
||||
{
|
||||
// Java 1.8
|
||||
// final boolean wasAccessible = _method.isAccessible();
|
||||
// Java 10
|
||||
final boolean wasAccessible = _method.canAccess(instance);
|
||||
if (!wasAccessible)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user