Backward compatibility changes for Java 8.
This commit is contained in:
@@ -47,6 +47,10 @@ public class HallOfSufferingAttack extends AbstractNpcAI
|
||||
{
|
||||
private class HSAWorld extends InstanceWorld
|
||||
{
|
||||
public HSAWorld()
|
||||
{
|
||||
}
|
||||
|
||||
public Map<Npc, Boolean> npcList = new HashMap<>();
|
||||
public Npc klodekus = null;
|
||||
public Npc klanikus = null;
|
||||
|
||||
@@ -47,6 +47,10 @@ public class HallOfSufferingDefence extends AbstractNpcAI
|
||||
{
|
||||
private class HSDWorld extends InstanceWorld
|
||||
{
|
||||
public HSDWorld()
|
||||
{
|
||||
}
|
||||
|
||||
public Map<Npc, Boolean> npcList = new HashMap<>();
|
||||
public Npc klodekus = null;
|
||||
public Npc klanikus = null;
|
||||
|
||||
@@ -65,6 +65,10 @@ public class HeartInfinityAttack extends AbstractNpcAI
|
||||
public long startTime = 0;
|
||||
protected ScheduledFuture<?> timerTask;
|
||||
|
||||
public HIAWorld()
|
||||
{
|
||||
}
|
||||
|
||||
public synchronized void addTumorCount(int value)
|
||||
{
|
||||
tumorCount += value;
|
||||
|
||||
@@ -53,6 +53,10 @@ public class HeartInfinityDefence extends AbstractNpcAI
|
||||
{
|
||||
private class HIDWorld extends InstanceWorld
|
||||
{
|
||||
public HIDWorld()
|
||||
{
|
||||
}
|
||||
|
||||
public List<Npc> npcList = new ArrayList<>();
|
||||
public List<Npc> deadTumors = new ArrayList<>();
|
||||
protected Npc deadTumor;
|
||||
|
||||
@@ -63,14 +63,14 @@ public class SeerUgoros extends AbstractNpcAI
|
||||
private static final byte FIGHTING = 1;
|
||||
private static final byte DEAD = 2;
|
||||
// Misc
|
||||
private static byte _state = DEAD;
|
||||
private static boolean _weedAttack = false;
|
||||
protected static byte _state = DEAD;
|
||||
protected static boolean _weedAttack = false;
|
||||
private static boolean _weedKilledByPlayer = false;
|
||||
private static boolean _killedOneWeed = false;
|
||||
private static Attackable _weed = null;
|
||||
private static Attackable _ugoros = null;
|
||||
private static PlayerInstance _attacker = null;
|
||||
private static ScheduledFuture<?> _thinkTask = null;
|
||||
protected static Attackable _weed = null;
|
||||
protected static Attackable _ugoros = null;
|
||||
protected static PlayerInstance _attacker = null;
|
||||
protected static ScheduledFuture<?> _thinkTask = null;
|
||||
|
||||
private SeerUgoros()
|
||||
{
|
||||
@@ -300,6 +300,10 @@ public class SeerUgoros extends AbstractNpcAI
|
||||
|
||||
private class ThinkTask implements Runnable
|
||||
{
|
||||
public ThinkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@@ -346,7 +350,7 @@ public class SeerUgoros extends AbstractNpcAI
|
||||
}
|
||||
}
|
||||
|
||||
private void changeAttackTarget(Creature attacker)
|
||||
protected void changeAttackTarget(Creature attacker)
|
||||
{
|
||||
_ugoros.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||
_ugoros.clearAggroList();
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -75,12 +75,12 @@ public class Q00311_ExpulsionOfEvilSpirits extends Quest
|
||||
private static final int SOUL_CORE_COUNT = 10;
|
||||
private static final int RAGNA_ORCS_KILLS_COUNT = 100;
|
||||
private static final int RAGNA_ORCS_AMULET_COUNT = 10;
|
||||
private static final ZoneType ALTARZONE = ZoneManager.getInstance().getZoneById(20201);
|
||||
private static long respawnTime = 0;
|
||||
private static Npc _altar;
|
||||
protected static final ZoneType ALTARZONE = ZoneManager.getInstance().getZoneById(20201);
|
||||
protected static Npc _altar;
|
||||
private static Npc _varangka;
|
||||
private static Npc _varangkaMinion1;
|
||||
private static Npc _varangkaMinion2;
|
||||
private static long respawnTime = 0;
|
||||
|
||||
public Q00311_ExpulsionOfEvilSpirits()
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
@@ -615,6 +615,10 @@ public class BotReportTable
|
||||
|
||||
private class ResetPointTask implements Runnable
|
||||
{
|
||||
public ResetPointTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
||||
@@ -1404,6 +1404,10 @@ public class TerritoryWarManager implements Siegable
|
||||
|
||||
private class closeTerritoryChannelTask implements Runnable
|
||||
{
|
||||
public closeTerritoryChannelTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
||||
@@ -168,6 +168,10 @@ public class FortCommanderInstance extends DefenderInstance
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
||||
@@ -203,6 +203,10 @@ public class SiegeFlagInstance extends Npc
|
||||
|
||||
private class ScheduleTalkTask implements Runnable
|
||||
{
|
||||
public ScheduleTalkTask()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
||||
@@ -59,7 +59,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()
|
||||
{
|
||||
|
||||
@@ -40,6 +40,10 @@ public class DocumentItem extends DocumentBase
|
||||
|
||||
private class DocumentItemDataHolder
|
||||
{
|
||||
public DocumentItemDataHolder()
|
||||
{
|
||||
}
|
||||
|
||||
int id;
|
||||
String type;
|
||||
StatSet set;
|
||||
|
||||
@@ -41,6 +41,10 @@ public class DocumentSkill extends DocumentBase
|
||||
|
||||
private class DocumentSkillDataHolder
|
||||
{
|
||||
public DocumentSkillDataHolder()
|
||||
{
|
||||
}
|
||||
|
||||
public int id;
|
||||
public String name;
|
||||
public StatSet[] sets;
|
||||
|
||||
@@ -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<>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user