Threadpool refactoring.

This commit is contained in:
MobiusDev
2018-04-02 14:50:53 +00:00
parent 317478a66d
commit 0c201f75e7
1127 changed files with 5204 additions and 5174 deletions
@@ -20,8 +20,8 @@ import java.text.SimpleDateFormat;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
@@ -131,7 +131,7 @@ public final class Parade extends AbstractNpcAI
// Starts at 8:00 and repeats every 6 hours.
final long diff = timeLeftMilli(8, 0, 0), cycle = 3600000L;
ThreadPoolManager.scheduleAtFixedRate(new Start(), diff, cycle);
ThreadPool.scheduleAtFixedRate(new Start(), diff, cycle);
// Test - Starts 3 minutes after server startup and repeats every 20 minutes.
// final long diff = timeLeftMilli(8, 0, 0), cycle = 600000L;
@@ -169,9 +169,9 @@ public final class Parade extends AbstractNpcAI
public void run()
{
load();
spawnTask = ThreadPoolManager.scheduleAtFixedRate(new Spawn(), 0, 5000);
deleteTask = ThreadPoolManager.scheduleAtFixedRate(new Delete(), 10000, 1000);
cleanTask = ThreadPoolManager.schedule(new Clean(), 420000);
spawnTask = ThreadPool.scheduleAtFixedRate(new Spawn(), 0, 5000);
deleteTask = ThreadPool.scheduleAtFixedRate(new Delete(), 10000, 1000);
cleanTask = ThreadPool.schedule(new Clean(), 420000);
}
}
@@ -16,7 +16,7 @@
*/
package ai.group_template;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.model.Location;
@@ -128,7 +128,7 @@ public final class DenOfEvil extends AbstractNpcAI
zone.addSkill(skillId, skillLevel + 1);
if (skillLevel == 3) // 3+1=4
{
ThreadPoolManager.schedule(new KashaDestruction(zone), 2 * 60 * 1000l);
ThreadPool.schedule(new KashaDestruction(zone), 2 * 60 * 1000l);
zone.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.KASHA_S_EYE_PITCHES_AND_TOSSES_LIKE_IT_S_ABOUT_TO_EXPLODE));
}
else if (skillLevel == 2)
@@ -141,7 +141,7 @@ public final class DenOfEvil extends AbstractNpcAI
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
ThreadPoolManager.schedule(new RespawnNewEye(npc.getLocation()), 15000);
ThreadPool.schedule(new RespawnNewEye(npc.getLocation()), 15000);
final L2EffectZone zone = ZoneManager.getInstance().getZone(npc, L2EffectZone.class);
if (zone == null)
{
@@ -216,7 +216,7 @@ public final class DenOfEvil extends AbstractNpcAI
final L2Npc npc = (L2Npc) character;
if (Util.contains(EYE_IDS, npc.getId()))
{
ThreadPoolManager.schedule(new RespawnNewEye(npc.getLocation()), 15000);
ThreadPool.schedule(new RespawnNewEye(npc.getLocation()), 15000);
}
}
}
@@ -19,7 +19,7 @@ package ai.group_template;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
@@ -91,7 +91,7 @@ public final class RandomSpawn extends AbstractNpcAI
if (!npc.isInsideRadius(loc, 200, false, false))
{
npc.getSpawn().setLocation(loc);
ThreadPoolManager.schedule(new Teleport(npc, loc), 100);
ThreadPool.schedule(new Teleport(npc, loc), 100);
}
return super.onSpawn(npc);
}
@@ -21,7 +21,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
import com.l2jmobius.gameserver.model.Location;
@@ -246,7 +246,7 @@ public final class QueenAnt extends AbstractNpcAI
}
case QUEEN:
{
_task = ThreadPoolManager.scheduleAtFixedRate(new QueenAntTask(), 5 * 1000, 5 * 1000);
_task = ThreadPool.scheduleAtFixedRate(new QueenAntTask(), 5 * 1000, 5 * 1000);
break;
}
}
@@ -25,7 +25,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.geoengine.GeoEngine;
import com.l2jmobius.gameserver.model.L2Spawn;
import com.l2jmobius.gameserver.model.L2Territory;
@@ -55,8 +55,8 @@ public class TarBeetleSpawn implements IXmlReader
parseDatapackFile("data/spawnZones/tar_beetle.xml");
if (!zones.isEmpty())
{
spawnTask = ThreadPoolManager.scheduleAtFixedRate(() -> zones.forEach(SpawnZone::refreshSpawn), 1000, 60000);
shotTask = ThreadPoolManager.scheduleAtFixedRate(() -> zones.forEach(SpawnZone::refreshShots), 300000, 300000);
spawnTask = ThreadPool.scheduleAtFixedRate(() -> zones.forEach(SpawnZone::refreshSpawn), 1000, 60000);
shotTask = ThreadPool.scheduleAtFixedRate(() -> zones.forEach(SpawnZone::refreshShots), 300000, 300000);
}
}
@@ -16,7 +16,7 @@
*/
package ai.npc.NpcBuffers;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -110,7 +110,7 @@ public class NpcBufferAI implements Runnable
break;
}
}
ThreadPoolManager.schedule(this, _skillData.getDelay());
ThreadPool.schedule(this, _skillData.getDelay());
}
/**
@@ -16,7 +16,7 @@
*/
package ai.npc.NpcBuffers;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -54,7 +54,7 @@ public final class NpcBuffers extends AbstractNpcAI
final NpcBufferData data = _npcBuffers.getNpcBuffer(npc.getId());
for (NpcBufferSkillData skill : data.getSkills())
{
ThreadPoolManager.schedule(new NpcBufferAI(npc, skill), skill.getInitialDelay());
ThreadPool.schedule(new NpcBufferAI(npc, skill), skill.getInitialDelay());
}
return super.onSpawn(npc);
}
@@ -18,8 +18,8 @@ package ai.npc.NpcBuffers.impl;
import java.util.Collection;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.SevenSigns;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.actor.L2Npc;
@@ -76,8 +76,8 @@ public final class CabaleBuffer extends AbstractNpcAI
@Override
public String onSpawn(L2Npc npc)
{
ThreadPoolManager.schedule(new CabaleAI(npc), 3000);
ThreadPoolManager.schedule(new Talk(npc), 60000);
ThreadPool.schedule(new CabaleAI(npc), 3000);
ThreadPool.schedule(new Talk(npc), 60000);
return super.onSpawn(npc);
}
@@ -101,7 +101,7 @@ public final class CabaleBuffer extends AbstractNpcAI
messages = PREACHER_MSG;
}
broadcastSay(_npc, messages[getRandom(messages.length)], null, -1);
ThreadPoolManager.schedule(this, 60000);
ThreadPool.schedule(this, 60000);
}
}
}
@@ -224,7 +224,7 @@ public final class CabaleBuffer extends AbstractNpcAI
break;
}
}
ThreadPoolManager.schedule(this, 3000);
ThreadPool.schedule(this, 3000);
}
/**
@@ -20,8 +20,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.L2Clan;
@@ -159,7 +159,7 @@ public final class FortressOfTheDead extends ClanHallSiegeEngine
{
cancelSiegeTask();
final long scheduleTime = (24 - hoursLeft) * 10 * 60000;
_siegeTask = ThreadPoolManager.schedule(new SiegeStarts(), scheduleTime);
_siegeTask = ThreadPool.schedule(new SiegeStarts(), scheduleTime);
}
else
{
@@ -29,8 +29,8 @@ import java.util.Map;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.cache.HtmCache;
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
import com.l2jmobius.gameserver.datatables.SpawnTable;
@@ -116,7 +116,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
}
if (_acceptedClans.size() >= 2)
{
_nextSiege = ThreadPoolManager.schedule(new SiegeStart(), 3600000);
_nextSiege = ThreadPool.schedule(new SiegeStart(), 3600000);
_rainbow.updateSiegeStatus(SiegeStatus.WAITING_BATTLE);
}
else
@@ -140,7 +140,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
// XXX _rainbow.siegeStarts();
spawnGourds();
_siegeEnd = ThreadPoolManager.schedule(new SiegeEnd(null), _rainbow.getSiegeLenght() - 120000);
_siegeEnd = ThreadPool.schedule(new SiegeEnd(null), _rainbow.getSiegeLenght() - 120000);
}
}
@@ -178,10 +178,10 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
// XXX _rainbow.siegeEnds();
ThreadPoolManager.schedule(new SetFinalAttackers(), _rainbow.getNextSiegeTime());
ThreadPool.schedule(new SetFinalAttackers(), _rainbow.getNextSiegeTime());
setRegistrationEndString((_rainbow.getNextSiegeTime() + System.currentTimeMillis()) - 3600000);
// Teleport out of the arenas is made 2 mins after game ends
ThreadPoolManager.schedule(new TeleportBack(), 120000);
ThreadPool.schedule(new TeleportBack(), 120000);
}
}
@@ -287,7 +287,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
if (delay > -1)
{
setRegistrationEndString(delay - 3600000);
_nextSiege = ThreadPoolManager.schedule(new SetFinalAttackers(), delay);
_nextSiege = ThreadPool.schedule(new SetFinalAttackers(), delay);
}
else
{
@@ -625,7 +625,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
{
_siegeEnd.cancel(false);
}
ThreadPoolManager.execute(new SiegeEnd(clan));
ThreadPool.execute(new SiegeEnd(clan));
}
}
@@ -905,7 +905,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
public static void launchSiege()
{
_nextSiege.cancel(false);
ThreadPoolManager.execute(new SiegeStart());
ThreadPool.execute(new SiegeStart());
}
@Override
@@ -915,7 +915,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
{
_siegeEnd.cancel(false);
}
ThreadPoolManager.execute(new SiegeEnd(null));
ThreadPool.execute(new SiegeEnd(null));
}
public static void updateAdminDate(long date)
@@ -932,7 +932,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
}
date -= 3600000;
setRegistrationEndString(date);
_nextSiege = ThreadPoolManager.schedule(new SetFinalAttackers(), _rainbow.getNextSiegeTime());
_nextSiege = ThreadPool.schedule(new SetFinalAttackers(), _rainbow.getNextSiegeTime());
}
public static void main(String[] args)
@@ -25,8 +25,8 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.ai.L2SpecialSiegeGuardAI;
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
@@ -402,7 +402,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
doUnSpawns(data);
}
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
for (int doorId : INNER_DOORS_TO_OPEN)
{
@@ -457,7 +457,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
Broadcast.toAllOnlinePlayers(msg);
_hall.updateSiegeStatus(SiegeStatus.WAITING_BATTLE);
_siegeTask = ThreadPoolManager.schedule(new SiegeStarts(), 3600000);
_siegeTask = ThreadPool.schedule(new SiegeStarts(), 3600000);
}
@Override
@@ -499,7 +499,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
}
// Schedule open doors closement and siege start in 2 minutes
ThreadPoolManager.schedule(new CloseOutterDoorsTask(this), 300000);
ThreadPool.schedule(new CloseOutterDoorsTask(this), 300000);
}
/**
@@ -21,7 +21,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2EventMonsterInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -111,7 +111,7 @@ public final class Elpies extends Event
Broadcast.toAllOnlinePlayers("Help us exterminate them!");
Broadcast.toAllOnlinePlayers("You have " + EVENT_DURATION_MINUTES + " minutes!");
_eventTask = ThreadPoolManager.schedule(() ->
_eventTask = ThreadPool.schedule(() ->
{
Broadcast.toAllOnlinePlayers("Time is up!");
eventStop();
@@ -21,7 +21,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.actor.L2Npc;
@@ -137,7 +137,7 @@ public final class Race extends Event
Broadcast.toAllOnlinePlayers("Visit Event Manager in Dion village and signup, you have " + _time_register + " min before Race Start...");
// Schedule Event end
_eventTask = ThreadPoolManager.schedule(() -> StartRace(), _time_register * 60 * 1000);
_eventTask = ThreadPool.schedule(() -> StartRace(), _time_register * 60 * 1000);
return true;
@@ -180,7 +180,7 @@ public final class Race extends Event
}
}
// Schedule timeup for Race
_eventTask = ThreadPoolManager.schedule(() -> timeUp(), _time_race * 60 * 1000);
_eventTask = ThreadPool.schedule(() -> timeUp(), _time_race * 60 * 1000);
}
@Override
@@ -23,7 +23,7 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
@@ -977,7 +977,7 @@ public class EnergySeeds extends AbstractNpcAI
public void scheduleRespawn(long waitTime)
{
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
// if the AI is inactive, do not spawn the NPC
if (isSeedActive(_seedId))
@@ -21,7 +21,7 @@ import java.util.Calendar;
import java.util.List;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.instancemanager.SoIManager;
@@ -561,8 +561,8 @@ public class HallOfErosionAttack extends AbstractNpcAI
npc.deleteMe();
world.deadTumor = addSpawn(TUMOR_DEAD, loc, world.getInstanceId());
world.deadTumors.add(world.deadTumor);
ThreadPoolManager.schedule(new TumorRevival(world.deadTumor, world), tumorRespawnTime);
ThreadPoolManager.schedule(new RegenerationCoffinSpawn(world.deadTumor, world), 20000);
ThreadPool.schedule(new TumorRevival(world.deadTumor, world), tumorRespawnTime);
ThreadPool.schedule(new RegenerationCoffinSpawn(world.deadTumor, world), 20000);
if (world.tumorCount >= 1)
{
broadCastPacket(world, new ExShowScreenMessage(NpcStringId.THE_TUMOR_INSIDE_S1_HAS_BEEN_DESTROYED_NIN_ORDER_TO_DRAW_OUT_THE_COWARDLY_COHEMENES_YOU_MUST_DESTROY_ALL_THE_TUMORS, 2, 8000));
@@ -21,7 +21,7 @@ import java.util.List;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.L2CommandChannel;
@@ -358,7 +358,7 @@ public class HallOfErosionDefence extends AbstractNpcAI
world.addAllowed(player.getObjectId());
}
((HEDWorld) world).finishTask = ThreadPoolManager.schedule(new FinishTask((HEDWorld) world), 20 * 60000);
((HEDWorld) world).finishTask = ThreadPool.schedule(new FinishTask((HEDWorld) world), 20 * 60000);
runTumors((HEDWorld) world);
}
}
@@ -391,7 +391,7 @@ public class HallOfErosionDefence extends AbstractNpcAI
{
final L2Npc npc = addSpawn(spawn[0], spawn[1], spawn[2], spawn[3], spawn[4], false, 0, false, world.getInstanceId());
world.deadTumors.add(npc);
ThreadPoolManager.schedule(new RegenerationCoffinSpawn(npc, world), 1000);
ThreadPool.schedule(new RegenerationCoffinSpawn(npc, world), 1000);
}
}
@@ -403,7 +403,7 @@ public class HallOfErosionDefence extends AbstractNpcAI
}
}
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
if (!conquestEnded)
{
@@ -544,7 +544,7 @@ public class HallOfErosionDefence extends AbstractNpcAI
world.deadTumor = addSpawn(TUMOR_DEAD, npc.getLocation(), world.getInstanceId());
world.deadTumors.add(world.deadTumor);
broadCastPacket(world, new ExShowScreenMessage(NpcStringId.THE_TUMOR_INSIDE_S1_HAS_BEEN_DESTROYED_NTHE_NEARBY_UNDEAD_THAT_WERE_ATTACKING_SEED_OF_LIFE_START_LOSING_THEIR_ENERGY_AND_RUN_AWAY, 2, 8000));
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
world.deadTumor.deleteMe();
final L2Npc tumor = addSpawn(TUMOR_ALIVE, world.deadTumor.getLocation(), world.getInstanceId());
@@ -22,7 +22,7 @@ import java.util.List;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
@@ -358,7 +358,7 @@ public class HeartInfinityAttack extends Quest
}
conquestBegun = true;
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
for (int objId : world.getAllowed())
{
@@ -366,7 +366,7 @@ public class HeartInfinityAttack extends Quest
player.showQuestMovie(2); // ExStartScenePlayer.SCENE_ECHMUS_OPENING
}
ThreadPoolManager.schedule(() -> conquestBegins(world), 62500);
ThreadPool.schedule(() -> conquestBegins(world), 62500);
}, 20000);
}
@@ -420,7 +420,7 @@ public class HeartInfinityAttack extends Quest
world.hounds.add(addSpawn(HOUND, -179224, 209624, -15504, 16384, false, 0, false, world.getInstanceId()));
world.hounds.add(addSpawn(HOUND, -179880, 209464, -15504, 16384, false, 0, false, world.getInstanceId()));
world.startTime = System.currentTimeMillis();
world.timerTask = ThreadPoolManager.scheduleAtFixedRate(new TimerTask(world), 298 * 1000, 5 * 60 * 1000);
world.timerTask = ThreadPool.scheduleAtFixedRate(new TimerTask(world), 298 * 1000, 5 * 60 * 1000);
}
@Override
@@ -607,8 +607,8 @@ public class HeartInfinityAttack extends Quest
npc.deleteMe();
world.deadTumor = addSpawn(DEADTUMOR, loc, world.getInstanceId());
world.deadTumors.add(world.deadTumor);
ThreadPoolManager.schedule(new TumorRevival(world.deadTumor, world), tumorRespawnTime);
ThreadPoolManager.schedule(new RegenerationCoffinSpawn(world.deadTumor, world), 20000);
ThreadPool.schedule(new TumorRevival(world.deadTumor, world), tumorRespawnTime);
ThreadPool.schedule(new RegenerationCoffinSpawn(world.deadTumor, world), 20000);
if (world.tumorCount < 1)
{
houndBlocked = true;
@@ -839,7 +839,7 @@ public class HeartInfinityAttack extends Quest
}
}
ThreadPoolManager.schedule(() -> broadCastPacket(world, new ExShowScreenMessage(NpcStringId.EKIMUS_HAS_SENSED_ABNORMAL_ACTIVITY_NTHE_ADVANCING_PARTY_IS_FORCEFULLY_EXPELLED, 2, 8000)), 10000);
ThreadPool.schedule(() -> broadCastPacket(world, new ExShowScreenMessage(NpcStringId.EKIMUS_HAS_SENSED_ABNORMAL_ACTIVITY_NTHE_ADVANCING_PARTY_IS_FORCEFULLY_EXPELLED, 2, 8000)), 10000);
}
protected void conquestConclusion(HIAWorld world)
@@ -21,7 +21,7 @@ import java.util.List;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
@@ -365,15 +365,15 @@ public class HeartInfinityDefence extends Quest
}
}
((HIDWorld) world).startTime = System.currentTimeMillis();
((HIDWorld) world).finishTask = ThreadPoolManager.schedule(new FinishTask((HIDWorld) world), 30 * 60000);
((HIDWorld) world).timerTask = ThreadPoolManager.scheduleAtFixedRate(new TimerTask((HIDWorld) world), 298 * 1000, 5 * 60 * 1000);
((HIDWorld) world).finishTask = ThreadPool.schedule(new FinishTask((HIDWorld) world), 30 * 60000);
((HIDWorld) world).timerTask = ThreadPool.scheduleAtFixedRate(new TimerTask((HIDWorld) world), 298 * 1000, 5 * 60 * 1000);
conquestBegins((HIDWorld) world);
}
}
private void conquestBegins(HIDWorld world)
{
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
broadCastPacket(world, new ExShowScreenMessage(NpcStringId.YOU_CAN_HEAR_THE_UNDEAD_OF_EKIMUS_RUSHING_TOWARD_YOU_S1_S2_IT_HAS_NOW_BEGUN, 2, 8000));
for (int[] spawn1 : ROOMS_MOBS)
@@ -406,7 +406,7 @@ public class HeartInfinityDefence extends Quest
InstanceManager.getInstance().getInstance(world.getInstanceId()).getDoor(14240102).openMe();
preawakenedEchmus = addSpawn(29161, -179534, 208510, -15496, 16342, false, 0, false, world.getInstanceId());
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
if (!conquestEnded)
{
@@ -423,7 +423,7 @@ public class HeartInfinityDefence extends Quest
}
}, 60000);
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
if (!conquestEnded)
{
@@ -452,7 +452,7 @@ public class HeartInfinityDefence extends Quest
}
}, tumorRespawnTime);
world.wagonSpawnTask = ThreadPoolManager.scheduleAtFixedRate(() -> addSpawn(SOULWAGON, -179544, 207400, -15496, 0, false, 0, false, world.getInstanceId()), 1000, wagonRespawnTime);
world.wagonSpawnTask = ThreadPool.scheduleAtFixedRate(() -> addSpawn(SOULWAGON, -179544, 207400, -15496, 0, false, 0, false, world.getInstanceId()), 1000, wagonRespawnTime);
}, 20000);
}
@@ -593,7 +593,7 @@ public class HeartInfinityDefence extends Quest
wagonRespawnTime += 10000;
broadCastPacket(world, new ExShowScreenMessage(NpcStringId.THE_TUMOR_INSIDE_S1_HAS_BEEN_DESTROYED_NTHE_SPEED_THAT_EKIMUS_CALLS_OUT_HIS_PREY_HAS_SLOWED_DOWN, 2, 8000));
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
world.deadTumor.deleteMe();
final L2Npc alivetumor = addSpawn(ALIVETUMOR, loc, world.getInstanceId());
@@ -20,7 +20,7 @@ import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.AirShipManager;
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
@@ -307,11 +307,11 @@ public abstract class AirShipController extends Quest
}
}
ThreadPoolManager.schedule(_decayTask, 1000);
ThreadPool.schedule(_decayTask, 1000);
}
else
{
_departSchedule = ThreadPoolManager.schedule(_departTask, DEPART_INTERVAL);
_departSchedule = ThreadPool.schedule(_departTask, DEPART_INTERVAL);
}
}
}
@@ -16,7 +16,7 @@
*/
package gracia.vehicles.AirShipGludioGracia;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.AirShipManager;
import com.l2jmobius.gameserver.model.L2Object;
@@ -255,7 +255,7 @@ public final class AirShipGludioGracia extends Quest implements Runnable
{
// _ship.teleToLocation(-167874, 256731, -509, 41035, false);
_ship.setOustLoc(OUST_GRACIA);
ThreadPoolManager.schedule(this, 5000);
ThreadPool.schedule(this, 5000);
break;
}
case 2:
@@ -268,7 +268,7 @@ public final class AirShipGludioGracia extends Quest implements Runnable
broadcastInGracia(NpcStringId.THE_REGULARLY_SCHEDULED_AIRSHIP_HAS_ARRIVED_IT_WILL_DEPART_FOR_THE_ADEN_CONTINENT_IN_1_MINUTE);
_ship.setInDock(GRACIA_DOCK_ID);
_ship.oustPlayers();
ThreadPoolManager.schedule(this, 60000);
ThreadPool.schedule(this, 60000);
break;
}
case 4:
@@ -282,7 +282,7 @@ public final class AirShipGludioGracia extends Quest implements Runnable
{
// _ship.teleToLocation(-157261, 255664, 221, 64781, false);
_ship.setOustLoc(OUST_GLUDIO);
ThreadPoolManager.schedule(this, 5000);
ThreadPool.schedule(this, 5000);
break;
}
case 6:
@@ -295,7 +295,7 @@ public final class AirShipGludioGracia extends Quest implements Runnable
broadcastInGludio(NpcStringId.THE_REGULARLY_SCHEDULED_AIRSHIP_HAS_ARRIVED_IT_WILL_DEPART_FOR_THE_GRACIA_CONTINENT_IN_1_MINUTE);
_ship.setInDock(GLUDIO_DOCK_ID);
_ship.oustPlayers();
ThreadPoolManager.schedule(this, 60000);
ThreadPool.schedule(this, 60000);
break;
}
}
@@ -29,8 +29,8 @@ import java.util.StringTokenizer;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.sql.impl.CharNameTable;
import com.l2jmobius.gameserver.data.xml.impl.ClassListData;
import com.l2jmobius.gameserver.data.xml.impl.TransformData;
@@ -385,7 +385,7 @@ public class AdminEditChar implements IAdminCommandHandler
if ((race != player.getRace()) || (((race == Race.HUMAN) || (race == Race.ORC)) && (isMage != player.isMageClass())))
{
TransformData.getInstance().transformPlayer(105, player);
ThreadPoolManager.schedule(new Untransform(player), 200);
ThreadPool.schedule(new Untransform(player), 200);
}
}
else
@@ -493,7 +493,7 @@ public class AdminEditChar implements IAdminCommandHandler
player.broadcastUserInfo();
// Transform-untransorm player quickly to force the client to reload the character textures
TransformData.getInstance().transformPlayer(105, player);
ThreadPoolManager.schedule(new Untransform(player), 200);
ThreadPool.schedule(new Untransform(player), 200);
}
else if (command.startsWith("admin_setcolor"))
@@ -16,8 +16,8 @@
*/
package handlers.admincommandhandlers;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.MonsterRace;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
@@ -109,7 +109,7 @@ public class AdminMonsterRace implements IAdminCommandHandler
activeChar.sendPacket(spk);
activeChar.broadcastPacket(spk);
ThreadPoolManager.schedule(new RunRace(codes, activeChar), 5000);
ThreadPool.schedule(new RunRace(codes, activeChar), 5000);
}
}
@@ -139,7 +139,7 @@ public class AdminMonsterRace implements IAdminCommandHandler
final MonRaceInfo spk = new MonRaceInfo(codes[2][0], codes[2][1], MonsterRace.getInstance().getMonsters(), MonsterRace.getInstance().getSpeeds());
activeChar.sendPacket(spk);
activeChar.broadcastPacket(spk);
ThreadPoolManager.schedule(new RunEnd(activeChar), 30000);
ThreadPool.schedule(new RunEnd(activeChar), 30000);
}
}
@@ -22,9 +22,9 @@ import java.util.Collection;
import java.util.LinkedList;
import java.util.StringTokenizer;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.mmocore.NioNetStringBuffer;
import com.l2jmobius.gameserver.GameServer;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.cache.HtmCache;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.L2Object;
@@ -603,7 +603,7 @@ public final class AdminPForge implements IAdminCommandHandler
p.setBuffers(bb, activeChar.getClient(), new NioNetStringBuffer(2000));
if (p.read())
{
ThreadPoolManager.execute(p);
ThreadPool.execute(p);
}
}
}
@@ -20,7 +20,7 @@ import java.util.NoSuchElementException;
import java.util.StringTokenizer;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.L2Object;
@@ -46,7 +46,7 @@ public class AdminTest implements IAdminCommandHandler
{
if (command.equals("admin_stats"))
{
for (String line : ThreadPoolManager.getStats())
for (String line : ThreadPool.getStats())
{
activeChar.sendMessage(line);
}
@@ -16,7 +16,7 @@
*/
package handlers.effecthandlers;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.conditions.Condition;
@@ -74,7 +74,7 @@ public final class ServitorShare extends AbstractEffect
final L2Character effected = info.getEffected().isPlayer() ? info.getEffected().getSummon() : info.getEffected().getActingPlayer();
if (effected != null)
{
ThreadPoolManager.schedule(new ScheduledEffectExitTask(effected, info.getSkill().getId()), 100);
ThreadPool.schedule(new ScheduledEffectExitTask(effected, info.getSkill().getId()), 100);
}
}
}
@@ -16,8 +16,8 @@
*/
package handlers.punishmenthandlers;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.LoginServerThread;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.cache.HtmCache;
import com.l2jmobius.gameserver.handler.IPunishmentHandler;
import com.l2jmobius.gameserver.model.L2World;
@@ -168,7 +168,7 @@ public class JailHandler implements IPunishmentHandler
OlympiadManager.getInstance().removeDisconnectedCompetitor(player);
}
ThreadPoolManager.schedule(new TeleportTask(player, L2JailZone.getLocationIn()), 2000);
ThreadPool.schedule(new TeleportTask(player, L2JailZone.getLocationIn()), 2000);
// Open a Html message to inform the player
final NpcHtmlMessage msg = new NpcHtmlMessage();
@@ -204,7 +204,7 @@ public class JailHandler implements IPunishmentHandler
*/
private static void removeFromPlayer(L2PcInstance player)
{
ThreadPoolManager.schedule(new TeleportTask(player, L2JailZone.getLocationOut()), 2000);
ThreadPool.schedule(new TeleportTask(player, L2JailZone.getLocationOut()), 2000);
// Open a Html message to inform the player
final NpcHtmlMessage msg = new NpcHtmlMessage();
@@ -33,9 +33,9 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.StringTokenizer;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.LoginServerThread;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.enums.ItemLocation;
import com.l2jmobius.gameserver.handler.ITelnetHandler;
@@ -200,7 +200,7 @@ public class DebugHandler implements ITelnetHandler
}
sb.append("\n\n## Thread Pool Manager Statistics ##\n");
for (String line : ThreadPoolManager.getStats())
for (String line : ThreadPool.getStats())
{
sb.append(line);
sb.append('\n');
@@ -19,7 +19,7 @@ package handlers.telnethandlers;
import java.io.PrintWriter;
import java.net.Socket;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.handler.ITelnetHandler;
/**
@@ -38,7 +38,7 @@ public class ThreadHandler implements ITelnetHandler
{
if (command.equals("performance"))
{
for (String line : ThreadPoolManager.getStats())
for (String line : ThreadPool.getStats())
{
_print.println(line);
}
@@ -46,10 +46,10 @@ public class ThreadHandler implements ITelnetHandler
}
else if (command.equals("purge"))
{
ThreadPoolManager.purge();
ThreadPool.purge();
_print.println("STATUS OF THREAD POOLS AFTER PURGE COMMAND:");
_print.println("");
for (String line : ThreadPoolManager.getStats())
for (String line : ThreadPool.getStats())
{
_print.println(line);
}
@@ -17,8 +17,8 @@
package handlers.usercommandhandlers;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.handler.IUserCommandHandler;
@@ -111,7 +111,7 @@ public class Unstuck implements IUserCommandHandler
// End SoE Animation section
// continue execution later
activeChar.setSkillCast(ThreadPoolManager.schedule(new EscapeFinalizer(activeChar), unstuckTimer));
activeChar.setSkillCast(ThreadPool.schedule(new EscapeFinalizer(activeChar), unstuckTimer));
return true;
}
@@ -20,7 +20,7 @@ import java.util.HashMap;
import java.util.concurrent.Future;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.handler.IVoicedCommandHandler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.tasks.player.AutoPotionTask;
@@ -70,7 +70,7 @@ public class AutoPotion implements IVoicedCommandHandler
AUTO_POTION_TASKS.get(playerOID).cancel(true);
AUTO_POTION_TASKS.remove(playerOID);
}
AUTO_POTION_TASKS.put(activeChar.getObjectId(), ThreadPoolManager.scheduleAtFixedRate(new AutoPotionTask(activeChar), POTION_TASK_DELAY, POTION_TASK_DELAY));
AUTO_POTION_TASKS.put(activeChar.getObjectId(), ThreadPool.scheduleAtFixedRate(new AutoPotionTask(activeChar), POTION_TASK_DELAY, POTION_TASK_DELAY));
activeChar.sendMessage("Auto potions is enabled.");
return true;
}
@@ -23,10 +23,10 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.SevenSigns;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.enums.PlayerAction;
@@ -472,7 +472,7 @@ public class Wedding implements IVoicedCommandHandler
final EscapeFinalizer ef = new EscapeFinalizer(activeChar, partner.getLocation(), partner.isIn7sDungeon());
// continue execution later
activeChar.setSkillCast(ThreadPoolManager.schedule(ef, teleportTimer));
activeChar.setSkillCast(ThreadPool.schedule(ef, teleportTimer));
activeChar.forceIsCasting(GameTimeController.getInstance().getGameTicks() + (teleportTimer / GameTimeController.MILLIS_IN_TICK));
return true;
@@ -17,7 +17,7 @@
package hellbound.AI;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
@@ -76,7 +76,7 @@ public final class Chimeras extends AbstractNpcAI
if (!npc.isInsideRadius(loc, 200, false, false))
{
npc.getSpawn().setLocation(loc);
ThreadPoolManager.schedule(new Teleport(npc, loc), 100);
ThreadPool.schedule(new Teleport(npc, loc), 100);
}
}
return super.onSpawn(npc);
@@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
import com.l2jmobius.gameserver.datatables.SkillData;
@@ -557,7 +557,7 @@ public final class TowerOfNaia extends AbstractNpcAI
{
removeForeigners(npcId, party);
startRoom(npcId);
ThreadPoolManager.schedule(new StopRoomTask(npcId), 300000);
ThreadPool.schedule(new StopRoomTask(npcId), 300000);
}
else
{
@@ -853,7 +853,7 @@ public final class TowerOfNaia extends AbstractNpcAI
}
else
{
ThreadPoolManager.schedule(() -> addSpawn(MUTATED_ELPY, -45474, 247450, -13994, 49152, false, 0, false), respawnTime - System.currentTimeMillis());
ThreadPool.schedule(() -> addSpawn(MUTATED_ELPY, -45474, 247450, -13994, 49152, false, 0, false), respawnTime - System.currentTimeMillis());
}
}
@@ -26,7 +26,7 @@ import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
import com.l2jmobius.gameserver.datatables.SkillData;
@@ -1207,7 +1207,7 @@ public final class TullyWorkshop extends AbstractNpcAI
DoorData.getInstance().getDoor(19260052).openMe();
countdownTime = 600000;
_countdown = ThreadPoolManager.scheduleAtFixedRate(() ->
_countdown = ThreadPool.scheduleAtFixedRate(() ->
{
countdownTime -= 10000;
L2Npc _npc = null;
@@ -1570,20 +1570,20 @@ public final class TullyWorkshop extends AbstractNpcAI
{
DoorData.getInstance().getDoor(20250005).openMe();
DoorData.getInstance().getDoor(20250004).openMe();
ThreadPoolManager.schedule(new DoorTask(new int[]
ThreadPool.schedule(new DoorTask(new int[]
{
20250006,
20250007
}, STATE_OPEN), 2000);
ThreadPoolManager.schedule(new DoorTask(new int[]
ThreadPool.schedule(new DoorTask(new int[]
{
20250778
}, STATE_CLOSE), 3000);
ThreadPoolManager.schedule(new DoorTask(new int[]
ThreadPool.schedule(new DoorTask(new int[]
{
20250777
}, STATE_CLOSE), 6000);
ThreadPoolManager.schedule(new DoorTask(new int[]
ThreadPool.schedule(new DoorTask(new int[]
{
20250009,
20250008
@@ -1594,12 +1594,12 @@ public final class TullyWorkshop extends AbstractNpcAI
{
DoorData.getInstance().getDoor(20250009).closeMe();
DoorData.getInstance().getDoor(20250008).closeMe();
ThreadPoolManager.schedule(new DoorTask(new int[]
ThreadPool.schedule(new DoorTask(new int[]
{
20250777,
20250778
}, STATE_OPEN), 1000);
ThreadPoolManager.schedule(new DoorTask(new int[]
ThreadPool.schedule(new DoorTask(new int[]
{
20250005,
20250004,
@@ -18,7 +18,7 @@ package hellbound.Instances.UrbanArea;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.L2Party;
@@ -167,7 +167,7 @@ public final class UrbanArea extends AbstractInstance
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
inst.setDuration(5 * 60000);
inst.setEmptyDestroyTime(0);
ThreadPoolManager.schedule(new ExitInstance(party, world), 285000);
ThreadPool.schedule(new ExitInstance(party, world), 285000);
htmltext = "32343-02d.htm";
}
}
@@ -221,7 +221,7 @@ public final class UrbanArea extends AbstractInstance
world.activeAmaskariCall.cancel(true);
}
world.activeAmaskariCall = ThreadPoolManager.schedule(new CallAmaskari(npc), 25000);
world.activeAmaskariCall = ThreadPool.schedule(new CallAmaskari(npc), 25000);
}
}
}
@@ -267,7 +267,7 @@ public final class UrbanArea extends AbstractInstance
{
world.activeAmaskariCall.cancel(true);
}
world.activeAmaskariCall = ThreadPoolManager.schedule(new CallAmaskari(npc), 25000);
world.activeAmaskariCall = ThreadPool.schedule(new CallAmaskari(npc), 25000);
}
}
}
@@ -319,7 +319,7 @@ public final class UrbanArea extends AbstractInstance
{
world.activeAmaskariCall.cancel(true);
}
world.activeAmaskariCall = ThreadPoolManager.schedule(new CallAmaskari(npc), 25000);
world.activeAmaskariCall = ThreadPool.schedule(new CallAmaskari(npc), 25000);
}
}
}
@@ -21,7 +21,7 @@ import java.util.concurrent.ScheduledFuture;
import java.util.logging.Level;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
@@ -61,7 +61,7 @@ public abstract class Chamber extends AbstractInstance
{
currentRoom = 0;
partyInside = party;
_banishTask = ThreadPoolManager.scheduleAtFixedRate(new BanishTask(), 60000, 60000);
_banishTask = ThreadPool.scheduleAtFixedRate(new BanishTask(), 60000, 60000);
}
protected L2Party getPartyInside()
@@ -77,7 +77,7 @@ public abstract class Chamber extends AbstractInstance
// Schedule next room change only if remaining time is enough
if ((inst.getInstanceEndTime() - System.currentTimeMillis()) > nextInterval)
{
_roomChangeTask = ThreadPoolManager.schedule(new ChangeRoomTask(), nextInterval - 5000);
_roomChangeTask = ThreadPool.schedule(new ChangeRoomTask(), nextInterval - 5000);
}
}
@@ -30,7 +30,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.InstanceType;
import com.l2jmobius.gameserver.geoengine.GeoEngine;
@@ -624,7 +624,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
{
openDoor(doorId, world.getInstanceId());
}
ThreadPoolManager.schedule(new IntroTask(world, 0), 600000);
ThreadPool.schedule(new IntroTask(world, 0), 600000);
break;
}
case 3: // first morph
@@ -641,7 +641,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
}
handleReenterTime(world);
world.activeScarlet.doCast(FIRST_MORPH_SKILL.getSkill());
ThreadPoolManager.schedule(new SongTask(world, 2), 1500);
ThreadPool.schedule(new SongTask(world, 2), 1500);
break;
}
case 4: // second morph
@@ -653,8 +653,8 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
world.songEffectTask.cancel(false);
}
world.songEffectTask = null;
ThreadPoolManager.schedule(new IntroTask(world, 23), 2000);
ThreadPoolManager.schedule(new IntroTask(world, 24), 2100);
ThreadPool.schedule(new IntroTask(world, 23), 2000);
ThreadPool.schedule(new IntroTask(world, 24), 2100);
break;
}
case 5: // raid success
@@ -671,7 +671,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
}
world.songTask = null;
world.songEffectTask = null;
ThreadPoolManager.schedule(new IntroTask(world, 33), 500);
ThreadPool.schedule(new IntroTask(world, 33), 500);
break;
}
case 6: // open doors
@@ -759,7 +759,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
updateKnownList(_world, demon);
_world.demons.add(demon);
}
ThreadPoolManager.schedule(new DemonSpawnTask(_world), TIME_BETWEEN_DEMON_SPAWNS);
ThreadPool.schedule(new DemonSpawnTask(_world), TIME_BETWEEN_DEMON_SPAWNS);
}
}
@@ -803,7 +803,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
{
if (_world.isVideo)
{
_world.songTask = ThreadPoolManager.schedule(new SongTask(_world, 0), 1000);
_world.songTask = ThreadPool.schedule(new SongTask(_world, 0), 1000);
}
else if ((_world.frintezza != null) && !_world.frintezza.isDead())
{
@@ -817,15 +817,15 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
_world.OnSong = element;
broadCastPacket(_world, new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 4000, false, null, element.songName, null));
broadCastPacket(_world, new MagicSkillUse(_world.frintezza, _world.frintezza, element.skill.getSkillId(), element.skill.getSkillLvl(), element.skill.getSkill().getHitTime(), 0));
_world.songEffectTask = ThreadPoolManager.schedule(new SongTask(_world, 1), element.skill.getSkill().getHitTime() - 10000);
_world.songTask = ThreadPoolManager.schedule(new SongTask(_world, 0), element.skill.getSkill().getHitTime());
_world.songEffectTask = ThreadPool.schedule(new SongTask(_world, 1), element.skill.getSkill().getHitTime() - 10000);
_world.songTask = ThreadPool.schedule(new SongTask(_world, 0), element.skill.getSkill().getHitTime());
break;
}
}
}
else
{
ThreadPoolManager.schedule(new SoulBreakingArrow(_world.frintezza), 35000);
ThreadPool.schedule(new SoulBreakingArrow(_world.frintezza), 35000);
}
}
break;
@@ -898,8 +898,8 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
{
case 0:
{
ThreadPoolManager.schedule(new IntroTask(_world, 1), 27000);
ThreadPoolManager.schedule(new IntroTask(_world, 2), 30000);
ThreadPool.schedule(new IntroTask(_world, 1), 27000);
ThreadPool.schedule(new IntroTask(_world, 2), 30000);
broadCastPacket(_world, new Earthquake(-87784, -155083, -9087, 45, 27));
break;
}
@@ -943,7 +943,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
_world.scarletDummy.setIsInvul(true);
_world.scarletDummy.setIsImmobilized(true);
stopPc();
ThreadPoolManager.schedule(new IntroTask(_world, 3), 1000);
ThreadPool.schedule(new IntroTask(_world, 3), 1000);
break;
}
case 3:
@@ -964,46 +964,46 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
updateKnownList(_world, demon);
_world.demons.add(demon);
}
ThreadPoolManager.schedule(new IntroTask(_world, 4), 6500);
ThreadPool.schedule(new IntroTask(_world, 4), 6500);
break;
}
case 4:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezzaDummy, 1800, 90, 8, 6500, 7000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 5), 900);
ThreadPool.schedule(new IntroTask(_world, 5), 900);
break;
}
case 5:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezzaDummy, 140, 90, 10, 2500, 4500, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 6), 4000);
ThreadPool.schedule(new IntroTask(_world, 6), 4000);
break;
}
case 6:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 40, 75, -10, 0, 1000, 0, 0, 1, 0, 0));
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 40, 75, -10, 0, 12000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 7), 1350);
ThreadPool.schedule(new IntroTask(_world, 7), 1350);
break;
}
case 7:
{
broadCastPacket(_world, new SocialAction(_world.frintezza.getObjectId(), 2));
ThreadPoolManager.schedule(new IntroTask(_world, 8), 7000);
ThreadPool.schedule(new IntroTask(_world, 8), 7000);
break;
}
case 8:
{
_world.frintezzaDummy.deleteMe();
_world.frintezzaDummy = null;
ThreadPoolManager.schedule(new IntroTask(_world, 9), 1000);
ThreadPool.schedule(new IntroTask(_world, 9), 1000);
break;
}
case 9:
{
broadCastPacket(_world, new SocialAction(_world.demons.get(1).getObjectId(), 1));
broadCastPacket(_world, new SocialAction(_world.demons.get(2).getObjectId(), 1));
ThreadPoolManager.schedule(new IntroTask(_world, 10), 400);
ThreadPool.schedule(new IntroTask(_world, 10), 400);
break;
}
case 10:
@@ -1012,7 +1012,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
broadCastPacket(_world, new SocialAction(_world.demons.get(3).getObjectId(), 1));
sendPacketX(new SpecialCamera(_world.portraitDummy1, 1000, 118, 0, 0, 1000, 0, 0, 1, 0, 0), new SpecialCamera(_world.portraitDummy3, 1000, 62, 0, 0, 1000, 0, 0, 1, 0, 0), -87784);
sendPacketX(new SpecialCamera(_world.portraitDummy1, 1000, 118, 0, 0, 10000, 0, 0, 1, 0, 0), new SpecialCamera(_world.portraitDummy3, 1000, 62, 0, 0, 10000, 0, 0, 1, 0, 0), -87784);
ThreadPoolManager.schedule(new IntroTask(_world, 11), 2000);
ThreadPool.schedule(new IntroTask(_world, 11), 2000);
break;
}
case 11:
@@ -1024,19 +1024,19 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
_world.portraitDummy3.deleteMe();
_world.portraitDummy1 = null;
_world.portraitDummy3 = null;
ThreadPoolManager.schedule(new IntroTask(_world, 12), 4500);
ThreadPool.schedule(new IntroTask(_world, 12), 4500);
break;
}
case 12:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 100, 195, 35, 0, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 13), 700);
ThreadPool.schedule(new IntroTask(_world, 13), 700);
break;
}
case 13:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 100, 195, 35, 0, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 14), 1300);
ThreadPool.schedule(new IntroTask(_world, 14), 1300);
break;
}
case 14:
@@ -1044,19 +1044,19 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
broadCastPacket(_world, new ExShowScreenMessage(NpcStringId.MOURNFUL_CHORALE_PRELUDE, 2, 5000));
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 120, 180, 45, 1500, 10000, 0, 0, 1, 0, 0));
broadCastPacket(_world, new MagicSkillUse(_world.frintezza, _world.frintezza, 5006, 1, 34000, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 15), 1500);
ThreadPool.schedule(new IntroTask(_world, 15), 1500);
break;
}
case 15:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 520, 135, 45, 8000, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 16), 7500);
ThreadPool.schedule(new IntroTask(_world, 16), 7500);
break;
}
case 16:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 1500, 110, 25, 10000, 13000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 17), 9500);
ThreadPool.schedule(new IntroTask(_world, 17), 9500);
break;
}
case 17:
@@ -1064,7 +1064,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
broadCastPacket(_world, new SpecialCamera(_world.overheadDummy, 930, 160, -20, 0, 1000, 0, 0, 1, 0, 0));
broadCastPacket(_world, new SpecialCamera(_world.overheadDummy, 600, 180, -25, 0, 10000, 0, 0, 1, 0, 0));
broadCastPacket(_world, new MagicSkillUse(_world.scarletDummy, _world.overheadDummy, 5004, 1, 5800, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 18), 5000);
ThreadPool.schedule(new IntroTask(_world, 18), 5000);
break;
}
case 18:
@@ -1077,20 +1077,20 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
updateKnownList(_world, _world.activeScarlet);
broadCastPacket(_world, new SocialAction(_world.activeScarlet.getObjectId(), 3));
broadCastPacket(_world, new SpecialCamera(_world.scarletDummy, 800, 180, 10, 1000, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 19), 2100);
ThreadPool.schedule(new IntroTask(_world, 19), 2100);
break;
}
case 19:
{
broadCastPacket(_world, new SpecialCamera(_world.activeScarlet, 300, 60, 8, 0, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 20), 2000);
ThreadPool.schedule(new IntroTask(_world, 20), 2000);
break;
}
case 20:
{
broadCastPacket(_world, new SpecialCamera(_world.activeScarlet, 500, 90, 10, 3000, 5000, 0, 0, 1, 0, 0));
_world.songTask = ThreadPoolManager.schedule(new SongTask(_world, 0), 100);
ThreadPoolManager.schedule(new IntroTask(_world, 21), 3000);
_world.songTask = ThreadPool.schedule(new SongTask(_world, 0), 100);
ThreadPool.schedule(new IntroTask(_world, 21), 3000);
break;
}
case 21:
@@ -1105,7 +1105,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
_world.scarletDummy.deleteMe();
_world.overheadDummy = null;
_world.scarletDummy = null;
ThreadPoolManager.schedule(new IntroTask(_world, 22), 2000);
ThreadPool.schedule(new IntroTask(_world, 22), 2000);
break;
}
case 22:
@@ -1124,7 +1124,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
_world.frintezza.disableCoreAI(true);
_world.frintezza.setIsMortal(false);
startPc();
ThreadPoolManager.schedule(new DemonSpawnTask(_world), TIME_BETWEEN_DEMON_SPAWNS);
ThreadPool.schedule(new DemonSpawnTask(_world), TIME_BETWEEN_DEMON_SPAWNS);
break;
}
case 23:
@@ -1142,20 +1142,20 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
_world.activeScarlet.setIsInvul(true);
_world.activeScarlet.setIsImmobilized(true);
_world.activeScarlet.disableAllSkills();
ThreadPoolManager.schedule(new IntroTask(_world, 25), 7000);
ThreadPool.schedule(new IntroTask(_world, 25), 7000);
break;
}
case 25:
{
broadCastPacket(_world, new MagicSkillUse(_world.frintezza, _world.frintezza, 5006, 1, 34000, 0));
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 26), 3000);
ThreadPool.schedule(new IntroTask(_world, 26), 3000);
break;
}
case 26:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 27), 3000);
ThreadPool.schedule(new IntroTask(_world, 27), 3000);
break;
}
case 27:
@@ -1174,15 +1174,15 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
}
broadCastPacket(_world, new SpecialCamera(_world.activeScarlet, 250, _world.scarlet_a, 12, 0, 1000, 0, 0, 1, 0, 0));
broadCastPacket(_world, new SpecialCamera(_world.activeScarlet, 250, _world.scarlet_a, 12, 0, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 28), 500);
ThreadPool.schedule(new IntroTask(_world, 28), 500);
break;
}
case 28:
{
_world.activeScarlet.doDie(_world.activeScarlet);
broadCastPacket(_world, new SpecialCamera(_world.activeScarlet, 450, _world.scarlet_a, 14, 8000, 8000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 29), 6250);
ThreadPoolManager.schedule(new IntroTask(_world, 30), 7200);
ThreadPool.schedule(new IntroTask(_world, 29), 6250);
ThreadPool.schedule(new IntroTask(_world, 30), 7200);
break;
}
case 29:
@@ -1199,13 +1199,13 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
_world.activeScarlet.disableAllSkills();
updateKnownList(_world, _world.activeScarlet);
broadCastPacket(_world, new SpecialCamera(_world.activeScarlet, 450, _world.scarlet_a, 12, 500, 14000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 31), 8100);
ThreadPool.schedule(new IntroTask(_world, 31), 8100);
break;
}
case 31:
{
broadCastPacket(_world, new SocialAction(_world.activeScarlet.getObjectId(), 2));
ThreadPoolManager.schedule(new IntroTask(_world, 32), 9000);
ThreadPool.schedule(new IntroTask(_world, 32), 9000);
break;
}
case 32:
@@ -1221,8 +1221,8 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
{
broadCastPacket(_world, new SpecialCamera(_world.activeScarlet, 300, _world.scarlet_a - 180, 5, 0, 7000, 0, 0, 1, 0, 0));
broadCastPacket(_world, new SpecialCamera(_world.activeScarlet, 200, _world.scarlet_a, 85, 4000, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 34), 7400);
ThreadPoolManager.schedule(new IntroTask(_world, 35), 7500);
ThreadPool.schedule(new IntroTask(_world, 34), 7400);
ThreadPool.schedule(new IntroTask(_world, 35), 7500);
break;
}
case 34:
@@ -1234,13 +1234,13 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
{
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 100, 120, 5, 0, 7000, 0, 0, 1, 0, 0));
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 100, 90, 5, 5000, 15000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 36), 7000);
ThreadPool.schedule(new IntroTask(_world, 36), 7000);
break;
}
case 36:
{
broadCastPacket(_world, new SpecialCamera(_world.frintezza, 900, 90, 25, 7000, 10000, 0, 0, 1, 0, 0));
ThreadPoolManager.schedule(new IntroTask(_world, 37), 9000);
ThreadPool.schedule(new IntroTask(_world, 37), 9000);
break;
}
case 37:
@@ -1326,7 +1326,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
{
case 0:
{
ThreadPoolManager.schedule(new StatusTask(_world, 1), 2000);
ThreadPool.schedule(new StatusTask(_world, 1), 2000);
for (int doorId : FIRST_ROOM_DOORS)
{
openDoor(doorId, _world.getInstanceId());
@@ -1340,7 +1340,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
}
case 2:
{
ThreadPoolManager.schedule(new StatusTask(_world, 3), 100);
ThreadPool.schedule(new StatusTask(_world, 3), 100);
for (int doorId : SECOND_ROOM_DOORS)
{
openDoor(doorId, _world.getInstanceId());
@@ -1478,7 +1478,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
final FETWorld world = (FETWorld) tmpworld;
if (npc.getId() == HALL_ALARM)
{
ThreadPoolManager.schedule(new StatusTask(world, 0), 2000);
ThreadPool.schedule(new StatusTask(world, 0), 2000);
if (debug)
{
_log.info("[Final Emperial Tomb] Hall alarm is disabled, doors will open!");
@@ -1489,7 +1489,7 @@ public final class FinalEmperialTomb extends AbstractInstance implements IXmlRea
world.darkChoirPlayerCount--;
if (world.darkChoirPlayerCount < 1)
{
ThreadPoolManager.schedule(new StatusTask(world, 2), 2000);
ThreadPool.schedule(new StatusTask(world, 2), 2000);
if (debug)
{
_log.info("[Final Emperial Tomb] All Dark Choir Players are killed, doors will open!");
@@ -19,7 +19,7 @@ package quests.Q00511_AwlUnderFoot;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.L2Party;
@@ -296,7 +296,7 @@ public final class Q00511_AwlUnderFoot extends Quest
dungeon.setReEnterTime(System.currentTimeMillis() + REENTERTIME);
InstanceManager.getInstance().addWorld(world);
_log.info("Fortress AwlUnderFoot started " + template + " Instance: " + instanceId + " created by player: " + player.getName());
ThreadPoolManager.schedule(new spawnRaid((FAUWorld) world), RAID_SPAWN_DELAY);
ThreadPool.schedule(new spawnRaid((FAUWorld) world), RAID_SPAWN_DELAY);
// teleport players
if (player.getParty() == null)
@@ -398,7 +398,7 @@ public final class Q00511_AwlUnderFoot extends Quest
else
{
world.incStatus();
ThreadPoolManager.schedule(new spawnRaid(world), RAID_SPAWN_DELAY);
ThreadPool.schedule(new spawnRaid(world), RAID_SPAWN_DELAY);
}
}
return null;
@@ -19,7 +19,7 @@ package quests.Q00726_LightWithinTheDarkness;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.L2Party;
import com.l2jmobius.gameserver.model.L2World;
@@ -281,7 +281,7 @@ public class Q00726_LightWithinTheDarkness extends Quest
world.setStatus(0);
dungeon.setReEnterTime(System.currentTimeMillis() + 14400000);
InstanceManager.getInstance().addWorld(world);
ThreadPoolManager.schedule(new spawnNpcs((PAWORLD) world), 10000);
ThreadPool.schedule(new spawnNpcs((PAWORLD) world), 10000);
for (L2PcInstance partyMember : party.getMembers())
{
@@ -392,7 +392,7 @@ public class Q00726_LightWithinTheDarkness extends Quest
protected void FirstWave(PAWORLD world)
{
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
addSpawn(SEDUCED_KNIGHT, 49384, -12232, -9384, 0, false, 0, false, world.getInstanceId());
addSpawn(SEDUCED_RANGER, 49192, -12232, -9384, 0, false, 0, false, world.getInstanceId());
@@ -404,7 +404,7 @@ public class Q00726_LightWithinTheDarkness extends Quest
{
addSpawn(KANADIS_FOLLOWER1, 50536, -12232, -9384, 32768, false, 0, false, world.getInstanceId());
}
ThreadPoolManager.schedule(() -> SecondWave(world), 8 * 60 * 1000);
ThreadPool.schedule(() -> SecondWave(world), 8 * 60 * 1000);
}, 10000);
}
@@ -416,7 +416,7 @@ public class Q00726_LightWithinTheDarkness extends Quest
{
addSpawn(KANADIS_FOLLOWER2, 50536, -12232, -9384, 32768, false, 0, false, world.getInstanceId());
}
ThreadPoolManager.schedule(() -> ThirdWave(world), 8 * 60 * 1000);
ThreadPool.schedule(() -> ThirdWave(world), 8 * 60 * 1000);
}
protected void ThirdWave(PAWORLD world)
@@ -21,7 +21,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.FortManager;
@@ -477,7 +477,7 @@ public class Q00727_HopeWithinTheDarkness extends Quest
// Destroy instance after 5 minutes
inst.setDuration(5 * 60000);
inst.setEmptyDestroyTime(0);
ThreadPoolManager.schedule(new completeDungeon(world, player), 1500);
ThreadPool.schedule(new completeDungeon(world, player), 1500);
}
}
}
@@ -634,7 +634,7 @@ public class Q00727_HopeWithinTheDarkness extends Quest
world.setStatus(0);
dungeon.setReEnterTime(System.currentTimeMillis() + REENTER_INTERVAL);
InstanceManager.getInstance().addWorld(world);
ThreadPoolManager.schedule(new spawnNpcs((CAUWorld) world), INITIAL_SPAWN_DELAY);
ThreadPool.schedule(new spawnNpcs((CAUWorld) world), INITIAL_SPAWN_DELAY);
if (DEBUG)
{
_log.info("Castle HopeWithinTheDarkness started " + template + " Instance: " + instanceId + " created by player: " + player.getName());
@@ -681,21 +681,21 @@ public class Q00727_HopeWithinTheDarkness extends Quest
_instance.spawnGroup("victims");
_instance.spawnGroup("bosses_1");
ThreadPoolManager.schedule(new spawnNpcs(_world), WAVE_SPAWN_DELAY);
ThreadPoolManager.schedule(new spawnPrivates(_world), PRIVATE_SPAWN_DELAY);
ThreadPool.schedule(new spawnNpcs(_world), WAVE_SPAWN_DELAY);
ThreadPool.schedule(new spawnPrivates(_world), PRIVATE_SPAWN_DELAY);
}
else if (_world.getStatus() == 1)
{
_instance.spawnGroup("bosses_2");
ThreadPoolManager.schedule(new spawnNpcs(_world), WAVE_SPAWN_DELAY);
ThreadPoolManager.schedule(new spawnPrivates(_world), PRIVATE_SPAWN_DELAY);
ThreadPool.schedule(new spawnNpcs(_world), WAVE_SPAWN_DELAY);
ThreadPool.schedule(new spawnPrivates(_world), PRIVATE_SPAWN_DELAY);
}
else if (_world.getStatus() == 2)
{
_instance.spawnGroup("bosses_3");
ThreadPoolManager.schedule(new spawnPrivates(_world), PRIVATE_SPAWN_DELAY);
ThreadPool.schedule(new spawnPrivates(_world), PRIVATE_SPAWN_DELAY);
}
}
catch (Exception e)
@@ -19,7 +19,7 @@ package vehicles;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.BoatManager;
import com.l2jmobius.gameserver.model.VehiclePathPoint;
@@ -162,19 +162,19 @@ public class BoatGiranTalking implements Runnable
case 0:
{
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], LEAVE_GIRAN5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 1:
{
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], LEAVE_GIRAN1);
ThreadPoolManager.schedule(this, 40000);
ThreadPool.schedule(this, 40000);
break;
}
case 2:
{
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], LEAVE_GIRAN0);
ThreadPoolManager.schedule(this, 20000);
ThreadPool.schedule(this, 20000);
break;
}
case 3:
@@ -183,19 +183,19 @@ public class BoatGiranTalking implements Runnable
_boat.broadcastPacket(GIRAN_SOUND);
_boat.payForRide(3946, 1, 46763, 187041, -3451);
_boat.executePath(GIRAN_TO_TALKING);
ThreadPoolManager.schedule(this, 250000);
ThreadPool.schedule(this, 250000);
break;
}
case 4:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, ARRIVAL_TALKING10);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 5:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, ARRIVAL_TALKING5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 6:
@@ -216,7 +216,7 @@ public class BoatGiranTalking implements Runnable
{
_shoutCount = 0;
}
ThreadPoolManager.schedule(this, 5000);
ThreadPool.schedule(this, 5000);
return;
}
_boat.executePath(TALKING_DOCK);
@@ -227,25 +227,25 @@ public class BoatGiranTalking implements Runnable
BoatManager.getInstance().dockShip(BoatManager.TALKING_ISLAND, true);
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GIRAN_DOCK, ARRIVED_AT_TALKING, ARRIVED_AT_TALKING_2);
_boat.broadcastPacket(TALKING_SOUND);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 9:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, LEAVE_TALKING5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 10:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, LEAVE_TALKING1);
ThreadPoolManager.schedule(this, 40000);
ThreadPool.schedule(this, 40000);
break;
}
case 11:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, LEAVE_TALKING0);
ThreadPoolManager.schedule(this, 20000);
ThreadPool.schedule(this, 20000);
break;
}
case 12:
@@ -255,31 +255,31 @@ public class BoatGiranTalking implements Runnable
_boat.broadcastPacket(TALKING_SOUND);
_boat.payForRide(3945, 1, -96777, 258970, -3623);
_boat.executePath(TALKING_TO_GIRAN);
ThreadPoolManager.schedule(this, 200000);
ThreadPool.schedule(this, 200000);
break;
}
case 13:
{
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN20);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 14:
{
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN15);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 15:
{
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN10);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 16:
{
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 17:
@@ -291,7 +291,7 @@ public class BoatGiranTalking implements Runnable
{
BoatManager.getInstance().broadcastPackets(GIRAN_DOCK, TALKING_DOCK[0], ARRIVED_AT_GIRAN, ARRIVED_AT_GIRAN_2);
_boat.broadcastPacket(GIRAN_SOUND);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
}
@@ -19,7 +19,7 @@ package vehicles;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.BoatManager;
import com.l2jmobius.gameserver.model.VehiclePathPoint;
@@ -177,19 +177,19 @@ public class BoatGludinRune implements Runnable
case 0:
{
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], LEAVE_GLUDIN5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 1:
{
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], LEAVE_GLUDIN1);
ThreadPoolManager.schedule(this, 40000);
ThreadPool.schedule(this, 40000);
break;
}
case 2:
{
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], LEAVE_GLUDIN0);
ThreadPoolManager.schedule(this, 20000);
ThreadPool.schedule(this, 20000);
break;
}
case 3:
@@ -199,25 +199,25 @@ public class BoatGludinRune implements Runnable
_boat.broadcastPacket(GLUDIN_SOUND);
_boat.payForRide(7905, 1, -90015, 150422, -3610);
_boat.executePath(GLUDIN_TO_RUNE);
ThreadPoolManager.schedule(this, 250000);
ThreadPool.schedule(this, 250000);
break;
}
case 4:
{
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_RUNE15);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 5:
{
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_RUNE10);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 6:
{
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_RUNE5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 7:
@@ -238,7 +238,7 @@ public class BoatGludinRune implements Runnable
{
_shoutCount = 0;
}
ThreadPoolManager.schedule(this, 5000);
ThreadPool.schedule(this, 5000);
return;
}
_boat.executePath(RUNE_DOCK);
@@ -249,25 +249,25 @@ public class BoatGludinRune implements Runnable
BoatManager.getInstance().dockShip(BoatManager.RUNE_HARBOR, true);
BoatManager.getInstance().broadcastPackets(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVED_AT_RUNE, ARRIVED_AT_RUNE_2);
_boat.broadcastPacket(RUNE_SOUND);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 10:
{
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], LEAVE_RUNE5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 11:
{
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], LEAVE_RUNE1);
ThreadPoolManager.schedule(this, 40000);
ThreadPool.schedule(this, 40000);
break;
}
case 12:
{
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], LEAVE_RUNE0);
ThreadPoolManager.schedule(this, 20000);
ThreadPool.schedule(this, 20000);
break;
}
case 13:
@@ -277,25 +277,25 @@ public class BoatGludinRune implements Runnable
_boat.broadcastPacket(RUNE_SOUND);
_boat.payForRide(7904, 1, 34513, -38009, -3640);
_boat.executePath(RUNE_TO_GLUDIN);
ThreadPoolManager.schedule(this, 60000);
ThreadPool.schedule(this, 60000);
break;
}
case 14:
{
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVAL_GLUDIN15);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 15:
{
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVAL_GLUDIN10);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 16:
{
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVAL_GLUDIN5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 17:
@@ -316,7 +316,7 @@ public class BoatGludinRune implements Runnable
{
_shoutCount = 0;
}
ThreadPoolManager.schedule(this, 5000);
ThreadPool.schedule(this, 5000);
return;
}
_boat.executePath(GLUDIN_DOCK);
@@ -327,7 +327,7 @@ public class BoatGludinRune implements Runnable
BoatManager.getInstance().dockShip(BoatManager.GLUDIN_HARBOR, true);
BoatManager.getInstance().broadcastPackets(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVED_AT_GLUDIN, ARRIVED_AT_GLUDIN_2);
_boat.broadcastPacket(GLUDIN_SOUND);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
}
@@ -19,7 +19,7 @@ package vehicles;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.BoatManager;
import com.l2jmobius.gameserver.model.VehiclePathPoint;
@@ -120,19 +120,19 @@ public class BoatInnadrilTour implements Runnable
case 0:
{
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, LEAVE_INNADRIL5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 1:
{
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, LEAVE_INNADRIL1);
ThreadPoolManager.schedule(this, 40000);
ThreadPool.schedule(this, 40000);
break;
}
case 2:
{
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, LEAVE_INNADRIL0);
ThreadPoolManager.schedule(this, 20000);
ThreadPool.schedule(this, 20000);
break;
}
case 3:
@@ -140,31 +140,31 @@ public class BoatInnadrilTour implements Runnable
BoatManager.getInstance().broadcastPackets(DOCK, DOCK, LEAVING_INNADRIL, INNADRIL_SOUND);
_boat.payForRide(0, 1, 107092, 219098, -3952);
_boat.executePath(TOUR);
ThreadPoolManager.schedule(this, 650000);
ThreadPool.schedule(this, 650000);
break;
}
case 4:
{
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL20);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 5:
{
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL15);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 6:
{
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL10);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 7:
{
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 8:
@@ -175,7 +175,7 @@ public class BoatInnadrilTour implements Runnable
case 9:
{
BoatManager.getInstance().broadcastPackets(DOCK, DOCK, ARRIVED_AT_INNADRIL, INNADRIL_SOUND);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
}
@@ -19,7 +19,7 @@ package vehicles;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.BoatManager;
import com.l2jmobius.gameserver.model.VehiclePathPoint;
@@ -121,7 +121,7 @@ public class BoatRunePrimeval implements Runnable
case 1:
{
BoatManager.getInstance().broadcastPackets(PRIMEVAL_DOCK, RUNE_DOCK[0], ARRIVED_AT_PRIMEVAL, ARRIVED_AT_PRIMEVAL_2, PRIMEVAL_SOUND);
ThreadPoolManager.schedule(this, 180000);
ThreadPool.schedule(this, 180000);
break;
}
case 2:
@@ -144,7 +144,7 @@ public class BoatRunePrimeval implements Runnable
{
_shoutCount = 0;
}
ThreadPoolManager.schedule(this, 5000);
ThreadPool.schedule(this, 5000);
return;
}
_boat.executePath(RUNE_DOCK);
@@ -154,7 +154,7 @@ public class BoatRunePrimeval implements Runnable
{
BoatManager.getInstance().dockShip(BoatManager.RUNE_HARBOR, true);
BoatManager.getInstance().broadcastPackets(RUNE_DOCK[0], PRIMEVAL_DOCK, ARRIVED_AT_RUNE, ARRIVED_AT_RUNE_2, RUNE_SOUND);
ThreadPoolManager.schedule(this, 180000);
ThreadPool.schedule(this, 180000);
break;
}
}
@@ -19,7 +19,7 @@ package vehicles;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.BoatManager;
import com.l2jmobius.gameserver.model.VehiclePathPoint;
@@ -146,19 +146,19 @@ public class BoatTalkingGludin implements Runnable
case 0:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_TALKING5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 1:
{
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_TALKING1, LEAVE_TALKING1_2);
ThreadPoolManager.schedule(this, 40000);
ThreadPool.schedule(this, 40000);
break;
}
case 2:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_TALKING0);
ThreadPoolManager.schedule(this, 20000);
ThreadPool.schedule(this, 20000);
break;
}
case 3:
@@ -168,19 +168,19 @@ public class BoatTalkingGludin implements Runnable
_boat.broadcastPacket(TALKING_SOUND);
_boat.payForRide(1074, 1, -96777, 258970, -3623);
_boat.executePath(TALKING_TO_GLUDIN);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 4:
{
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], TALKING_DOCK[0], ARRIVAL_GLUDIN10);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 5:
{
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], TALKING_DOCK[0], ARRIVAL_GLUDIN5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 6:
@@ -201,7 +201,7 @@ public class BoatTalkingGludin implements Runnable
{
_shoutCount = 0;
}
ThreadPoolManager.schedule(this, 5000);
ThreadPool.schedule(this, 5000);
return;
}
_boat.executePath(GLUDIN_DOCK);
@@ -212,25 +212,25 @@ public class BoatTalkingGludin implements Runnable
BoatManager.getInstance().dockShip(BoatManager.GLUDIN_HARBOR, true);
BoatManager.getInstance().broadcastPackets(GLUDIN_DOCK[0], TALKING_DOCK[0], ARRIVED_AT_GLUDIN, ARRIVED_AT_GLUDIN_2);
_boat.broadcastPacket(GLUDIN_SOUND);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 9:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_GLUDIN5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 10:
{
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_GLUDIN1, LEAVE_TALKING1_2);
ThreadPoolManager.schedule(this, 40000);
ThreadPool.schedule(this, 40000);
break;
}
case 11:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_GLUDIN0);
ThreadPoolManager.schedule(this, 20000);
ThreadPool.schedule(this, 20000);
break;
}
case 12:
@@ -240,19 +240,19 @@ public class BoatTalkingGludin implements Runnable
_boat.broadcastPacket(GLUDIN_SOUND);
_boat.payForRide(1075, 1, -90015, 150422, -3610);
_boat.executePath(GLUDIN_TO_TALKING);
ThreadPoolManager.schedule(this, 150000);
ThreadPool.schedule(this, 150000);
break;
}
case 13:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_TALKING10);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
case 14:
{
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_TALKING5);
ThreadPoolManager.schedule(this, 240000);
ThreadPool.schedule(this, 240000);
break;
}
case 15:
@@ -273,7 +273,7 @@ public class BoatTalkingGludin implements Runnable
{
_shoutCount = 0;
}
ThreadPoolManager.schedule(this, 5000);
ThreadPool.schedule(this, 5000);
return;
}
_boat.executePath(TALKING_DOCK);
@@ -284,7 +284,7 @@ public class BoatTalkingGludin implements Runnable
BoatManager.getInstance().dockShip(BoatManager.TALKING_ISLAND, true);
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GLUDIN_DOCK[0], ARRIVED_AT_TALKING, ARRIVED_AT_TALKING_2);
_boat.broadcastPacket(TALKING_SOUND);
ThreadPoolManager.schedule(this, 300000);
ThreadPool.schedule(this, 300000);
break;
}
}
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jmobius.gameserver;
package com.l2jmobius.commons.concurrent;
import java.util.ArrayList;
import java.util.List;
@@ -37,9 +37,9 @@ import com.l2jmobius.Config;
* <li>Instant pool handles short-life events.</li>
* </ul>
*/
public final class ThreadPoolManager
public final class ThreadPool
{
protected static final Logger LOG = Logger.getLogger(ThreadPoolManager.class.getName());
protected static final Logger LOG = Logger.getLogger(ThreadPool.class.getName());
private static final long MAX_DELAY = TimeUnit.NANOSECONDS.toMillis(Long.MAX_VALUE - System.nanoTime()) / 2;
@@ -30,6 +30,7 @@ import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.Server;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.commons.mmocore.SelectorConfig;
import com.l2jmobius.commons.mmocore.SelectorThread;
@@ -167,7 +168,7 @@ public final class GameServer
}
printSection("ThreadPool");
ThreadPoolManager.init();
ThreadPool.init();
EventDispatcher.getInstance();
new File("log/game").mkdirs();
@@ -22,6 +22,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.instancemanager.DayNightSpawnManager;
import com.l2jmobius.gameserver.model.actor.L2Character;
@@ -143,7 +144,7 @@ public final class GameTimeController extends Thread
if (isNight)
{
ThreadPoolManager.execute(() -> DayNightSpawnManager.getInstance().notifyChangeMode());
ThreadPool.execute(() -> DayNightSpawnManager.getInstance().notifyChangeMode());
}
while (true)
@@ -175,7 +176,7 @@ public final class GameTimeController extends Thread
{
isNight = !isNight;
ThreadPoolManager.execute(() -> DayNightSpawnManager.getInstance().notifyChangeMode());
ThreadPool.execute(() -> DayNightSpawnManager.getInstance().notifyChangeMode());
}
}
}
@@ -20,6 +20,7 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.ItemLocation;
import com.l2jmobius.gameserver.instancemanager.ItemsOnGroundManager;
import com.l2jmobius.gameserver.model.L2World;
@@ -31,7 +32,7 @@ public final class ItemsAutoDestroy
protected ItemsAutoDestroy()
{
ThreadPoolManager.scheduleAtFixedRate(this::removeItems, 5000, 5000);
ThreadPool.scheduleAtFixedRate(this::removeItems, 5000, 5000);
}
public static ItemsAutoDestroy getInstance()
@@ -24,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.data.xml.impl.RecipeData;
import com.l2jmobius.gameserver.datatables.ItemTable;
import com.l2jmobius.gameserver.enums.StatType;
@@ -109,7 +110,7 @@ public class RecipeController
if (Config.ALT_GAME_CREATION)
{
_activeMakers.put(manufacturer.getObjectId(), maker);
ThreadPoolManager.schedule(maker, 100);
ThreadPool.schedule(maker, 100);
}
else
{
@@ -158,7 +159,7 @@ public class RecipeController
if (Config.ALT_GAME_CREATION)
{
_activeMakers.put(player.getObjectId(), maker);
ThreadPoolManager.schedule(maker, 100);
ThreadPool.schedule(maker, 100);
}
else
{
@@ -353,7 +354,7 @@ public class RecipeController
_player.broadcastPacket(msk);
_player.sendPacket(new SetupGauge(0, _delay));
ThreadPoolManager.schedule(this, 100 + _delay);
ThreadPool.schedule(this, 100 + _delay);
}
else
{
@@ -536,7 +537,7 @@ public class RecipeController
if (Config.ALT_GAME_CREATION && isWait)
{
_player.sendPacket(new SetupGauge(0, _delay));
ThreadPoolManager.schedule(this, 100 + _delay);
ThreadPool.schedule(this, 100 + _delay);
}
else
{
@@ -558,7 +559,7 @@ public class RecipeController
if (Config.ALT_GAME_CREATION && isWait)
{
_player.sendPacket(new SetupGauge(0, _delay));
ThreadPoolManager.schedule(this, 100 + _delay);
ThreadPool.schedule(this, 100 + _delay);
}
else
{
@@ -30,6 +30,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.instancemanager.CastleManager;
import com.l2jmobius.gameserver.model.AutoSpawnHandler;
@@ -186,7 +187,7 @@ public class SevenSigns
// Schedule a time for the next period change.
final SevenSignsPeriodChange sspc = new SevenSignsPeriodChange();
ThreadPoolManager.schedule(sspc, milliToChange);
ThreadPool.schedule(sspc, milliToChange);
// Thanks to http://rainbow.arch.scriptmania.com/scripts/timezone_countdown.html for help with this.
final double numSecs = (milliToChange / 1000) % 60;
@@ -1625,7 +1626,7 @@ public class SevenSigns
setCalendarForNextPeriodChange();
final SevenSignsPeriodChange sspc = new SevenSignsPeriodChange();
ThreadPoolManager.schedule(sspc, getMilliToPeriodChange());
ThreadPool.schedule(sspc, getMilliToPeriodChange());
}
}
@@ -31,6 +31,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.data.sql.impl.CharNameTable;
@@ -930,7 +931,7 @@ public class SevenSignsFestival implements SpawnListener
// at the specified time, then invoke it automatically after every cycle.
_managerInstance = new FestivalManager();
setNextFestivalStart(Config.ALT_FESTIVAL_MANAGER_START + FESTIVAL_SIGNUP_TIME);
_managerScheduledTask = ThreadPoolManager.scheduleAtFixedRate(_managerInstance, Config.ALT_FESTIVAL_MANAGER_START, Config.ALT_FESTIVAL_CYCLE_LENGTH);
_managerScheduledTask = ThreadPool.scheduleAtFixedRate(_managerInstance, Config.ALT_FESTIVAL_MANAGER_START, Config.ALT_FESTIVAL_CYCLE_LENGTH);
_log.info("SevenSignsFestival: The first Festival of Darkness cycle begins in " + (Config.ALT_FESTIVAL_MANAGER_START / 60000) + " minute(s).");
}
@@ -20,6 +20,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
import com.l2jmobius.gameserver.data.sql.impl.OfflineTradersTable;
@@ -213,7 +214,7 @@ public class Shutdown extends Thread
// stop all thread pools
try
{
ThreadPoolManager.shutdown();
ThreadPool.shutdown();
_log.info("Thread Pool Manager: Manager has been shut down(" + tc.getEstimatedTimeAndRestartCounter() + "ms).");
}
catch (Throwable t)
@@ -23,8 +23,8 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
import java.util.concurrent.Future;
import java.util.logging.Logger;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
@@ -836,7 +836,7 @@ public abstract class AbstractAI implements Ctrl
// Create and Launch an AI Follow Task to execute every 1s
_followTarget = target;
_followTask = ThreadPoolManager.scheduleAtFixedRate(new FollowTask(), 5, FOLLOW_INTERVAL);
_followTask = ThreadPool.scheduleAtFixedRate(new FollowTask(), 5, FOLLOW_INTERVAL);
}
/**
@@ -853,7 +853,7 @@ public abstract class AbstractAI implements Ctrl
}
_followTarget = target;
_followTask = ThreadPoolManager.scheduleAtFixedRate(new FollowTask(range), 5, ATTACK_FOLLOW_INTERVAL);
_followTask = ThreadPool.scheduleAtFixedRate(new FollowTask(range), 5, ATTACK_FOLLOW_INTERVAL);
}
/**
@@ -26,8 +26,8 @@ import java.util.Set;
import java.util.concurrent.Future;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.sql.impl.TerritoryTable;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.enums.AISkillScope;
@@ -303,7 +303,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
// If not idle - create an AI task (schedule onEvtThink repeatedly)
if (_aiTask == null)
{
_aiTask = ThreadPoolManager.scheduleAtFixedRate(this, 1000, 1000);
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
}
}
@@ -402,7 +402,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
{
if ((_fearTime > 0) && (_fearTask == null))
{
_fearTask = ThreadPoolManager.scheduleAtFixedRate(new FearTask(this, effector, start), 0, FEAR_TICKS * 1000); // seconds
_fearTask = ThreadPool.scheduleAtFixedRate(new FearTask(this, effector, start), 0, FEAR_TICKS * 1000); // seconds
_actor.startAbnormalVisualEffect(true, AbnormalVisualEffect.TURN_FLEE);
}
else
@@ -30,8 +30,8 @@ import java.util.ArrayList;
import java.util.List;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.enums.ItemLocation;
import com.l2jmobius.gameserver.geoengine.GeoEngine;
import com.l2jmobius.gameserver.instancemanager.WalkingManager;
@@ -311,7 +311,7 @@ public class L2CharacterAI extends AbstractAI
if (_actor.getBowAttackEndTime() > GameTimeController.getInstance().getGameTicks())
{
ThreadPoolManager.schedule(new CastTask(_actor, skill, target), (_actor.getBowAttackEndTime() - GameTimeController.getInstance().getGameTicks()) * GameTimeController.MILLIS_IN_TICK);
ThreadPool.schedule(new CastTask(_actor, skill, target), (_actor.getBowAttackEndTime() - GameTimeController.getInstance().getGameTicks()) * GameTimeController.MILLIS_IN_TICK);
}
else
{
@@ -16,7 +16,7 @@
*/
package com.l2jmobius.gameserver.ai;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
@@ -87,7 +87,7 @@ public class L2DoorAI extends L2CharacterAI
@Override
protected void onEvtAttacked(L2Character attacker)
{
ThreadPoolManager.execute(new onEventAttackedDoorTask((L2DoorInstance) _actor, attacker));
ThreadPool.execute(new onEventAttackedDoorTask((L2DoorInstance) _actor, attacker));
}
@Override
@@ -23,8 +23,8 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
import java.util.Collection;
import java.util.concurrent.Future;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.geoengine.GeoEngine;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
@@ -199,7 +199,7 @@ public class L2FortSiegeGuardAI extends L2CharacterAI implements Runnable
// If not idle - create an AI task (schedule onEvtThink repeatedly)
if (_aiTask == null)
{
_aiTask = ThreadPoolManager.scheduleAtFixedRate(this, 1000, 1000);
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
}
}
@@ -23,8 +23,8 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
import java.util.Collection;
import java.util.concurrent.Future;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.geoengine.GeoEngine;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
@@ -197,7 +197,7 @@ public class L2SiegeGuardAI extends L2CharacterAI implements Runnable
// If not idle - create an AI task (schedule onEvtThink repeatedly)
if (_aiTask == null)
{
_aiTask = ThreadPoolManager.scheduleAtFixedRate(this, 1000, 1000);
_aiTask = ThreadPool.scheduleAtFixedRate(this, 1000, 1000);
}
}
@@ -23,7 +23,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
import java.util.concurrent.Future;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.geoengine.GeoEngine;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.L2Character;
@@ -294,7 +294,7 @@ public class L2SummonAI extends L2PlayableAI implements Runnable
{
if (_avoidTask == null)
{
_avoidTask = ThreadPoolManager.scheduleAtFixedRate(this, 100, 100);
_avoidTask = ThreadPool.scheduleAtFixedRate(this, 100, 100);
}
}
@@ -20,7 +20,7 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
/**
@@ -33,7 +33,7 @@ public class WarehouseCacheManager
protected WarehouseCacheManager()
{
ThreadPoolManager.scheduleAtFixedRate(new CacheScheduler(), 120000, 60000);
ThreadPool.scheduleAtFixedRate(new CacheScheduler(), 120000, 60000);
}
public void addCacheTask(L2PcInstance pc)
@@ -29,8 +29,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.communitybbs.Manager.ForumsBBSManager;
import com.l2jmobius.gameserver.idfactory.IdFactory;
import com.l2jmobius.gameserver.instancemanager.CHSiegeManager;
@@ -340,7 +340,7 @@ public class ClanTable
public void scheduleRemoveClan(int clanId)
{
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
if (getClan(clanId) == null)
{
@@ -36,8 +36,8 @@ import org.xml.sax.Attributes;
import org.xml.sax.helpers.DefaultHandler;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -422,11 +422,11 @@ public final class BotReportTable
c.set(Calendar.DAY_OF_YEAR, c.get(Calendar.DAY_OF_YEAR) + 1);
}
ThreadPoolManager.schedule(new ResetPointTask(), c.getTimeInMillis() - System.currentTimeMillis());
ThreadPool.schedule(new ResetPointTask(), c.getTimeInMillis() - System.currentTimeMillis());
}
catch (Exception e)
{
ThreadPoolManager.schedule(new ResetPointTask(), 24 * 3600 * 1000);
ThreadPool.schedule(new ResetPointTask(), 24 * 3600 * 1000);
LOGGER.log(Level.WARNING, "BotReportTable: Could not properly schedule bot report points reset task. Scheduled in 24 hours.", e);
}
}
@@ -29,8 +29,8 @@ import java.util.logging.LogRecord;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
import com.l2jmobius.gameserver.engines.DocumentEngine;
import com.l2jmobius.gameserver.enums.ItemLocation;
@@ -220,14 +220,14 @@ public class ItemTable
if ((raid.getFirstCommandChannelAttacked() != null) && !Config.AUTO_LOOT_RAIDS)
{
item.setOwnerId(raid.getFirstCommandChannelAttacked().getLeaderObjectId());
itemLootShedule = ThreadPoolManager.schedule(new ResetOwner(item), Config.LOOT_RAIDS_PRIVILEGE_INTERVAL);
itemLootShedule = ThreadPool.schedule(new ResetOwner(item), Config.LOOT_RAIDS_PRIVILEGE_INTERVAL);
item.setItemLootShedule(itemLootShedule);
}
}
else if (!Config.AUTO_LOOT || ((reference instanceof L2EventMonsterInstance) && ((L2EventMonsterInstance) reference).eventDropOnGround()))
{
item.setOwnerId(actor.getObjectId());
itemLootShedule = ThreadPoolManager.schedule(new ResetOwner(item), 15000);
itemLootShedule = ThreadPool.schedule(new ResetOwner(item), 15000);
item.setItemLootShedule(itemLootShedule);
}
}
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.idfactory;
import java.util.BitSet;
import java.util.concurrent.atomic.AtomicInteger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.util.PrimeFinder;
/**
@@ -53,7 +53,7 @@ public class BitSetIDFactory extends IdFactory
synchronized (BitSetIDFactory.class)
{
ThreadPoolManager.scheduleAtFixedRate(new BitSetCapacityCheck(), 30000, 30000);
ThreadPool.scheduleAtFixedRate(new BitSetCapacityCheck(), 30000, 30000);
initialize();
}
_log.info(getClass().getSimpleName() + ": " + _freeIds.size() + " id's available.");
@@ -35,8 +35,8 @@ import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.enums.ManorMode;
import com.l2jmobius.gameserver.model.CropProcure;
import com.l2jmobius.gameserver.model.L2Clan;
@@ -101,7 +101,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
// Schedule autosave
if (!Config.ALT_MANOR_SAVE_ALL_ACTIONS)
{
ThreadPoolManager.scheduleAtFixedRate(this::storeMe, Config.ALT_MANOR_SAVE_PERIOD_RATE * 60 * 60 * 1000, Config.ALT_MANOR_SAVE_PERIOD_RATE * 60 * 60 * 1000);
ThreadPool.scheduleAtFixedRate(this::storeMe, Config.ALT_MANOR_SAVE_PERIOD_RATE * 60 * 60 * 1000, Config.ALT_MANOR_SAVE_PERIOD_RATE * 60 * 60 * 1000);
}
}
else
@@ -272,7 +272,7 @@ public final class CastleManorManager implements IXmlReader, IStorable
}
}
// Schedule mode change
ThreadPoolManager.schedule(this::changeMode, _nextModeChange.getTimeInMillis() - System.currentTimeMillis());
ThreadPool.schedule(this::changeMode, _nextModeChange.getTimeInMillis() - System.currentTimeMillis());
}
public final void changeMode()
@@ -27,8 +27,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.datatables.ItemTable;
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -79,7 +79,7 @@ public class FishingChampionshipManager
}
else
{
ThreadPoolManager.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
ThreadPool.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
}
}
@@ -305,7 +305,7 @@ public class FishingChampionshipManager
pl.sendPacket(html);
refreshResult();
ThreadPoolManager.schedule(new needRefresh(), 60000);
ThreadPool.schedule(new needRefresh(), 60000);
return;
}
@@ -471,7 +471,7 @@ public class FishingChampionshipManager
shutdown();
_log.info("FishingChampionshipManager : new event period start.");
ThreadPoolManager.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
ThreadPool.schedule(new finishChamp(), _enddate - System.currentTimeMillis());
}
}
@@ -33,8 +33,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
import com.l2jmobius.gameserver.datatables.SpawnTable;
import com.l2jmobius.gameserver.instancemanager.tasks.FourSepulchersChangeAttackTimeTask;
@@ -204,25 +204,25 @@ public final class FourSepulchersManager
if ((currentTime >= _coolDownTimeEnd) && (currentTime < _entryTimeEnd)) // entry time check
{
clean();
_changeEntryTimeTask = ThreadPoolManager.schedule(new FourSepulchersChangeEntryTimeTask(), 0);
_changeEntryTimeTask = ThreadPool.schedule(new FourSepulchersChangeEntryTimeTask(), 0);
_log.info(getClass().getSimpleName() + ": Beginning in Entry time");
}
else if ((currentTime >= _entryTimeEnd) && (currentTime < _warmUpTimeEnd)) // warmup time check
{
clean();
_changeWarmUpTimeTask = ThreadPoolManager.schedule(new FourSepulchersChangeWarmUpTimeTask(), 0);
_changeWarmUpTimeTask = ThreadPool.schedule(new FourSepulchersChangeWarmUpTimeTask(), 0);
_log.info(getClass().getSimpleName() + ": Beginning in WarmUp time");
}
else if ((currentTime >= _warmUpTimeEnd) && (currentTime < _attackTimeEnd)) // attack time check
{
clean();
_changeAttackTimeTask = ThreadPoolManager.schedule(new FourSepulchersChangeAttackTimeTask(), 0);
_changeAttackTimeTask = ThreadPool.schedule(new FourSepulchersChangeAttackTimeTask(), 0);
_log.info(getClass().getSimpleName() + ": Beginning in Attack time");
}
else
// else cooldown time and without cleanup because it's already implemented
{
_changeCoolDownTimeTask = ThreadPoolManager.schedule(new FourSepulchersChangeCoolDownTimeTask(), 0);
_changeCoolDownTimeTask = ThreadPool.schedule(new FourSepulchersChangeCoolDownTimeTask(), 0);
_log.info(getClass().getSimpleName() + ": Beginning in Cooldown time");
}
}
@@ -31,8 +31,8 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
import com.l2jmobius.gameserver.instancemanager.tasks.GrandBossManagerStoreTask;
import com.l2jmobius.gameserver.model.L2Object;
@@ -109,7 +109,7 @@ public final class GrandBossManager implements IStorable
{
_log.log(Level.WARNING, "Error while initializing GrandBossManager: " + e.getMessage(), e);
}
ThreadPoolManager.scheduleAtFixedRate(new GrandBossManagerStoreTask(), 5 * 60 * 1000, 5 * 60 * 1000);
ThreadPool.scheduleAtFixedRate(new GrandBossManagerStoreTask(), 5 * 60 * 1000, 5 * 60 * 1000);
}
/**
@@ -23,7 +23,7 @@ import java.util.Map;
import java.util.Set;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.Team;
import com.l2jmobius.gameserver.instancemanager.tasks.PenaltyRemoveTask;
import com.l2jmobius.gameserver.model.ArenaParticipantsHolder;
@@ -86,7 +86,7 @@ public final class HandysBlockCheckerManager
{
holder.checkAndShuffle();
}
ThreadPoolManager.execute(holder.getEvent().new StartEvent());
ThreadPool.execute(holder.getEvent().new StartEvent());
}
else
{
@@ -345,7 +345,7 @@ public final class HandysBlockCheckerManager
private void schedulePenaltyRemoval(int objId)
{
ThreadPoolManager.schedule(new PenaltyRemoveTask(objId), 10000);
ThreadPool.schedule(new PenaltyRemoveTask(objId), 10000);
}
/**
@@ -27,9 +27,9 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ItemsAutoDestroy;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
@@ -47,7 +47,7 @@ public final class ItemsOnGroundManager implements Runnable
{
if (Config.SAVE_DROPPED_ITEM_INTERVAL > 0)
{
ThreadPoolManager.scheduleAtFixedRate(this, Config.SAVE_DROPPED_ITEM_INTERVAL, Config.SAVE_DROPPED_ITEM_INTERVAL);
ThreadPool.scheduleAtFixedRate(this, Config.SAVE_DROPPED_ITEM_INTERVAL, Config.SAVE_DROPPED_ITEM_INTERVAL);
}
load();
}
@@ -29,8 +29,8 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.idfactory.IdFactory;
import com.l2jmobius.gameserver.instancemanager.tasks.MessageDeletionTask;
import com.l2jmobius.gameserver.model.L2World;
@@ -72,11 +72,11 @@ public final class MailManager
if (expiration < System.currentTimeMillis())
{
ThreadPoolManager.schedule(new MessageDeletionTask(msgId), 10000);
ThreadPool.schedule(new MessageDeletionTask(msgId), 10000);
}
else
{
ThreadPoolManager.schedule(new MessageDeletionTask(msgId), expiration - System.currentTimeMillis());
ThreadPool.schedule(new MessageDeletionTask(msgId), expiration - System.currentTimeMillis());
}
}
}
@@ -181,7 +181,7 @@ public final class MailManager
receiver.sendPacket(ExNoticePostArrived.valueOf(true));
}
ThreadPoolManager.schedule(new MessageDeletionTask(msg.getId()), msg.getExpiration() - System.currentTimeMillis());
ThreadPool.schedule(new MessageDeletionTask(msg.getId()), msg.getExpiration() - System.currentTimeMillis());
}
public final void markAsReadInDb(int msgId)
@@ -26,8 +26,8 @@ import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.Containers;
@@ -109,7 +109,7 @@ public class PremiumManager
*/
private void startExpireTask(L2PcInstance player, long delay)
{
ScheduledFuture<?> task = ThreadPoolManager.schedule(new PremiumExpireTask(player), delay);
ScheduledFuture<?> task = ThreadPool.schedule(new PremiumExpireTask(player), delay);
expiretasks.put(player.getAccountName(), task);
}
@@ -29,8 +29,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.datatables.SpawnTable;
import com.l2jmobius.gameserver.model.L2Spawn;
import com.l2jmobius.gameserver.model.StatsSet;
@@ -186,7 +186,7 @@ public class RaidBossSpawnManager
time.setTimeInMillis(respawnTime);
_log.info(getClass().getSimpleName() + ": Updated " + boss.getName() + " respawn time to " + time.getTime());
_schedules.put(boss.getId(), ThreadPoolManager.schedule(new SpawnSchedule(boss.getId()), respawnDelay));
_schedules.put(boss.getId(), ThreadPool.schedule(new SpawnSchedule(boss.getId()), respawnDelay));
updateDb();
}
}
@@ -242,7 +242,7 @@ public class RaidBossSpawnManager
}
else
{
_schedules.put(bossId, ThreadPoolManager.schedule(new SpawnSchedule(bossId), respawnTime - Calendar.getInstance().getTimeInMillis()));
_schedules.put(bossId, ThreadPool.schedule(new SpawnSchedule(bossId), respawnTime - Calendar.getInstance().getTimeInMillis()));
}
_spawns.put(bossId, spawnDat);
@@ -21,8 +21,8 @@ import java.util.Calendar;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.ThreadPoolManager;
/**
* @author Gigi
@@ -71,7 +71,7 @@ public class ServerRestartManager
if (lastRestart != null)
{
nextRestartTime = new SimpleDateFormat("HH:mm").format(lastRestart.getTime());
ThreadPoolManager.schedule(new ServerRestartTask(), lastDelay - (Config.SERVER_RESTART_SCHEDULE_COUNTDOWN * 1000));
ThreadPool.schedule(new ServerRestartTask(), lastDelay - (Config.SERVER_RESTART_SCHEDULE_COUNTDOWN * 1000));
_log.info("Scheduled server restart at " + lastRestart.getTime() + ".");
}
}
@@ -20,7 +20,7 @@ import java.util.Calendar;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.instancemanager.tasks.UpdateSoDStateTask;
import com.l2jmobius.gameserver.model.quest.Quest;
@@ -113,7 +113,7 @@ public final class SoDManager
}
else
{
ThreadPoolManager.schedule(new UpdateSoDStateTask(), Config.SOD_STAGE_2_LENGTH - timePast);
ThreadPool.schedule(new UpdateSoDStateTask(), Config.SOD_STAGE_2_LENGTH - timePast);
}
break;
}
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.instancemanager;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -116,7 +116,7 @@ public class SoIManager
spawnOpenedSeed();
DoorData.getInstance().getDoor(14240102).openMe();
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
closeSeed();
setCurrentStage(4);
@@ -32,8 +32,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.sql.impl.ClanTable;
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
import com.l2jmobius.gameserver.datatables.SkillData;
@@ -275,7 +275,7 @@ public final class TerritoryWarManager implements Siegable
{
_scheduledEndTWTask.cancel(false);
}
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), 1000);
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), 1000);
}
else
{
@@ -283,7 +283,7 @@ public final class TerritoryWarManager implements Siegable
{
_scheduledStartTWTask.cancel(false);
}
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), 1000);
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), 1000);
}
}
@@ -1267,14 +1267,14 @@ public final class TerritoryWarManager implements Siegable
if (timeRemaining > 7200000)
{
_isRegistrationOver = false;
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 7200000); // Prepare task for 2h before TW start to end registration
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 7200000); // Prepare task for 2h before TW start to end registration
}
else if ((timeRemaining <= 7200000) && (timeRemaining > 1200000))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_REQUEST_PERIOD_HAS_ENDED);
Broadcast.toAllOnlinePlayers(sm);
_isRegistrationOver = true;
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 1200000); // Prepare task for 20 mins left before TW start.
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 1200000); // Prepare task for 20 mins left before TW start.
}
else if ((timeRemaining <= 1200000) && (timeRemaining > 600000))
{
@@ -1283,7 +1283,7 @@ public final class TerritoryWarManager implements Siegable
_isTWChannelOpen = true;
_isRegistrationOver = true;
updatePlayerTWStateFlags(false);
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 600000); // Prepare task for 10 mins left before TW start.
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 600000); // Prepare task for 10 mins left before TW start.
}
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
{
@@ -1292,7 +1292,7 @@ public final class TerritoryWarManager implements Siegable
_isTWChannelOpen = true;
_isRegistrationOver = true;
updatePlayerTWStateFlags(false);
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 300000); // Prepare task for 5 mins left before TW start.
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 300000); // Prepare task for 5 mins left before TW start.
}
else if ((timeRemaining <= 300000) && (timeRemaining > 60000))
{
@@ -1301,7 +1301,7 @@ public final class TerritoryWarManager implements Siegable
_isTWChannelOpen = true;
_isRegistrationOver = true;
updatePlayerTWStateFlags(false);
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining - 60000); // Prepare task for 1 min left before TW start.
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining - 60000); // Prepare task for 1 min left before TW start.
}
else if ((timeRemaining <= 60000) && (timeRemaining > 0))
{
@@ -1310,15 +1310,15 @@ public final class TerritoryWarManager implements Siegable
_isTWChannelOpen = true;
_isRegistrationOver = true;
updatePlayerTWStateFlags(false);
_scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), timeRemaining); // Prepare task for TW start.
_scheduledStartTWTask = ThreadPool.schedule(new ScheduleStartTWTask(), timeRemaining); // Prepare task for TW start.
}
else if ((timeRemaining + WARLENGTH) > 0)
{
_isTWChannelOpen = true;
_isRegistrationOver = true;
startTerritoryWar();
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), 1000); // Prepare task for TW end.
_scheduledRewardOnlineTask = ThreadPoolManager.scheduleAtFixedRate(new RewardOnlineParticipants(), 60000, 60000);
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), 1000); // Prepare task for TW end.
_scheduledRewardOnlineTask = ThreadPool.scheduleAtFixedRate(new RewardOnlineParticipants(), 60000, 60000);
}
}
catch (Exception e)
@@ -1348,41 +1348,41 @@ public final class TerritoryWarManager implements Siegable
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_WILL_END_IN_S1_HOUR_S);
sm.addInt(2);
announceToParticipants(sm, 0, 0);
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining - 3600000); // Prepare task for 1 hr left.
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining - 3600000); // Prepare task for 1 hr left.
}
else if ((timeRemaining <= 3600000) && (timeRemaining > 600000))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_WILL_END_IN_S1_MINUTE_S);
sm.addInt((int) (timeRemaining / 60000));
announceToParticipants(sm, 0, 0);
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining - 600000); // Prepare task for 10 minute left.
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining - 600000); // Prepare task for 10 minute left.
}
else if ((timeRemaining <= 600000) && (timeRemaining > 300000))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_WILL_END_IN_S1_MINUTE_S);
sm.addInt((int) (timeRemaining / 60000));
announceToParticipants(sm, 0, 0);
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining - 300000); // Prepare task for 5 minute left.
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining - 300000); // Prepare task for 5 minute left.
}
else if ((timeRemaining <= 300000) && (timeRemaining > 10000))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_TERRITORY_WAR_WILL_END_IN_S1_MINUTE_S);
sm.addInt((int) (timeRemaining / 60000));
announceToParticipants(sm, 0, 0);
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining - 10000); // Prepare task for 10 seconds count down
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining - 10000); // Prepare task for 10 seconds count down
}
else if ((timeRemaining <= 10000) && (timeRemaining > 0))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SECOND_S_TO_THE_END_OF_TERRITORY_WAR);
sm.addInt((int) (timeRemaining / 1000));
announceToParticipants(sm, 0, 0);
_scheduledEndTWTask = ThreadPoolManager.schedule(new ScheduleEndTWTask(), timeRemaining); // Prepare task for second count down
_scheduledEndTWTask = ThreadPool.schedule(new ScheduleEndTWTask(), timeRemaining); // Prepare task for second count down
}
else
{
endTerritoryWar();
// _scheduledStartTWTask = ThreadPoolManager.schedule(new ScheduleStartTWTask(), 1000);
ThreadPoolManager.schedule(new closeTerritoryChannelTask(), 600000);
ThreadPool.schedule(new closeTerritoryChannelTask(), 600000);
}
}
catch (Exception e)
@@ -25,7 +25,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.tasks.StartMovingTask;
@@ -269,7 +269,7 @@ public final class WalkingManager implements IXmlReader
npc.setWalking();
}
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, node);
walk.setWalkCheckTask(ThreadPoolManager.scheduleAtFixedRate(new StartMovingTask(npc, routeName), 60000, 60000)); // start walk check task, for resuming walk after fight
walk.setWalkCheckTask(ThreadPool.scheduleAtFixedRate(new StartMovingTask(npc, routeName), 60000, 60000)); // start walk check task, for resuming walk after fight
npc.getKnownList().startTrackingTask();
@@ -277,7 +277,7 @@ public final class WalkingManager implements IXmlReader
}
else
{
ThreadPoolManager.schedule(new StartMovingTask(npc, routeName), 60000);
ThreadPool.schedule(new StartMovingTask(npc, routeName), 60000);
}
}
// walk was stopped due to some reason (arrived to node, script action, fight or something else), resume it
@@ -414,7 +414,7 @@ public final class WalkingManager implements IXmlReader
npc.broadcastSay(ChatType.NPC_GENERAL, node.getChatText());
}
ThreadPoolManager.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
ThreadPool.schedule(new ArrivedTask(npc, walk), 100 + (node.getDelay() * 1000L));
}
/**
@@ -26,8 +26,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@@ -152,12 +152,12 @@ public class Lottery
if (_enddate > System.currentTimeMillis())
{
_isStarted = true;
ThreadPoolManager.schedule(new finishLottery(), _enddate - System.currentTimeMillis());
ThreadPool.schedule(new finishLottery(), _enddate - System.currentTimeMillis());
if (_enddate > (System.currentTimeMillis() + (12 * MINUTE)))
{
_isSellingTickets = true;
ThreadPoolManager.schedule(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE));
ThreadPool.schedule(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE));
}
return;
}
@@ -191,8 +191,8 @@ public class Lottery
_enddate = finishtime.getTimeInMillis();
}
ThreadPoolManager.schedule(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE));
ThreadPoolManager.schedule(new finishLottery(), _enddate - System.currentTimeMillis());
ThreadPool.schedule(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE));
ThreadPool.schedule(new finishLottery(), _enddate - System.currentTimeMillis());
try (Connection con = DatabaseFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement(INSERT_LOTTERY))
@@ -400,7 +400,7 @@ public class Lottery
_log.log(Level.WARNING, "Lottery: Could not store finished lottery data: " + e.getMessage(), e);
}
ThreadPoolManager.schedule(new startLottery(), MINUTE);
ThreadPool.schedule(new startLottery(), MINUTE);
_number++;
_isStarted = false;
@@ -20,7 +20,7 @@ import java.util.Calendar;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
/**
@@ -61,14 +61,14 @@ public final class FourSepulchersChangeAttackTimeTask implements Runnable
{
final Calendar inter = Calendar.getInstance();
inter.set(Calendar.MINUTE, (int) min);
ThreadPoolManager.schedule(new FourSepulchersManagerSayTask(), inter.getTimeInMillis() - Calendar.getInstance().getTimeInMillis());
ThreadPool.schedule(new FourSepulchersManagerSayTask(), inter.getTimeInMillis() - Calendar.getInstance().getTimeInMillis());
break;
}
}
}
else
{
ThreadPoolManager.schedule(new FourSepulchersManagerSayTask(), 5 * 60400);
ThreadPool.schedule(new FourSepulchersManagerSayTask(), 5 * 60400);
}
// searching time when attack time will be ended:
// counting difference between time when attack time ends and
@@ -83,7 +83,7 @@ public final class FourSepulchersChangeAttackTimeTask implements Runnable
interval = Config.FS_TIME_ATTACK * 60000L;
}
manager.setChangeCoolDownTimeTask(ThreadPoolManager.schedule(new FourSepulchersChangeCoolDownTimeTask(), interval));
manager.setChangeCoolDownTimeTask(ThreadPool.schedule(new FourSepulchersChangeCoolDownTimeTask(), interval));
final ScheduledFuture<?> changeAttackTimeTask = manager.getChangeAttackTimeTask();
if (changeAttackTimeTask != null)
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.instancemanager.tasks;
import java.util.Calendar;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
/**
@@ -54,7 +54,7 @@ public final class FourSepulchersChangeCoolDownTimeTask implements Runnable
final long interval = time.getTimeInMillis() - Calendar.getInstance().getTimeInMillis();
manager.setChangeEntryTimeTask(ThreadPoolManager.schedule(new FourSepulchersChangeEntryTimeTask(), interval));
manager.setChangeEntryTimeTask(ThreadPool.schedule(new FourSepulchersChangeEntryTimeTask(), interval));
final ScheduledFuture<?> changeCoolDownTimeTask = manager.getChangeCoolDownTimeTask();
if (changeCoolDownTimeTask != null)
@@ -20,7 +20,7 @@ import java.util.Calendar;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
/**
@@ -40,8 +40,8 @@ public final class FourSepulchersChangeEntryTimeTask implements Runnable
final long interval = manager.isFirstTimeRun() ? manager.getEntrytTimeEnd() - Calendar.getInstance().getTimeInMillis() : Config.FS_TIME_ENTRY * 60000L;
// launching saying process...
ThreadPoolManager.schedule(new FourSepulchersManagerSayTask(), 0);
manager.setChangeWarmUpTimeTask(ThreadPoolManager.schedule(new FourSepulchersChangeWarmUpTimeTask(), interval));
ThreadPool.schedule(new FourSepulchersManagerSayTask(), 0);
manager.setChangeWarmUpTimeTask(ThreadPool.schedule(new FourSepulchersChangeWarmUpTimeTask(), interval));
final ScheduledFuture<?> changeEntryTimeTask = manager.getChangeEntryTimeTask();
if (changeEntryTimeTask != null)
@@ -20,7 +20,7 @@ import java.util.Calendar;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
/**
@@ -39,7 +39,7 @@ public final class FourSepulchersChangeWarmUpTimeTask implements Runnable
manager.setIsCoolDownTime(false);
final long interval = manager.isFirstTimeRun() ? manager.getWarmUpTimeEnd() - Calendar.getInstance().getTimeInMillis() : Config.FS_TIME_WARMUP * 60000L;
manager.setChangeAttackTimeTask(ThreadPoolManager.schedule(new FourSepulchersChangeAttackTimeTask(), interval));
manager.setChangeAttackTimeTask(ThreadPool.schedule(new FourSepulchersChangeAttackTimeTask(), interval));
final ScheduledFuture<?> changeWarmUpTimeTask = manager.getChangeWarmUpTimeTask();
if (changeWarmUpTimeTask != null)
@@ -19,7 +19,7 @@ package com.l2jmobius.gameserver.instancemanager.tasks;
import java.util.Calendar;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.instancemanager.FourSepulchersManager;
/**
@@ -43,7 +43,7 @@ public final class FourSepulchersManagerSayTask implements Runnable
// cannot be
// more than
// 59
ThreadPoolManager.schedule(new FourSepulchersManagerSayTask(), 5 * 60000);
ThreadPool.schedule(new FourSepulchersManagerSayTask(), 5 * 60000);
}
// attack time ending chat
else if ((tmp.get(Calendar.MINUTE) + 5) >= Config.FS_TIME_ATTACK)
@@ -34,8 +34,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.datatables.SpawnTable;
import com.l2jmobius.gameserver.idfactory.IdFactory;
import com.l2jmobius.gameserver.instancemanager.MapRegionManager;
@@ -274,7 +274,7 @@ public class AutoSpawnHandler
if (isActive)
{
final AutoSpawner rs = new AutoSpawner(objectId);
spawnTask = spawnInst._desDelay > 0 ? ThreadPoolManager.scheduleAtFixedRate(rs, spawnInst._initDelay, spawnInst._resDelay) : ThreadPoolManager.schedule(rs, spawnInst._initDelay);
spawnTask = spawnInst._desDelay > 0 ? ThreadPool.scheduleAtFixedRate(rs, spawnInst._initDelay, spawnInst._resDelay) : ThreadPool.schedule(rs, spawnInst._initDelay);
_runningSpawns.put(objectId, spawnTask);
}
else
@@ -285,7 +285,7 @@ public class AutoSpawnHandler
{
spawnTask.cancel(false);
}
ThreadPoolManager.schedule(rd, 0);
ThreadPool.schedule(rd, 0);
}
spawnInst.setSpawnActive(isActive);
}
@@ -489,7 +489,7 @@ public class AutoSpawnHandler
// If there is no despawn time, do not create a despawn task.
if (spawnInst.getDespawnDelay() > 0)
{
ThreadPoolManager.schedule(new AutoDespawner(_objectId), spawnInst.getDespawnDelay() - 1000);
ThreadPool.schedule(new AutoDespawner(_objectId), spawnInst.getDespawnDelay() - 1000);
}
}
catch (Exception e)
@@ -33,7 +33,7 @@ import java.util.function.Function;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Summon;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
@@ -1308,7 +1308,7 @@ public final class CharEffectList
return;
}
// Schedule the icon update packets 500miliseconds ahead, so it can gather-up most of the changes.
_effectIconsUpdate = ThreadPoolManager.schedule(() ->
_effectIconsUpdate = ThreadPool.schedule(() ->
{
AbnormalStatusUpdate asu = null;
PartySpelled ps = null;
@@ -24,8 +24,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.commons.database.DatabaseFactory;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.data.xml.impl.TransformData;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
@@ -352,7 +352,7 @@ public class CursedWeapon implements INamable
{
_player.stopTransformation(true);
ThreadPoolManager.schedule(() -> TransformData.getInstance().transformPlayer(transformationId, _player), 500);
ThreadPool.schedule(() -> TransformData.getInstance().transformPlayer(transformationId, _player), 500);
}
else
{
@@ -378,7 +378,7 @@ public class CursedWeapon implements INamable
}
else
{
_removeTask = ThreadPoolManager.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
}
}
@@ -391,7 +391,7 @@ public class CursedWeapon implements INamable
// Start the Life Task
_endTime = System.currentTimeMillis() + (_duration * 60000L);
_removeTask = ThreadPoolManager.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
_removeTask = ThreadPool.scheduleAtFixedRate(new RemoveTask(), _durationLost * 12000L, _durationLost * 12000L);
return true;
}
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model;
import java.util.concurrent.ScheduledFuture;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
@@ -84,6 +84,6 @@ public class DropProtection implements Runnable
throw new NullPointerException("Trying to protect dropped item to null owner");
}
_task = ThreadPoolManager.schedule(this, PROTECTED_MILLIS_TIME);
_task = ThreadPool.schedule(this, PROTECTED_MILLIS_TIME);
}
}
@@ -28,9 +28,9 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.SevenSignsFestival;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.datatables.ItemTable;
import com.l2jmobius.gameserver.enums.PartyDistributionType;
import com.l2jmobius.gameserver.instancemanager.DuelManager;
@@ -359,7 +359,7 @@ public class L2Party extends AbstractPlayerGroup
if (_positionBroadcastTask == null)
{
_positionBroadcastTask = ThreadPoolManager.scheduleAtFixedRate(() ->
_positionBroadcastTask = ThreadPool.scheduleAtFixedRate(() ->
{
if (_positionPacket == null)
{
@@ -993,7 +993,7 @@ public class L2Party extends AbstractPlayerGroup
}
_changeRequestDistributionType = partyDistributionType;
_changeDistributionTypeAnswers = new HashSet<>();
_changeDistributionTypeRequestTask = ThreadPoolManager.schedule(() -> finishLootRequest(false), PARTY_DISTRIBUTION_TYPE_REQUEST_TIMEOUT.toMillis());
_changeDistributionTypeRequestTask = ThreadPool.schedule(() -> finishLootRequest(false), PARTY_DISTRIBUTION_TYPE_REQUEST_TIMEOUT.toMillis());
broadcastToPartyMembers(getLeader(), new ExAskModifyPartyLooting(getLeader().getName(), partyDistributionType));
@@ -16,7 +16,7 @@
*/
package com.l2jmobius.gameserver.model;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.clientpackets.L2GameClientPacket;
@@ -123,7 +123,7 @@ public class L2Request
{
_isRequestor = isRequestor;
_isAnswerer = !isRequestor;
ThreadPoolManager.schedule(() -> clear(), REQUEST_TIMEOUT * 1000);
ThreadPool.schedule(() -> clear(), REQUEST_TIMEOUT * 1000);
}
/**
@@ -27,7 +27,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.data.sql.impl.TerritoryTable;
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
import com.l2jmobius.gameserver.datatables.NpcPersonalAIData;
@@ -441,7 +441,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
_scheduledCount++;
// Create a new SpawnTask to launch after the respawn Delay
ThreadPoolManager.schedule(new SpawnTask(), hasRespawnRandom() ? Rnd.get(_respawnMinDelay, _respawnMaxDelay) : _respawnMinDelay);
ThreadPool.schedule(new SpawnTask(), hasRespawnRandom() ? Rnd.get(_respawnMinDelay, _respawnMaxDelay) : _respawnMinDelay);
}
}
@@ -24,7 +24,7 @@ import java.util.concurrent.ScheduledFuture;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.datatables.SpawnTable;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
@@ -330,7 +330,7 @@ public final class L2WorldRegion
}
// then, set a timer to activate the neighbors
_neighborsTask = ThreadPoolManager.schedule(new NeighborsTask(true), 1000 * Config.GRID_NEIGHBOR_TURNON_TIME);
_neighborsTask = ThreadPool.schedule(new NeighborsTask(true), 1000 * Config.GRID_NEIGHBOR_TURNON_TIME);
}
}
@@ -350,7 +350,7 @@ public final class L2WorldRegion
// start a timer to "suggest" a deactivate to self and neighbors.
// suggest means: first check if a neighbor has L2PcInstances in it. If not, deactivate.
_neighborsTask = ThreadPoolManager.schedule(new NeighborsTask(false), 1000 * Config.GRID_NEIGHBOR_TURNOFF_TIME);
_neighborsTask = ThreadPool.schedule(new NeighborsTask(false), 1000 * Config.GRID_NEIGHBOR_TURNOFF_TIME);
}
}
@@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlEvent;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.ai.L2AttackableAI;
@@ -257,7 +257,7 @@ public class L2Attackable extends L2Npc
{
_commandChannelTimer = new CommandChannelTimer(this);
_commandChannelLastAttack = System.currentTimeMillis();
ThreadPoolManager.schedule(_commandChannelTimer, 10000); // check for last attack
ThreadPool.schedule(_commandChannelTimer, 10000); // check for last attack
_firstCommandChannelAttacked.broadcastPacket(new CreatureSay(0, ChatType.PARTYROOM_ALL, "", "You have looting rights!")); // TODO: retail msg
}
}
@@ -35,8 +35,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ai.CtrlEvent;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.ai.L2AttackableAI;
@@ -802,7 +802,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (getCurrentMp() < mpConsume)
{
// If L2PcInstance doesn't have enough MP, stop the attack
ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), 1000);
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), 1000);
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
sendPacket(ActionFailed.STATIC_PACKET);
return false;
@@ -820,7 +820,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
else
{
// Cancel the action because the bow can't be re-use at this moment
ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), 1000);
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), 1000);
sendPacket(ActionFailed.STATIC_PACKET);
return false;
}
@@ -1084,7 +1084,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
// Notify AI with EVT_READY_TO_ACT
ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), timeAtk + reuse);
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT), timeAtk + reuse);
}
finally
{
@@ -1150,7 +1150,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
// Create a new hit task with Medium priority
ThreadPoolManager.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
ThreadPool.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
// Calculate and set the disable delay of the bow in function of the Attack Speed
_disableBowAttackEndTime = ((sAtk + reuse) / GameTimeController.MILLIS_IN_TICK) + GameTimeController.getInstance().getGameTicks();
@@ -1220,7 +1220,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
// Create a new hit task with Medium priority
ThreadPoolManager.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
ThreadPool.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
// Calculate and set the disable delay of the bow in function of the Attack Speed
_disableBowAttackEndTime = ((sAtk + reuse) / GameTimeController.MILLIS_IN_TICK) + GameTimeController.getInstance().getGameTicks();
@@ -1290,10 +1290,10 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
// Create a new hit task with Medium priority for hit 1
ThreadPoolManager.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk / 2);
ThreadPool.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk / 2);
// Create a new hit task with Medium priority for hit 2 with a higher delay
ThreadPoolManager.schedule(new HitTask(this, target, damage2, crit2, miss2, attack.hasSoulshot(), shld2), sAtk);
ThreadPool.schedule(new HitTask(this, target, damage2, crit2, miss2, attack.hasSoulshot(), shld2), sAtk);
// Add those hits to the Server-Client packet Attack
attack.addHit(target, damage1, miss1, crit1, shld1);
@@ -1470,7 +1470,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
// Create a new hit task with Medium priority
ThreadPoolManager.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
ThreadPool.schedule(new HitTask(this, target, damage1, crit1, miss1, attack.hasSoulshot(), shld1), sAtk);
// Add this hit to the Server-Client packet Attack
attack.addHit(target, damage1, miss1, crit1, shld1);
@@ -1741,7 +1741,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// queue herbs and potions
if (isCastingSimultaneouslyNow() && simultaneously)
{
ThreadPoolManager.schedule(() -> beginCast(skill, simultaneously, target, targets), 100);
ThreadPool.schedule(() -> beginCast(skill, simultaneously, target, targets), 100);
return;
}
@@ -1895,7 +1895,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Before start AI Cast Broadcast Fly Effect is Need
if (skill.getFlyType() != null)
{
ThreadPoolManager.schedule(new FlyToLocationTask(this, target, skill), 50);
ThreadPool.schedule(new FlyToLocationTask(this, target, skill), 50);
}
final MagicUseTask mut = new MagicUseTask(this, targets, skill, skillTime, simultaneously);
@@ -1925,7 +1925,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime)
// For client animation reasons (party buffs especially) 400 ms before!
_skillCast2 = ThreadPoolManager.schedule(mut, skillTime - 400);
_skillCast2 = ThreadPool.schedule(mut, skillTime - 400);
}
else
{
@@ -1938,7 +1938,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Create a task MagicUseTask to launch the MagicSkill at the end of the casting time (skillTime)
// For client animation reasons (party buffs especially) 400 ms before!
_skillCast = ThreadPoolManager.schedule(mut, skillTime - 400);
_skillCast = ThreadPool.schedule(mut, skillTime - 400);
}
}
else
@@ -4051,7 +4051,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
if (distFraction > 1)
{
ThreadPoolManager.execute(() ->
ThreadPool.execute(() ->
{
try
{
@@ -4502,7 +4502,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Create a task to notify the AI that L2Character arrives at a check point of the movement
if ((ticksToMove * GameTimeController.MILLIS_IN_TICK) > 3000)
{
ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
}
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive to destination by GameTimeController
}
@@ -4580,7 +4580,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Create a task to notify the AI that L2Character arrives at a check point of the movement
if ((ticksToMove * GameTimeController.MILLIS_IN_TICK) > 3000)
{
ThreadPoolManager.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
ThreadPool.schedule(new NotifyAITask(this, CtrlEvent.EVT_ARRIVED_REVALIDATE), 2000);
}
// the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
@@ -5432,7 +5432,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
else
{
_skillCast = ThreadPoolManager.schedule(mut, 400);
_skillCast = ThreadPool.schedule(mut, 400);
}
}
@@ -5561,11 +5561,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
if (mut.isSimultaneous())
{
_skillCast2 = ThreadPoolManager.schedule(mut, 0);
_skillCast2 = ThreadPool.schedule(mut, 0);
}
else
{
_skillCast = ThreadPoolManager.schedule(mut, 0);
_skillCast = ThreadPool.schedule(mut, 0);
}
}
}
@@ -5632,7 +5632,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// DON'T USE : Recursive call to useMagic() method
// currPlayer.useMagic(queuedSkill.getSkill(), queuedSkill.isCtrlPressed(), queuedSkill.isShiftPressed());
ThreadPoolManager.execute(new QueuedMagicUseTask(currPlayer, queuedSkill.getSkill(), queuedSkill.isCtrlPressed(), queuedSkill.isShiftPressed()));
ThreadPool.execute(new QueuedMagicUseTask(currPlayer, queuedSkill.getSkill(), queuedSkill.isCtrlPressed(), queuedSkill.isShiftPressed()));
}
}
@@ -26,10 +26,10 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ItemsAutoDestroy;
import com.l2jmobius.gameserver.SevenSigns;
import com.l2jmobius.gameserver.SevenSignsFestival;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.cache.HtmCache;
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
import com.l2jmobius.gameserver.datatables.ItemTable;
@@ -314,7 +314,7 @@ public class L2Npc extends L2Character
// Create a RandomAnimation Task that will be launched after the calculated delay
_rAniTask = new RandomAnimationTask(this);
ThreadPoolManager.schedule(_rAniTask, interval);
ThreadPool.schedule(_rAniTask, interval);
}
/**
@@ -1533,7 +1533,7 @@ public class L2Npc extends L2Character
public L2Npc scheduleDespawn(long delay)
{
ThreadPoolManager.schedule(() ->
ThreadPool.schedule(() ->
{
if (!isDecayed())
{
@@ -22,8 +22,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Level;
import com.l2jmobius.Config;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.GameTimeController;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.InstanceType;
import com.l2jmobius.gameserver.instancemanager.MapRegionManager;
@@ -92,7 +92,7 @@ public abstract class L2Vehicle extends L2Character
{
if (_engine != null)
{
ThreadPoolManager.schedule(_engine, delay);
ThreadPool.schedule(_engine, delay);
}
}
@@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.data.xml.impl.PetDataTable;
import com.l2jmobius.gameserver.datatables.SkillData;
@@ -187,7 +187,7 @@ public final class L2BabyPetInstance extends L2PetInstance
{
if ((_majorHeal != null) || (_buffs != null) || ((_recharge != null) && (_castTask == null) && !isDead()))
{
_castTask = ThreadPoolManager.scheduleAtFixedRate(new CastTask(this), 3000, 2000);
_castTask = ThreadPool.scheduleAtFixedRate(new CastTask(this), 3000, 2000);
}
}
@@ -18,7 +18,7 @@ package com.l2jmobius.gameserver.model.actor.instance;
import java.util.concurrent.Future;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.enums.InstanceType;
import com.l2jmobius.gameserver.idfactory.IdFactory;
import com.l2jmobius.gameserver.model.actor.stat.ControllableAirShipStat;
@@ -257,8 +257,8 @@ public class L2ControllableAirShipInstance extends L2AirShipInstance
public void onSpawn()
{
super.onSpawn();
_checkTask = ThreadPoolManager.scheduleAtFixedRate(new CheckTask(), 60000, 10000);
_consumeFuelTask = ThreadPoolManager.scheduleAtFixedRate(new ConsumeFuelTask(), 60000, 60000);
_checkTask = ThreadPool.scheduleAtFixedRate(new CheckTask(), 60000, 10000);
_consumeFuelTask = ThreadPool.scheduleAtFixedRate(new ConsumeFuelTask(), 60000, 60000);
}
@Override
@@ -330,7 +330,7 @@ public class L2ControllableAirShipInstance extends L2AirShipInstance
if (isVisible() && isEmpty() && !isInDock())
{
// deleteMe() can't be called from CheckTask because task should not cancel itself
ThreadPoolManager.execute(new DecayTask());
ThreadPool.execute(new DecayTask());
}
}
}
@@ -22,7 +22,7 @@ import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.commons.concurrent.ThreadPool;
import com.l2jmobius.gameserver.ai.CtrlEvent;
import com.l2jmobius.gameserver.datatables.SkillData;
import com.l2jmobius.gameserver.instancemanager.DuelManager;
@@ -181,7 +181,7 @@ public final class L2CubicInstance implements IIdentifiable
break;
}
}
_disappearTask = ThreadPoolManager.schedule(new CubicDisappear(this), cubicDuration * 1000); // disappear
_disappearTask = ThreadPool.schedule(new CubicDisappear(this), cubicDuration * 1000); // disappear
}
public synchronized void doAction()
@@ -208,12 +208,12 @@ public final class L2CubicInstance implements IIdentifiable
case SMART_CUBIC_EVATEMPLAR:
case SMART_CUBIC_SHILLIENTEMPLAR:
{
_actionTask = ThreadPoolManager.scheduleAtFixedRate(new CubicAction(this, _cubicSkillChance), 0, _cubicDelay);
_actionTask = ThreadPool.scheduleAtFixedRate(new CubicAction(this, _cubicSkillChance), 0, _cubicDelay);
break;
}
case LIFE_CUBIC:
{
_actionTask = ThreadPoolManager.scheduleAtFixedRate(new CubicHeal(this), 0, _cubicDelay);
_actionTask = ThreadPool.scheduleAtFixedRate(new CubicHeal(this), 0, _cubicDelay);
break;
}
}

Some files were not shown because too many files have changed in this diff Show More