Threadpool refactoring.
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
package ai.areas.DenOfDevil;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
@@ -127,7 +127,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.DEFEAT_KASHA_S_EYES_TO_LIFT_THE_GREAT_CURSE));
|
||||
}
|
||||
else if (skillLevel == 2)
|
||||
@@ -140,7 +140,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)
|
||||
{
|
||||
@@ -213,7 +213,7 @@ public final class DenOfEvil extends AbstractNpcAI
|
||||
final L2Npc npc = (L2Npc) character;
|
||||
if (CommonUtil.contains(EYE_IDS, npc.getId()))
|
||||
{
|
||||
ThreadPoolManager.schedule(new RespawnNewEye(npc.getLocation()), 15000);
|
||||
ThreadPool.schedule(new RespawnNewEye(npc.getLocation()), 15000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
@@ -129,7 +129,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;
|
||||
@@ -167,9 +167,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
package ai.areas.GainakUnderground;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
@@ -140,7 +140,7 @@ public final class GainakSiege extends AbstractNpcAI
|
||||
final L2SiegeZone zone = ZoneManager.getInstance().getZone(npc, L2SiegeZone.class);
|
||||
if ((zone != null) && (zone.getId() == 60019) && zone.isActive())
|
||||
{
|
||||
ThreadPoolManager.schedule(new RespawnNewAssassin(npc.getLocation()), 60000);
|
||||
ThreadPool.schedule(new RespawnNewAssassin(npc.getLocation()), 60000);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
@@ -27,8 +27,8 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.IGameXmlReader;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
@@ -256,7 +256,7 @@ public final class FourSepulchers extends AbstractNpcAI implements IGameXmlReade
|
||||
if ((doorInfo[0] == sepulcherId) && (doorInfo[1] == currentWave))
|
||||
{
|
||||
openDoor(doorInfo[2], 0);
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
closeDoor(doorInfo[2], 0);
|
||||
}, 15000);
|
||||
@@ -578,7 +578,7 @@ public final class FourSepulchers extends AbstractNpcAI implements IGameXmlReade
|
||||
showHtmlFile(player, npcId + "-OK.html", npc, null);
|
||||
|
||||
// Kick all players when/if time is over
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
ZoneManager.getInstance().getZoneById(MANAGER_ZONES.get(npcId)).oustAllPlayers();
|
||||
}, TIME_ATTACK * 60 * 1000);
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package ai.areas.Rune.AltarOfSacrifice;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -109,7 +109,7 @@ public class AltarOfSacrifice extends AbstractNpcAI
|
||||
|
||||
private void sendMessage(L2Npc npc, NpcStringId npcString, int delay)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
if (npc != null)
|
||||
{
|
||||
|
@@ -20,7 +20,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jmobius.gameserver.enums.CategoryType;
|
||||
@@ -340,7 +340,7 @@ public final class AwakeningMaster extends AbstractNpcAI
|
||||
player.sendSkillList();
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
player.sendPacket(ExShowUsm.AWAKENING_END);
|
||||
}, 10000);
|
||||
|
@@ -22,7 +22,7 @@ import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -174,7 +174,7 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
_templates.stream().forEach(t -> t.spawn(g -> String.valueOf(g.getName()).equalsIgnoreCase(zoneName.concat("_demonic")), null));
|
||||
zone.getPlayersInside().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 600, 0, NpcStringId.DEMONIC_SYSTEM_ACTIVATED)));
|
||||
currentInfo.setZoneStage(7);
|
||||
ThreadPoolManager.schedule(new changeZoneStage(zone), 600000); // 10min
|
||||
ThreadPool.schedule(new changeZoneStage(zone), 600000); // 10min
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -202,7 +202,7 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
if (currentInfo.getZoneStage() < 6)
|
||||
{
|
||||
currentInfo.setZoneStage(currentInfo.getZoneStage() + 1);
|
||||
ThreadPoolManager.schedule(new changeZoneStage(zone), 5000);
|
||||
ThreadPool.schedule(new changeZoneStage(zone), 5000);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -248,7 +248,7 @@ public class HarnakUndergroundRuinsZone extends AbstractNpcAI
|
||||
if (calcPoints >= 300)
|
||||
{
|
||||
calcPoints = 300;
|
||||
ThreadPoolManager.schedule(new changeZoneStage(currentZone.getKey()), 1000);
|
||||
ThreadPool.schedule(new changeZoneStage(currentZone.getKey()), 1000);
|
||||
}
|
||||
currentInfo.setCurrentPoint(calcPoints);
|
||||
for (L2PcInstance player : currentZone.getKey().getPlayersInside())
|
||||
|
@@ -21,8 +21,8 @@ import java.util.List;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
@@ -303,7 +303,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
}
|
||||
else if ((percent <= 75) && (_status == 1))
|
||||
{
|
||||
_bigVortexesTask = ThreadPoolManager.schedule(() -> spawnServitor(1, 300, _lindvior.getLocation(), NPC_ATTACKER_BIG_VORTEX), 1000);
|
||||
_bigVortexesTask = ThreadPool.schedule(() -> spawnServitor(1, 300, _lindvior.getLocation(), NPC_ATTACKER_BIG_VORTEX), 1000);
|
||||
for (Location loc : ATTACKER_SMALL_VORTEX_SPAWNS)
|
||||
{
|
||||
addSpawn(LINDVIOR_SERVITOR[1], loc, true);
|
||||
@@ -324,7 +324,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
{
|
||||
addSpawn(LINDVIOR_SERVITOR[2], loc, true);
|
||||
}
|
||||
_skillCastTask = ThreadPoolManager.scheduleAtFixedRate(() -> _lindvior.doCast(SKILL_REFLECT.getSkill()), 5000, 80000);
|
||||
_skillCastTask = ThreadPool.scheduleAtFixedRate(() -> _lindvior.doCast(SKILL_REFLECT.getSkill()), 5000, 80000);
|
||||
_status = 3;
|
||||
}
|
||||
else if ((percent <= 40) && (_status == 3))
|
||||
@@ -348,7 +348,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
}
|
||||
else if ((percent <= 35) && (_status == 4))
|
||||
{
|
||||
_smallVortexesTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
_smallVortexesTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
for (Location loc : ATTACKER_SMALL_VORTEX_SPAWNS)
|
||||
{
|
||||
@@ -372,14 +372,14 @@ public class Lindvior extends AbstractNpcAI
|
||||
_lindvior.deleteMe();
|
||||
_lindvior = (L2GrandBossInstance) addSpawn(LINDVIOR_RAID, _lindvior.getLocation(), false, 0, false);
|
||||
_lindvior.setCurrentHp(_lindvior.getMaxHp() * 0.2);
|
||||
_bigVortexesTask = ThreadPoolManager.schedule(() -> spawnServitor(1, 300, _lindvior.getLocation(), NPC_ATTACKER_BIG_VORTEX), 1000);
|
||||
_bigVortexesTask = ThreadPool.schedule(() -> spawnServitor(1, 300, _lindvior.getLocation(), NPC_ATTACKER_BIG_VORTEX), 1000);
|
||||
for (Location loc : ATTACKER_SMALL_VORTEX_SPAWNS)
|
||||
{
|
||||
addSpawn(NPC_ATTACKER_SMALL_VORTEX, loc, true);
|
||||
addSpawn(LINDVIOR_SERVITOR[4], loc, true);
|
||||
addSpawn(LINDVIOR_SERVITOR[3], loc, true);
|
||||
}
|
||||
_collapseTask = ThreadPoolManager.schedule(Lindvior.this::Clean, 600000);
|
||||
_collapseTask = ThreadPool.schedule(Lindvior.this::Clean, 600000);
|
||||
_status = 6;
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
@@ -580,7 +580,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
_guardSpawn.add(npc);
|
||||
}
|
||||
|
||||
_mobsSpawnTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
_mobsSpawnTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
for (Location loc : ATTACKER_GENERATOR_SPAWNS)
|
||||
{
|
||||
@@ -596,7 +596,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
}, 30000, 80000);
|
||||
|
||||
_dummyLindvior = addSpawn(LINDVIOR_CAMERA, 45259, -27115, -638, 41325, false, 0, false);
|
||||
_announceTask = ThreadPoolManager.scheduleAtFixedRate(() -> _zoneLair.getPlayersInside().forEach(player -> player.sendPacket(new ExShowScreenMessage(NpcStringId.YOU_MUST_ACTIVATE_THE_4_GENERATORS, ExShowScreenMessage.TOP_CENTER, 7000, true))), 10000, 20000);
|
||||
_announceTask = ThreadPool.scheduleAtFixedRate(() -> _zoneLair.getPlayersInside().forEach(player -> player.sendPacket(new ExShowScreenMessage(NpcStringId.YOU_MUST_ACTIVATE_THE_4_GENERATORS, ExShowScreenMessage.TOP_CENTER, 7000, true))), 10000, 20000);
|
||||
break;
|
||||
}
|
||||
case 2: // After activation of 4 generators, we wait to be charged
|
||||
@@ -621,7 +621,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
{
|
||||
guard.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ALL_4_GENERATORS_MUST_BE_ACTIVATED);
|
||||
});
|
||||
_announceProtect = ThreadPoolManager.scheduleAtFixedRate(() -> _zoneLair.getPlayersInside().forEach(p -> player.sendPacket(new ExShowScreenMessage(NpcStringId.PROTECT_THE_GENERATOR, ExShowScreenMessage.TOP_CENTER, 7000, true))), 10000, 18000);
|
||||
_announceProtect = ThreadPool.scheduleAtFixedRate(() -> _zoneLair.getPlayersInside().forEach(p -> player.sendPacket(new ExShowScreenMessage(NpcStringId.PROTECT_THE_GENERATOR, ExShowScreenMessage.TOP_CENTER, 7000, true))), 10000, 18000);
|
||||
_zoneLair.broadcastPacket(new SpecialCamera(_dummyLindvior, 3300, 200, 20, 11000, 10500, 0, 8, 1, 0, 0));
|
||||
_generatorSpawn.forEach(npc -> npc.sendInfo(player));
|
||||
startQuestTimer("show_movie", 13000, null, null);
|
||||
@@ -696,7 +696,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
_zoneLair.broadcastPacket(new SocialAction(_lindvior.getObjectId(), 1));
|
||||
_zoneLair.getPlayersInside().forEach(_lindvior::sendInfo);
|
||||
_zoneLair.broadcastPacket(new ExShowScreenMessage(NpcStringId.LINDVIOR_HAS_FALLEN_FROM_THE_SKY, ExShowScreenMessage.TOP_CENTER, 7000));
|
||||
_mobsSpawnTask = ThreadPoolManager.scheduleAtFixedRate(() -> spawnServitor(2, 1000, _lindvior.getLocation(), LINDVIOR_SERVITOR), 60000, 180000);
|
||||
_mobsSpawnTask = ThreadPool.scheduleAtFixedRate(() -> spawnServitor(2, 1000, _lindvior.getLocation(), LINDVIOR_SERVITOR), 60000, 180000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -749,12 +749,12 @@ public class Lindvior extends AbstractNpcAI
|
||||
_dummyLindvior.deleteMe();
|
||||
_lindvior2 = addSpawn(LINDVIOR_FAKE, CENTER_LOCATION, false, 0, false);
|
||||
_lindvior2.setTargetable(false);
|
||||
_announceTask = ThreadPoolManager.scheduleAtFixedRate(() -> _zoneLair.getPlayersInside().forEach(p -> p.sendPacket(new ExShowScreenMessage(NpcStringId.CHARGE_THE_CANNON_USING_THE_GENERATOR, ExShowScreenMessage.TOP_CENTER, 7000, true))), 40000, 20000);
|
||||
_announceTask = ThreadPool.scheduleAtFixedRate(() -> _zoneLair.getPlayersInside().forEach(p -> p.sendPacket(new ExShowScreenMessage(NpcStringId.CHARGE_THE_CANNON_USING_THE_GENERATOR, ExShowScreenMessage.TOP_CENTER, 7000, true))), 40000, 20000);
|
||||
break;
|
||||
}
|
||||
case "start_charge":
|
||||
{
|
||||
_skillCastTask = ThreadPoolManager.scheduleAtFixedRate(() -> _generatorSpawn.forEach(generators ->
|
||||
_skillCastTask = ThreadPool.scheduleAtFixedRate(() -> _generatorSpawn.forEach(generators ->
|
||||
{
|
||||
int index = generators.getScriptValue();
|
||||
if (!generators.isCastingNow() && (generators.getEffectList().getBuffInfoBySkillId(SKILL_RECHARGE_POSIBLE.getSkillId()) == null) && !hasFlag(_chargedMask, 1 << index))
|
||||
@@ -780,7 +780,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
});
|
||||
}
|
||||
}), 10000, 20000);
|
||||
_LynDracoTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
_LynDracoTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
for (Location loc : LYN_DRACO_SPAWNS)
|
||||
{
|
||||
@@ -830,7 +830,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
_mobsSpawnTask = null;
|
||||
}
|
||||
_zoneLair.getCharactersInside().stream().filter(L2Character::isNpc).forEach(mob -> mob.deleteMe());
|
||||
ThreadPoolManager.schedule(() -> npc.decayMe(), 10000);
|
||||
ThreadPool.schedule(() -> npc.decayMe(), 10000);
|
||||
_zoneLair.broadcastPacket(new OnEventTrigger(SECOND_STAGE_EVENT_TRIGGER, false));
|
||||
_zoneLair.broadcastPacket(new OnEventTrigger(FIRST_STAGE_EVENT_TRIGGER, true));
|
||||
_lionel.deleteMe();
|
||||
@@ -846,7 +846,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
{
|
||||
_zoneLair.broadcastPacket(new ExShowScreenMessage(NpcStringId.THE_GENERATOR_HAS_BEEN_DESTROYED, ExShowScreenMessage.TOP_CENTER, 5000, true));
|
||||
Clean();
|
||||
_collapseTask = ThreadPoolManager.schedule(() -> Fail(false), 20000);
|
||||
_collapseTask = ThreadPool.schedule(() -> Fail(false), 20000);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
@@ -882,7 +882,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
{
|
||||
if (zone.getPlayersInside().isEmpty())
|
||||
{
|
||||
_collapseTask = ThreadPoolManager.schedule(() -> Fail(true), 900000);
|
||||
_collapseTask = ThreadPool.schedule(() -> Fail(true), 900000);
|
||||
}
|
||||
}
|
||||
return super.onExitZone(character, zone);
|
||||
@@ -940,7 +940,7 @@ public class Lindvior extends AbstractNpcAI
|
||||
{
|
||||
if (_socialTask == null)
|
||||
{
|
||||
_socialTask = ThreadPoolManager.schedule(() -> nextStage(1), 3000);
|
||||
_socialTask = ThreadPool.schedule(() -> nextStage(1), 3000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
@@ -258,7 +258,7 @@ public final class QueenAnt extends AbstractNpcAI
|
||||
{
|
||||
((L2MonsterInstance) npc).getMinionList().spawnMinions(npc.getParameters().getMinionList("Privates"));
|
||||
}
|
||||
_task = ThreadPoolManager.scheduleAtFixedRate(new QueenAntTask(), 5 * 1000, 5 * 1000);
|
||||
_task = ThreadPool.scheduleAtFixedRate(new QueenAntTask(), 5 * 1000, 5 * 1000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -20,8 +20,8 @@ import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.Rnd;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.datatables.SpawnTable;
|
||||
import com.l2jmobius.gameserver.enums.Movie;
|
||||
@@ -429,7 +429,7 @@ public class Trasken extends AbstractNpcAI
|
||||
doom.setTarget(doom);
|
||||
doom.isCastingNow();
|
||||
doom.doCast(SKILL_1.getSkill());
|
||||
ThreadPoolManager.schedule(() -> doom.deleteMe(), 15000);
|
||||
ThreadPool.schedule(() -> doom.deleteMe(), 15000);
|
||||
}
|
||||
final double percent = ((npc.getCurrentHp() - damage) / npc.getMaxHp()) * 100.0;
|
||||
if ((percent <= 30) && (_statusZone == 4))
|
||||
@@ -616,7 +616,7 @@ public class Trasken extends AbstractNpcAI
|
||||
_zoneLair.getCharactersInside().stream().filter(L2Object::isMonster).forEach(cha -> ((L2MonsterInstance) cha).getSpawn().stopRespawn());
|
||||
_zoneLair2.getCharactersInside().stream().filter(L2Character::isNpc).forEach(mob -> mob.deleteMe());
|
||||
_zoneLair2.getCharactersInside().stream().filter(L2Object::isMonster).forEach(cha -> ((L2MonsterInstance) cha).getSpawn().stopRespawn());
|
||||
ThreadPoolManager.schedule(() -> npc.decayMe(), 10000);
|
||||
ThreadPool.schedule(() -> npc.decayMe(), 10000);
|
||||
cancelQuestTimer("finish", npc, null);
|
||||
|
||||
GrandBossManager.getInstance().setBossStatus(TRASKEN, DEAD);
|
||||
@@ -642,7 +642,7 @@ public class Trasken extends AbstractNpcAI
|
||||
final int[] spawn = Rnd_Spawn_Tail[Rnd.get(Rnd_Spawn_Tail.length)];
|
||||
if (SpawnTable.getInstance().getSpawns(TAIL_TRASKEN) == null)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
tie_trasken = addSpawn(TAIL_TRASKEN, spawn[0], spawn[1], spawn[2], 0, false, 0, true);
|
||||
tie_trasken.setCurrentHp(hp_tail);
|
||||
@@ -663,7 +663,7 @@ public class Trasken extends AbstractNpcAI
|
||||
final int[] spawn1 = Rnd_Spawn_Trasken[Rnd.get(Rnd_Spawn_Trasken.length)];
|
||||
if (SpawnTable.getInstance().getSpawns(TRASKEN) == null)
|
||||
{
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
trasken = addSpawn(TRASKEN, spawn1[0], spawn1[1], spawn1[2], 0, false, 0, true);
|
||||
trasken.doCast(SKILL_TRASKEN_UP.getSkill());
|
||||
@@ -774,7 +774,7 @@ public class Trasken extends AbstractNpcAI
|
||||
}
|
||||
final int time = 540000;
|
||||
zone.getPlayersInside().forEach(temp -> temp.sendPacket(new ExSendUIEvent(temp, false, false, 540, 0, NpcStringId.REMAINING_TIME)));
|
||||
_collapseTask = ThreadPoolManager.schedule(() -> Fail(true), time);
|
||||
_collapseTask = ThreadPool.schedule(() -> Fail(true), time);
|
||||
}
|
||||
return super.onEnterZone(character, zone);
|
||||
}
|
||||
@@ -784,7 +784,7 @@ public class Trasken extends AbstractNpcAI
|
||||
{
|
||||
if ((zone.getId() == ZONE_ID_HEART) && zone.getPlayersInside().isEmpty())
|
||||
{
|
||||
_collapseTask = ThreadPoolManager.schedule(() ->
|
||||
_collapseTask = ThreadPool.schedule(() ->
|
||||
{
|
||||
Fail(true);
|
||||
for (int info : eventTriggers)
|
||||
@@ -890,7 +890,7 @@ public class Trasken extends AbstractNpcAI
|
||||
character.getEffectList().stopSkillEffects(true, traskenBuff.getSkill());
|
||||
}
|
||||
}
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
character.broadcastPacket(new ExShowScreenMessage(NpcStringId.YOU_VE_EXCEEDED_THE_MAXIMUM_NUMBER_OF_PERSONNEL, 5, 24000, true));
|
||||
character.doCast(SKILL_TRASKEN_SLEEP.getSkill());
|
||||
|
@@ -20,8 +20,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.instancemanager.GraciaSeedsManager;
|
||||
@@ -721,7 +721,7 @@ public final 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))
|
||||
|
@@ -18,7 +18,7 @@ package ai.others.NpcBuffers;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -90,6 +90,6 @@ public class NpcBufferAI implements Runnable
|
||||
|
||||
_npc.doCast(skill);
|
||||
|
||||
ThreadPoolManager.schedule(this, skill.getReuseDelay());
|
||||
ThreadPool.schedule(this, skill.getReuseDelay());
|
||||
}
|
||||
}
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package ai.others.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;
|
||||
|
||||
@@ -53,7 +53,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);
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ package custom.events.Elpies;
|
||||
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.SpawnTable;
|
||||
import com.l2jmobius.gameserver.model.L2Spawn;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -112,7 +112,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();
|
||||
|
@@ -22,7 +22,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.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -138,7 +138,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;
|
||||
|
||||
@@ -181,7 +181,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
|
||||
|
@@ -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;
|
||||
@@ -107,7 +107,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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -137,7 +137,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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.data.xml.impl.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.data.xml.impl.SkillData;
|
||||
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
@@ -57,7 +57,7 @@ public class ClassChange extends AbstractEffect
|
||||
{
|
||||
final L2PcInstance player = effected.getActingPlayer();
|
||||
// TODO: FIX ME - Executing 1 second later otherwise interupted exception during storeCharBase()
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
final int activeClass = player.getClassId().getId();
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package handlers.playeractions;
|
||||
|
||||
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.NextAction;
|
||||
@@ -129,7 +129,7 @@ public final class SocialAction implements IPlayerActionHandler
|
||||
player.sendPacket(sm);
|
||||
if (!player.isProcessingRequest())
|
||||
{
|
||||
ThreadPoolManager.schedule(() -> scheduleDeny(player), 10000);
|
||||
ThreadPool.schedule(() -> scheduleDeny(player), 10000);
|
||||
player.blockRequest();
|
||||
}
|
||||
return;
|
||||
|
@@ -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;
|
||||
@@ -162,7 +162,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();
|
||||
@@ -198,7 +198,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();
|
||||
|
@@ -34,10 +34,10 @@ import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.GameServer;
|
||||
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.model.L2Object;
|
||||
@@ -199,7 +199,7 @@ public class Debug implements ITelnetCommand
|
||||
}
|
||||
|
||||
sb.append("\r\n## Thread Pool Manager Statistics ##\r\n");
|
||||
for (String line : ThreadPoolManager.getStats())
|
||||
for (String line : ThreadPool.getStats())
|
||||
{
|
||||
sb.append(line);
|
||||
sb.append("\r\n");
|
||||
|
@@ -17,7 +17,7 @@
|
||||
package handlers.telnethandlers.server;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
|
||||
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
@@ -44,7 +44,7 @@ public class Performance implements ITelnetCommand
|
||||
{
|
||||
// ThreadPoolManager.purge();
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
for (String line : ThreadPoolManager.getStats())
|
||||
for (String line : ThreadPool.getStats())
|
||||
{
|
||||
sb.append(line + Config.EOL);
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
package handlers.telnethandlers.server;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
|
||||
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
@@ -42,9 +42,9 @@ public class Purge implements ITelnetCommand
|
||||
@Override
|
||||
public String handle(ChannelHandlerContext ctx, String[] args)
|
||||
{
|
||||
ThreadPoolManager.purge();
|
||||
ThreadPool.purge();
|
||||
final StringBuilder sb = new StringBuilder("STATUS OF THREAD POOLS AFTER PURGE COMMAND:" + Config.EOL);
|
||||
for (String line : ThreadPoolManager.getStats())
|
||||
for (String line : ThreadPool.getStats())
|
||||
{
|
||||
sb.append(line + Config.EOL);
|
||||
}
|
||||
|
@@ -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,8 +23,8 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.QuestSound;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -202,7 +202,7 @@ public final class CastleDungeon extends AbstractInstance
|
||||
*/
|
||||
private void spawnRaid(Instance instance)
|
||||
{
|
||||
final ScheduledFuture<?> spawnTask = ThreadPoolManager.schedule(() ->
|
||||
final ScheduledFuture<?> spawnTask = ThreadPool.schedule(() ->
|
||||
{
|
||||
// Get template id of raid
|
||||
final int npcId;
|
||||
|
@@ -25,8 +25,8 @@ import java.util.logging.Level;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
@@ -111,7 +111,7 @@ public final class ChamberOfDelusion extends AbstractInstance
|
||||
changeRoom(instance);
|
||||
|
||||
// Start banish task
|
||||
final ScheduledFuture<?> banishTask = ThreadPoolManager.scheduleAtFixedRate(() ->
|
||||
final ScheduledFuture<?> banishTask = ThreadPool.scheduleAtFixedRate(() ->
|
||||
{
|
||||
if (instance.getRemainingTime() < 60000)
|
||||
{
|
||||
@@ -414,7 +414,7 @@ public final class ChamberOfDelusion extends AbstractInstance
|
||||
final long nextInterval = (bossRoom) ? 60000L : (ROOM_CHANGE_INTERVAL + getRandom(ROOM_CHANGE_RANDOM_TIME)) * 1000L;
|
||||
if (world.getRemainingTime() > nextInterval)
|
||||
{
|
||||
final ScheduledFuture<?> roomChangeTask = ThreadPoolManager.schedule(() ->
|
||||
final ScheduledFuture<?> roomChangeTask = ThreadPool.schedule(() ->
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -23,8 +23,8 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.QuestSound;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
@@ -225,7 +225,7 @@ public final class FortressDungeon extends AbstractInstance
|
||||
*/
|
||||
private void spawnRaid(Instance instance)
|
||||
{
|
||||
final ScheduledFuture<?> spawnTask = ThreadPoolManager.schedule(() ->
|
||||
final ScheduledFuture<?> spawnTask = ThreadPool.schedule(() ->
|
||||
{
|
||||
// Get template id of raid
|
||||
final int npcId;
|
||||
|
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
package quests.Q10292_SevenSignsGirlOfDoubt;
|
||||
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.QuestSound;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -168,7 +168,7 @@ public final class Q10292_SevenSignsGirlOfDoubt extends Quest
|
||||
creature1.setRandomWalking(true);
|
||||
final L2Npc creature2 = addSpawn(CREATURE_OF_THE_DUSK2, 89524, -238131, -9632, 56, false, 0, false, player.getInstanceId());
|
||||
creature2.setRandomWalking(true);
|
||||
ThreadPoolManager.schedule(() ->
|
||||
ThreadPool.schedule(() ->
|
||||
{
|
||||
creature1.deleteMe();
|
||||
creature2.deleteMe();
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package quests.Q10742_AFurryFriend;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import com.l2jmobius.gameserver.enums.Race;
|
||||
import com.l2jmobius.gameserver.instancemanager.WalkingManager;
|
||||
@@ -228,6 +228,6 @@ public final class Q10742_AFurryFriend extends Quest
|
||||
public void onRouteFinished(L2Npc npc)
|
||||
{
|
||||
WalkingManager.getInstance().cancelMoving(npc);
|
||||
ThreadPoolManager.schedule(() -> npc.deleteMe(), 1000);
|
||||
ThreadPool.schedule(() -> npc.deleteMe(), 1000);
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ package vehicles;
|
||||
import java.util.concurrent.Future;
|
||||
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.enums.Movie;
|
||||
import com.l2jmobius.gameserver.instancemanager.AirShipManager;
|
||||
@@ -291,11 +291,11 @@ public abstract class AirShipController extends AbstractNpcAI
|
||||
playMovie(_dockedShip.getPassengers(), _movie);
|
||||
}
|
||||
|
||||
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 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.L2World;
|
||||
@@ -251,7 +251,7 @@ public final class AirShipGludioGracia extends AbstractNpcAI implements Runnable
|
||||
{
|
||||
// _ship.teleToLocation(-167874, 256731, -509, 41035, false);
|
||||
_ship.setOustLoc(OUST_GRACIA);
|
||||
ThreadPoolManager.schedule(this, 5000);
|
||||
ThreadPool.schedule(this, 5000);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
@@ -264,7 +264,7 @@ public final class AirShipGludioGracia extends AbstractNpcAI 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:
|
||||
@@ -278,7 +278,7 @@ public final class AirShipGludioGracia extends AbstractNpcAI implements Runnable
|
||||
{
|
||||
// _ship.teleToLocation(-157261, 255664, 221, 64781, false);
|
||||
_ship.setOustLoc(OUST_GLUDIO);
|
||||
ThreadPoolManager.schedule(this, 5000);
|
||||
ThreadPool.schedule(this, 5000);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
@@ -291,7 +291,7 @@ public final class AirShipGludioGracia extends AbstractNpcAI 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;
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ package vehicles;
|
||||
|
||||
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;
|
||||
@@ -176,19 +176,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:
|
||||
@@ -198,25 +198,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:
|
||||
@@ -239,7 +239,7 @@ public class BoatGludinRune implements Runnable
|
||||
_shoutCount = 0;
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(this, 5000);
|
||||
ThreadPool.schedule(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(RUNE_DOCK);
|
||||
@@ -250,25 +250,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:
|
||||
@@ -278,25 +278,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:
|
||||
@@ -319,7 +319,7 @@ public class BoatGludinRune implements Runnable
|
||||
_shoutCount = 0;
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(this, 5000);
|
||||
ThreadPool.schedule(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(GLUDIN_DOCK);
|
||||
@@ -330,7 +330,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;
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ package vehicles;
|
||||
|
||||
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;
|
||||
@@ -119,19 +119,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:
|
||||
@@ -139,31 +139,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:
|
||||
@@ -174,7 +174,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;
|
||||
}
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ package vehicles;
|
||||
|
||||
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,7 +120,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:
|
||||
@@ -145,7 +145,7 @@ public class BoatRunePrimeval implements Runnable
|
||||
_shoutCount = 0;
|
||||
}
|
||||
|
||||
ThreadPoolManager.schedule(this, 5000);
|
||||
ThreadPool.schedule(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(RUNE_DOCK);
|
||||
@@ -155,7 +155,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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user